aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/old/3.3.5a/2012_01_08_00_world_version.sql (renamed from sql/updates/world/2012_01_08_00_world_version.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_01_world_sai.sql (renamed from sql/updates/world/2012_01_08_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_02_world_creature_template.sql (renamed from sql/updates/world/2012_01_08_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_03_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_08_03_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_04_world_quest_template.sql (renamed from sql/updates/world/2012_01_08_04_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_05_world_conditions.sql (renamed from sql/updates/world/2012_01_08_05_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_06_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_06_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_07_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_07_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_08_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_08_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_09_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_09_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_11_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_11_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_12_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_12_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_13_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_13_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_14_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_14_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_15_world_script_texts.sql (renamed from sql/updates/world/2012_01_08_15_world_script_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_16_world_misc.sql (renamed from sql/updates/world/2012_01_08_16_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_creature_addon.sql (renamed from sql/updates/world/2012_01_08_18_world_creature_addon.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_spell_linked_spell.sql (renamed from sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_waypoint_data.sql (renamed from sql/updates/world/2012_01_08_18_world_waypoint_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_waypoint_scripts.sql (renamed from sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_19_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_00_world_creature_text.sql (renamed from sql/updates/world/2012_01_09_00_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_09_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_01_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_01_world_creature_text.sql (renamed from sql/updates/world/2012_01_09_01_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_01_world_smart_scripts.sql (renamed from sql/updates/world/2012_01_09_01_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_00_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_00_world_disables.sql (renamed from sql/updates/world/2012_01_11_00_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_11_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_01_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_11_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_12_00_world_sai.sql (renamed from sql/updates/world/2012_01_12_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_00_world_creature.sql (renamed from sql/updates/world/2012_01_13_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_13_01_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_02_world_sai.sql (renamed from sql/updates/world/2012_01_13_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_13_03_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_04_world_creature_texts.sql (renamed from sql/updates/world/2012_01_13_04_world_creature_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_05_world_creature_texts.sql (renamed from sql/updates/world/2012_01_13_05_world_creature_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_06_world_creature_text.sql (renamed from sql/updates/world/2012_01_13_06_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_00_characters_lfg_data.sql (renamed from sql/updates/characters/2012_01_14_00_characters_lfg_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_00_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_14_00_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_01_world_npc_trainer.sql (renamed from sql/updates/world/2012_01_14_01_world_npc_trainer.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_02_world_spell_proc_event.sql (renamed from sql/updates/world/2012_01_14_02_world_spell_proc_event.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_03_world_trinity_string.sql (renamed from sql/updates/world/2012_01_14_03_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_15_00_world_loot_template.sql (renamed from sql/updates/world/2012_01_15_00_world_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_15_02_world_creature_template.sql (renamed from sql/updates/world/2012_01_15_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql (renamed from sql/updates/world/2012_01_15_03_world_item_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql (renamed from sql/updates/world/2012_01_16_00_world_stored_procedure.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_01_world_sai.sql (renamed from sql/updates/world/2012_01_16_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_02_world_sai.sql (renamed from sql/updates/world/2012_01_16_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_03_world_sai.sql (renamed from sql/updates/world/2012_01_16_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_04_world_sai.sql (renamed from sql/updates/world/2012_01_16_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_05_world_sai.sql (renamed from sql/updates/world/2012_01_16_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_06_world_sai.sql (renamed from sql/updates/world/2012_01_16_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_07_world_sai.sql (renamed from sql/updates/world/2012_01_16_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_08_world_sai.sql (renamed from sql/updates/world/2012_01_16_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_09_world_sai.sql (renamed from sql/updates/world/2012_01_16_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_17_00_world_misc.sql (renamed from sql/updates/world/2012_01_17_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_17_01_world_conditions.sql (renamed from sql/updates/world/2012_01_17_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_00_world_quest_template.sql (renamed from sql/updates/world/2012_01_19_00_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_01_world_sai.sql (renamed from sql/updates/world/2012_01_19_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_02_world_quest_template.sql (renamed from sql/updates/world/2012_01_19_02_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_03_world_sai.sql (renamed from sql/updates/world/2012_01_19_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_04_world_sai.sql (renamed from sql/updates/world/2012_01_19_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_05_world_sai.sql (renamed from sql/updates/world/2012_01_19_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_06_world_sai.sql (renamed from sql/updates/world/2012_01_19_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_07_world_sai.sql (renamed from sql/updates/world/2012_01_19_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_08_world_sai.sql (renamed from sql/updates/world/2012_01_19_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_00_world_creature.sql (renamed from sql/updates/world/2012_01_21_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_00_world_sai.sql (renamed from sql/updates/world/2012_01_21_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_01_world_npc_vendor.sql (renamed from sql/updates/world/2012_01_21_01_world_npc_vendor.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_02_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_00_world_command.sql (renamed from sql/updates/world/2012_01_22_00_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_00_world_sai.sql (renamed from sql/updates/world/2012_01_22_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_01_world_conditions.sql (renamed from sql/updates/world/2012_01_22_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_02_world_creature_addon.sql (renamed from sql/updates/world/2012_01_22_02_world_creature_addon.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_00_characters_character_queststatus_rewarded.sql (renamed from sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_00_world_game_event_seasonal_questrelation.sql (renamed from sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_00_world_sai.sql (renamed from sql/updates/world/2012_01_23_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_01_world_creature_script_names.sql (renamed from sql/updates/world/2012_01_23_01_world_creature_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_02_world_disables.sql (renamed from sql/updates/world/2012_01_23_02_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql (renamed from sql/updates/world/2012_01_23_04_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_05_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_23_05_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_06_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_07_world_creature_text.sql (renamed from sql/updates/world/2012_01_23_07_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_24_00_world_misc.sql (renamed from sql/updates/world/2012_01_24_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_24_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_24_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_26_00_world_sai.sql (renamed from sql/updates/world/2012_01_26_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql (renamed from sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_28_00_world_conditions.sql (renamed from sql/updates/world/2012_01_28_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_00_world_conditions.sql (renamed from sql/updates/world/2012_01_29_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_00_world_spell_dbc.sql (renamed from sql/updates/world/2012_01_29_00_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_01_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_02_world_spell_trigger_spell.sql (renamed from sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_03_world_misc.sql (renamed from sql/updates/world/2012_01_29_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_04_world_misc.sql (renamed from sql/updates/world/2012_01_29_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_00_world_conditions.sql (renamed from sql/updates/world/2012_01_30_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_01_world_conditions.sql (renamed from sql/updates/world/2012_01_30_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_30_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_01_30_02_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_03_world_creature_loot_template.sql (renamed from sql/updates/world/2012_01_30_03_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_05_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_31_01_world_misc.sql (renamed from sql/updates/world/2012_01_31_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_01_00_world_misc.sql (renamed from sql/updates/world/2012_02_01_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql (renamed from sql/updates/world/2012_02_02_00_world_item_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql (renamed from sql/updates/world/2012_02_03_00_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql (renamed from sql/updates/world/2012_02_03_01_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_creature.sql (renamed from sql/updates/world/2012_02_04_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql (renamed from sql/updates/world/2012_02_04_00_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql (renamed from sql/updates/world/2012_02_04_00_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_04_01_world_creature.sql (renamed from sql/updates/world/2012_02_04_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql (renamed from sql/updates/world/2012_02_05_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_00_world_misc.sql (renamed from sql/updates/world/2012_02_05_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_01_world_game_event.sql (renamed from sql/updates/world/2012_02_05_01_world_game_event.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_02_world_creature.sql (renamed from sql/updates/world/2012_02_05_02_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_03_world_game_event.sql (renamed from sql/updates/world/2012_02_05_03_world_game_event.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_04_world_misc.sql (renamed from sql/updates/world/2012_02_05_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql (renamed from sql/updates/world/2012_02_05_04_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_06_00_world_misc.sql (renamed from sql/updates/world/2012_02_06_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_07_00_world_misc.sql (renamed from sql/updates/world/2012_02_07_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_00_world_misc.sql (renamed from sql/updates/world/2012_02_08_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_01_world_misc.sql (renamed from sql/updates/world/2012_02_08_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_02_world_misc.sql (renamed from sql/updates/world/2012_02_08_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_03_world_misc.sql (renamed from sql/updates/world/2012_02_08_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_04_world_misc.sql (renamed from sql/updates/world/2012_02_08_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql (renamed from sql/updates/world/2012_02_08_05_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_02_08_06_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_07_world_pool.sql (renamed from sql/updates/world/2012_02_08_07_world_pool.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_08_world_pool.sql (renamed from sql/updates/world/2012_02_08_08_world_pool.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql (renamed from sql/updates/world/2012_02_08_09_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_10_world_gossip.sql (renamed from sql/updates/world/2012_02_08_10_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_11_world_pool.sql (renamed from sql/updates/world/2012_02_08_11_world_pool.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_12_world_sai.sql (renamed from sql/updates/world/2012_02_08_12_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql (renamed from sql/updates/world/2012_02_08_13_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_14_world_sai.sql (renamed from sql/updates/world/2012_02_08_14_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_15_world_misc.sql (renamed from sql/updates/world/2012_02_08_15_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_08_16_world_sai.sql (renamed from sql/updates/world/2012_02_08_16_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_10_00_world_conditions.sql (renamed from sql/updates/world/2012_02_10_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql (renamed from sql/updates/world/2012_02_10_01_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_10_02_world_conditions.sql (renamed from sql/updates/world/2012_02_10_02_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_10_03_world_conditions.sql (renamed from sql/updates/world/2012_02_10_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_10_04_world_conditions.sql (renamed from sql/updates/world/2012_02_10_04_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_00_world_creature.sql (renamed from sql/updates/world/2012_02_11_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_01_world_creature.sql (renamed from sql/updates/world/2012_02_11_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_02_world_pool.sql (renamed from sql/updates/world/2012_02_11_02_world_pool.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql (renamed from sql/updates/world/2012_02_11_03_world_areatrigger.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_04_world_sai.sql (renamed from sql/updates/world/2012_02_11_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_05_world_sai.sql (renamed from sql/updates/world/2012_02_11_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_06_world_sai.sql (renamed from sql/updates/world/2012_02_11_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_07_world_sai.sql (renamed from sql/updates/world/2012_02_11_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_08_world_sai.sql (renamed from sql/updates/world/2012_02_11_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql (renamed from sql/updates/world/2012_02_11_09_world_sai_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_11_10_world_sai.sql (renamed from sql/updates/world/2012_02_11_10_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_12_00_world_gossip.sql (renamed from sql/updates/world/2012_02_12_00_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_02_12_01_world_sai.sql243
-rw-r--r--sql/old/3.3.5a/2012_02_12_02_world_creature.sql57
-rw-r--r--sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql147
-rw-r--r--sql/old/3.3.5a/2012_02_12_04_world_sai.sql12
-rw-r--r--sql/updates/world/2012_02_13_00_world_version.sql1
-rw-r--r--sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql7
-rw-r--r--sql/updates/world/2012_02_15_00_world_quest_template.sql1
-rw-r--r--sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql13
-rw-r--r--sql/updates/world/2012_02_15_02_world_item_template.sql3
-rw-r--r--sql/updates/world/2012_02_15_03_world_quest_template.sql18
-rw-r--r--sql/updates/world/2012_02_15_04_world_quest_template.sql17
-rw-r--r--sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql3
-rw-r--r--sql/updates/world/2012_02_15_07_00_world_creature.sql57
-rw-r--r--sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql147
-rw-r--r--sql/updates/world/2012_02_15_07_02_world_misc.sql120
-rw-r--r--src/server/collision/Management/VMapManager2.cpp3
-rwxr-xr-xsrc/server/collision/Management/VMapManager2.h2
-rw-r--r--src/server/collision/Maps/MapTree.cpp8
-rw-r--r--src/server/collision/Models/WorldModel.cpp3
-rwxr-xr-xsrc/server/collision/Models/WorldModel.h1
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAI.cpp6
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAIMgr.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp8
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h1
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRV.cpp2
-rwxr-xr-xsrc/server/game/Chat/Commands/Level1.cpp4
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp852
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.h58
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.h2
-rwxr-xr-xsrc/server/game/Entities/Item/Item.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp184
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h11
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp22
-rw-r--r--src/server/game/Entities/Vehicle/VehicleDefines.h6
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp691
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h507
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h28
-rwxr-xr-xsrc/server/game/Handlers/AuctionHouseHandler.cpp260
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp8
-rwxr-xr-xsrc/server/game/Handlers/PetitionsHandler.cpp5
-rwxr-xr-xsrc/server/game/Loot/LootMgr.cpp8
-rwxr-xr-xsrc/server/game/Maps/Map.cpp130
-rwxr-xr-xsrc/server/game/Maps/Map.h75
-rwxr-xr-xsrc/server/game/Movement/MotionMaster.cpp206
-rwxr-xr-xsrc/server/game/Movement/MotionMaster.h42
-rwxr-xr-xsrc/server/game/Quests/QuestDef.h18
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.cpp116
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.h38
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp10
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h7
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp36
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.h40
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp95
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp2
-rw-r--r--src/server/game/Tools/PlayerDump.cpp26
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp3
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp4
-rwxr-xr-xsrc/server/shared/Database/QueryResult.cpp32
-rwxr-xr-xsrc/server/shared/Database/QueryResult.h26
-rw-r--r--src/tools/vmap4_extractor/model.cpp3
218 files changed, 2706 insertions, 1737 deletions
diff --git a/sql/updates/world/2012_01_08_00_world_version.sql b/sql/old/3.3.5a/2012_01_08_00_world_version.sql
index 721fea914f1..721fea914f1 100644
--- a/sql/updates/world/2012_01_08_00_world_version.sql
+++ b/sql/old/3.3.5a/2012_01_08_00_world_version.sql
diff --git a/sql/updates/world/2012_01_08_01_world_sai.sql b/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
index fcdc21662c0..fcdc21662c0 100644
--- a/sql/updates/world/2012_01_08_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
diff --git a/sql/updates/world/2012_01_08_02_world_creature_template.sql b/sql/old/3.3.5a/2012_01_08_02_world_creature_template.sql
index a544118aa4f..a544118aa4f 100644
--- a/sql/updates/world/2012_01_08_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_08_02_world_creature_template.sql
diff --git a/sql/updates/world/2012_01_08_03_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_08_03_world_gossip_menu.sql
index 6555d25fbc3..6555d25fbc3 100644
--- a/sql/updates/world/2012_01_08_03_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_08_03_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_08_04_world_quest_template.sql b/sql/old/3.3.5a/2012_01_08_04_world_quest_template.sql
index fdc3c401302..fdc3c401302 100644
--- a/sql/updates/world/2012_01_08_04_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_01_08_04_world_quest_template.sql
diff --git a/sql/updates/world/2012_01_08_05_world_conditions.sql b/sql/old/3.3.5a/2012_01_08_05_world_conditions.sql
index b8e43e7d0e2..b8e43e7d0e2 100644
--- a/sql/updates/world/2012_01_08_05_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_08_05_world_conditions.sql
diff --git a/sql/updates/world/2012_01_08_06_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_06_world_creature_text.sql
index 31331faaa95..31331faaa95 100644
--- a/sql/updates/world/2012_01_08_06_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_06_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_07_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_07_world_creature_text.sql
index 0cb9601a156..0cb9601a156 100644
--- a/sql/updates/world/2012_01_08_07_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_07_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_08_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_08_world_creature_text.sql
index 7c4a1f9ba7d..7c4a1f9ba7d 100644
--- a/sql/updates/world/2012_01_08_08_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_08_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_09_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_09_world_creature_text.sql
index 55f777dc733..55f777dc733 100644
--- a/sql/updates/world/2012_01_08_09_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_09_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_11_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_11_world_creature_text.sql
index ae4e544b3f7..ae4e544b3f7 100644
--- a/sql/updates/world/2012_01_08_11_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_11_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_12_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_12_world_creature_text.sql
index 13b452e7b6a..13b452e7b6a 100644
--- a/sql/updates/world/2012_01_08_12_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_12_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_13_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_13_world_creature_text.sql
index 83e9f70f049..83e9f70f049 100644
--- a/sql/updates/world/2012_01_08_13_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_13_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_14_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_14_world_creature_text.sql
index d62ac5fdd20..d62ac5fdd20 100644
--- a/sql/updates/world/2012_01_08_14_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_14_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_15_world_script_texts.sql b/sql/old/3.3.5a/2012_01_08_15_world_script_texts.sql
index b0614eda526..b0614eda526 100644
--- a/sql/updates/world/2012_01_08_15_world_script_texts.sql
+++ b/sql/old/3.3.5a/2012_01_08_15_world_script_texts.sql
diff --git a/sql/updates/world/2012_01_08_16_world_misc.sql b/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
index 63cd81ff869..63cd81ff869 100644
--- a/sql/updates/world/2012_01_08_16_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
diff --git a/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_08_18_world_achievement_criteria_data.sql
index e20fd1c55bb..e20fd1c55bb 100644
--- a/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_08_18_world_creature_addon.sql b/sql/old/3.3.5a/2012_01_08_18_world_creature_addon.sql
index 7570cc14afe..7570cc14afe 100644
--- a/sql/updates/world/2012_01_08_18_world_creature_addon.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_creature_addon.sql
diff --git a/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql b/sql/old/3.3.5a/2012_01_08_18_world_spell_linked_spell.sql
index 927c6c0c663..927c6c0c663 100644
--- a/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2012_01_08_18_world_waypoint_data.sql b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_data.sql
index e443f7c055a..e443f7c055a 100644
--- a/sql/updates/world/2012_01_08_18_world_waypoint_data.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_data.sql
diff --git a/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_scripts.sql
index f6c147155ea..f6c147155ea 100644
--- a/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_scripts.sql
diff --git a/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_08_19_world_achievement_criteria_data.sql
index 6cd1a367e81..6cd1a367e81 100644
--- a/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_08_19_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_09_00_world_creature_text.sql b/sql/old/3.3.5a/2012_01_09_00_world_creature_text.sql
index 2a70be00b12..2a70be00b12 100644
--- a/sql/updates/world/2012_01_09_00_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_09_00_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_09_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_09_00_world_spell_script_names.sql
index 7279fc54413..7279fc54413 100644
--- a/sql/updates/world/2012_01_09_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_09_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_09_01_world_achievement_criteria_data.sql
index ae3c2ec960a..ae3c2ec960a 100644
--- a/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_09_01_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_09_01_world_creature_text.sql b/sql/old/3.3.5a/2012_01_09_01_world_creature_text.sql
index d1ec26bd7f4..d1ec26bd7f4 100644
--- a/sql/updates/world/2012_01_09_01_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_09_01_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_09_01_world_smart_scripts.sql b/sql/old/3.3.5a/2012_01_09_01_world_smart_scripts.sql
index a7304fa6e6a..a7304fa6e6a 100644
--- a/sql/updates/world/2012_01_09_01_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_01_09_01_world_smart_scripts.sql
diff --git a/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_11_00_world_achievement_criteria_data.sql
index 6c5d8ae7866..6c5d8ae7866 100644
--- a/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_11_00_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_11_00_world_disables.sql b/sql/old/3.3.5a/2012_01_11_00_world_disables.sql
index 18f9a5c3964..18f9a5c3964 100644
--- a/sql/updates/world/2012_01_11_00_world_disables.sql
+++ b/sql/old/3.3.5a/2012_01_11_00_world_disables.sql
diff --git a/sql/updates/world/2012_01_11_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_11_00_world_spell_script_names.sql
index 82428ef989e..82428ef989e 100644
--- a/sql/updates/world/2012_01_11_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_11_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_11_01_world_achievement_criteria_data.sql
index aa3ec94a5a8..aa3ec94a5a8 100644
--- a/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_11_01_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_11_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_11_01_world_spell_script_names.sql
index 4600f190c4e..4600f190c4e 100644
--- a/sql/updates/world/2012_01_11_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_11_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_12_00_world_sai.sql b/sql/old/3.3.5a/2012_01_12_00_world_sai.sql
index 6acbd0bd293..6acbd0bd293 100644
--- a/sql/updates/world/2012_01_12_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_12_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_13_00_world_creature.sql b/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
index bb20ec25863..bb20ec25863 100644
--- a/sql/updates/world/2012_01_13_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
diff --git a/sql/updates/world/2012_01_13_01_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
index 968e169ecab..968e169ecab 100644
--- a/sql/updates/world/2012_01_13_01_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_13_02_world_sai.sql b/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
index 1a11714c5c7..1a11714c5c7 100644
--- a/sql/updates/world/2012_01_13_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
diff --git a/sql/updates/world/2012_01_13_03_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
index 98dda69bf1a..98dda69bf1a 100644
--- a/sql/updates/world/2012_01_13_03_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_13_04_world_creature_texts.sql b/sql/old/3.3.5a/2012_01_13_04_world_creature_texts.sql
index ffab5673873..ffab5673873 100644
--- a/sql/updates/world/2012_01_13_04_world_creature_texts.sql
+++ b/sql/old/3.3.5a/2012_01_13_04_world_creature_texts.sql
diff --git a/sql/updates/world/2012_01_13_05_world_creature_texts.sql b/sql/old/3.3.5a/2012_01_13_05_world_creature_texts.sql
index 87aee698a11..87aee698a11 100644
--- a/sql/updates/world/2012_01_13_05_world_creature_texts.sql
+++ b/sql/old/3.3.5a/2012_01_13_05_world_creature_texts.sql
diff --git a/sql/updates/world/2012_01_13_06_world_creature_text.sql b/sql/old/3.3.5a/2012_01_13_06_world_creature_text.sql
index 99429cfad5f..99429cfad5f 100644
--- a/sql/updates/world/2012_01_13_06_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_13_06_world_creature_text.sql
diff --git a/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql b/sql/old/3.3.5a/2012_01_14_00_characters_lfg_data.sql
index 3c6671a3914..3c6671a3914 100644
--- a/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql
+++ b/sql/old/3.3.5a/2012_01_14_00_characters_lfg_data.sql
diff --git a/sql/updates/world/2012_01_14_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_14_00_world_gossip_menu.sql
index f328d101c57..f328d101c57 100644
--- a/sql/updates/world/2012_01_14_00_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_14_00_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_14_01_world_npc_trainer.sql b/sql/old/3.3.5a/2012_01_14_01_world_npc_trainer.sql
index 0f3e598b5a3..0f3e598b5a3 100644
--- a/sql/updates/world/2012_01_14_01_world_npc_trainer.sql
+++ b/sql/old/3.3.5a/2012_01_14_01_world_npc_trainer.sql
diff --git a/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_01_14_02_world_spell_proc_event.sql
index 846afdda6cc..846afdda6cc 100644
--- a/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2012_01_14_02_world_spell_proc_event.sql
diff --git a/sql/updates/world/2012_01_14_03_world_trinity_string.sql b/sql/old/3.3.5a/2012_01_14_03_world_trinity_string.sql
index 7dab007f774..7dab007f774 100644
--- a/sql/updates/world/2012_01_14_03_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2012_01_14_03_world_trinity_string.sql
diff --git a/sql/updates/world/2012_01_15_00_world_loot_template.sql b/sql/old/3.3.5a/2012_01_15_00_world_loot_template.sql
index af61833536d..af61833536d 100644
--- a/sql/updates/world/2012_01_15_00_world_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_00_world_loot_template.sql
diff --git a/sql/updates/world/2012_01_15_02_world_creature_template.sql b/sql/old/3.3.5a/2012_01_15_02_world_creature_template.sql
index 4b6dcad8a33..4b6dcad8a33 100644
--- a/sql/updates/world/2012_01_15_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_02_world_creature_template.sql
diff --git a/sql/updates/world/2012_01_15_03_world_item_loot_template.sql b/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
index bbe9994e897..bbe9994e897 100644
--- a/sql/updates/world/2012_01_15_03_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
diff --git a/sql/updates/world/2012_01_16_00_world_stored_procedure.sql b/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
index 4a5b66df7b2..4a5b66df7b2 100644
--- a/sql/updates/world/2012_01_16_00_world_stored_procedure.sql
+++ b/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
diff --git a/sql/updates/world/2012_01_16_01_world_sai.sql b/sql/old/3.3.5a/2012_01_16_01_world_sai.sql
index 881f6cb919c..881f6cb919c 100644
--- a/sql/updates/world/2012_01_16_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_01_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_02_world_sai.sql b/sql/old/3.3.5a/2012_01_16_02_world_sai.sql
index 435675fd143..435675fd143 100644
--- a/sql/updates/world/2012_01_16_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_02_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_03_world_sai.sql b/sql/old/3.3.5a/2012_01_16_03_world_sai.sql
index f5e0d90983f..f5e0d90983f 100644
--- a/sql/updates/world/2012_01_16_03_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_03_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_04_world_sai.sql b/sql/old/3.3.5a/2012_01_16_04_world_sai.sql
index 85087a57dec..85087a57dec 100644
--- a/sql/updates/world/2012_01_16_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_04_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_05_world_sai.sql b/sql/old/3.3.5a/2012_01_16_05_world_sai.sql
index d5966dfc3ec..d5966dfc3ec 100644
--- a/sql/updates/world/2012_01_16_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_05_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_06_world_sai.sql b/sql/old/3.3.5a/2012_01_16_06_world_sai.sql
index 62231b60fdc..62231b60fdc 100644
--- a/sql/updates/world/2012_01_16_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_06_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_07_world_sai.sql b/sql/old/3.3.5a/2012_01_16_07_world_sai.sql
index 79324bd2c0b..79324bd2c0b 100644
--- a/sql/updates/world/2012_01_16_07_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_07_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_08_world_sai.sql b/sql/old/3.3.5a/2012_01_16_08_world_sai.sql
index 0857b8fd45b..0857b8fd45b 100644
--- a/sql/updates/world/2012_01_16_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_08_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_09_world_sai.sql b/sql/old/3.3.5a/2012_01_16_09_world_sai.sql
index d82fc341ff0..d82fc341ff0 100644
--- a/sql/updates/world/2012_01_16_09_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_09_world_sai.sql
diff --git a/sql/updates/world/2012_01_17_00_world_misc.sql b/sql/old/3.3.5a/2012_01_17_00_world_misc.sql
index 300d239bd43..300d239bd43 100644
--- a/sql/updates/world/2012_01_17_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_17_00_world_misc.sql
diff --git a/sql/updates/world/2012_01_17_01_world_conditions.sql b/sql/old/3.3.5a/2012_01_17_01_world_conditions.sql
index 6c562ba4d45..6c562ba4d45 100644
--- a/sql/updates/world/2012_01_17_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_17_01_world_conditions.sql
diff --git a/sql/updates/world/2012_01_19_00_world_quest_template.sql b/sql/old/3.3.5a/2012_01_19_00_world_quest_template.sql
index f1af6e7eedd..f1af6e7eedd 100644
--- a/sql/updates/world/2012_01_19_00_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_01_19_00_world_quest_template.sql
diff --git a/sql/updates/world/2012_01_19_01_world_sai.sql b/sql/old/3.3.5a/2012_01_19_01_world_sai.sql
index 969eea6c4dd..969eea6c4dd 100644
--- a/sql/updates/world/2012_01_19_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_01_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_02_world_quest_template.sql b/sql/old/3.3.5a/2012_01_19_02_world_quest_template.sql
index 7bff373242d..7bff373242d 100644
--- a/sql/updates/world/2012_01_19_02_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_01_19_02_world_quest_template.sql
diff --git a/sql/updates/world/2012_01_19_03_world_sai.sql b/sql/old/3.3.5a/2012_01_19_03_world_sai.sql
index 6588e6a1ba8..6588e6a1ba8 100644
--- a/sql/updates/world/2012_01_19_03_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_03_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_04_world_sai.sql b/sql/old/3.3.5a/2012_01_19_04_world_sai.sql
index 6c1530ce4ee..6c1530ce4ee 100644
--- a/sql/updates/world/2012_01_19_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_04_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_05_world_sai.sql b/sql/old/3.3.5a/2012_01_19_05_world_sai.sql
index 2e6a743167e..2e6a743167e 100644
--- a/sql/updates/world/2012_01_19_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_05_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_06_world_sai.sql b/sql/old/3.3.5a/2012_01_19_06_world_sai.sql
index 817d6bd9aaa..817d6bd9aaa 100644
--- a/sql/updates/world/2012_01_19_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_06_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_07_world_sai.sql b/sql/old/3.3.5a/2012_01_19_07_world_sai.sql
index 3b0e27667e6..3b0e27667e6 100644
--- a/sql/updates/world/2012_01_19_07_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_07_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_08_world_sai.sql b/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
index 5b26998a607..5b26998a607 100644
--- a/sql/updates/world/2012_01_19_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
diff --git a/sql/updates/world/2012_01_21_00_world_creature.sql b/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
index b4a015380c3..b4a015380c3 100644
--- a/sql/updates/world/2012_01_21_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
diff --git a/sql/updates/world/2012_01_21_00_world_sai.sql b/sql/old/3.3.5a/2012_01_21_00_world_sai.sql
index e275c521e74..e275c521e74 100644
--- a/sql/updates/world/2012_01_21_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_21_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_21_01_world_npc_vendor.sql b/sql/old/3.3.5a/2012_01_21_01_world_npc_vendor.sql
index f8c7d0f4327..f8c7d0f4327 100644
--- a/sql/updates/world/2012_01_21_01_world_npc_vendor.sql
+++ b/sql/old/3.3.5a/2012_01_21_01_world_npc_vendor.sql
diff --git a/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_21_02_world_achievement_criteria_data.sql
index a9c2781d57f..a9c2781d57f 100644
--- a/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_21_02_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_22_00_world_command.sql b/sql/old/3.3.5a/2012_01_22_00_world_command.sql
index c87b7b3f825..c87b7b3f825 100644
--- a/sql/updates/world/2012_01_22_00_world_command.sql
+++ b/sql/old/3.3.5a/2012_01_22_00_world_command.sql
diff --git a/sql/updates/world/2012_01_22_00_world_sai.sql b/sql/old/3.3.5a/2012_01_22_00_world_sai.sql
index 8df31981de1..8df31981de1 100644
--- a/sql/updates/world/2012_01_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_22_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_22_01_world_conditions.sql b/sql/old/3.3.5a/2012_01_22_01_world_conditions.sql
index 9aaea4f8ac1..9aaea4f8ac1 100644
--- a/sql/updates/world/2012_01_22_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_22_01_world_conditions.sql
diff --git a/sql/updates/world/2012_01_22_02_world_creature_addon.sql b/sql/old/3.3.5a/2012_01_22_02_world_creature_addon.sql
index 808d728610e..808d728610e 100644
--- a/sql/updates/world/2012_01_22_02_world_creature_addon.sql
+++ b/sql/old/3.3.5a/2012_01_22_02_world_creature_addon.sql
diff --git a/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql b/sql/old/3.3.5a/2012_01_23_00_characters_character_queststatus_rewarded.sql
index d81cf3a6617..d81cf3a6617 100644
--- a/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql
+++ b/sql/old/3.3.5a/2012_01_23_00_characters_character_queststatus_rewarded.sql
diff --git a/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql b/sql/old/3.3.5a/2012_01_23_00_world_game_event_seasonal_questrelation.sql
index 40bf28a1ead..40bf28a1ead 100644
--- a/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql
+++ b/sql/old/3.3.5a/2012_01_23_00_world_game_event_seasonal_questrelation.sql
diff --git a/sql/updates/world/2012_01_23_00_world_sai.sql b/sql/old/3.3.5a/2012_01_23_00_world_sai.sql
index d73561b6cd6..d73561b6cd6 100644
--- a/sql/updates/world/2012_01_23_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_23_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_23_01_world_creature_script_names.sql b/sql/old/3.3.5a/2012_01_23_01_world_creature_script_names.sql
index d7c2b22725e..d7c2b22725e 100644
--- a/sql/updates/world/2012_01_23_01_world_creature_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_23_01_world_creature_script_names.sql
diff --git a/sql/updates/world/2012_01_23_02_world_disables.sql b/sql/old/3.3.5a/2012_01_23_02_world_disables.sql
index 0a1be704dac..0a1be704dac 100644
--- a/sql/updates/world/2012_01_23_02_world_disables.sql
+++ b/sql/old/3.3.5a/2012_01_23_02_world_disables.sql
diff --git a/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
index 4d1f4536455..4d1f4536455 100644
--- a/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_23_04_world_creature_text.sql b/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
index f505a86b16c..f505a86b16c 100644
--- a/sql/updates/world/2012_01_23_04_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_23_05_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_23_05_world_spell_script_names.sql
index 6f3b4907e5b..6f3b4907e5b 100644
--- a/sql/updates/world/2012_01_23_05_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_23_05_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_23_06_world_achievement_criteria_data.sql
index 33899c3f512..33899c3f512 100644
--- a/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_23_06_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_23_07_world_creature_text.sql b/sql/old/3.3.5a/2012_01_23_07_world_creature_text.sql
index 90ac11e363c..90ac11e363c 100644
--- a/sql/updates/world/2012_01_23_07_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_23_07_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_24_00_world_misc.sql b/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
index 8703cd7aa42..8703cd7aa42 100644
--- a/sql/updates/world/2012_01_24_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
diff --git a/sql/updates/world/2012_01_24_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_24_00_world_spell_script_names.sql
index 0e772c3c200..0e772c3c200 100644
--- a/sql/updates/world/2012_01_24_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_24_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_26_00_world_sai.sql b/sql/old/3.3.5a/2012_01_26_00_world_sai.sql
index ee69e263e2e..ee69e263e2e 100644
--- a/sql/updates/world/2012_01_26_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_26_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql b/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
index 1dc2749807e..1dc2749807e 100644
--- a/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql
+++ b/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
diff --git a/sql/updates/world/2012_01_28_00_world_conditions.sql b/sql/old/3.3.5a/2012_01_28_00_world_conditions.sql
index e66d893db35..e66d893db35 100644
--- a/sql/updates/world/2012_01_28_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_28_00_world_conditions.sql
diff --git a/sql/updates/world/2012_01_29_00_world_conditions.sql b/sql/old/3.3.5a/2012_01_29_00_world_conditions.sql
index 8a04993a03e..8a04993a03e 100644
--- a/sql/updates/world/2012_01_29_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_29_00_world_conditions.sql
diff --git a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql b/sql/old/3.3.5a/2012_01_29_00_world_spell_dbc.sql
index bbde43e3313..bbde43e3313 100644
--- a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2012_01_29_00_world_spell_dbc.sql
diff --git a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_01_29_01_world_spell_bonus_data.sql
index d31489b8fce..d31489b8fce 100644
--- a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_01_29_01_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql b/sql/old/3.3.5a/2012_01_29_02_world_spell_trigger_spell.sql
index 13f9380c950..13f9380c950 100644
--- a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql
+++ b/sql/old/3.3.5a/2012_01_29_02_world_spell_trigger_spell.sql
diff --git a/sql/updates/world/2012_01_29_03_world_misc.sql b/sql/old/3.3.5a/2012_01_29_03_world_misc.sql
index 3253b5cd55b..3253b5cd55b 100644
--- a/sql/updates/world/2012_01_29_03_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_29_03_world_misc.sql
diff --git a/sql/updates/world/2012_01_29_04_world_misc.sql b/sql/old/3.3.5a/2012_01_29_04_world_misc.sql
index 3686957e433..3686957e433 100644
--- a/sql/updates/world/2012_01_29_04_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_29_04_world_misc.sql
diff --git a/sql/updates/world/2012_01_30_00_world_conditions.sql b/sql/old/3.3.5a/2012_01_30_00_world_conditions.sql
index 48b9c63b5cb..48b9c63b5cb 100644
--- a/sql/updates/world/2012_01_30_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_30_00_world_conditions.sql
diff --git a/sql/updates/world/2012_01_30_01_world_conditions.sql b/sql/old/3.3.5a/2012_01_30_01_world_conditions.sql
index bcaf0af435a..bcaf0af435a 100644
--- a/sql/updates/world/2012_01_30_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_30_01_world_conditions.sql
diff --git a/sql/updates/world/2012_01_30_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_30_01_world_spell_script_names.sql
index 6e4b10094e5..6e4b10094e5 100644
--- a/sql/updates/world/2012_01_30_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_30_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_01_30_02_world_creature_loot_template.sql
index 429d470a77f..429d470a77f 100644
--- a/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_02_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_01_30_03_world_creature_loot_template.sql
index 531c472c263..531c472c263 100644
--- a/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_03_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
index 3ef39fe43d2..3ef39fe43d2 100644
--- a/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_30_05_world_gameobject_loot_template.sql
index 8196663eebe..8196663eebe 100644
--- a/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_05_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql
index 91f26990488..91f26990488 100644
--- a/sql/updates/world/2012_01_31_00_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_01_31_01_world_misc.sql b/sql/old/3.3.5a/2012_01_31_01_world_misc.sql
index c359f186431..c359f186431 100644
--- a/sql/updates/world/2012_01_31_01_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_31_01_world_misc.sql
diff --git a/sql/updates/world/2012_02_01_00_world_misc.sql b/sql/old/3.3.5a/2012_02_01_00_world_misc.sql
index e137f7a8238..e137f7a8238 100644
--- a/sql/updates/world/2012_02_01_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_01_00_world_misc.sql
diff --git a/sql/updates/world/2012_02_02_00_world_item_loot_template.sql b/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
index 4223835bee3..4223835bee3 100644
--- a/sql/updates/world/2012_02_02_00_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
diff --git a/sql/updates/world/2012_02_03_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql
index e56662f2e9d..e56662f2e9d 100644
--- a/sql/updates/world/2012_02_03_00_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_02_03_01_world_quest_template.sql b/sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql
index 9871fbf979e..9871fbf979e 100644
--- a/sql/updates/world/2012_02_03_01_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql
diff --git a/sql/updates/world/2012_02_04_00_world_creature.sql b/sql/old/3.3.5a/2012_02_04_00_world_creature.sql
index ffc5dfe773b..ffc5dfe773b 100644
--- a/sql/updates/world/2012_02_04_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_02_04_00_world_creature.sql
diff --git a/sql/updates/world/2012_02_04_00_world_gameobject_template.sql b/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
index d824c35da51..d824c35da51 100644
--- a/sql/updates/world/2012_02_04_00_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
diff --git a/sql/updates/world/2012_02_04_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql
index 9cae36ec0a9..9cae36ec0a9 100644
--- a/sql/updates/world/2012_02_04_00_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_02_04_01_world_creature.sql b/sql/old/3.3.5a/2012_02_04_01_world_creature.sql
index 09f135c2715..09f135c2715 100644
--- a/sql/updates/world/2012_02_04_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_02_04_01_world_creature.sql
diff --git a/sql/updates/world/2012_02_05_00_world_creature_template.sql b/sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql
index 31751f9f324..31751f9f324 100644
--- a/sql/updates/world/2012_02_05_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql
diff --git a/sql/updates/world/2012_02_05_00_world_misc.sql b/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
index c5c4cfc43a6..c5c4cfc43a6 100644
--- a/sql/updates/world/2012_02_05_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
diff --git a/sql/updates/world/2012_02_05_01_world_game_event.sql b/sql/old/3.3.5a/2012_02_05_01_world_game_event.sql
index 61c7e7db5ab..61c7e7db5ab 100644
--- a/sql/updates/world/2012_02_05_01_world_game_event.sql
+++ b/sql/old/3.3.5a/2012_02_05_01_world_game_event.sql
diff --git a/sql/updates/world/2012_02_05_02_world_creature.sql b/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
index 7426b7ef8b0..7426b7ef8b0 100644
--- a/sql/updates/world/2012_02_05_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
diff --git a/sql/updates/world/2012_02_05_03_world_game_event.sql b/sql/old/3.3.5a/2012_02_05_03_world_game_event.sql
index 157a2e9194c..157a2e9194c 100644
--- a/sql/updates/world/2012_02_05_03_world_game_event.sql
+++ b/sql/old/3.3.5a/2012_02_05_03_world_game_event.sql
diff --git a/sql/updates/world/2012_02_05_04_world_misc.sql b/sql/old/3.3.5a/2012_02_05_04_world_misc.sql
index 0d72b08167e..0d72b08167e 100644
--- a/sql/updates/world/2012_02_05_04_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_05_04_world_misc.sql
diff --git a/sql/updates/world/2012_02_05_04_world_quest_template.sql b/sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql
index 093ca8aa8bf..093ca8aa8bf 100644
--- a/sql/updates/world/2012_02_05_04_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql
diff --git a/sql/updates/world/2012_02_06_00_world_misc.sql b/sql/old/3.3.5a/2012_02_06_00_world_misc.sql
index 984c618775d..984c618775d 100644
--- a/sql/updates/world/2012_02_06_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_06_00_world_misc.sql
diff --git a/sql/updates/world/2012_02_07_00_world_misc.sql b/sql/old/3.3.5a/2012_02_07_00_world_misc.sql
index ef34c56ed00..ef34c56ed00 100644
--- a/sql/updates/world/2012_02_07_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_07_00_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_00_world_misc.sql b/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
index 40ce5629214..40ce5629214 100644
--- a/sql/updates/world/2012_02_08_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_01_world_misc.sql b/sql/old/3.3.5a/2012_02_08_01_world_misc.sql
index f6f6f9a6b94..f6f6f9a6b94 100644
--- a/sql/updates/world/2012_02_08_01_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_01_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_02_world_misc.sql b/sql/old/3.3.5a/2012_02_08_02_world_misc.sql
index 64b6ba82cc9..64b6ba82cc9 100644
--- a/sql/updates/world/2012_02_08_02_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_02_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_03_world_misc.sql b/sql/old/3.3.5a/2012_02_08_03_world_misc.sql
index 80d2fd901fc..80d2fd901fc 100644
--- a/sql/updates/world/2012_02_08_03_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_03_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_04_world_misc.sql b/sql/old/3.3.5a/2012_02_08_04_world_misc.sql
index 1de2adc45f3..1de2adc45f3 100644
--- a/sql/updates/world/2012_02_08_04_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_04_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_05_world_gameobject.sql b/sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql
index a9388d189a9..a9388d189a9 100644
--- a/sql/updates/world/2012_02_08_05_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql
diff --git a/sql/updates/world/2012_02_08_06_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql
index 199c9df86f4..199c9df86f4 100644
--- a/sql/updates/world/2012_02_08_06_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_02_08_07_world_pool.sql b/sql/old/3.3.5a/2012_02_08_07_world_pool.sql
index 8f43e1b3b03..8f43e1b3b03 100644
--- a/sql/updates/world/2012_02_08_07_world_pool.sql
+++ b/sql/old/3.3.5a/2012_02_08_07_world_pool.sql
diff --git a/sql/updates/world/2012_02_08_08_world_pool.sql b/sql/old/3.3.5a/2012_02_08_08_world_pool.sql
index 96124ec2540..96124ec2540 100644
--- a/sql/updates/world/2012_02_08_08_world_pool.sql
+++ b/sql/old/3.3.5a/2012_02_08_08_world_pool.sql
diff --git a/sql/updates/world/2012_02_08_09_world_quest_template.sql b/sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql
index 1b53bd34811..1b53bd34811 100644
--- a/sql/updates/world/2012_02_08_09_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql
diff --git a/sql/updates/world/2012_02_08_10_world_gossip.sql b/sql/old/3.3.5a/2012_02_08_10_world_gossip.sql
index 009b56c7018..009b56c7018 100644
--- a/sql/updates/world/2012_02_08_10_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_02_08_10_world_gossip.sql
diff --git a/sql/updates/world/2012_02_08_11_world_pool.sql b/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
index f49f5afec6a..f49f5afec6a 100644
--- a/sql/updates/world/2012_02_08_11_world_pool.sql
+++ b/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
diff --git a/sql/updates/world/2012_02_08_12_world_sai.sql b/sql/old/3.3.5a/2012_02_08_12_world_sai.sql
index 81ea39c8ecf..81ea39c8ecf 100644
--- a/sql/updates/world/2012_02_08_12_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_08_12_world_sai.sql
diff --git a/sql/updates/world/2012_02_08_13_world_gameobject.sql b/sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql
index 0a43dda67d4..0a43dda67d4 100644
--- a/sql/updates/world/2012_02_08_13_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql
diff --git a/sql/updates/world/2012_02_08_14_world_sai.sql b/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
index 60e96a52663..60e96a52663 100644
--- a/sql/updates/world/2012_02_08_14_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
diff --git a/sql/updates/world/2012_02_08_15_world_misc.sql b/sql/old/3.3.5a/2012_02_08_15_world_misc.sql
index f6ea64249cf..f6ea64249cf 100644
--- a/sql/updates/world/2012_02_08_15_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_15_world_misc.sql
diff --git a/sql/updates/world/2012_02_08_16_world_sai.sql b/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
index 06fbb233aeb..06fbb233aeb 100644
--- a/sql/updates/world/2012_02_08_16_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
diff --git a/sql/updates/world/2012_02_10_00_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_00_world_conditions.sql
index 508011609cf..508011609cf 100644
--- a/sql/updates/world/2012_02_10_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_02_10_00_world_conditions.sql
diff --git a/sql/updates/world/2012_02_10_01_world_gameobject.sql b/sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql
index 1dbbb850472..1dbbb850472 100644
--- a/sql/updates/world/2012_02_10_01_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql
diff --git a/sql/updates/world/2012_02_10_02_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_02_world_conditions.sql
index 66d72e1be3a..66d72e1be3a 100644
--- a/sql/updates/world/2012_02_10_02_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_02_10_02_world_conditions.sql
diff --git a/sql/updates/world/2012_02_10_03_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_03_world_conditions.sql
index b46684df7d5..b46684df7d5 100644
--- a/sql/updates/world/2012_02_10_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_02_10_03_world_conditions.sql
diff --git a/sql/updates/world/2012_02_10_04_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_04_world_conditions.sql
index 4703ec29044..4703ec29044 100644
--- a/sql/updates/world/2012_02_10_04_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_02_10_04_world_conditions.sql
diff --git a/sql/updates/world/2012_02_11_00_world_creature.sql b/sql/old/3.3.5a/2012_02_11_00_world_creature.sql
index c7d4971cc29..c7d4971cc29 100644
--- a/sql/updates/world/2012_02_11_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_02_11_00_world_creature.sql
diff --git a/sql/updates/world/2012_02_11_01_world_creature.sql b/sql/old/3.3.5a/2012_02_11_01_world_creature.sql
index 898e746d306..898e746d306 100644
--- a/sql/updates/world/2012_02_11_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_02_11_01_world_creature.sql
diff --git a/sql/updates/world/2012_02_11_02_world_pool.sql b/sql/old/3.3.5a/2012_02_11_02_world_pool.sql
index dd2cf949639..dd2cf949639 100644
--- a/sql/updates/world/2012_02_11_02_world_pool.sql
+++ b/sql/old/3.3.5a/2012_02_11_02_world_pool.sql
diff --git a/sql/updates/world/2012_02_11_03_world_areatrigger.sql b/sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql
index 80e86d52530..80e86d52530 100644
--- a/sql/updates/world/2012_02_11_03_world_areatrigger.sql
+++ b/sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql
diff --git a/sql/updates/world/2012_02_11_04_world_sai.sql b/sql/old/3.3.5a/2012_02_11_04_world_sai.sql
index ba2d106f472..ba2d106f472 100644
--- a/sql/updates/world/2012_02_11_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_04_world_sai.sql
diff --git a/sql/updates/world/2012_02_11_05_world_sai.sql b/sql/old/3.3.5a/2012_02_11_05_world_sai.sql
index 2d773911118..2d773911118 100644
--- a/sql/updates/world/2012_02_11_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_05_world_sai.sql
diff --git a/sql/updates/world/2012_02_11_06_world_sai.sql b/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
index 5a021bdfb3d..5a021bdfb3d 100644
--- a/sql/updates/world/2012_02_11_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
diff --git a/sql/updates/world/2012_02_11_07_world_sai.sql b/sql/old/3.3.5a/2012_02_11_07_world_sai.sql
index 935422fed67..935422fed67 100644
--- a/sql/updates/world/2012_02_11_07_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_07_world_sai.sql
diff --git a/sql/updates/world/2012_02_11_08_world_sai.sql b/sql/old/3.3.5a/2012_02_11_08_world_sai.sql
index 81a0307f9ad..81a0307f9ad 100644
--- a/sql/updates/world/2012_02_11_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_08_world_sai.sql
diff --git a/sql/updates/world/2012_02_11_09_world_sai_gossip.sql b/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
index 3c49b752ee2..3c49b752ee2 100644
--- a/sql/updates/world/2012_02_11_09_world_sai_gossip.sql
+++ b/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
diff --git a/sql/updates/world/2012_02_11_10_world_sai.sql b/sql/old/3.3.5a/2012_02_11_10_world_sai.sql
index f2095e320fd..f2095e320fd 100644
--- a/sql/updates/world/2012_02_11_10_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_10_world_sai.sql
diff --git a/sql/updates/world/2012_02_12_00_world_gossip.sql b/sql/old/3.3.5a/2012_02_12_00_world_gossip.sql
index f0c57e87b01..f0c57e87b01 100644
--- a/sql/updates/world/2012_02_12_00_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_02_12_00_world_gossip.sql
diff --git a/sql/old/3.3.5a/2012_02_12_01_world_sai.sql b/sql/old/3.3.5a/2012_02_12_01_world_sai.sql
new file mode 100644
index 00000000000..4e96f1da7c9
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_01_world_sai.sql
@@ -0,0 +1,243 @@
+-- Hot On The Trail (A:24849 H:24851)
+
+SET @QUEST_A := 24849;
+SET @QUEST_H := 24851;
+
+SET @BUNNY_BANK := 38340; -- [DND] Holiday - Love - Bank Bunny
+SET @BUNNY_BANK_SW_GUID := 208836;
+SET @BUNNY_BANK_ORG_GUID := 208835;
+SET @BUNNY_AH := 38341; -- [DND] Holiday - Love - AH Bunny
+SET @BUNNY_AH_SW_GUID := 208837;
+SET @BUNNY_AH_ORG_GUID := 208838;
+SET @BUNNY_BARBER := 38342; -- [DND] Holiday - Love - Barber Bunny
+SET @BUNNY_BARBER_SW_GUID := 208839;
+SET @BUNNY_BARBER_ORG_GUID := 208840;
+
+SET @TRIGGER_BANK_SW := 5710;
+SET @TRIGGER_AH_SW := 5711;
+SET @TRIGGER_BARBER_SW := 5712;
+SET @TRIGGER_BANK_ORG := 5715;
+SET @TRIGGER_AH_ORG := 5714;
+SET @TRIGGER_BARBER_ORG := 5716;
+
+SET @SPELL_BANK_SW := 71713; -- Searching the Bank
+SET @SPELL_BANK_ORG := 71759;
+SET @SPELL_AH_SW := 71745; -- Searching the Auction House
+SET @SPELL_AH_ORG := 71760;
+SET @SPELL_BARBER_SW := 71752; -- Searching the Barber Shop
+SET @SPELL_BARBER_ORG := 71758;
+
+-- spells to 'trick' the player
+SET @SPELL_ROCKET := 71715; -- Snivel's Rocket (bank)
+SET @SPELL_BLIND := 71750; -- Blind! (ah)
+SET @SPELL_VANISH := 24222; -- Vanish Visual (barber)
+
+SET @SNIVEL_BANK_SW := 38334; -- Snivel Rustrocket <Venture Co.>
+SET @SNIVEL_BANK_ORG := 38337;
+SET @SNIVEL_AH_SW := 38335;
+SET @SNIVEL_AH_ORG := 38338;
+SET @SNIVEL_BARBER_SW := 38336;
+SET @SNIVEL_BARBER_ORG := 38339;
+
+SET @SPELL_SUM_SW_BANK := 71712; -- Summon Snivel
+SET @SPELL_SUM_ORG_BANK := 71762;
+SET @SPELL_SUM_SW_AH := 71744;
+SET @SPELL_SUM_ORG_AH := 71763;
+SET @SPELL_SUM_SW_BARBER := 71751;
+SET @SPELL_SUM_ORG_BARBER := 71765;
+
+UPDATE `quest_template` SET `SpecialFlags`=`SpecialFlags`|2 WHERE `Id` IN (@QUEST_A,@QUEST_H);
+
+DELETE FROM `areatrigger_involvedrelation` WHERE `id` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG);
+INSERT INTO `areatrigger_involvedrelation` (`id`,`quest`) VALUES
+(@TRIGGER_BANK_SW,@QUEST_A),
+(@TRIGGER_AH_SW,@QUEST_A),
+(@TRIGGER_BARBER_SW,@QUEST_A),
+--
+(@TRIGGER_BANK_ORG,@QUEST_H),
+(@TRIGGER_AH_ORG,@QUEST_H),
+(@TRIGGER_BARBER_ORG,@QUEST_H);
+
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG);
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
+(@TRIGGER_BANK_SW,'SmartTrigger'),
+(@TRIGGER_AH_SW,'SmartTrigger'),
+(@TRIGGER_BARBER_SW,'SmartTrigger'),
+--
+(@TRIGGER_BANK_ORG,'SmartTrigger'),
+(@TRIGGER_AH_ORG,'SmartTrigger'),
+(@TRIGGER_BARBER_ORG,'SmartTrigger');
+
+
+-- area trigger scripts
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG) AND `source_type`=2;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@TRIGGER_BANK_SW,2,0,1,46,0,100,0,@TRIGGER_BANK_SW,0,0,0,86,@SPELL_BANK_SW,0,10,@BUNNY_BANK_SW_GUID,@BUNNY_BANK,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BANK_SW,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BANK_SW_GUID,@BUNNY_BANK,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_AH_SW,2,0,1,46,0,100,0,@TRIGGER_AH_SW,0,0,0,86,@SPELL_AH_SW,0,10,@BUNNY_AH_SW_GUID,@BUNNY_AH,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_AH_SW,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_AH_SW_GUID,@BUNNY_AH,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_BARBER_SW,2,0,1,46,0,100,0,@TRIGGER_BARBER_SW,0,0,0,86,@SPELL_BARBER_SW,0,10,@BUNNY_BARBER_SW_GUID,@BUNNY_BARBER,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BARBER_SW,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BARBER_SW_GUID,@BUNNY_BARBER,0,0,0,0,0,'Link - Kill - Bunny'),
+-- --
+(@TRIGGER_BANK_ORG,2,0,1,46,0,100,0,@TRIGGER_BANK_ORG,0,0,0,86,@SPELL_BANK_ORG,0,10,@BUNNY_BANK_ORG_GUID,@BUNNY_BANK,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BANK_ORG,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BANK_ORG_GUID,@BUNNY_BANK,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_AH_ORG,2,0,1,46,0,100,0,@TRIGGER_AH_ORG,0,0,0,86,@SPELL_AH_ORG,0,10,@BUNNY_AH_ORG_GUID,@BUNNY_AH,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_AH_ORG,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_AH_ORG_GUID,@BUNNY_AH,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_BARBER_ORG,2,0,1,46,0,100,0,@TRIGGER_BARBER_ORG,0,0,0,86,@SPELL_BARBER_ORG,0,10,@BUNNY_BARBER_ORG_GUID,@BUNNY_BARBER,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BARBER_ORG,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BARBER_ORG_GUID,@BUNNY_BARBER,0,0,0,0,0,'Link - Kill - Bunny');
+
+
+-- Snivel Rustrocket scripts
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SNIVEL_BANK_SW*100,@SNIVEL_AH_SW*100,@SNIVEL_BARBER_SW*100,@SNIVEL_BANK_ORG*100,@SNIVEL_AH_ORG*100,@SNIVEL_BARBER_ORG*100) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@SNIVEL_BANK_SW,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BANK_SW*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_BANK_SW,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_BANK_SW*100,9,0,0,0,0,100,0,2000,2000,0,0,5,6,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_SW*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_SW*100,9,2,0,0,0,100,0,2000,2000,0,0,5,11,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_SW*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_SW*100,9,4,0,0,0,100,0,1000,1000,0,0,11,@SPELL_ROCKET,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_BANK_SW*100,9,5,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_BANK_SW,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_AH_SW,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_AH_SW*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_AH_SW,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_AH_SW*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_SW*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_SW*100,9,2,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_SW*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_SW*100,9,4,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_SW*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_SW*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_BLIND,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_AH_SW*100,9,7,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_AH_SW,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_BARBER_SW,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BARBER_SW*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+--
+(@SNIVEL_BARBER_SW*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_SW*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,2,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_SW*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,4,0,0,0,100,0,2000,2000,0,0,5,5,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_SW*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_VANISH,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Self'),
+(@SNIVEL_BARBER_SW*100,9,7,0,0,0,100,0,1000,1000,0,0,1,3,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,8,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Despawn - Self'),
+-- -- --
+(@SNIVEL_BANK_ORG,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BANK_ORG*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_BANK_ORG,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_BANK_ORG*100,9,0,0,0,0,100,0,2000,2000,0,0,5,6,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_ORG*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_ORG*100,9,2,0,0,0,100,0,2000,2000,0,0,5,11,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_ORG*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_ORG*100,9,4,0,0,0,100,0,1000,1000,0,0,11,@SPELL_ROCKET,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_BANK_ORG*100,9,5,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_BANK_ORG,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_AH_ORG,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_AH_ORG*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_AH_ORG,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_AH_ORG*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_ORG*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_ORG*100,9,2,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_ORG*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_ORG*100,9,4,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_ORG*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_ORG*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_BLIND,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_AH_ORG*100,9,7,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_AH_ORG,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_BARBER_ORG,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BARBER_ORG*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+--
+(@SNIVEL_BARBER_ORG*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_ORG*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,2,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_ORG*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,4,0,0,0,100,0,2000,2000,0,0,5,5,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_ORG*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_VANISH,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Self'),
+(@SNIVEL_BARBER_ORG*100,9,7,0,0,0,100,0,1000,1000,0,0,1,3,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,8,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Despawn - Self');
+
+
+DELETE FROM `creature_text` WHERE `entry` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@SNIVEL_BANK_SW,0,0,'What are you staring at? Haven''t you ever seen a genius before?',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BANK_SW,1,0,'This''ll teach you to mind your own business!',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_AH_SW,0,0,'That''s right, I''d like to list some of these ''fireworks''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_SW,1,0,'Those''ll net me a nice profit when I return from the South Seas.''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_SW,2,0,'You... Don''t think I don''t see you. Leave me alone!.',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_BARBER_SW,0,0,'Thanks for the great cut and shave, buddy.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_SW,1,0,'Here''s a little somethin'' extra since I''ll be away.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_SW,2,0,'On second thought, keep the whole bag. I have to, uh, get going.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_SW,3,0,'Did you really think you could corner me this easily?',12,0,100,0,0,0,'say text'),
+-- --
+(@SNIVEL_BANK_ORG,0,0,'What are you staring at? Haven''t you ever seen a genius before?',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BANK_ORG,1,0,'This''ll teach you to mind your own business!',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_AH_ORG,0,0,'That''s right, I''d like to list some of these ''fireworks''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_ORG,1,0,'Those''ll net me a nice profit when I return from the South Seas.''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_ORG,2,0,'You... Don''t think I don''t see you. Leave me alone!.',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_BARBER_ORG,0,0,'Thanks for the great cut and shave, buddy.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_ORG,1,0,'Here''s a little somethin'' extra since I''ll be away.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_ORG,2,0,'On second thought, keep the whole bag. I have to, uh, get going.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_ORG,3,0,'Did you really think you could corner me this easily?',12,0,100,0,0,0,'say text');
+
+
+DELETE FROM `waypoints` WHERE `entry` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG);
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+-- need proper 3.3.5a WPs
+(@SNIVEL_BANK_SW,1,-8922.295,620.7185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,2,-8910.545,627.2185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,3,-8902.795,631.2185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,4,-8901.045,631.9685,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,5,-8898.795,633.2185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,6,-8897.045,633.9685,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,7,-8895.545,634.7185,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,8,-8894.295,635.2185,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,9,-8892.045,636.2185,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,10,-8890.389,637.309,99.52265,'Snivel Rustrocket'),
+-- need proper 3.3.5a WPs
+(@SNIVEL_AH_SW,1,-8806.079,665.8424,96.2017,'Snivel Rustrocket'),
+(@SNIVEL_AH_SW,2,-8807.825,653.1030,96.1965,'Snivel Rustrocket'),
+(@SNIVEL_AH_SW,3,-8829.964,634.2772,94.3178,'Snivel Rustrocket'),
+(@SNIVEL_AH_SW,4,-8838.774,616.6351,92.8850,'Snivel Rustrocket'),
+-- need proper 3.3.5a WPs
+(@SNIVEL_BANK_ORG,1,1615.59,-4379.849,12.610,'Snivel Rustrocket'),
+(@SNIVEL_BANK_ORG,2,1603.85,-4393.092,9.837,'Snivel Rustrocket'),
+(@SNIVEL_BANK_ORG,3,1576.08,-4410.980,6.569,'Snivel Rustrocket'),
+-- need proper 3.3.5a WPs
+(@SNIVEL_AH_ORG,1,1669.29,-4433.413,19.643,'Snivel Rustrocket'),
+(@SNIVEL_AH_ORG,2,1652.96,-4419.120,16.705,'Snivel Rustrocket'),
+(@SNIVEL_AH_ORG,3,1627.23,-4427.485,13.353,'Snivel Rustrocket');
+
+
+DELETE FROM `spell_target_position` WHERE `id` IN (@SPELL_SUM_SW_BANK,@SPELL_SUM_SW_AH,@SPELL_SUM_SW_BARBER,@SPELL_SUM_ORG_BANK,@SPELL_SUM_ORG_AH,@SPELL_SUM_ORG_BARBER);
+INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(@SPELL_SUM_SW_BANK,0,-8922.7,620.628,100.225,0),
+(@SPELL_SUM_SW_AH,0,-8815.04,662.193,95.4238,0),
+(@SPELL_SUM_SW_BARBER,0,-8745.29,656.266,105.091,0),
+--
+(@SPELL_SUM_ORG_BANK,1,1624.64,-4375.8662,12.0282,0),
+(@SPELL_SUM_ORG_AH,1,1678.29,-4451.2597,19.2568,0),
+(@SPELL_SUM_ORG_BARBER,1,1764.49,-4345.9306,-7.7980,0);
+
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,1,@TRIGGER_BANK_SW,2,0,9,0,@QUEST_A,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_AH_SW,2,0,9,0,@QUEST_A,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_BARBER_SW,2,0,9,0,@QUEST_A,0,0,0,0,'','execute sai only if player has quest taken'),
+--
+(22,1,@TRIGGER_BANK_ORG,2,0,9,0,@QUEST_H,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_AH_ORG,2,0,9,0,@QUEST_H,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_BARBER_ORG,2,0,9,0,@QUEST_H,0,0,0,0,'','execute sai only if player has quest taken');
diff --git a/sql/old/3.3.5a/2012_02_12_02_world_creature.sql b/sql/old/3.3.5a/2012_02_12_02_world_creature.sql
new file mode 100644
index 00000000000..75beec97d67
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_02_world_creature.sql
@@ -0,0 +1,57 @@
+SET @GUID := 40489;
+SET @NPC :=3254;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,1,1,1,0,0, 10.3997021, -2316.43555, 92.1945343, 2.91896486,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,1,1,1,0,0,346.736572 , -2606.38916, 91.7916641, 1.58010352,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,1,1,1,0,0, 83.07206 , -2545.2085 , 98.107666 , 1.86412442,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,1,1,1,0,0,-93.53362 , -2287.0835 , 92.35358 , 0.8518014 ,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,1,1,1,0,0,-618.9995,-2738.234,91.91664,4.303216,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,1,1,1,0,0,-491.2982,-2473.443,93.66666,2.670027,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,1,1,1,0,0,-614.9523,-2721.66 ,93.85735,1.412064,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,1,1,1,0,0,-617.4864,-2710.463,96.7657 ,1.582084,120,0,0,1,0,0,0,0,0);
+
+SET @NPC1=@GUID*10;
+SET @NPC2=(@GUID+1)*10;
+SET @NPC3=(@GUID+2)*10;
+SET @NPC4=(@GUID+3)*10;
+SET @NPC5=(@GUID+6)*10;
+SET @NPC6=(@GUID+7)*10;
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@NPC1,1,6.336712,-2322.309,92.16663,0,0,0,0,100,0),
+-- 2nd
+(@NPC2,1,346.4289,-2573.332,91.79166,0,0,0,0,100,0),
+-- 3rd
+(@NPC3,1,81.53384,-2540.826,97.38716,0,0,0,0,100,0),
+(@NPC3,2,80.28384,-2537.076,96.63716,0,0,0,0,100,0),
+(@NPC3,3,79.03384,-2533.326,95.38716,0,0,0,0,100,0),
+(@NPC3,4,78.28384,-2530.326,94.63716,0,0,0,0,100,0),
+(@NPC3,5,77.03384,-2526.576,93.63716,0,0,0,0,100,0),
+(@NPC3,6,76.49564,-2523.443,93.66665,0,0,0,0,100,0),
+-- 4th
+(@NPC4,1,-88.46167,-2281.137,92.69763,0,0,0,0,100,0),
+(@NPC4,2,-92.46167,-2285.637,91.94763,0,0,0,0,100,0),
+-- 5th
+(@NPC5,1,-614.9318,-2720.435,94.01199,0,0,0,0,100,0),
+-- 6th
+(@NPC6,1,-617.2921,-2722.99,93.41664,0,0,0,0,100,0),
+(@NPC6,2,-617.3077,-2721.99,93.41664,0,0,0,0,100,0),
+(@NPC6,3,-617.3398,-2719.99,94.16664,0,0,0,0,100,0),
+(@NPC6,4,-617.3867,-2716.99,95.04164,0,0,0,0,100,0),
+(@NPC6,5,-617.4336,-2713.99,95.91664,0,0,0,0,100,0),
+(@NPC6,6,-617.4805,-2710.99,96.66664,0,0,0,0,100,0),
+(@NPC6,7,-617.503,-2708.995,97.04164,0,0,0,0,100,0),
+(@NPC6,8,-617.503,-2708.995,97.04164,0,0,0,0,100,0);
+
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@GUID+3,@GUID+6,@GUID+7);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@NPC1,0,0,0,0,''),
+(@GUID+1,@NPC2,0,0,0,0,''),
+(@GUID+2,@NPC3,0,0,0,0,''),
+(@GUID+3,@NPC4,0,0,0,0,''),
+(@GUID+6,@NPC5,0,0,0,0,''),
+(@GUID+7,@NPC6,0,0,0,0,'');
diff --git a/sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql b/sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql
new file mode 100644
index 00000000000..e47572b2074
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql
@@ -0,0 +1,147 @@
+SET @NPC := 26841;
+SET @GUID := 40497; -- need 9
+
+SET @SPAWN0 := (@GUID )*10;
+SET @SPAWN1 := (@GUID+1)*10;
+SET @SPAWN2 := (@GUID+2)*10;
+SET @SPAWN3 := (@GUID+3)*10;
+SET @SPAWN4 := (@GUID+4)*10;
+SET @SPAWN5 := (@GUID+5)*10;
+SET @SPAWN6 := (@GUID+6)*10;
+SET @SPAWN7 := (@GUID+7)*10;
+SET @SPAWN8 := (@GUID+8)*10;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,571,1,1,0,0,4690.292,859.291,154.1271,2.914072,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,571,1,1,0,0,4362.418,750.5102,123.7846,6.194367,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,571,1,1,0,0,4191.03,645.8215,109.6868,0.4027403,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,571,1,1,0,0,4098.345,657.0866,99.36436,5.185792,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,571,1,1,0,0,4065.753,709.2308,108.47,1.153499,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,571,1,1,0,0,4012.895,495.4877,82.1595,0.8684024,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,571,1,1,0,0,3941.605,552.9745,144.0994,0.06546114,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,571,1,1,0,0,3995.586,447.6094,88.55691,1.320955,120,0,0,1,0,0,0,0,0),
+(@GUID+8,@NPC,571,1,1,0,0,3869.004,707.384,134.3378,4.695541,120,0,0,1,0,0,0,0,0);
+
+DELETE FROM `creature_addon` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@SPAWN0,0,0,0,0,''),
+(@GUID+1,@SPAWN1,0,0,0,0,''),
+(@GUID+2,@SPAWN2,0,0,0,0,''),
+(@GUID+3,@SPAWN3,0,0,0,0,''),
+(@GUID+4,@SPAWN4,0,0,0,0,''),
+(@GUID+5,@SPAWN5,0,0,0,0,''),
+(@GUID+6,@SPAWN6,0,0,0,0,''),
+(@GUID+7,@SPAWN7,0,0,0,0,''),
+(@GUID+8,@SPAWN8,0,0,0,0,'');
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@SPAWN0,@SPAWN1,@SPAWN2,@SPAWN3,@SPAWN4,@SPAWN5,@SPAWN6,@SPAWN7,@SPAWN8);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@SPAWN0,0,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,1,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,2,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+(@SPAWN0,3,4532.678,762.772,130.1951,0,0,0,0,100,0),
+(@SPAWN0,4,4566.182,662.6984,132.7506,0,0,0,0,100,0),
+(@SPAWN0,5,4592.511,595.6938,130.1674,0,0,0,0,100,0),
+(@SPAWN0,6,4732.632,631.5569,164.584,0,0,0,0,100,0),
+(@SPAWN0,7,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,8,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,9,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+-- 2nd
+(@SPAWN1,0,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,1,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,2,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+(@SPAWN1,3,4112.486,636.6321,86.95068,0,0,0,0,100,0),
+(@SPAWN1,4,4141.771,704.1605,67.97847,0,0,0,0,100,0),
+(@SPAWN1,5,4191.388,726.6014,98.11736,0,0,0,0,100,0),
+(@SPAWN1,6,4247.502,724.9836,182.4229,0,0,0,0,100,0),
+(@SPAWN1,7,4295.807,746.8245,210.1174,0,0,0,0,100,0),
+(@SPAWN1,8,4387.15,744.5955,93.08962,0,0,0,0,100,0),
+(@SPAWN1,9,4428.509,680.8868,91.33962,0,0,0,0,100,0),
+(@SPAWN1,10,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,11,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,12,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+-- 3rd
+(@SPAWN2,0,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,1,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,2,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+(@SPAWN2,3,4378.531,451.3199,54.28299,0,0,0,0,100,0),
+(@SPAWN2,4,4277.019,345.219,121.2274,0,0,0,0,100,0),
+(@SPAWN2,5,4185.893,458.5754,118.5608,0,0,0,0,100,0),
+(@SPAWN2,6,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,7,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,8,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+-- 4th
+(@SPAWN3,0,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,1,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,2,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+(@SPAWN3,3,4382.415,794.0613,99.36437,0,0,0,0,100,0),
+(@SPAWN3,4,4312.128,808.5213,99.36437,0,0,0,0,100,0),
+(@SPAWN3,5,4206.404,817.2534,99.36437,0,0,0,0,100,0),
+(@SPAWN3,6,4089.363,771.5425,99.36437,0,0,0,0,100,0),
+(@SPAWN3,7,4114.452,637.4808,99.36437,0,0,0,0,100,0),
+(@SPAWN3,8,4265.095,661.3358,99.36437,0,0,0,0,100,0),
+(@SPAWN3,9,4366.876,678.4272,99.36437,0,0,0,0,100,0),
+(@SPAWN3,10,4433.122,674.1555,99.36437,0,0,0,0,100,0),
+(@SPAWN3,11,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,12,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,13,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+-- 5th
+(@SPAWN4,0,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,1,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,2,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+(@SPAWN4,3,4156.661,638.471,129.439,0,0,0,0,100,0),
+(@SPAWN4,4,4062.89,681.9251,102.9113,0,0,0,0,100,0),
+(@SPAWN4,5,4096.761,758.9566,123.5501,0,0,0,0,100,0),
+(@SPAWN4,6,4134.598,799.989,109.8835,0,0,0,0,100,0),
+(@SPAWN4,7,4189.475,840.5444,114.6335,0,0,0,0,100,0),
+(@SPAWN4,8,4274.875,812.3191,101.3001,0,0,0,0,100,0),
+(@SPAWN4,9,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,10,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,11,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+-- 6th
+(@SPAWN5,0,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,1,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,2,3926.388,447.295,82.1595,0,0,0,0,100,0),
+(@SPAWN5,3,4017.082,501.3171,82.1595,0,0,0,0,100,0),
+(@SPAWN5,4,4015.132,597.8423,82.1595,0,0,0,0,100,0),
+(@SPAWN5,5,3923.788,576.8113,82.1595,0,0,0,0,100,0),
+(@SPAWN5,6,3865.991,561.2335,82.1595,0,0,0,0,100,0),
+(@SPAWN5,7,3795.942,538.189,82.1595,0,0,0,0,100,0),
+(@SPAWN5,8,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,9,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,10,3926.388,447.295,82.1595,0,0,0,0,100,0),
+-- 7th
+(@SPAWN6,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN6,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN6,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN6,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN6,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN6,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,9,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+-- 8th
+(@SPAWN7,0,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,1,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,2,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+(@SPAWN7,3,4056.414,373.3088,88.55692,0,0,0,0,100,0),
+(@SPAWN7,4,3994.193,440.1974,88.55692,0,0,0,0,100,0),
+(@SPAWN7,5,4076.892,564.8895,88.55692,0,0,0,0,100,0),
+(@SPAWN7,6,4178.652,558.3406,88.55692,0,0,0,0,100,0),
+(@SPAWN7,7,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,8,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,9,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+-- 9th
+(@SPAWN8,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN8,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN8,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN8,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN8,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN8,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,9,3883.254,607.1956,134.3378,0,0,0,0,100,0);
diff --git a/sql/old/3.3.5a/2012_02_12_04_world_sai.sql b/sql/old/3.3.5a/2012_02_12_04_world_sai.sql
new file mode 100644
index 00000000000..190e3c3c63e
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_04_world_sai.sql
@@ -0,0 +1,12 @@
+-- By Dasio
+UPDATE `smart_scripts` SET `action_param2`=2, `action_param3`=0 WHERE `entryorguid`=4961 AND `id` IN (1,2) AND `source_type`=0;
+
+-- By tREAK
+SET @NPC_STEFAN :=28518;
+SET @SPELL_PUSH_ENSORCELED_CHOKER :=53810;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=28518 AND `source_type`=0 AND `id` IN (1,2,4);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_STEFAN,0,1,2,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Say line'),
+(@NPC_STEFAN,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Close gossip'),
+(@NPC_STEFAN,0,4,2,62,0,100,0,9709,1,0,0,85,@SPELL_PUSH_ENSORCELED_CHOKER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Invoker Spellcast');
diff --git a/sql/updates/world/2012_02_13_00_world_version.sql b/sql/updates/world/2012_02_13_00_world_version.sql
new file mode 100644
index 00000000000..2dd7ab92ddb
--- /dev/null
+++ b/sql/updates/world/2012_02_13_00_world_version.sql
@@ -0,0 +1 @@
+UPDATE `version` SET `db_version`='TDB 335.11.46' LIMIT 1;
diff --git a/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql b/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..4361f33cf38
--- /dev/null
+++ b/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql
@@ -0,0 +1,7 @@
+-- Criteria conditions for Once Bitten, Twice Shy achievement
+DELETE FROM `achievement_criteria_data` WHERE `type`=12 AND `criteria_id` IN (13013, 13012, 13011, 12780);
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`scriptname`) VALUES
+(13013, 12, 1, 0, ""), -- heroic
+(13012, 12, 1, 0, ""), -- heroic
+(13011, 12, 0, 0, ""), -- normal
+(12780, 12, 0, 0, ""); -- normal \ No newline at end of file
diff --git a/sql/updates/world/2012_02_15_00_world_quest_template.sql b/sql/updates/world/2012_02_15_00_world_quest_template.sql
new file mode 100644
index 00000000000..e26f52fd0fe
--- /dev/null
+++ b/sql/updates/world/2012_02_15_00_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `OfferRewardText` = 'Good, $C. You have done well in serving the Dark Lady. Your continued perseverance and ambition will be of great use to the Lady''s subjects. Return to me again in the future. Perhaps I will have other tasks for you that will aid the Dark Lady in her attempts at overtaking the Lich King and completely freeing the Scourge.', `RequestItemsText` = 'There are a hundred other tasks awaiting my attention, $C. Do you have the books?' WHERE `Id` = 14356;
diff --git a/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql b/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql
new file mode 100644
index 00000000000..1c3d45dc490
--- /dev/null
+++ b/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql
@@ -0,0 +1,13 @@
+DELETE FROM `areatrigger_tavern` WHERE `id` IN (98, 4109, 4300, 4378, 4380, 4498, 4608, 5314, 5315, 5316, 5317);
+INSERT INTO `areatrigger_tavern` (`id`, `name`) VALUES
+(98, 'Nesingwary''s Expedition'),
+(4109, 'Tranquillen - Upper level Inn'),
+(4300, 'Cenarion Refugee - Outside Inn'),
+(4378, 'Stonebreaker Hold Inn'),
+(4380, 'Falcon Watch Inn'),
+(4498, 'Old Hillsbrad Foothills Inn'),
+(4608, 'Sanctum Of The Stars - Upper level Inn'),
+(5314, 'Wyrmrest Temple'),
+(5315, 'Wyrmrest Temple'),
+(5316, 'Wyrmrest Temple'),
+(5317, 'Wyrmrest Temple');
diff --git a/sql/updates/world/2012_02_15_02_world_item_template.sql b/sql/updates/world/2012_02_15_02_world_item_template.sql
new file mode 100644
index 00000000000..463d43368cd
--- /dev/null
+++ b/sql/updates/world/2012_02_15_02_world_item_template.sql
@@ -0,0 +1,3 @@
+DELETE FROM `item_template` WHERE `entry`=49867;
+INSERT INTO `item_template` (`entry`, `class`, `subclass`, `unk0`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `Duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `WDBVerified`) VALUES
+(49867, 12, 0, -1, 'Crown Chemical Co. Supplies', 11448, 1, 0, 8192, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 4, 'You can hear the clink of glass... dont drop it!', 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 423, 0, 0, 0, 0, 14545);
diff --git a/sql/updates/world/2012_02_15_03_world_quest_template.sql b/sql/updates/world/2012_02_15_03_world_quest_template.sql
new file mode 100644
index 00000000000..833d36b246c
--- /dev/null
+++ b/sql/updates/world/2012_02_15_03_world_quest_template.sql
@@ -0,0 +1,18 @@
+-- Love is in the Air
+-- Quests Missing Text ... By Albis
+
+UPDATE `quest_template` SET `RequestItemsText` ='The cologne isn''t going to give itself out, you know.$B$BGet spraying!' , `OfferRewardText` ='Nice work, $N! People will be buying Crown colognes by the crate-load now that they''ve had a chance to try them.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24635;
+UPDATE `quest_template` SET `RequestItemsText` ='That perfume''s not going to spray itself, you know.$B$BGet going!' , `OfferRewardText` ='Great work, $N! People will come running to buy Crown perfumes now that they''ve had a chance to sample their wonders.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24629;
+UPDATE `quest_template` SET `RequestItemsText` ='You know, those chocolates aren''t going to fling themselves at people.$B$BYou need to get to work!' , `OfferRewardText` ='Lovely work, $N! People will be tripping over one another to get Crown chocolates now that they''ve had a chance to taste those sweet, romantic treats.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24636;
+UPDATE `quest_template` SET `OfferRewardText` ='Hey. You got some time on your hands? I could use someone like you.' WHERE `Id` IN (24804,24805);
+UPDATE `quest_template` SET `RequestItemsText` ='You analyze that reek yet, kid?' , `OfferRewardText` ='Hey, thanks, kid. Give it over, let''s take a look.$B$B<He takes the device from you and fiddles with it.>$B$BOh, that ain''t good.' WHERE `Id` IN (24655,24536);
+UPDATE `quest_template` SET `RequestItemsText` ='Did they toss ya a crate to deliver?' , `OfferRewardText` ='You got it, huh? Good job, kid. Top notch. Let''s see what we what we got here.$B$B<He cracks open the crate and rummages around inside.' WHERE `Id` IN (24656,24541);
+UPDATE `quest_template` SET `OfferRewardText` ='You... You''re not Snivel. Did he send you? He''s so late, I had started to give up hope...$B$B<Tears start welling up in the woman''s eyes once she realizes that you aren''t there to deliver a message from Snivel.>$B$BThat''s not like my Snivel, but what choice is there?' WHERE `Id` = 24848;
+UPDATE `quest_template` SET `OfferRewardText` ='You''re not Snivel. He was supposed to be here an hour ago! What have you done with him?$B$B<Roka seems to calm down when you tell her that you''re looking for Snivel, too. Then the tears start to well up in her eyes.>$B$BThis isn''t like my Snivel. Do you think something''s happened to him?' WHERE `Id` = 24850;
+UPDATE `quest_template` SET `RequestItemsText` ='Who are you?' , `OfferRewardText` ='All he talked about was leaving town with all his money? Then he really has abandoned me, hasn''t he?$B$BOh, $N. I was such a fool to fall for him, but how could I help myself? He was so irresistible!' WHERE `Id` = 24849;
+UPDATE `quest_template` SET `RequestItemsText` ='Who are you?' , `OfferRewardText` ='All he talked about was leaving town with all his money? Then he really has abandoned me, hasn''t he?$B$BI can''t believe I fell for such a horrible goblin! But he was so irresistible when we first met.' WHERE `Id` = 24851;
+UPDATE `quest_template` SET `RequestItemsText` ='Did you find the guy, or did he crawl under a rock?' , `OfferRewardText` ='You got his ledger? Really? That''s great, $N. There''s probably loads of good information in here.' WHERE `Id` IN (24657,24576);
+UPDATE `quest_template` SET `OfferRewardText` ='Fantastic. Help is exactly what I need.' WHERE `Id` IN (24792,24793);
+UPDATE `quest_template` SET `RequestItemsText` ='I don''t remember ordering a cleaing service... why yes, I am Apothecary Hummel.$B$B...wait, what is the meaning of this? You think these meaningless papers can stop me? Hah!' , `OfferRewardText` ='What we do here is none of your business...' WHERE `Id` = 11488;
+UPDATE `quest_template` SET `RequestItemsText` ='Did you take care of those no-good scheming villains?' , `OfferRewardText` ='What''ve you got there?$B$BOh hey, this is big. Real big. Most of the crazy details in one little package. Thanks - you really helped us reel this all in. Good working with ya.' WHERE `Id` IN (24745,14483);
+UPDATE `quest_template` SET `RequestItemsText` ='Did you teach ''em a lesson?' , `OfferRewardText` ='Good job, kid. You deserve a little somethin''. And hey, come back tomorrow if you get the time; I might have a job for ya.' WHERE `Id` IN (24658,24665,24666,24664,24663,24659,24660,24662,24647,24638,24651,24652,24650,24649,24645,24648);
diff --git a/sql/updates/world/2012_02_15_04_world_quest_template.sql b/sql/updates/world/2012_02_15_04_world_quest_template.sql
new file mode 100644
index 00000000000..8b6ad1d2cf9
--- /dev/null
+++ b/sql/updates/world/2012_02_15_04_world_quest_template.sql
@@ -0,0 +1,17 @@
+-- Horde
+UPDATE `quest_template` SET `PrevQuestId`=24805 WHERE `Id`=24536; -- Uncommon Scents completed before starting Something Stinks
+UPDATE `quest_template` SET `PrevQuestId`=24536 WHERE `Id`=24541; -- Something Stinks completed before starting Pilfering Perfume
+UPDATE `quest_template` SET `PrevQuestId`=24541 WHERE `Id`=24850; -- Pilfering Perfume completed before starting Snivel's Sweetheart
+UPDATE `quest_template` SET `PrevQuestId`=24850 WHERE `Id`=24851; -- Snivel's Sweetheart completed before starting Hot On The Trail
+UPDATE `quest_template` SET `PrevQuestId`=24851 WHERE `Id`=24576; -- Hot On The Trail completed before starting A Friendly Chat...
+
+UPDATE `quest_template` SET `PrevQuestId`=24576 WHERE `Id` IN (24638,24645,24647,24648,24649,24650,24651,24652); -- A Friendly Chat... completed before starting Crushing the Crown
+
+-- Alliance
+UPDATE `quest_template` SET `PrevQuestId`=24804 WHERE `Id`=24655; -- Uncommon Scents completed before starting Something Stinks
+UPDATE `quest_template` SET `PrevQuestId`=24655 WHERE `Id`=24656; -- Something Stinks completed before starting Pilfering Perfume
+UPDATE `quest_template` SET `PrevQuestId`=24656 WHERE `Id`=24848; -- Pilfering Perfume completed before starting Snivel's Sweetheart
+UPDATE `quest_template` SET `PrevQuestId`=24848 WHERE `Id`=24849; -- Snivel's Sweetheart completed before starting Hot On The Trail
+UPDATE `quest_template` SET `PrevQuestId`=24849 WHERE `Id`=24657; -- Hot On The Trail completed before starting A Friendly Chat...
+
+UPDATE `quest_template` SET `PrevQuestId`=24657 WHERE `Id` IN (24658,24659,24660,24662,24663,24664,24665,24666); -- A Friendly Chat... completed before starting Crushing the Crown
diff --git a/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql b/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql
new file mode 100644
index 00000000000..431e23b53b8
--- /dev/null
+++ b/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql
@@ -0,0 +1,3 @@
+DELETE FROM `creature_involvedrelation` WHERE `quest`=24745;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(38066, 24745); -- A - Something is in the Air (and it Ain't Love) - Inspector Snip Snagglebolt
diff --git a/sql/updates/world/2012_02_15_07_00_world_creature.sql b/sql/updates/world/2012_02_15_07_00_world_creature.sql
new file mode 100644
index 00000000000..75beec97d67
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_00_world_creature.sql
@@ -0,0 +1,57 @@
+SET @GUID := 40489;
+SET @NPC :=3254;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,1,1,1,0,0, 10.3997021, -2316.43555, 92.1945343, 2.91896486,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,1,1,1,0,0,346.736572 , -2606.38916, 91.7916641, 1.58010352,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,1,1,1,0,0, 83.07206 , -2545.2085 , 98.107666 , 1.86412442,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,1,1,1,0,0,-93.53362 , -2287.0835 , 92.35358 , 0.8518014 ,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,1,1,1,0,0,-618.9995,-2738.234,91.91664,4.303216,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,1,1,1,0,0,-491.2982,-2473.443,93.66666,2.670027,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,1,1,1,0,0,-614.9523,-2721.66 ,93.85735,1.412064,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,1,1,1,0,0,-617.4864,-2710.463,96.7657 ,1.582084,120,0,0,1,0,0,0,0,0);
+
+SET @NPC1=@GUID*10;
+SET @NPC2=(@GUID+1)*10;
+SET @NPC3=(@GUID+2)*10;
+SET @NPC4=(@GUID+3)*10;
+SET @NPC5=(@GUID+6)*10;
+SET @NPC6=(@GUID+7)*10;
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@NPC1,1,6.336712,-2322.309,92.16663,0,0,0,0,100,0),
+-- 2nd
+(@NPC2,1,346.4289,-2573.332,91.79166,0,0,0,0,100,0),
+-- 3rd
+(@NPC3,1,81.53384,-2540.826,97.38716,0,0,0,0,100,0),
+(@NPC3,2,80.28384,-2537.076,96.63716,0,0,0,0,100,0),
+(@NPC3,3,79.03384,-2533.326,95.38716,0,0,0,0,100,0),
+(@NPC3,4,78.28384,-2530.326,94.63716,0,0,0,0,100,0),
+(@NPC3,5,77.03384,-2526.576,93.63716,0,0,0,0,100,0),
+(@NPC3,6,76.49564,-2523.443,93.66665,0,0,0,0,100,0),
+-- 4th
+(@NPC4,1,-88.46167,-2281.137,92.69763,0,0,0,0,100,0),
+(@NPC4,2,-92.46167,-2285.637,91.94763,0,0,0,0,100,0),
+-- 5th
+(@NPC5,1,-614.9318,-2720.435,94.01199,0,0,0,0,100,0),
+-- 6th
+(@NPC6,1,-617.2921,-2722.99,93.41664,0,0,0,0,100,0),
+(@NPC6,2,-617.3077,-2721.99,93.41664,0,0,0,0,100,0),
+(@NPC6,3,-617.3398,-2719.99,94.16664,0,0,0,0,100,0),
+(@NPC6,4,-617.3867,-2716.99,95.04164,0,0,0,0,100,0),
+(@NPC6,5,-617.4336,-2713.99,95.91664,0,0,0,0,100,0),
+(@NPC6,6,-617.4805,-2710.99,96.66664,0,0,0,0,100,0),
+(@NPC6,7,-617.503,-2708.995,97.04164,0,0,0,0,100,0),
+(@NPC6,8,-617.503,-2708.995,97.04164,0,0,0,0,100,0);
+
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@GUID+3,@GUID+6,@GUID+7);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@NPC1,0,0,0,0,''),
+(@GUID+1,@NPC2,0,0,0,0,''),
+(@GUID+2,@NPC3,0,0,0,0,''),
+(@GUID+3,@NPC4,0,0,0,0,''),
+(@GUID+6,@NPC5,0,0,0,0,''),
+(@GUID+7,@NPC6,0,0,0,0,'');
diff --git a/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql b/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql
new file mode 100644
index 00000000000..e47572b2074
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql
@@ -0,0 +1,147 @@
+SET @NPC := 26841;
+SET @GUID := 40497; -- need 9
+
+SET @SPAWN0 := (@GUID )*10;
+SET @SPAWN1 := (@GUID+1)*10;
+SET @SPAWN2 := (@GUID+2)*10;
+SET @SPAWN3 := (@GUID+3)*10;
+SET @SPAWN4 := (@GUID+4)*10;
+SET @SPAWN5 := (@GUID+5)*10;
+SET @SPAWN6 := (@GUID+6)*10;
+SET @SPAWN7 := (@GUID+7)*10;
+SET @SPAWN8 := (@GUID+8)*10;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,571,1,1,0,0,4690.292,859.291,154.1271,2.914072,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,571,1,1,0,0,4362.418,750.5102,123.7846,6.194367,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,571,1,1,0,0,4191.03,645.8215,109.6868,0.4027403,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,571,1,1,0,0,4098.345,657.0866,99.36436,5.185792,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,571,1,1,0,0,4065.753,709.2308,108.47,1.153499,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,571,1,1,0,0,4012.895,495.4877,82.1595,0.8684024,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,571,1,1,0,0,3941.605,552.9745,144.0994,0.06546114,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,571,1,1,0,0,3995.586,447.6094,88.55691,1.320955,120,0,0,1,0,0,0,0,0),
+(@GUID+8,@NPC,571,1,1,0,0,3869.004,707.384,134.3378,4.695541,120,0,0,1,0,0,0,0,0);
+
+DELETE FROM `creature_addon` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@SPAWN0,0,0,0,0,''),
+(@GUID+1,@SPAWN1,0,0,0,0,''),
+(@GUID+2,@SPAWN2,0,0,0,0,''),
+(@GUID+3,@SPAWN3,0,0,0,0,''),
+(@GUID+4,@SPAWN4,0,0,0,0,''),
+(@GUID+5,@SPAWN5,0,0,0,0,''),
+(@GUID+6,@SPAWN6,0,0,0,0,''),
+(@GUID+7,@SPAWN7,0,0,0,0,''),
+(@GUID+8,@SPAWN8,0,0,0,0,'');
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@SPAWN0,@SPAWN1,@SPAWN2,@SPAWN3,@SPAWN4,@SPAWN5,@SPAWN6,@SPAWN7,@SPAWN8);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@SPAWN0,0,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,1,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,2,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+(@SPAWN0,3,4532.678,762.772,130.1951,0,0,0,0,100,0),
+(@SPAWN0,4,4566.182,662.6984,132.7506,0,0,0,0,100,0),
+(@SPAWN0,5,4592.511,595.6938,130.1674,0,0,0,0,100,0),
+(@SPAWN0,6,4732.632,631.5569,164.584,0,0,0,0,100,0),
+(@SPAWN0,7,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,8,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,9,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+-- 2nd
+(@SPAWN1,0,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,1,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,2,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+(@SPAWN1,3,4112.486,636.6321,86.95068,0,0,0,0,100,0),
+(@SPAWN1,4,4141.771,704.1605,67.97847,0,0,0,0,100,0),
+(@SPAWN1,5,4191.388,726.6014,98.11736,0,0,0,0,100,0),
+(@SPAWN1,6,4247.502,724.9836,182.4229,0,0,0,0,100,0),
+(@SPAWN1,7,4295.807,746.8245,210.1174,0,0,0,0,100,0),
+(@SPAWN1,8,4387.15,744.5955,93.08962,0,0,0,0,100,0),
+(@SPAWN1,9,4428.509,680.8868,91.33962,0,0,0,0,100,0),
+(@SPAWN1,10,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,11,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,12,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+-- 3rd
+(@SPAWN2,0,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,1,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,2,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+(@SPAWN2,3,4378.531,451.3199,54.28299,0,0,0,0,100,0),
+(@SPAWN2,4,4277.019,345.219,121.2274,0,0,0,0,100,0),
+(@SPAWN2,5,4185.893,458.5754,118.5608,0,0,0,0,100,0),
+(@SPAWN2,6,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,7,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,8,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+-- 4th
+(@SPAWN3,0,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,1,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,2,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+(@SPAWN3,3,4382.415,794.0613,99.36437,0,0,0,0,100,0),
+(@SPAWN3,4,4312.128,808.5213,99.36437,0,0,0,0,100,0),
+(@SPAWN3,5,4206.404,817.2534,99.36437,0,0,0,0,100,0),
+(@SPAWN3,6,4089.363,771.5425,99.36437,0,0,0,0,100,0),
+(@SPAWN3,7,4114.452,637.4808,99.36437,0,0,0,0,100,0),
+(@SPAWN3,8,4265.095,661.3358,99.36437,0,0,0,0,100,0),
+(@SPAWN3,9,4366.876,678.4272,99.36437,0,0,0,0,100,0),
+(@SPAWN3,10,4433.122,674.1555,99.36437,0,0,0,0,100,0),
+(@SPAWN3,11,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,12,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,13,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+-- 5th
+(@SPAWN4,0,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,1,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,2,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+(@SPAWN4,3,4156.661,638.471,129.439,0,0,0,0,100,0),
+(@SPAWN4,4,4062.89,681.9251,102.9113,0,0,0,0,100,0),
+(@SPAWN4,5,4096.761,758.9566,123.5501,0,0,0,0,100,0),
+(@SPAWN4,6,4134.598,799.989,109.8835,0,0,0,0,100,0),
+(@SPAWN4,7,4189.475,840.5444,114.6335,0,0,0,0,100,0),
+(@SPAWN4,8,4274.875,812.3191,101.3001,0,0,0,0,100,0),
+(@SPAWN4,9,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,10,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,11,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+-- 6th
+(@SPAWN5,0,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,1,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,2,3926.388,447.295,82.1595,0,0,0,0,100,0),
+(@SPAWN5,3,4017.082,501.3171,82.1595,0,0,0,0,100,0),
+(@SPAWN5,4,4015.132,597.8423,82.1595,0,0,0,0,100,0),
+(@SPAWN5,5,3923.788,576.8113,82.1595,0,0,0,0,100,0),
+(@SPAWN5,6,3865.991,561.2335,82.1595,0,0,0,0,100,0),
+(@SPAWN5,7,3795.942,538.189,82.1595,0,0,0,0,100,0),
+(@SPAWN5,8,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,9,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,10,3926.388,447.295,82.1595,0,0,0,0,100,0),
+-- 7th
+(@SPAWN6,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN6,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN6,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN6,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN6,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN6,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,9,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+-- 8th
+(@SPAWN7,0,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,1,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,2,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+(@SPAWN7,3,4056.414,373.3088,88.55692,0,0,0,0,100,0),
+(@SPAWN7,4,3994.193,440.1974,88.55692,0,0,0,0,100,0),
+(@SPAWN7,5,4076.892,564.8895,88.55692,0,0,0,0,100,0),
+(@SPAWN7,6,4178.652,558.3406,88.55692,0,0,0,0,100,0),
+(@SPAWN7,7,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,8,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,9,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+-- 9th
+(@SPAWN8,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN8,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN8,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN8,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN8,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN8,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,9,3883.254,607.1956,134.3378,0,0,0,0,100,0);
diff --git a/sql/updates/world/2012_02_15_07_02_world_misc.sql b/sql/updates/world/2012_02_15_07_02_world_misc.sql
new file mode 100644
index 00000000000..e7ffe54e922
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_02_world_misc.sql
@@ -0,0 +1,120 @@
+-- Love is in the Air
+SET @OGUID := 24399;
+SET @CGUID := 40506;
+SET @OLDGUID := 40489; -- wrong guids
+SET @EVENT := 8;
+
+-- Quest chain
+DELETE FROM `creature_questrelation` WHERE `quest` IN (24804,24657,24656,24848,24849);
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES
+(38293, 24804), -- A - Uncommon Scents - Junior Inspector
+(38325, 24657), -- A - Friendly Chat... - Marion Sutton
+(38066, 24656), -- A - Pilfering Perfume - Inspector Snip Snagglebolt
+(38066, 24848), -- A - Fireworks At The Gilded Rose - Inspector Snip Snagglebolt
+(38325, 24849); -- A - Hot On The Trail - Marion Sutton
+
+DELETE FROM `creature_involvedrelation` WHERE `quest` IN (24804,24657,24656,24848,24849);
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(38066, 24804), -- A - Uncommon Scents - Inspector Snip Snagglebolt
+(38066, 24657), -- A - Friendly Chat... - Inspector Snip Snagglebolt
+(38066, 24656), -- A - Pilfering Perfume - Inspector Snip Snagglebolt
+(38325, 24848), -- A - Fireworks At The Gilded Rose - Marion Sutton
+(38325, 24849); -- A - Hot On The Trail - Marion Sutton
+
+-- Loot: Crown Chemical Co. Supplies
+DELETE FROM `gameobject_loot_template` WHERE `entry`=27766;
+INSERT INTO `gameobject_loot_template` VALUES
+(27766, 49867, -100, 1, 0, 1, 1); -- Crown Chemical Co. Supplies
+
+-- GO spawns
+DELETE FROM `gameobject` WHERE `id` IN (181086,201752,201778) AND `guid` BETWEEN @OGUID+0 AND @OGUID+42;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+-- Valentine Arch
+(@OGUID+0, 181086, 1, 1, 1, 9869.12, 2493.13, 1315.88, 6.16653, 0, 0, 0.0582931, -0.9983, 300, 0, 1),
+(@OGUID+1, 181086, 530, 1, 1, -4004.66, -11844.5, 0.19541, 4.93701, 0, 0, 0.623403, -0.7819, 300, 0, 1),
+(@OGUID+2, 181086, 0, 1, 1, -4918.78, -983.208, 501.455, 2.30465, 0, 0, 0.913711, 0.406364, 300, 0, 1),
+(@OGUID+3, 181086, 0, 1, 1, -8869.51, 636.686, 95.7873, 0.794388, 0, 0, 0.386832, 0.92215, 300, 0, 1),
+(@OGUID+4, 181086, 1, 1, 1, 1653.44, -4437.37, 18.1863, 1.72627, 0, 0, 0.759883, 0.65006, 300, 0, 1),
+(@OGUID+5, 181086, 1, 1, 1, -1224.34, 68.3642, 129.71, 3.17285, 0, 0, 0.999878, -0.015627, 300, 0, 1),
+(@OGUID+6, 181086, 530, 1, 1, 9612.28, -7184.77, 14.285, 1.82938, 0, 0, 0.792374, 0.610036, 300, 0, 1),
+(@OGUID+7, 181086, 0, 1, 1, 1629.62, 240.116, 63.8516, 0.155664, 0, 0, 0.0777534, 0.996973, 300, 0, 1),
+-- Large Crate
+(@OGUID+8, 201752, 0, 1, 1, -9029.77, 353.325, 92.923, 0.8808, 0, 0, 0.426301, 0.904581, 300, 0, 1),
+(@OGUID+9, 201752, 0, 1, 1, -9029.87, 351.542, 92.9248, 0.489671, 0, 0, 0.242397, 0.970177, 300, 0, 1),
+(@OGUID+10, 201752, 0, 1, 1, -9028.41, 352.69, 92.9163, 0.721364, 0, 0, 0.352912, 0.935656, 300, 0, 1),
+(@OGUID+11, 201752, 0, 1, 1, -9027.7, 351.062, 92.9193, 0.689162, 0, 0, 0.337803, 0.941217, 300, 0, 1),
+(@OGUID+12, 201752, 0, 1, 1, -9029.08, 349.917, 92.932, 0.657746, 0, 0, 0.322977, 0.946407, 300, 0, 1),
+(@OGUID+13, 201752, 0, 1, 1, -9028.77, 352.62, 94.1596, 6.02202, 0, 0, 0.130214, -0.991486, 300, 0, 1),
+(@OGUID+14, 201752, 0, 1, 1, -9028.84, 350.443, 94.1755, 0.771628, 0, 0, 0.376314, 0.926492, 300, 0, 1),
+(@OGUID+15, 201752, 0, 1, 1, -9026.5, 348.864, 93.0359, 2.17356, 0, 0, 0.885134, 0.465337, 300, 0, 1),
+(@OGUID+16, 201752, 0, 1, 1, -9028.21, 348.744, 93.024, 0.889436, 0, 0, 0.430203, 0.902732, 300, 0, 1),
+(@OGUID+17, 201752, 1, 1, 1, 1381.97, -4431.17, 30.6588, 5.49617, 0, 0, 0.383432, -0.923569, 300, 0, 1),
+(@OGUID+18, 201752, 1, 1, 1, 1380.98, -4432.28, 30.6586, 5.55507, 0, 0, 0.356069, -0.93446, 300, 0, 1),
+(@OGUID+19, 201752, 1, 1, 1, 1379.73, -4433.4, 30.6569, 5.69644, 0, 0, 0.28918, -0.957275, 300, 0, 1),
+(@OGUID+20, 201752, 1, 1, 1, 1377.96, -4432.16, 30.6489, 5.58649, 0, 0, 0.341345, -0.939938, 300, 0, 1),
+(@OGUID+21, 201752, 1, 1, 1, 1379.23, -4431.41, 30.6768, 5.559, 0, 0, 0.354231, -0.935158, 300, 0, 1),
+(@OGUID+22, 201752, 1, 1, 1, 1379.85, -4432.91, 31.8999, 5.66896, 0, 0, 0.302309, -0.95321, 300, 0, 1),
+(@OGUID+23, 201752, 1, 1, 1, 1380.81, -4431.58, 31.902, 5.64147, 0, 0, 0.315381, -0.948965, 300, 0, 1),
+(@OGUID+24, 201752, 1, 1, 1, 1377.67, -4434.36, 30.6055, 5.36265, 0, 0, 0.444186, -0.895935, 300, 0, 1),
+-- Crown Chemical Co. Supplies
+(@OGUID+25, 201778, 0, 1, 1, -9031.18, 354.399, 92.9752, 6.12019, 0, 0, 0.0814081, -0.996681, 300, 0, 1),
+(@OGUID+26, 201778, 0, 1, 1, -9028.76, 352.525, 95.4034, 0.503804, 0, 0, 0.249246, 0.96844, 300, 0, 1),
+(@OGUID+27, 201778, 0, 1, 1, -9030.19, 351.409, 94.1683, 0.134668, 0, 0, 0.067283, 0.997734, 300, 0, 1),
+(@OGUID+28, 201778, 0, 1, 1, -9031.52, 349.739, 92.9068, 0.338872, 0, 0, 0.168626, 0.98568, 300, 0, 1),
+(@OGUID+29, 201778, 0, 1, 1, -9030.55, 347.899, 92.9635, 0.751206, 0, 0, 0.366833, 0.930287, 300, 0, 1),
+(@OGUID+30, 201778, 0, 1, 1, -9027.59, 348.911, 94.2683, 1.784, 0, 0, 0.77833, 0.627855, 300, 0, 1),
+(@OGUID+31, 201778, 0, 1, 1, -9028.87, 349.971, 95.4191, 1.82327, 0, 0, 0.790507, 0.612452, 300, 0, 1),
+(@OGUID+32, 201778, 0, 1, 1, -9031.75, 354.82, 92.9939, 6.0605, 0, 0, 0.111113, -0.993808, 300, 0, 1),
+(@OGUID+33, 201778, 0, 1, 1, -9032.22, 352.779, 92.9627, 6.0605, 0, 0, 0.111113, -0.993808, 300, 0, 1),
+(@OGUID+34, 201778, 1, 1, 1, 1375.84, -4432.46, 30.5735, 5.69645, 0, 0, 0.289178, -0.957275, 300, 0, 1),
+(@OGUID+35, 201778, 1, 1, 1, 1377.99, -4431.81, 31.8923, 5.5001, 0, 0, 0.381614, -0.924322, 300, 0, 1),
+(@OGUID+36, 201778, 1, 1, 1, 1379.21, -4430.58, 31.9198, 4.81681, 0, 0, 0.669241, -0.743045, 300, 0, 1),
+(@OGUID+37, 201778, 1, 1, 1, 1379.35, -4432.78, 33.143, 5.61791, 0, 0, 0.326536, -0.945185, 300, 0, 1),
+(@OGUID+38, 201778, 1, 1, 1, 1380.87, -4431.5, 33.1452, 4.66994, 0, 0, 0.721955, -0.69194, 300, 0, 1),
+(@OGUID+39, 201778, 1, 1, 1, 1380.96, -4429.36, 30.6772, 4.6503, 0, 0, 0.728713, -0.68482, 300, 0, 1),
+(@OGUID+40, 201778, 1, 1, 1, 1383.08, -4429.42, 30.651, 4.53642, 0, 0, 0.766505, -0.642238, 300, 0, 1),
+(@OGUID+41, 201778, 1, 1, 1, 1378.64, -4428.42, 30.6846, 5.23543, 0, 0, 0.500243, -0.865885, 300, 0, 1),
+(@OGUID+42, 201778, 1, 1, 1, 1377.05, -4429.39, 30.6467, 5.31397, 0, 0, 0.465863, -0.884857, 300, 0, 1);
+
+DELETE FROM `game_event_gameobject` WHERE `eventEntry`=@EVENT AND `guid` BETWEEN @OGUID AND @OGUID+42;
+INSERT INTO `game_event_gameobject` (`guid`, `eventEntry`) VALUES
+(@OGUID, @EVENT),(@OGUID+1, @EVENT),(@OGUID+2, @EVENT),
+(@OGUID+3, @EVENT),(@OGUID+4, @EVENT),(@OGUID+5, @EVENT),
+(@OGUID+6, @EVENT),(@OGUID+7, @EVENT),(@OGUID+8, @EVENT),
+(@OGUID+9, @EVENT),(@OGUID+10, @EVENT),(@OGUID+11, @EVENT),
+(@OGUID+12, @EVENT),(@OGUID+13, @EVENT),(@OGUID+14, @EVENT),
+(@OGUID+15, @EVENT),(@OGUID+16, @EVENT),(@OGUID+17, @EVENT),
+(@OGUID+18, @EVENT),(@OGUID+19, @EVENT),(@OGUID+20, @EVENT),
+(@OGUID+21, @EVENT),(@OGUID+22, @EVENT),(@OGUID+23, @EVENT),
+(@OGUID+24, @EVENT),(@OGUID+25, @EVENT),(@OGUID+26, @EVENT),
+(@OGUID+27, @EVENT),(@OGUID+28, @EVENT),(@OGUID+29, @EVENT),
+(@OGUID+30, @EVENT),(@OGUID+31, @EVENT),(@OGUID+32, @EVENT),
+(@OGUID+33, @EVENT),(@OGUID+34, @EVENT),(@OGUID+35, @EVENT),
+(@OGUID+36, @EVENT),(@OGUID+37, @EVENT),(@OGUID+38, @EVENT),
+(@OGUID+39, @EVENT),(@OGUID+40, @EVENT),(@OGUID+41, @EVENT),
+(@OGUID+42, @EVENT);
+
+-- [Q]: Pilfering Perfume
+-- Note: this is EndText (misleading field name), NOT ObjectiveText1
+UPDATE `quest_template` SET `EndText` = 'Steal perfume package from Crown Chemical Co. outside Stormind' WHERE `Id` = 24656; -- Alliance
+UPDATE `quest_template` SET `EndText` = 'Steal perfume package from Crown Chemical Co. outside Orgrimmar' WHERE `Id` = 24541; -- Horde
+
+-- Creature templates and spawns
+UPDATE `creature_template` SET `minlevel`=70, `maxlevel`=75 WHERE `entry`=37671; -- Crown Supply Guard
+UPDATE `creature_template` SET `npcflag`=`npcflag`|1, `gossip_menu_id`=10991 WHERE `entry`=38293; -- Junior Inspector (gossip menu not confirmed)
+
+DELETE FROM `creature` WHERE `id` IN (38293,38065,37671) AND `guid` BETWEEN @CGUID+0 AND @CGUID+3;
+DELETE FROM `creature` WHERE `id` IN (38293,38065,37671) AND `guid` BETWEEN @OLDGUID+0 AND @OLDGUID+3;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@CGUID+0, 38293, 530, 1, 1, 0, 0, -4022.81, -11842.7, 0.0062171, 5.89912, 300, 0, 0, 955, 0, 0, 0, 0, 0), -- Junior Inspector
+(@CGUID+1, 38065, 1, 1, 1, 0, 0, 1380.22, -4426.79, 30.6681, 2.03572, 300, 0, 0, 12600, 0, 0, 0, 0, 0), -- Crown Supply Sentry <Crown Chemical Co.>
+(@CGUID+2, 37671, 0, 1, 1, 30912, 0, -9033.01, 356.408, 93.1543, 2.09345, 300, 0, 0, 42, 0, 0, 0, 0, 0), -- Crown Supply Guard
+(@CGUID+3, 37671, 0, 1, 1, 30912, 0, -9028.63, 344.994, 93.2389, 3.37679, 300, 0, 0, 42, 0, 0, 0, 0, 0); -- Crown Supply Guard
+
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+3 AND `eventEntry`=@EVENT;
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @OLDGUID+0 AND @OLDGUID+3 AND `eventEntry`=@EVENT;
+INSERT INTO `game_event_creature` (`guid`, `eventEntry`) VALUES
+(@CGUID+0, @EVENT),
+(@CGUID+1, @EVENT),
+(@CGUID+2, @EVENT),
+(@CGUID+3, @EVENT);
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 62abc31831a..81b97f5f352 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -245,7 +245,7 @@ namespace VMAP
return false;
}
- WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename)
+ WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags/* Only used when creating the model */)
{
//! Critical section, thread safe access to iLoadedModelFiles
TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
@@ -261,6 +261,7 @@ namespace VMAP
return NULL;
}
sLog->outDebug(LOG_FILTER_MAPS, "VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str());
+ worldmodel->Flags = flags;
model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first;
model->second.setModel(worldmodel);
}
diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h
index 1fba108388a..4b66a2e9fc7 100755
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
@@ -103,7 +103,7 @@ namespace VMAP
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const;
- WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
+ WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags = 0);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index fda0535e8a7..f94f9bbf52b 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -127,7 +127,7 @@ namespace VMAP
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
iMapID(mapID), iTreeValues(0), iBasePath(basePath)
{
- if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' || iBasePath[iBasePath.length()-1] != '\\'))
+ if (iBasePath.length() > 0 && iBasePath[iBasePath.length()-1] != '/' && iBasePath[iBasePath.length()-1] != '\\')
{
iBasePath.push_back('/');
}
@@ -241,7 +241,7 @@ namespace VMAP
bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
{
std::string basePath = vmapPath;
- if (basePath.length() > 0 && (basePath[basePath.length()-1] != '/' || basePath[basePath.length()-1] != '\\'))
+ if (basePath.length() > 0 && basePath[basePath.length()-1] != '/' && basePath[basePath.length()-1] != '\\')
basePath.push_back('/');
std::string fullname = basePath + VMapManager2::getMapFileName(mapID);
bool success = true;
@@ -309,7 +309,7 @@ namespace VMAP
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
- WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
+ WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str());
if (model)
{
@@ -380,7 +380,7 @@ namespace VMAP
if (result)
{
// acquire model instance
- WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
+ WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
if (!model)
sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index a7de37d41e6..b49538a485d 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -420,6 +420,9 @@ namespace VMAP
bool WorldModel::IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const
{
+ // M2 models are not taken into account for LoS calculation
+ if (Flags & MOD_M2)
+ return false;
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.size() == 1)
diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h
index ebf828e4935..dbaccb58573 100755
--- a/src/server/collision/Models/WorldModel.h
+++ b/src/server/collision/Models/WorldModel.h
@@ -113,6 +113,7 @@ namespace VMAP
bool GetLocationInfo(const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, LocationInfo &info) const;
bool writeFile(const std::string &filename);
bool readFile(const std::string &filename);
+ uint32 Flags;
protected:
uint32 RootWMOID;
std::vector<GroupModel> groupModels;
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 9036448d9b4..730606becb5 100755
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -1334,9 +1334,9 @@ void CreatureEventAI::ReceiveEmote(Player* player, uint32 textEmote)
return;
Condition cond;
- cond.mConditionType = ConditionType((*itr).Event.receive_emote.condition);
- cond.mConditionValue1 = (*itr).Event.receive_emote.conditionValue1;
- cond.mConditionValue2 = (*itr).Event.receive_emote.conditionValue2;
+ cond.ConditionType = ConditionTypes((*itr).Event.receive_emote.condition);
+ cond.ConditionValue1 = (*itr).Event.receive_emote.conditionValue1;
+ cond.ConditionValue2 = (*itr).Event.receive_emote.conditionValue2;
ConditionSourceInfo srcInfo = ConditionSourceInfo(player);
if (cond.Meets(srcInfo))
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index 8f2cf6b471f..add7b4db174 100755
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
@@ -359,9 +359,9 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
if (temp.receive_emote.condition)
{
Condition cond;
- cond.mConditionType = ConditionType(temp.receive_emote.condition);
- cond.mConditionValue1 = temp.receive_emote.conditionValue1;
- cond.mConditionValue2 = temp.receive_emote.conditionValue2;
+ cond.ConditionType = ConditionTypes(temp.receive_emote.condition);
+ cond.ConditionValue1 = temp.receive_emote.conditionValue1;
+ cond.ConditionValue2 = temp.receive_emote.conditionValue2;
if (!sConditionMgr->isConditionTypeValid(&cond))
{
sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 1cf78c4a59c..c716741371e 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -2783,10 +2783,10 @@ bool SmartScript::ConditionValid(Unit* u, int32 c, int32 v1, int32 v2, int32 v3)
if (c == 0) return true;
if (!u || !u->ToPlayer()) return false;
Condition cond;
- cond.mConditionType = ConditionType(uint32(c));
- cond.mConditionValue1 = uint32(v1);
- cond.mConditionValue1 = uint32(v2);
- cond.mConditionValue1 = uint32(v3);
+ cond.ConditionType = ConditionTypes(uint32(c));
+ cond.ConditionValue1 = uint32(v1);
+ cond.ConditionValue1 = uint32(v2);
+ cond.ConditionValue1 = uint32(v3);
ConditionSourceInfo srcInfo = ConditionSourceInfo(u->ToPlayer());
return cond.Meets(srcInfo);
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index f81393be761..190fbcc5107 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -30,6 +30,7 @@ class Player;
class WorldPacket;
#define MIN_AUCTION_TIME (12*HOUR)
+#define MAX_AUCTION_ITEMS 160
enum AuctionError
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 64167690633..3c3d5e1655b 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -102,6 +102,8 @@ void BattlegroundRV::StartingEventOpenDoors()
setState(BG_RV_STATE_OPEN_FENCES);
setTimer(BG_RV_FIRST_TIMER);
+
+ TogglePillarCollision(true);
}
void BattlegroundRV::AddPlayer(Player* player)
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index 57d5e8cfa94..cb42863ca73 100755
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -558,8 +558,8 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
bool limitReached = false;
- GameTeleMap const & teleMap = sObjectMgr->GetGameTeleMap();
- for (GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
+ GameTeleContainer const & teleMap = sObjectMgr->GetGameTeleMap();
+ for (GameTeleContainer::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
{
GameTele const* tele = &itr->second;
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 6f380bb5d8a..bcdc6c26524 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -31,17 +31,17 @@
// Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI)
bool Condition::Meets(ConditionSourceInfo& sourceInfo)
{
- ASSERT(mConditionTarget < MAX_CONDITION_TARGETS);
- WorldObject* object = sourceInfo.mConditionTargets[mConditionTarget];
+ ASSERT(ConditionTarget < MAX_CONDITION_TARGETS);
+ WorldObject* object = sourceInfo.mConditionTargets[ConditionTarget];
// object not present, return false
if (!object)
{
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "Condition object not found for condition (Entry: %u Type: %u Group: %u)", mSourceEntry, mSourceType, mSourceGroup);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "Condition object not found for condition (Entry: %u Type: %u Group: %u)", SourceEntry, SourceType, SourceGroup);
return false;
}
bool condMeets = false;
bool sendErrorMsg = false;
- switch (mConditionType)
+ switch (ConditionType)
{
case CONDITION_NONE:
condMeets = true; // empty condition, always met
@@ -50,12 +50,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
{
if (Unit* unit = object->ToUnit())
{
- if (!mConditionValue3)
- condMeets = unit->HasAuraEffect(mConditionValue1, mConditionValue2);
+ if (!ConditionValue3)
+ condMeets = unit->HasAuraEffect(ConditionValue1, ConditionValue2);
else if (Player* player = unit->ToPlayer())
{
if (Unit* target = player->GetSelectedUnit())
- condMeets = target->HasAuraEffect(mConditionValue1, mConditionValue2);
+ condMeets = target->HasAuraEffect(ConditionValue1, ConditionValue2);
}
}
break;
@@ -65,72 +65,72 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
if (Player* player = object->ToPlayer())
{
// don't allow 0 items (it's checked during table load)
- ASSERT(mConditionValue2);
- bool checkBank = mConditionValue3 ? true : false;
- condMeets = player->HasItemCount(mConditionValue1, mConditionValue2, checkBank);
+ ASSERT(ConditionValue2);
+ bool checkBank = ConditionValue3 ? true : false;
+ condMeets = player->HasItemCount(ConditionValue1, ConditionValue2, checkBank);
}
break;
}
case CONDITION_ITEM_EQUIPPED:
{
if (Player* player = object->ToPlayer())
- condMeets = player->HasItemOrGemWithIdEquipped(mConditionValue1, 1);
+ condMeets = player->HasItemOrGemWithIdEquipped(ConditionValue1, 1);
break;
}
case CONDITION_ZONEID:
- condMeets = object->GetZoneId() == mConditionValue1;
+ condMeets = object->GetZoneId() == ConditionValue1;
break;
case CONDITION_REPUTATION_RANK:
{
if (Player* player = object->ToPlayer())
{
- if (FactionEntry const* faction = sFactionStore.LookupEntry(mConditionValue1))
- condMeets = (mConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction)));
+ if (FactionEntry const* faction = sFactionStore.LookupEntry(ConditionValue1))
+ condMeets = (ConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction)));
}
break;
}
case CONDITION_ACHIEVEMENT:
{
if (Player* player = object->ToPlayer())
- condMeets = player->GetAchievementMgr().HasAchieved(mConditionValue1);
+ condMeets = player->GetAchievementMgr().HasAchieved(ConditionValue1);
break;
}
case CONDITION_TEAM:
{
if (Player* player = object->ToPlayer())
- condMeets = player->GetTeam() == mConditionValue1;
+ condMeets = player->GetTeam() == ConditionValue1;
break;
}
case CONDITION_CLASS:
{
if (Player* player = object->ToPlayer())
- condMeets = player->getClassMask() & mConditionValue1;
+ condMeets = player->getClassMask() & ConditionValue1;
break;
}
case CONDITION_RACE:
{
if (Player* player = object->ToPlayer())
- condMeets = player->getRaceMask() & mConditionValue1;
+ condMeets = player->getRaceMask() & ConditionValue1;
break;
}
case CONDITION_SKILL:
{
if (Player* player = object->ToPlayer())
- condMeets = player->HasSkill(mConditionValue1) && player->GetBaseSkillValue(mConditionValue1) >= mConditionValue2;
+ condMeets = player->HasSkill(ConditionValue1) && player->GetBaseSkillValue(ConditionValue1) >= ConditionValue2;
break;
}
case CONDITION_QUESTREWARDED:
{
if (Player* player = object->ToPlayer())
- condMeets = (player->GetQuestRewardStatus(mConditionValue1) == !mConditionValue2);
+ condMeets = (player->GetQuestRewardStatus(ConditionValue1) == !ConditionValue2);
break;
}
case CONDITION_QUESTTAKEN:
{
if (Player* player = object->ToPlayer())
{
- QuestStatus status = player->GetQuestStatus(mConditionValue1);
- condMeets = ((status == QUEST_STATUS_INCOMPLETE) == !mConditionValue2);
+ QuestStatus status = player->GetQuestStatus(ConditionValue1);
+ condMeets = ((status == QUEST_STATUS_INCOMPLETE) == !ConditionValue2);
}
break;
}
@@ -138,8 +138,8 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
{
if (Player* player = object->ToPlayer())
{
- QuestStatus status = player->GetQuestStatus(mConditionValue1);
- condMeets = ((status == QUEST_STATUS_COMPLETE && !player->GetQuestRewardStatus(mConditionValue1)) == !mConditionValue2);
+ QuestStatus status = player->GetQuestStatus(ConditionValue1);
+ condMeets = ((status == QUEST_STATUS_COMPLETE && !player->GetQuestRewardStatus(ConditionValue1)) == !ConditionValue2);
}
break;
}
@@ -147,19 +147,19 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
{
if (Player* player = object->ToPlayer())
{
- QuestStatus status = player->GetQuestStatus(mConditionValue1);
- condMeets = ((status == QUEST_STATUS_NONE) == !mConditionValue2);
+ QuestStatus status = player->GetQuestStatus(ConditionValue1);
+ condMeets = ((status == QUEST_STATUS_NONE) == !ConditionValue2);
}
break;
}
case CONDITION_ACTIVE_EVENT:
- condMeets = sGameEventMgr->IsActiveEvent(mConditionValue1);
+ condMeets = sGameEventMgr->IsActiveEvent(ConditionValue1);
break;
case CONDITION_INSTANCE_DATA:
{
Map* map = object->GetMap();
if (map && map->IsDungeon() && ((InstanceMap*)map)->GetInstanceScript())
- condMeets = ((InstanceMap*)map)->GetInstanceScript()->GetData(mConditionValue1) == mConditionValue2;
+ condMeets = ((InstanceMap*)map)->GetInstanceScript()->GetData(ConditionValue1) == ConditionValue2;
break;
}
case CONDITION_SPELL_SCRIPT_TARGET:
@@ -172,7 +172,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
Unit* target = player->GetSelectedUnit();
if (target)
if (Creature* cTarget = target->ToCreature())
- if (cTarget->GetEntry() == mConditionValue1)
+ if (cTarget->GetEntry() == ConditionValue1)
condMeets = true;
}
break;
@@ -183,7 +183,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
{
Unit* target = player->GetSelectedUnit();
if (target)
- condMeets = !target->HealthAbovePct(mConditionValue1);
+ condMeets = !target->HealthAbovePct(ConditionValue1);
break;
}
}
@@ -192,16 +192,16 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
if (Player* player = object->ToPlayer())
{
if (Unit* target = player->GetSelectedUnit())
- if (player->GetDistance(target) >= mConditionValue1 && (!mConditionValue2 || player->GetDistance(target) <= mConditionValue2))
+ if (player->GetDistance(target) >= ConditionValue1 && (!ConditionValue2 || player->GetDistance(target) <= ConditionValue2))
condMeets = true;
}
break;
}
case CONDITION_MAPID:
- condMeets = object->GetMapId() == mConditionValue1;
+ condMeets = object->GetMapId() == ConditionValue1;
break;
case CONDITION_AREAID:
- condMeets = object->GetAreaId() == mConditionValue1;
+ condMeets = object->GetAreaId() == ConditionValue1;
break;
case CONDITION_ITEM_TARGET:
{
@@ -211,51 +211,51 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
case CONDITION_SPELL:
{
if (Player* player = object->ToPlayer())
- condMeets = player->HasSpell(mConditionValue1);
+ condMeets = player->HasSpell(ConditionValue1);
break;
}
case CONDITION_LEVEL:
{
if (Unit* unit = object->ToUnit())
- condMeets = CompareValues(static_cast<ComparisionType>(mConditionValue2), static_cast<uint32>(unit->getLevel()), mConditionValue1);
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), static_cast<uint32>(unit->getLevel()), ConditionValue1);
break;
}
case CONDITION_DRUNKENSTATE:
{
if (Player* player = object->ToPlayer())
- condMeets = (uint32)Player::GetDrunkenstateByValue(player->GetDrunkValue()) >= mConditionValue1;
+ condMeets = (uint32)Player::GetDrunkenstateByValue(player->GetDrunkValue()) >= ConditionValue1;
break;
}
case CONDITION_NEAR_CREATURE:
{
- condMeets = GetClosestCreatureWithEntry(object, mConditionValue1, (float)mConditionValue2) ? true : false;
+ condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false;
break;
}
case CONDITION_NEAR_GAMEOBJECT:
{
- condMeets = GetClosestGameObjectWithEntry(object, mConditionValue1, (float)mConditionValue2) ? true : false;
+ condMeets = GetClosestGameObjectWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false;
break;
}
case CONDITION_OBJECT_ENTRY:
{
- if (object->GetTypeId() == mConditionValue1)
- condMeets = (!mConditionValue2) || (object->GetEntry() == mConditionValue2);
+ if (object->GetTypeId() == ConditionValue1)
+ condMeets = (!ConditionValue2) || (object->GetEntry() == ConditionValue2);
break;
}
case CONDITION_TYPE_MASK:
{
- condMeets = object->isType(mConditionValue1);
+ condMeets = object->isType(ConditionValue1);
break;
}
case CONDITION_RELATION_TO:
{
- if (WorldObject* toObject = sourceInfo.mConditionTargets[mConditionValue1])
+ if (WorldObject* toObject = sourceInfo.mConditionTargets[ConditionValue1])
{
Unit* toUnit = toObject->ToUnit();
Unit* unit = object->ToUnit();
if (toUnit && unit)
{
- switch (mConditionValue2)
+ switch (ConditionValue2)
{
case RELATION_SELF:
condMeets = unit == toUnit;
@@ -279,19 +279,19 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
}
case CONDITION_REACTION_TO:
{
- if (WorldObject* toObject = sourceInfo.mConditionTargets[mConditionValue1])
+ if (WorldObject* toObject = sourceInfo.mConditionTargets[ConditionValue1])
{
Unit* toUnit = toObject->ToUnit();
Unit* unit = object->ToUnit();
if (toUnit && unit)
- condMeets = (1 << unit->GetReactionTo(toUnit)) & mConditionValue2;
+ condMeets = (1 << unit->GetReactionTo(toUnit)) & ConditionValue2;
}
break;
}
case CONDITION_DISTANCE_TO:
{
- if (WorldObject* toObject = sourceInfo.mConditionTargets[mConditionValue1])
- condMeets = CompareValues(static_cast<ComparisionType>(mConditionValue3), object->GetDistance(toObject), static_cast<float>(mConditionValue2));
+ if (WorldObject* toObject = sourceInfo.mConditionTargets[ConditionValue1])
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue3), object->GetDistance(toObject), static_cast<float>(ConditionValue2));
break;
}
case CONDITION_ALIVE:
@@ -303,23 +303,23 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
case CONDITION_HP_VAL:
{
if (Unit* unit = object->ToUnit())
- condMeets = CompareValues(static_cast<ComparisionType>(mConditionValue2), unit->GetHealth(), static_cast<uint32>(mConditionValue1));
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), unit->GetHealth(), static_cast<uint32>(ConditionValue1));
break;
}
case CONDITION_HP_PCT:
{
if (Unit* unit = object->ToUnit())
- condMeets = CompareValues(static_cast<ComparisionType>(mConditionValue2), unit->GetHealthPct(), static_cast<float>(mConditionValue1));
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), unit->GetHealthPct(), static_cast<float>(ConditionValue1));
break;
}
case CONDITION_WORLD_STATE:
{
- condMeets = mConditionValue2 == sWorld->getWorldState(mConditionValue1);
+ condMeets = ConditionValue2 == sWorld->getWorldState(ConditionValue1);
break;
}
case CONDITION_PHASEMASK:
{
- condMeets = object->GetPhaseMask() & mConditionValue1;
+ condMeets = object->GetPhaseMask() & ConditionValue1;
break;
}
default:
@@ -327,7 +327,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
break;
}
- if (mNegativeCondition)
+ if (NegativeCondition)
condMeets = !condMeets;
if (!condMeets)
@@ -340,7 +340,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
uint32 Condition::GetMaxAvailableConditionTargets()
{
// returns number of targets which are available for given source type
- switch(mSourceType)
+ switch(SourceType)
{
case CONDITION_SOURCE_TYPE_SPELL:
return 2;
@@ -374,34 +374,34 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo,
std::map<uint32, bool> ElseGroupStore;
for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
{
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->mConditionType, (*i)->mConditionValue1);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->ConditionType, (*i)->ConditionValue1);
if ((*i)->isLoaded())
{
- std::map<uint32, bool>::const_iterator itr = ElseGroupStore.find((*i)->mElseGroup);
+ std::map<uint32, bool>::const_iterator itr = ElseGroupStore.find((*i)->ElseGroup);
if (itr == ElseGroupStore.end())
- ElseGroupStore[(*i)->mElseGroup] = true;
+ ElseGroupStore[(*i)->ElseGroup] = true;
else if (!(*itr).second)
continue;
- if ((*i)->mReferenceId)//handle reference
+ if ((*i)->ReferenceId)//handle reference
{
- ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find((*i)->mReferenceId);
+ ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find((*i)->ReferenceId);
if (ref != ConditionReferenceStore.end())
{
if (!IsObjectMeetToConditionList(sourceInfo, (*ref).second))
- ElseGroupStore[(*i)->mElseGroup] = false;
+ ElseGroupStore[(*i)->ElseGroup] = false;
}
else
{
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "IsPlayerMeetToConditionList: Reference template -%u not found",
- (*i)->mReferenceId);//checked at loading, should never happen
+ (*i)->ReferenceId);//checked at loading, should never happen
}
}
else //handle normal condition
{
if (!(*i)->Meets(sourceInfo))
- ElseGroupStore[(*i)->mElseGroup] = false;
+ ElseGroupStore[(*i)->ElseGroup] = false;
}
}
}
@@ -527,21 +527,21 @@ void ConditionMgr::LoadConditions(bool isReload)
Condition* cond = new Condition();
int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
- cond->mSourceGroup = fields[1].GetUInt32();
- cond->mSourceEntry = fields[2].GetInt32();
- cond->mSourceId = fields[3].GetUInt32();
- cond->mElseGroup = fields[4].GetUInt32();
+ cond->SourceGroup = fields[1].GetUInt32();
+ cond->SourceEntry = fields[2].GetInt32();
+ cond->SourceId = fields[3].GetUInt32();
+ cond->ElseGroup = fields[4].GetUInt32();
int32 iConditionTypeOrReference = fields[5].GetInt32();
- cond->mConditionTarget = fields[6].GetUInt8();
- cond->mConditionValue1 = fields[7].GetUInt32();
- cond->mConditionValue2 = fields[8].GetUInt32();
- cond->mConditionValue3 = fields[9].GetUInt32();
- cond->mNegativeCondition = fields[10].GetUInt8();
- cond->ErrorTextd = fields[11].GetUInt32();
- cond->mScriptId = sObjectMgr->GetScriptId(fields[12].GetCString());
+ cond->ConditionTarget = fields[6].GetUInt8();
+ cond->ConditionValue1 = fields[7].GetUInt32();
+ cond->ConditionValue2 = fields[8].GetUInt32();
+ cond->ConditionValue3 = fields[9].GetUInt32();
+ cond->NegativeCondition = fields[10].GetUInt8();
+ cond->ErrorTextId = fields[11].GetUInt32();
+ cond->ScriptId = sObjectMgr->GetScriptId(fields[12].GetCString());
if (iConditionTypeOrReference >= 0)
- cond->mConditionType = ConditionType(iConditionTypeOrReference);
+ cond->ConditionType = ConditionTypes(iConditionTypeOrReference);
if (iConditionTypeOrReference < 0)//it has a reference
{
@@ -551,26 +551,26 @@ void ConditionMgr::LoadConditions(bool isReload)
delete cond;
continue;
}
- cond->mReferenceId = uint32(abs(iConditionTypeOrReference));
+ cond->ReferenceId = uint32(abs(iConditionTypeOrReference));
const char* rowType = "reference template";
if (iSourceTypeOrReferenceId >= 0)
rowType = "reference";
//check for useless data
- if (cond->mConditionTarget)
- sLog->outErrorDb("Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionTarget);
- if (cond->mConditionValue1)
- sLog->outErrorDb("Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionValue1);
- if (cond->mConditionValue2)
- sLog->outErrorDb("Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionValue3);
- if (cond->mNegativeCondition)
- sLog->outErrorDb("Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->mNegativeCondition);
- if (cond->mSourceGroup && iSourceTypeOrReferenceId < 0)
- sLog->outErrorDb("Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->mSourceGroup);
- if (cond->mSourceEntry && iSourceTypeOrReferenceId < 0)
- sLog->outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->mSourceEntry);
+ if (cond->ConditionTarget)
+ sLog->outErrorDb("Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget);
+ if (cond->ConditionValue1)
+ sLog->outErrorDb("Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3);
+ if (cond->NegativeCondition)
+ sLog->outErrorDb("Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition);
+ if (cond->SourceGroup && iSourceTypeOrReferenceId < 0)
+ sLog->outErrorDb("Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup);
+ if (cond->SourceEntry && iSourceTypeOrReferenceId < 0)
+ sLog->outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry);
}
else if (!isConditionTypeValid(cond))//doesn't have reference, validate ConditionType
{
@@ -591,7 +591,7 @@ void ConditionMgr::LoadConditions(bool isReload)
continue;
}//end of reference templates
- cond->mSourceType = ConditionSourceType(iSourceTypeOrReferenceId);
+ cond->SourceType = ConditionSourceType(iSourceTypeOrReferenceId);
//if not a reference and SourceType is invalid, skip
if (iConditionTypeOrReference >= 0 && !isSourceTypeValid(cond))
@@ -601,53 +601,53 @@ void ConditionMgr::LoadConditions(bool isReload)
}
//Grouping is only allowed for some types (loot templates, gossip menus, gossip items)
- if (cond->mSourceGroup && !isGroupable(cond->mSourceType))
+ if (cond->SourceGroup && !isGroupable(cond->SourceType))
{
- sLog->outErrorDb("Condition type %u has not allowed grouping %u!", uint32(cond->mSourceType), cond->mSourceGroup);
+ sLog->outErrorDb("Condition type %u has not allowed grouping %u!", uint32(cond->SourceType), cond->SourceGroup);
delete cond;
continue;
}
- else if (cond->mSourceGroup)
+ else if (cond->SourceGroup)
{
bool valid = false;
//handle grouped conditions
- switch (cond->mSourceType)
+ switch (cond->SourceType)
{
case CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Creature.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Creature.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Disenchant.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Disenchant.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Fishing.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Fishing.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Gameobject.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Gameobject.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Item.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Item.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Mail.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Mail.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Milling.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Milling.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Pickpocketing.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Pickpocketing.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Prospecting.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Prospecting.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Reference.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Reference.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Skinning.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Skinning.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Spell.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Spell.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
valid = addToGossipMenus(cond);
@@ -658,18 +658,18 @@ void ConditionMgr::LoadConditions(bool isReload)
case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
{
//if no list for vehicle create one
- if (VehicleSpellConditionStore.find(cond->mSourceGroup) == VehicleSpellConditionStore.end())
+ if (VehicleSpellConditionStore.find(cond->SourceGroup) == VehicleSpellConditionStore.end())
{
ConditionTypeContainer cmap;
- VehicleSpellConditionStore[cond->mSourceGroup] = cmap;
+ VehicleSpellConditionStore[cond->SourceGroup] = cmap;
}
//if no list for vehicle's spell create one
- if (VehicleSpellConditionStore[cond->mSourceGroup].find(cond->mSourceEntry) == VehicleSpellConditionStore[cond->mSourceGroup].end())
+ if (VehicleSpellConditionStore[cond->SourceGroup].find(cond->SourceEntry) == VehicleSpellConditionStore[cond->SourceGroup].end())
{
ConditionList clist;
- VehicleSpellConditionStore[cond->mSourceGroup][cond->mSourceEntry] = clist;
+ VehicleSpellConditionStore[cond->SourceGroup][cond->SourceEntry] = clist;
}
- VehicleSpellConditionStore[cond->mSourceGroup][cond->mSourceEntry].push_back(cond);
+ VehicleSpellConditionStore[cond->SourceGroup][cond->SourceEntry].push_back(cond);
valid = true;
++count;
continue; // do not add to m_AllocatedMemory to avoid double deleting
@@ -677,18 +677,18 @@ void ConditionMgr::LoadConditions(bool isReload)
case CONDITION_SOURCE_TYPE_SMART_EVENT:
{
// If the entry does not exist, create a new list
- std::pair<int32, uint32> key = std::make_pair(cond->mSourceEntry, cond->mSourceId);
+ std::pair<int32, uint32> key = std::make_pair(cond->SourceEntry, cond->SourceId);
if (SmartEventConditionStore.find(key) == SmartEventConditionStore.end())
{
ConditionTypeContainer cmap;
SmartEventConditionStore[key] = cmap;
}
- if (SmartEventConditionStore[key].find(cond->mSourceGroup) == SmartEventConditionStore[key].end())
+ if (SmartEventConditionStore[key].find(cond->SourceGroup) == SmartEventConditionStore[key].end())
{
ConditionList clist;
- SmartEventConditionStore[key][cond->mSourceGroup] = clist;
+ SmartEventConditionStore[key][cond->SourceGroup] = clist;
}
- SmartEventConditionStore[key][cond->mSourceGroup].push_back(cond);
+ SmartEventConditionStore[key][cond->SourceGroup].push_back(cond);
valid = true;
++count;
continue;
@@ -699,7 +699,7 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!valid)
{
- sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->mSourceGroup);
+ sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->SourceGroup);
delete cond;
}
else
@@ -712,21 +712,21 @@ void ConditionMgr::LoadConditions(bool isReload)
//handle not grouped conditions
//make sure we have a storage list for our SourceType
- if (ConditionStore.find(cond->mSourceType) == ConditionStore.end())
+ if (ConditionStore.find(cond->SourceType) == ConditionStore.end())
{
ConditionTypeContainer mTypeMap;
- ConditionStore[cond->mSourceType] = mTypeMap;//add new empty list for SourceType
+ ConditionStore[cond->SourceType] = mTypeMap;//add new empty list for SourceType
}
//make sure we have a condition list for our SourceType's entry
- if (ConditionStore[cond->mSourceType].find(cond->mSourceEntry) == ConditionStore[cond->mSourceType].end())
+ if (ConditionStore[cond->SourceType].find(cond->SourceEntry) == ConditionStore[cond->SourceType].end())
{
ConditionList mCondList;
- ConditionStore[cond->mSourceType][cond->mSourceEntry] = mCondList;
+ ConditionStore[cond->SourceType][cond->SourceEntry] = mCondList;
}
//add new Condition to storage based on Type/Entry
- ConditionStore[cond->mSourceType][cond->mSourceEntry].push_back(cond);
+ ConditionStore[cond->SourceType][cond->SourceEntry].push_back(cond);
++count;
}
while (result->NextRow());
@@ -739,26 +739,26 @@ bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot)
{
if (!loot)
{
- sLog->outErrorDb("ConditionMgr: LootTemplate %u not found", cond->mSourceGroup);
+ sLog->outErrorDb("ConditionMgr: LootTemplate %u not found", cond->SourceGroup);
return false;
}
if (loot->addConditionItem(cond))
return true;
- sLog->outErrorDb("ConditionMgr: Item %u not found in LootTemplate %u", cond->mSourceEntry, cond->mSourceGroup);
+ sLog->outErrorDb("ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup);
return false;
}
bool ConditionMgr::addToGossipMenus(Condition* cond)
{
- GossipMenusMapBoundsNonConst pMenuBounds = sObjectMgr->GetGossipMenusMapBoundsNonConst(cond->mSourceGroup);
+ GossipMenusMapBoundsNonConst pMenuBounds = sObjectMgr->GetGossipMenusMapBoundsNonConst(cond->SourceGroup);
if (pMenuBounds.first != pMenuBounds.second)
{
- for (GossipMenusMap::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
+ for (GossipMenusContainer::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
{
- if ((*itr).second.entry == cond->mSourceGroup && (*itr).second.text_id == cond->mSourceEntry)
+ if ((*itr).second.entry == cond->SourceGroup && (*itr).second.text_id == cond->SourceEntry)
{
(*itr).second.conditions.push_back(cond);
return true;
@@ -766,18 +766,18 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
}
}
- sLog->outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->mSourceGroup);
+ sLog->outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->SourceGroup);
return false;
}
bool ConditionMgr::addToGossipMenuItems(Condition* cond)
{
- GossipMenuItemsMapBoundsNonConst pMenuItemBounds = sObjectMgr->GetGossipMenuItemsMapBoundsNonConst(cond->mSourceGroup);
+ GossipMenuItemsMapBoundsNonConst pMenuItemBounds = sObjectMgr->GetGossipMenuItemsMapBoundsNonConst(cond->SourceGroup);
if (pMenuItemBounds.first != pMenuItemBounds.second)
{
- for (GossipMenuItemsMap::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
+ for (GossipMenuItemsContainer::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
{
- if ((*itr).second.MenuId == cond->mSourceGroup && (*itr).second.OptionIndex == cond->mSourceEntry)
+ if ((*itr).second.MenuId == cond->SourceGroup && (*itr).second.OptionIndex == cond->SourceEntry)
{
(*itr).second.Conditions.push_back(cond);
return true;
@@ -785,236 +785,236 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
}
}
- sLog->outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->mSourceGroup, cond->mSourceEntry);
+ sLog->outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry);
return false;
}
bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
- if (cond->mSourceType == CONDITION_SOURCE_TYPE_NONE || cond->mSourceType >= CONDITION_SOURCE_TYPE_MAX)
+ if (cond->SourceType == CONDITION_SOURCE_TYPE_NONE || cond->SourceType >= CONDITION_SOURCE_TYPE_MAX)
{
- sLog->outErrorDb("Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->mSourceType));
+ sLog->outErrorDb("Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType));
return false;
}
- switch (cond->mSourceType)
+ switch (cond->SourceType)
{
case CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE:
{
- if (!LootTemplates_Creature.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Creature.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Creature.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Creature.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE:
{
- if (!LootTemplates_Disenchant.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Disenchant.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Disenchant.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Disenchant.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Fishing.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Fishing.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Fishing.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Fishing.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE:
{
- if (!LootTemplates_Gameobject.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Gameobject.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Gameobject.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Gameobject.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE:
{
- if (!LootTemplates_Item.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Item.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Item.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Item.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE:
{
- if (!LootTemplates_Mail.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Mail.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Mail.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Mail.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Milling.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Milling.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Milling.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Milling.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Pickpocketing.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Pickpocketing.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Pickpocketing.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Pickpocketing.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Prospecting.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Prospecting.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Prospecting.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Prospecting.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE:
{
- if (!LootTemplates_Reference.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Reference.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Reference.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Reference.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Skinning.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Skinning.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Skinning.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Skinning.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE:
{
- if (!LootTemplates_Spell.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Spell.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Spell.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Spell.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET:
{
- if (cond->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
+ if (cond->ConditionType != CONDITION_SPELL_SCRIPT_TARGET)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, has ConditionType %u. Only CONDITION_SPELL_SCRIPT_TARGET(18) is valid for CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET(14), ignoring.", cond->mSourceEntry, uint32(cond->mConditionType));
+ sLog->outErrorDb("SourceEntry %u in `condition` table, has ConditionType %u. Only CONDITION_SPELL_SCRIPT_TARGET(18) is valid for CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET(14), ignoring.", cond->SourceEntry, uint32(cond->ConditionType));
return false;
}
- SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->mSourceEntry);
+ SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry);
if (!spellProto)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
@@ -1041,59 +1041,59 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
targetfound = true;
//break;
}
- else if (cond->mConditionValue3 & (1 << i))
+ else if (cond->ConditionValue3 & (1 << i))
{
- cond->mConditionValue3 &= ~(1 << i);
+ cond->ConditionValue3 &= ~(1 << i);
sLog->outErrorDb("SourceEntry %u in `condition` table does not have any implicit target TARGET_UNIT_NEARBY_ENTRY(38) or TARGET_DEST_NEARBY_ENTRY (46)"
", TARGET_UNIT_SRC_AREA_ENTRY(7), TARGET_UNIT_DEST_AREA_ENTRY(8), TARGET_UNIT_CONE_ENTRY(60), TARGET_GAMEOBJECT_NEARBY_ENTRY(40)"
- "TARGET_GAMEOBJECT_SRC_AREA(51), TARGET_GAMEOBJECT_DEST_AREA(52) in effect %u", cond->mSourceEntry, uint32(i));
+ "TARGET_GAMEOBJECT_SRC_AREA(51), TARGET_GAMEOBJECT_DEST_AREA(52) in effect %u", cond->SourceEntry, uint32(i));
}
}
- if (!targetfound && !cond->mConditionValue3) // cond->mConditionValue3 already errored up there
+ if (!targetfound && !cond->ConditionValue3) // cond->mConditionValue3 already errored up there
{
sLog->outErrorDb("SourceEntry %u in `condition` table does not have any implicit target TARGET_UNIT_NEARBY_ENTRY(38) or TARGET_DEST_NEARBY_ENTRY (46)"
", TARGET_UNIT_SRC_AREA_ENTRY(7), TARGET_UNIT_DEST_AREA_ENTRY(8), TARGET_UNIT_CONE_ENTRY(60), TARGET_GAMEOBJECT_NEARBY_ENTRY(40)"
- "TARGET_GAMEOBJECT_SRC_AREA(51), TARGET_GAMEOBJECT_DEST_AREA(52)", cond->mSourceEntry);
+ "TARGET_GAMEOBJECT_SRC_AREA(51), TARGET_GAMEOBJECT_DEST_AREA(52)", cond->SourceEntry);
return false;
}
- if ((cond->mConditionValue1 == SPELL_TARGET_TYPE_DEAD) && !spellProto->IsAllowingDeadTarget())
+ if ((cond->ConditionValue1 == SPELL_TARGET_TYPE_DEAD) && !spellProto->IsAllowingDeadTarget())
{
- sLog->outErrorDb("SourceEntry %u in `condition` table does have SPELL_TARGET_TYPE_DEAD specified but spell does not have SPELL_ATTR2_CAN_TARGET_DEAD", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table does have SPELL_TARGET_TYPE_DEAD specified but spell does not have SPELL_ATTR2_CAN_TARGET_DEAD", cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE:
{
- if (!sObjectMgr->GetCreatureTemplate(cond->mSourceEntry))
+ if (!sObjectMgr->GetCreatureTemplate(cond->SourceEntry))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SPELL:
{
- SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->mSourceEntry);
+ SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry);
if (!spellProto)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET:
{
- if (cond->mConditionType != CONDITION_ITEM_TARGET)
+ if (cond->ConditionType != CONDITION_ITEM_TARGET)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, has ConditionType %u. Only CONDITION_ITEM_TARGET(24) is valid for CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET(18), ignoring.", cond->mSourceEntry, uint32(cond->mConditionType));
+ sLog->outErrorDb("SourceEntry %u in `condition` table, has ConditionType %u. Only CONDITION_ITEM_TARGET(24) is valid for CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET(18), ignoring.", cond->SourceEntry, uint32(cond->ConditionType));
return false;
}
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `item_tamplate`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `item_tamplate`, ignoring.", cond->SourceEntry);
return false;
}
@@ -1121,35 +1121,35 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
if (!bIsItemSpellValid)
{
sLog->outErrorDb("Conditions: CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET for item %u, which either doesn't have item spelltrigger or its spells don't allow caster to select a unit target"
- ", or the spells are already listed in CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET conditions.", cond->mSourceEntry);
+ ", or the spells are already listed in CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET conditions.", cond->SourceEntry);
break;
}
break;
}
case CONDITION_SOURCE_TYPE_QUEST_ACCEPT:
- if (!sObjectMgr->GetQuestTemplate(cond->mSourceEntry))
+ if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
{
- sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->mSourceEntry);
+ sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry);
return false;
}
break;
case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK:
- if (!sObjectMgr->GetQuestTemplate(cond->mSourceEntry))
+ if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
{
- sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->mSourceEntry);
+ sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry);
return false;
}
break;
case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
- if (!sObjectMgr->GetCreatureTemplate(cond->mSourceGroup))
+ if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
- if (!sSpellMgr->GetSpellInfo(cond->mSourceEntry))
+ if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
@@ -1165,129 +1165,129 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
}
bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
- if (cond->mConditionType == CONDITION_NONE || cond->mConditionType >= CONDITION_MAX)
+ if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX)
{
- sLog->outErrorDb("Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->mConditionType), cond->mSourceEntry);
+ sLog->outErrorDb("Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry);
return false;
}
- if (cond->mConditionTarget >= cond->GetMaxAvailableConditionTargets())
+ if (cond->ConditionTarget >= cond->GetMaxAvailableConditionTargets())
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
- switch (cond->mConditionType)
+ switch (cond->ConditionType)
{
case CONDITION_AURA:
{
- if (!sSpellMgr->GetSpellInfo(cond->mConditionValue1))
+ if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
{
- sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 > 2)
+ if (cond->ConditionValue2 > 2)
{
- sLog->outErrorDb("Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2);
return false;
}
break;
}
case CONDITION_ITEM:
{
- ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1);
+ ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
if (!proto)
{
- sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->ConditionValue1);
return false;
}
- if (!cond->mConditionValue2)
+ if (!cond->ConditionValue2)
{
- sLog->outErrorDb("Item condition has 0 set for item count in value2 (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2);
return false;
}
break;
}
case CONDITION_ITEM_EQUIPPED:
{
- ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1);
+ ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
if (!proto)
{
- sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("ItemEquipped condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("ItemEquipped condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ZONEID:
{
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->mConditionValue1);
+ AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1);
if (!areaEntry)
{
- sLog->outErrorDb("ZoneID condition has non existing area (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1);
return false;
}
if (areaEntry->zone != 0)
{
- sLog->outErrorDb("ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("ZoneID condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("ZoneID condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_REPUTATION_RANK:
{
- FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->mConditionValue1);
+ FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->ConditionValue1);
if (!factionEntry)
{
- sLog->outErrorDb("Reputation condition has non existing faction (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("Reputation condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TEAM:
{
- if (cond->mConditionValue1 != ALLIANCE && cond->mConditionValue1 != HORDE)
+ if (cond->ConditionValue1 != ALLIANCE && cond->ConditionValue1 != HORDE)
{
- sLog->outErrorDb("Team condition specifies unknown team (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Team condition specifies unknown team (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Team condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Team condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Team condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Team condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_SKILL:
{
- SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->mConditionValue1);
+ SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->ConditionValue1);
if (!pSkill)
{
- sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 < 1 || cond->mConditionValue2 > sWorld->GetConfigMaxSkillValue())
+ if (cond->ConditionValue2 < 1 || cond->ConditionValue2 > sWorld->GetConfigMaxSkillValue())
{
- sLog->outErrorDb("Skill condition specifies invalid skill value (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Skill condition specifies invalid skill value (%u), skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("Skill condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Skill condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_QUESTREWARDED:
@@ -1295,91 +1295,91 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case CONDITION_QUEST_NONE:
case CONDITION_QUEST_COMPLETE:
{
- if (!sObjectMgr->GetQuestTemplate(cond->mConditionValue1))
+ if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 > 1)
- sLog->outErrorDb("Quest condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Quest condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2 > 1)
+ sLog->outErrorDb("Quest condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Quest condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ACTIVE_EVENT:
{
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
- if (cond->mConditionValue1 >=events.size() || !events[cond->mConditionValue1].isValid())
+ if (cond->ConditionValue1 >=events.size() || !events[cond->ConditionValue1].isValid())
{
- sLog->outErrorDb("ActiveEvent condition has non existing event id (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("ActiveEvent condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("ActiveEvent condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ACHIEVEMENT:
{
- AchievementEntry const* achievement = GetAchievementStore()->LookupEntry(cond->mConditionValue1);
+ AchievementEntry const* achievement = GetAchievementStore()->LookupEntry(cond->ConditionValue1);
if (!achievement)
{
- sLog->outErrorDb("Achivement condition has non existing achivement id (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Achivement condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Achivement condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_CLASS:
{
- if (!(cond->mConditionValue1 & CLASSMASK_ALL_PLAYABLE))
+ if (!(cond->ConditionValue1 & CLASSMASK_ALL_PLAYABLE))
{
- sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->mConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
+ sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Class condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Class condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Class condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Class condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_RACE:
{
- if (!(cond->mConditionValue1 & RACEMASK_ALL_PLAYABLE))
+ if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE))
{
- sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->mConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
+ sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Race condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Race condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Race condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_SPELL_SCRIPT_TARGET:
{
- if (cond->mConditionValue1 >= MAX_SPELL_TARGET_TYPE)
+ if (cond->ConditionValue1 >= MAX_SPELL_TARGET_TYPE)
{
- sLog->outErrorDb("SpellTarget condition has non existing spell target type (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("SpellTarget condition has non existing spell target type (%u), skipped", cond->ConditionValue1);
return false;
}
- switch (cond->mConditionValue1)
+ switch (cond->ConditionValue1)
{
case SPELL_TARGET_TYPE_GAMEOBJECT:
{
- if (cond->mConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->mConditionValue2))
+ if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2))
{
- sLog->outErrorDb("SpellTarget condition has non existing gameobject (%u) as target, skipped", cond->mConditionValue2);
+ sLog->outErrorDb("SpellTarget condition has non existing gameobject (%u) as target, skipped", cond->ConditionValue2);
return false;
}
break;
@@ -1388,16 +1388,16 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case SPELL_TARGET_TYPE_CREATURE:
case SPELL_TARGET_TYPE_DEAD:
{
- if (cond->mConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue2))
+ if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2))
{
- sLog->outErrorDb("SpellTarget condition has non existing creature template entry (%u) as target, skipped", cond->mConditionValue2);
+ sLog->outErrorDb("SpellTarget condition has non existing creature template entry (%u) as target, skipped", cond->ConditionValue2);
return false;
}
- const CreatureTemplate* cInfo = sObjectMgr->GetCreatureTemplate(cond->mConditionValue2);
- if (cond->mSourceEntry == 30427 && !cInfo->SkinLootId)
+ const CreatureTemplate* cInfo = sObjectMgr->GetCreatureTemplate(cond->ConditionValue2);
+ if (cond->SourceEntry == 30427 && !cInfo->SkinLootId)
{
- sLog->outErrorDb("SpellTarget condition has creature entry %u as a target of spellid 30427, but this creature has no skinlootid. Gas extraction will not work!, skipped", cond->mConditionValue2);
+ sLog->outErrorDb("SpellTarget condition has creature entry %u as a target of spellid 30427, but this creature has no skinlootid. Gas extraction will not work!, skipped", cond->ConditionValue2);
return false;
}
break;
@@ -1407,277 +1407,277 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_CREATURE_TARGET:
{
- if (!cond->mConditionValue1 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue1))
+ if (!cond->ConditionValue1 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("CreatureTarget condition has non existing creature template entry (%u) as target, skipped", cond->mConditionValue1);
+ sLog->outErrorDb("CreatureTarget condition has non existing creature template entry (%u) as target, skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("CreatureTarget condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("CreatureTarget condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("CreatureTarget condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("CreatureTarget condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TARGET_HEALTH_BELOW_PCT:
{
- if (cond->mConditionValue1 > 100)
+ if (cond->ConditionValue1 > 100)
{
- sLog->outErrorDb("TargetHealthBelowPct condition has invalid data in value1 (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("TargetHealthBelowPct condition has invalid data in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("TargetHealthBelowPct condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("TargetHealthBelowPct condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("TargetHealthBelowPct condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("TargetHealthBelowPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TARGET_RANGE:
{
- if (cond->mConditionValue2 && cond->mConditionValue2 < cond->mConditionValue1)//maxDist can be 0 for infinit max range
+ if (cond->ConditionValue2 && cond->ConditionValue2 < cond->ConditionValue1)//maxDist can be 0 for infinit max range
{
sLog->outErrorDb("TargetRange condition has max distance closer then min distance, skipped");
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("TargetRange condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("TargetRange condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_MAPID:
{
- MapEntry const* me = sMapStore.LookupEntry(cond->mConditionValue1);
+ MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1);
if (!me)
{
- sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Map condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Map condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Map condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Map condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ITEM_TARGET:
{
- if (!cond->mConditionValue1 || cond->mConditionValue1 > MAX_ITEM_REQ_TARGET_TYPE)
+ if (!cond->ConditionValue1 || cond->ConditionValue1 > MAX_ITEM_REQ_TARGET_TYPE)
{
- sLog->outErrorDb("ItemTarget condition has incorrect target type (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ItemTarget condition has incorrect target type (%u), skipped", cond->ConditionValue1);
return false;
}
- if (!cond->mConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue2))
+ if (!cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2))
{
- sLog->outErrorDb("ItemTarget condition has non existing creature template entry (%u) as target, skipped", cond->mConditionValue2);
+ sLog->outErrorDb("ItemTarget condition has non existing creature template entry (%u) as target, skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("ItemTarget condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ItemTarget condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_SPELL:
{
- if (!sSpellMgr->GetSpellInfo(cond->mConditionValue1))
+ if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
{
- sLog->outErrorDb("Spell condition has non existing spell (Id: %d), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Spell condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Spell condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Spell condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Spell condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_LEVEL:
{
- if (cond->mConditionValue2 >= COMP_TYPE_MAX)
+ if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("Level condition has invalid option (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Level condition has invalid option (%u), skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("Level condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Level condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_DRUNKENSTATE:
{
- if (cond->mConditionValue1 > DRUNKEN_SMASHED)
+ if (cond->ConditionValue1 > DRUNKEN_SMASHED)
{
- sLog->outErrorDb("DrunkState condition has invalid state (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
+ if (cond->ConditionValue2)
{
- sLog->outErrorDb("DrunkState condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ sLog->outErrorDb("DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("DrunkState condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_NEAR_CREATURE:
{
- if (!sObjectMgr->GetCreatureTemplate(cond->mConditionValue1))
+ if (!sObjectMgr->GetCreatureTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("NearCreature condition has non existing creature template entry (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("NearCreature condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_NEAR_GAMEOBJECT:
{
- if (!sObjectMgr->GetGameObjectTemplate(cond->mConditionValue1))
+ if (!sObjectMgr->GetGameObjectTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("NearGameObject condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_OBJECT_ENTRY:
{
- switch (cond->mConditionValue1)
+ switch (cond->ConditionValue1)
{
case TYPEID_UNIT:
- if (cond->mConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue2))
+ if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2))
{
- sLog->outErrorDb("ObjectEntry condition has non existing creature template entry (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2);
return false;
}
break;
case TYPEID_GAMEOBJECT:
- if (cond->mConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->mConditionValue2))
+ if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2))
{
- sLog->outErrorDb("ObjectEntry condition has non existing game object template entry (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2);
return false;
}
break;
case TYPEID_PLAYER:
case TYPEID_CORPSE:
- if (cond->mConditionValue2)
- sLog->outErrorDb("ObjectEntry condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2);
break;
default:
- sLog->outErrorDb("ObjectEntry condition has wrong typeid set (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("ObjectEntry condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TYPE_MASK:
{
- if (!cond->mConditionValue1 || (cond->mConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE)))
+ if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE)))
{
- sLog->outErrorDb("TypeMask condition has invalid typemask set (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("TypeMask condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("TypeMask condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_RELATION_TO:
{
- if (cond->mConditionValue1 >= cond->GetMaxAvailableConditionTargets())
+ if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
{
- sLog->outErrorDb("RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue1 == cond->mConditionTarget)
+ if (cond->ConditionValue1 == cond->ConditionTarget)
{
- sLog->outErrorDb("RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 >= RELATION_MAX)
+ if (cond->ConditionValue2 >= RELATION_MAX)
{
- sLog->outErrorDb("RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("RelationTo condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_REACTION_TO:
{
- if (cond->mConditionValue1 >= cond->GetMaxAvailableConditionTargets())
+ if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
{
- sLog->outErrorDb("ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue1 == cond->mConditionTarget)
+ if (cond->ConditionValue1 == cond->ConditionTarget)
{
- sLog->outErrorDb("ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
return false;
}
- if (!cond->mConditionValue2)
+ if (!cond->ConditionValue2)
{
- sLog->outErrorDb("mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2);
return false;
}
break;
}
case CONDITION_DISTANCE_TO:
{
- if (cond->mConditionValue1 >= cond->GetMaxAvailableConditionTargets())
+ if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
{
- sLog->outErrorDb("DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue1 == cond->mConditionTarget)
+ if (cond->ConditionValue1 == cond->ConditionTarget)
{
- sLog->outErrorDb("DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue3 >= COMP_TYPE_MAX)
+ if (cond->ConditionValue3 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("DistanceTo condition has invalid ComparisionType (%u), skipped", cond->mConditionValue3);
+ sLog->outErrorDb("DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3);
return false;
}
break;
}
case CONDITION_ALIVE:
{
- if (cond->mConditionValue1)
- sLog->outErrorDb("Alive condition has useless data in value1 (%u)!", cond->mConditionValue1);
- if (cond->mConditionValue2)
- sLog->outErrorDb("Alive condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Alive condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue1)
+ sLog->outErrorDb("Alive condition has useless data in value1 (%u)!", cond->ConditionValue1);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Alive condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Alive condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_HP_VAL:
{
- if (cond->mConditionValue2 >= COMP_TYPE_MAX)
+ if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("HpVal condition has invalid ComparisionType (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("HpVal condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_HP_PCT:
{
- if (cond->mConditionValue1 > 100)
+ if (cond->ConditionValue1 > 100)
{
- sLog->outErrorDb("HpPct condition has too big percent value (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 >= COMP_TYPE_MAX)
+ if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("HpPct condition has invalid ComparisionType (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("HpPct condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_AREAID:
@@ -1685,21 +1685,21 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
break;
case CONDITION_WORLD_STATE:
{
- if (!sWorld->getWorldState(cond->mConditionValue1))
+ if (!sWorld->getWorldState(cond->ConditionValue1))
{
- sLog->outErrorDb("World state condition has non existing world state in value1 (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue3)
- sLog->outErrorDb("World state condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("World state condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_PHASEMASK:
{
- if (cond->mConditionValue2)
- sLog->outErrorDb("Phasemask condition has useless data in value2 (%u)!", cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Phasemask condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
default:
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index f3e9c728ac1..dc204ccd0ec 100755
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -28,7 +28,7 @@ class WorldObject;
class LootTemplate;
struct Condition;
-enum ConditionType
+enum ConditionTypes
{ // value1 value2 value3
CONDITION_NONE = 0, // 0 0 0 always true
CONDITION_AURA = 1, // spell_id effindex use target? true if player (or target, if value3) has aura of spell_id with effect effindex
@@ -140,40 +140,40 @@ struct ConditionSourceInfo
struct Condition
{
- ConditionSourceType mSourceType; //SourceTypeOrReferenceId
- uint32 mSourceGroup;
- int32 mSourceEntry;
- uint32 mSourceId; // So far, only used in CONDITION_SOURCE_TYPE_SMART_EVENT
- uint32 mElseGroup;
- ConditionType mConditionType; //ConditionTypeOrReference
- uint8 mConditionTarget;
- uint32 mConditionValue1;
- uint32 mConditionValue2;
- uint32 mConditionValue3;
- uint32 ErrorTextd;
- uint32 mReferenceId;
- uint32 mScriptId;
- bool mNegativeCondition;
+ ConditionSourceType SourceType; //SourceTypeOrReferenceId
+ uint32 SourceGroup;
+ int32 SourceEntry;
+ uint32 SourceId; // So far, only used in CONDITION_SOURCE_TYPE_SMART_EVENT
+ uint32 ElseGroup;
+ ConditionTypes ConditionType; //ConditionTypeOrReference
+ uint32 ConditionValue1;
+ uint32 ConditionValue2;
+ uint32 ConditionValue3;
+ uint32 ErrorTextId;
+ uint32 ReferenceId;
+ uint32 ScriptId;
+ uint8 ConditionTarget;
+ bool NegativeCondition;
Condition()
{
- mSourceType = CONDITION_SOURCE_TYPE_NONE;
- mSourceGroup = 0;
- mSourceEntry = 0;
- mElseGroup = 0;
- mConditionType = CONDITION_NONE;
- mConditionTarget = 0;
- mConditionValue1 = 0;
- mConditionValue2 = 0;
- mConditionValue3 = 0;
- mReferenceId = 0;
- ErrorTextd = 0;
- mScriptId = 0;
- mNegativeCondition = false;
+ SourceType = CONDITION_SOURCE_TYPE_NONE;
+ SourceGroup = 0;
+ SourceEntry = 0;
+ ElseGroup = 0;
+ ConditionType = CONDITION_NONE;
+ ConditionTarget = 0;
+ ConditionValue1 = 0;
+ ConditionValue2 = 0;
+ ConditionValue3 = 0;
+ ReferenceId = 0;
+ ErrorTextId = 0;
+ ScriptId = 0;
+ NegativeCondition = false;
}
bool Meets(ConditionSourceInfo& sourceInfo);
- bool isLoaded() const { return mConditionType > CONDITION_NONE || mReferenceId; }
+ bool isLoaded() const { return ConditionType > CONDITION_NONE || ReferenceId; }
uint32 GetMaxAvailableConditionTargets();
};
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index e622c48761c..1e360342852 100755
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -209,7 +209,7 @@ struct CreatureBaseStats
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
};
-typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsMap;
+typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
struct CreatureLocale
{
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 12c26904169..f303f7bf877 100755
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -881,7 +881,7 @@ bool Item::IsTargetValidForItemUse(Unit* pUnitTarget)
for (ConditionList::const_iterator itr = conditions.begin(); itr != conditions.end(); ++itr)
{
- ItemRequiredTarget irt(ItemRequiredTargetType((*itr)->mConditionValue1), (*itr)->mConditionValue2);
+ ItemRequiredTarget irt(ItemRequiredTargetType((*itr)->ConditionValue1), (*itr)->ConditionValue2);
if (irt.IsFitToRequirements(pUnitTarget))
return true;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 630551cfc2a..64b0e542467 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1570,7 +1570,7 @@ void Player::Update(uint32 p_time)
while (iter != m_timedquests.end())
{
QuestStatusData& q_status = m_QuestStatus[*iter];
- if (q_status.m_timer <= p_time)
+ if (q_status.Timer <= p_time)
{
uint32 quest_id = *iter;
++iter; // current iter will be removed in FailQuest
@@ -1578,7 +1578,7 @@ void Player::Update(uint32 p_time)
}
else
{
- q_status.m_timer -= p_time;
+ q_status.Timer -= p_time;
m_QuestStatusSave[*iter] = true;
++iter;
}
@@ -6955,38 +6955,38 @@ void Player::RewardReputation(Unit* pVictim, float rate)
float favored_rep_mult = 0;
if ((HasAura(32096) || HasAura(32098)) && (zone == 3483 || zone == 3562 || zone == 3836 || zone == 3713 || zone == 3714)) favored_rep_mult = 0.25; // Thrallmar's Favor and Honor Hold's Favor
- else if (HasAura(30754) && (Rep->repfaction1 == 609 || Rep->repfaction2 == 609) && !ChampioningFaction) favored_rep_mult = 0.25; // Cenarion Favor
+ else if (HasAura(30754) && (Rep->RepFaction1 == 609 || Rep->RepFaction2 == 609) && !ChampioningFaction) favored_rep_mult = 0.25; // Cenarion Favor
if (favored_rep_mult > 0) favored_rep_mult *= 2; // Multiplied by 2 because the reputation is divided by 2 for some reason (See "donerep1 / 2" and "donerep2 / 2") -- if you know why this is done, please update/explain :)
// Favored reputation increase END
bool recruitAFriend = GetsRecruitAFriendBonus(false);
- if (Rep->repfaction1 && (!Rep->team_dependent || team == ALLIANCE))
+ if (Rep->RepFaction1 && (!Rep->TeamDependent || team == ALLIANCE))
{
- int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, ChampioningFaction ? ChampioningFaction : Rep->repfaction1, false);
+ int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1, false);
donerep1 = int32(donerep1*(rate + favored_rep_mult));
if (recruitAFriend)
donerep1 = int32(donerep1 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
- FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction1);
+ FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1);
- if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1)
+ if (factionEntry1 && current_reputation_rank1 <= Rep->ReputationMaxCap1)
GetReputationMgr().ModifyReputation(factionEntry1, donerep1);
}
- if (Rep->repfaction2 && (!Rep->team_dependent || team == HORDE))
+ if (Rep->RepFaction2 && (!Rep->TeamDependent || team == HORDE))
{
- int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, ChampioningFaction ? ChampioningFaction : Rep->repfaction2, false);
+ int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2, false);
donerep2 = int32(donerep2*(rate + favored_rep_mult));
if (recruitAFriend)
donerep2 = int32(donerep2 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
- FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction2);
+ FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2);
- if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2)
+ if (factionEntry2 && current_reputation_rank2 <= Rep->ReputationMaxCap2)
GetReputationMgr().ModifyReputation(factionEntry2, donerep2);
}
}
@@ -14086,7 +14086,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
PrepareQuestMenu(source->GetGUID());
- for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
+ for (GossipMenuItemsContainer::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
{
bool canTalk = true;
if (!sConditionMgr->IsObjectMeetToConditions(this, itr->second.Conditions))
@@ -14390,7 +14390,7 @@ uint32 Player::GetGossipTextId(uint32 menuId)
GossipMenusMapBounds menuBounds = sObjectMgr->GetGossipMenusMapBounds(menuId);
- for (GossipMenusMap::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
+ for (GossipMenusContainer::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
if (sConditionMgr->IsObjectMeetToConditions(this, itr->second.conditions))
textId = itr->second.text_id;
@@ -14678,13 +14678,13 @@ bool Player::CanCompleteQuest(uint32 quest_id)
QuestStatusData &q_status = itr->second;
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER))
{
for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; i++)
{
- if (qInfo->RequiredItemCount[i]!= 0 && q_status.m_itemcount[i] < qInfo->RequiredItemCount[i])
+ if (qInfo->RequiredItemCount[i]!= 0 && q_status.ItemCount[i] < qInfo->RequiredItemCount[i])
return false;
}
}
@@ -14696,19 +14696,19 @@ bool Player::CanCompleteQuest(uint32 quest_id)
if (qInfo->RequiredNpcOrGo[i] == 0)
continue;
- if (qInfo->RequiredNpcOrGoCount[i] != 0 && q_status.m_creatureOrGOcount[i] < qInfo->RequiredNpcOrGoCount[i])
+ if (qInfo->RequiredNpcOrGoCount[i] != 0 && q_status.CreatureOrGOCount[i] < qInfo->RequiredNpcOrGoCount[i])
return false;
}
}
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
- if (qInfo->GetPlayersSlain() != 0 && q_status.m_playercount < qInfo->GetPlayersSlain())
+ if (qInfo->GetPlayersSlain() != 0 && q_status.PlayerCount < qInfo->GetPlayersSlain())
return false;
- if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT) && !q_status.m_explored)
+ if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT) && !q_status.Explored)
return false;
- if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && q_status.m_timer == 0)
+ if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && q_status.Timer == 0)
return false;
if (qInfo->GetRewOrReqMoney() < 0)
@@ -14835,23 +14835,23 @@ void Player::AddQuest(Quest const* quest, Object* questGiver)
QuestStatusData& questStatusData = m_QuestStatus[quest_id];
// check for repeatable quests status reset
- questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
- questStatusData.m_explored = false;
+ questStatusData.Status = QUEST_STATUS_INCOMPLETE;
+ questStatusData.Explored = false;
if (quest->HasFlag(QUEST_TRINITY_FLAGS_DELIVER))
{
for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
- questStatusData.m_itemcount[i] = 0;
+ questStatusData.ItemCount[i] = 0;
}
if (quest->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO))
{
for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
- questStatusData.m_creatureOrGOcount[i] = 0;
+ questStatusData.CreatureOrGOCount[i] = 0;
}
if (quest->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
- questStatusData.m_playercount = 0;
+ questStatusData.PlayerCount = 0;
GiveQuestSourceItem(quest);
AdjustQuestReqItemCount(quest, questStatusData);
@@ -14871,14 +14871,14 @@ void Player::AddQuest(Quest const* quest, Object* questGiver)
// shared timed quest
if (questGiver && questGiver->GetTypeId() == TYPEID_PLAYER)
- limittime = questGiver->ToPlayer()->getQuestStatusMap()[quest_id].m_timer / IN_MILLISECONDS;
+ limittime = questGiver->ToPlayer()->getQuestStatusMap()[quest_id].Timer / IN_MILLISECONDS;
AddTimedQuest(quest_id);
- questStatusData.m_timer = limittime * IN_MILLISECONDS;
+ questStatusData.Timer = limittime * IN_MILLISECONDS;
qtime = static_cast<uint32>(time(NULL)) + limittime;
}
else
- questStatusData.m_timer = 0;
+ questStatusData.Timer = 0;
SetQuestSlot(log_slot, quest_id, qtime);
@@ -15141,7 +15141,7 @@ void Player::FailQuest(uint32 questId)
QuestStatusData& q_status = m_QuestStatus[questId];
RemoveTimedQuest(questId);
- q_status.m_timer = 0;
+ q_status.Timer = 0;
SendQuestTimerFailed(questId);
}
@@ -15471,7 +15471,7 @@ bool Player::SatisfyQuestPrevChain(Quest const* qInfo, bool msg)
QuestStatusMap::const_iterator itr = m_QuestStatus.find(*iter);
// If any of the previous quests in chain active, return false
- if (itr != m_QuestStatus.end() && itr->second.m_status != QUEST_STATUS_NONE)
+ if (itr != m_QuestStatus.end() && itr->second.Status != QUEST_STATUS_NONE)
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
@@ -15537,8 +15537,8 @@ bool Player::SatisfyQuestSeasonal(Quest const* qInfo, bool /*msg*/)
return true;
uint16 eventId = sGameEventMgr->GetEventIdForQuest(qInfo);
- if (m_seasonalquests.find(eventId) == m_seasonalquests.end())
- return false;
+ if (m_seasonalquests.find(eventId) == m_seasonalquests.end() || m_seasonalquests[eventId].empty())
+ return true;
// if not found in cooldown list
return m_seasonalquests[eventId].find(qInfo->GetQuestId()) == m_seasonalquests[eventId].end();
@@ -15631,7 +15631,7 @@ QuestStatus Player::GetQuestStatus(uint32 quest_id) const
{
QuestStatusMap::const_iterator itr = m_QuestStatus.find(quest_id);
if (itr != m_QuestStatus.end())
- return itr->second.m_status;
+ return itr->second.Status;
if (Quest const* qInfo = sObjectMgr->GetQuestTemplate(quest_id))
if (!qInfo->IsRepeatable() && m_RewardedQuests.find(quest_id) != m_RewardedQuests.end())
@@ -15647,7 +15647,7 @@ bool Player::CanShareQuest(uint32 quest_id) const
{
QuestStatusMap::const_iterator itr = m_QuestStatus.find(quest_id);
if (itr != m_QuestStatus.end())
- return itr->second.m_status == QUEST_STATUS_INCOMPLETE;
+ return itr->second.Status == QUEST_STATUS_INCOMPLETE;
}
return false;
}
@@ -15656,7 +15656,7 @@ void Player::SetQuestStatus(uint32 quest_id, QuestStatus status)
{
if (sObjectMgr->GetQuestTemplate(quest_id))
{
- m_QuestStatus[quest_id].m_status = status;
+ m_QuestStatus[quest_id].Status = status;
m_QuestStatusSave[quest_id] = true;
}
@@ -15693,7 +15693,7 @@ uint16 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry)
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
if (qInfo->RequiredNpcOrGo[j] == entry)
- return m_QuestStatus[quest_id].m_creatureOrGOcount[j];
+ return m_QuestStatus[quest_id].CreatureOrGOCount[j];
return 0;
}
@@ -15709,7 +15709,7 @@ void Player::AdjustQuestReqItemCount(Quest const* quest, QuestStatusData& questS
{
uint32 curitemcount = GetItemCount(quest->RequiredItemId[i], true);
- questStatusData.m_itemcount[i] = std::min(curitemcount, reqitemcount);
+ questStatusData.ItemCount[i] = std::min(curitemcount, reqitemcount);
m_QuestStatusSave[quest->GetQuestId()] = true;
}
}
@@ -15734,9 +15734,9 @@ void Player::AreaExploredOrEventHappens(uint32 questId)
{
QuestStatusData& q_status = m_QuestStatus[questId];
- if (!q_status.m_explored)
+ if (!q_status.Explored)
{
- q_status.m_explored = true;
+ q_status.Explored = true;
m_QuestStatusSave[questId] = true;
}
}
@@ -15773,7 +15773,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status != QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status != QUEST_STATUS_INCOMPLETE)
continue;
Quest const* qInfo = sObjectMgr->GetQuestTemplate(questid);
@@ -15786,11 +15786,11 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
if (reqitem == entry)
{
uint32 reqitemcount = qInfo->RequiredItemCount[j];
- uint16 curitemcount = q_status.m_itemcount[j];
+ uint16 curitemcount = q_status.ItemCount[j];
if (curitemcount < reqitemcount)
{
uint16 additemcount = curitemcount + count <= reqitemcount ? count : reqitemcount - curitemcount;
- q_status.m_itemcount[j] += additemcount;
+ q_status.ItemCount[j] += additemcount;
m_QuestStatusSave[questid] = true;
@@ -15827,14 +15827,14 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count)
uint32 reqitemcount = qInfo->RequiredItemCount[j];
uint16 curitemcount;
- if (q_status.m_status != QUEST_STATUS_COMPLETE)
- curitemcount = q_status.m_itemcount[j];
+ if (q_status.Status != QUEST_STATUS_COMPLETE)
+ curitemcount = q_status.ItemCount[j];
else
curitemcount = GetItemCount(entry, true);
if (curitemcount < reqitemcount + count)
{
uint16 remitemcount = curitemcount <= reqitemcount ? count : count + reqitemcount - curitemcount;
- q_status.m_itemcount[j] = (curitemcount <= remitemcount) ? 0 : curitemcount - remitemcount;
+ q_status.ItemCount[j] = (curitemcount <= remitemcount) ? 0 : curitemcount - remitemcount;
m_QuestStatusSave[questid] = true;
@@ -15882,7 +15882,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
continue;
// just if !ingroup || !noraidgroup || raidgroup
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
{
@@ -15901,10 +15901,10 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
if (reqkill == real_entry)
{
uint32 reqkillcount = qInfo->RequiredNpcOrGoCount[j];
- uint16 curkillcount = q_status.m_creatureOrGOcount[j];
+ uint16 curkillcount = q_status.CreatureOrGOCount[j];
if (curkillcount < reqkillcount)
{
- q_status.m_creatureOrGOcount[j] = curkillcount + addkillcount;
+ q_status.CreatureOrGOCount[j] = curkillcount + addkillcount;
m_QuestStatusSave[questid] = true;
@@ -15937,16 +15937,16 @@ void Player::KilledPlayerCredit()
continue;
// just if !ingroup || !noraidgroup || raidgroup
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
{
uint32 reqkill = qInfo->GetPlayersSlain();
- uint16 curkill = q_status.m_playercount;
+ uint16 curkill = q_status.PlayerCount;
if (curkill < reqkill)
{
- q_status.m_playercount = curkill + addkillcount;
+ q_status.PlayerCount = curkill + addkillcount;
m_QuestStatusSave[questid] = true;
@@ -15979,7 +15979,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
{
@@ -16020,10 +16020,10 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
continue;
uint32 reqCastCount = qInfo->RequiredNpcOrGoCount[j];
- uint16 curCastCount = q_status.m_creatureOrGOcount[j];
+ uint16 curCastCount = q_status.CreatureOrGOCount[j];
if (curCastCount < reqCastCount)
{
- q_status.m_creatureOrGOcount[j] = curCastCount + addCastCount;
+ q_status.CreatureOrGOCount[j] = curCastCount + addCastCount;
m_QuestStatusSave[questid] = true;
@@ -16056,7 +16056,7 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid)
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO))
{
@@ -16077,10 +16077,10 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid)
if (reqTarget == entry)
{
uint32 reqTalkCount = qInfo->RequiredNpcOrGoCount[j];
- uint16 curTalkCount = q_status.m_creatureOrGOcount[j];
+ uint16 curTalkCount = q_status.CreatureOrGOCount[j];
if (curTalkCount < reqTalkCount)
{
- q_status.m_creatureOrGOcount[j] = curTalkCount + addTalkCount;
+ q_status.CreatureOrGOCount[j] = curTalkCount + addTalkCount;
m_QuestStatusSave[questid] = true;
@@ -16111,7 +16111,7 @@ void Player::MoneyChanged(uint32 count)
{
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (int32(count) >= -qInfo->GetRewOrReqMoney())
{
@@ -16119,7 +16119,7 @@ void Player::MoneyChanged(uint32 count)
CompleteQuest(questid);
}
}
- else if (q_status.m_status == QUEST_STATUS_COMPLETE)
+ else if (q_status.Status == QUEST_STATUS_COMPLETE)
{
if (int32(count) < -qInfo->GetRewOrReqMoney())
IncompleteQuest(questid);
@@ -16139,13 +16139,13 @@ void Player::ReputationChanged(FactionEntry const* factionEntry)
if (qInfo->GetRepObjectiveFaction() == factionEntry->ID)
{
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) >= qInfo->GetRepObjectiveValue())
if (CanCompleteQuest(questid))
CompleteQuest(questid);
}
- else if (q_status.m_status == QUEST_STATUS_COMPLETE)
+ else if (q_status.Status == QUEST_STATUS_COMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) < qInfo->GetRepObjectiveValue())
IncompleteQuest(questid);
@@ -16167,13 +16167,13 @@ void Player::ReputationChanged2(FactionEntry const* factionEntry)
if (qInfo->GetRepObjectiveFaction2() == factionEntry->ID)
{
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) >= qInfo->GetRepObjectiveValue2())
if (CanCompleteQuest(questid))
CompleteQuest(questid);
}
- else if (q_status.m_status == QUEST_STATUS_COMPLETE)
+ else if (q_status.Status == QUEST_STATUS_COMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) < qInfo->GetRepObjectiveValue2())
IncompleteQuest(questid);
@@ -16198,7 +16198,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
QuestStatusData const& q_status = qs_itr->second;
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
Quest const* qinfo = sObjectMgr->GetQuestTemplate(questid);
if (!qinfo)
@@ -16213,7 +16213,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
// This part for ReqItem drop
for (uint8 j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
{
- if (itemid == qinfo->RequiredItemId[j] && q_status.m_itemcount[j] < qinfo->RequiredItemCount[j])
+ if (itemid == qinfo->RequiredItemId[j] && q_status.ItemCount[j] < qinfo->RequiredItemCount[j])
return true;
}
// This part - for ReqSource
@@ -17776,14 +17776,14 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
uint8 qstatus = fields[1].GetUInt8();
if (qstatus < MAX_QUEST_STATUS)
- questStatusData.m_status = QuestStatus(qstatus);
+ questStatusData.Status = QuestStatus(qstatus);
else
{
- questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
+ questStatusData.Status = QUEST_STATUS_INCOMPLETE;
sLog->outError("Player %s have invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).", GetName(), quest_id, qstatus);
}
- questStatusData.m_explored = (fields[2].GetUInt8() > 0);
+ questStatusData.Explored = (fields[2].GetUInt8() > 0);
time_t quest_time = time_t(fields[3].GetUInt32());
@@ -17792,44 +17792,44 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
AddTimedQuest(quest_id);
if (quest_time <= sWorld->GetGameTime())
- questStatusData.m_timer = 1;
+ questStatusData.Timer = 1;
else
- questStatusData.m_timer = uint32((quest_time - sWorld->GetGameTime()) * IN_MILLISECONDS);
+ questStatusData.Timer = uint32((quest_time - sWorld->GetGameTime()) * IN_MILLISECONDS);
}
else
quest_time = 0;
- questStatusData.m_creatureOrGOcount[0] = fields[4].GetUInt16();
- questStatusData.m_creatureOrGOcount[1] = fields[5].GetUInt16();
- questStatusData.m_creatureOrGOcount[2] = fields[6].GetUInt16();
- questStatusData.m_creatureOrGOcount[3] = fields[7].GetUInt16();
- questStatusData.m_itemcount[0] = fields[8].GetUInt16();
- questStatusData.m_itemcount[1] = fields[9].GetUInt16();
- questStatusData.m_itemcount[2] = fields[10].GetUInt16();
- questStatusData.m_itemcount[3] = fields[11].GetUInt16();
- questStatusData.m_playercount = fields[12].GetUInt16();
+ questStatusData.CreatureOrGOCount[0] = fields[4].GetUInt16();
+ questStatusData.CreatureOrGOCount[1] = fields[5].GetUInt16();
+ questStatusData.CreatureOrGOCount[2] = fields[6].GetUInt16();
+ questStatusData.CreatureOrGOCount[3] = fields[7].GetUInt16();
+ questStatusData.ItemCount[0] = fields[8].GetUInt16();
+ questStatusData.ItemCount[1] = fields[9].GetUInt16();
+ questStatusData.ItemCount[2] = fields[10].GetUInt16();
+ questStatusData.ItemCount[3] = fields[11].GetUInt16();
+ questStatusData.PlayerCount = fields[12].GetUInt16();
// add to quest log
- if (slot < MAX_QUEST_LOG_SIZE && questStatusData.m_status != QUEST_STATUS_NONE)
+ if (slot < MAX_QUEST_LOG_SIZE && questStatusData.Status != QUEST_STATUS_NONE)
{
SetQuestSlot(slot, quest_id, uint32(quest_time)); // cast can't be helped
- if (questStatusData.m_status == QUEST_STATUS_COMPLETE)
+ if (questStatusData.Status == QUEST_STATUS_COMPLETE)
SetQuestSlotState(slot, QUEST_STATE_COMPLETE);
- else if (questStatusData.m_status == QUEST_STATUS_FAILED)
+ else if (questStatusData.Status == QUEST_STATUS_FAILED)
SetQuestSlotState(slot, QUEST_STATE_FAIL);
for (uint8 idx = 0; idx < QUEST_OBJECTIVES_COUNT; ++idx)
- if (questStatusData.m_creatureOrGOcount[idx])
- SetQuestSlotCounter(slot, idx, questStatusData.m_creatureOrGOcount[idx]);
+ if (questStatusData.CreatureOrGOCount[idx])
+ SetQuestSlotCounter(slot, idx, questStatusData.CreatureOrGOCount[idx]);
- if (questStatusData.m_playercount)
- SetQuestSlotCounter(slot, QUEST_PVP_KILL_SLOT, questStatusData.m_playercount);
+ if (questStatusData.PlayerCount)
+ SetQuestSlotCounter(slot, QUEST_PVP_KILL_SLOT, questStatusData.PlayerCount);
++slot;
}
- sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.Status, quest_id, GetGUIDLow());
}
}
while (result->NextRow());
@@ -19004,10 +19004,10 @@ void Player::_SaveQuestStatus(SQLTransaction& trans)
if (saveItr->second)
{
statusItr = m_QuestStatus.find(saveItr->first);
- if (statusItr != m_QuestStatus.end() && (keepAbandoned || statusItr->second.m_status != QUEST_STATUS_NONE))
+ if (statusItr != m_QuestStatus.end() && (keepAbandoned || statusItr->second.Status != QUEST_STATUS_NONE))
trans->PAppend("REPLACE INTO character_queststatus (guid, quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, itemcount1, itemcount2, itemcount3, itemcount4, playercount) "
"VALUES ('%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
- GetGUIDLow(), statusItr->first, statusItr->second.m_status, statusItr->second.m_explored, uint64(statusItr->second.m_timer / IN_MILLISECONDS+ sWorld->GetGameTime()), statusItr->second.m_creatureOrGOcount[0], statusItr->second.m_creatureOrGOcount[1], statusItr->second.m_creatureOrGOcount[2], statusItr->second.m_creatureOrGOcount[3], statusItr->second.m_itemcount[0], statusItr->second.m_itemcount[1], statusItr->second.m_itemcount[2], statusItr->second.m_itemcount[3], statusItr->second.m_playercount);
+ GetGUIDLow(), statusItr->first, statusItr->second.Status, statusItr->second.Explored, uint64(statusItr->second.Timer / IN_MILLISECONDS+ sWorld->GetGameTime()), statusItr->second.CreatureOrGOCount[0], statusItr->second.CreatureOrGOCount[1], statusItr->second.CreatureOrGOCount[2], statusItr->second.CreatureOrGOCount[3], statusItr->second.ItemCount[0], statusItr->second.ItemCount[1], statusItr->second.ItemCount[2], statusItr->second.ItemCount[3], statusItr->second.PlayerCount);
}
else
trans->PAppend("DELETE FROM character_queststatus WHERE guid = %u AND quest = %u", GetGUIDLow(), saveItr->first);
@@ -22337,7 +22337,7 @@ bool Player::HasQuestForGO(int32 GOId) const
QuestStatusData const& qs = qs_itr->second;
- if (qs.m_status == QUEST_STATUS_INCOMPLETE)
+ if (qs.Status == QUEST_STATUS_INCOMPLETE)
{
Quest const* qinfo = sObjectMgr->GetQuestTemplate(questid);
if (!qinfo)
@@ -22351,7 +22351,7 @@ bool Player::HasQuestForGO(int32 GOId) const
if (qinfo->RequiredNpcOrGo[j] >= 0) //skip non GO case
continue;
- if ((-1)*GOId == qinfo->RequiredNpcOrGo[j] && qs.m_creatureOrGOcount[j] < qinfo->RequiredNpcOrGoCount[j])
+ if ((-1)*GOId == qinfo->RequiredNpcOrGo[j] && qs.CreatureOrGOCount[j] < qinfo->RequiredNpcOrGoCount[j])
return true;
}
}
@@ -22384,7 +22384,7 @@ void Player::UpdateForQuestWorldObjects()
continue;
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(obj->GetEntry());
- for (SpellClickInfoMap::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
+ for (SpellClickInfoContainer::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
if (_itr->second.questStart || _itr->second.questEnd)
{
obj->BuildCreateUpdateBlockForPlayer(&udata, this);
@@ -24161,7 +24161,7 @@ bool Player::canSeeSpellClickOn(Creature const* c) const
if (clickPair.first == clickPair.second)
return true;
- for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
if (itr->second.IsFitToRequirements(this, c))
return true;
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 345df411165..0fb2a6fb75d 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1062,19 +1062,16 @@ private:
Player* _killer;
Unit* _victim;
- bool _isBattleGround;
-
- bool _isPvP;
-
Group* _group;
float _groupRate;
- uint8 _maxLevel;
Player* _maxNotGrayMember;
uint32 _count;
uint32 _sumLevel;
- bool _isFullXP;
-
uint32 _xp;
+ bool _isFullXP;
+ uint8 _maxLevel;
+ bool _isBattleGround;
+ bool _isPvP;
};
class Player : public Unit, public GridObject<Player>
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3859c8dcafe..04eab0b7d56 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12148,6 +12148,26 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co
|| target->GetReactionTo(this) > REP_NEUTRAL)
return false;
+ // Not all neutral creatures can be attacked
+ if (GetReactionTo(target) == REP_NEUTRAL &&
+ target->GetReactionTo(this) == REP_NEUTRAL)
+ {
+ if (
+ !(target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER) &&
+ !(target->GetTypeId() == TYPEID_UNIT && GetTypeId() == TYPEID_UNIT)
+ )
+ {
+ Player const* player = target->GetTypeId() == TYPEID_PLAYER ? target->ToPlayer() : ToPlayer();
+ Unit const* creature = target->GetTypeId() == TYPEID_UNIT ? target : this;
+
+ if (FactionTemplateEntry const* factionTemplate = creature->getFactionTemplateEntry())
+ if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplate->faction))
+ if (FactionState const* repState = player->GetReputationMgr().GetState(factionEntry))
+ if (repState->Flags & FACTION_FLAG_PEACE_FORCED)
+ return false;
+ }
+ }
+
Creature const* creatureAttacker = ToCreature();
if (creatureAttacker && creatureAttacker->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_UNK26)
return false;
@@ -16853,7 +16873,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
bool success = false;
uint32 spellClickEntry = GetVehicleKit() ? GetVehicleKit()->GetCreatureEntry() : GetEntry();
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(spellClickEntry);
- for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
if (itr->second.IsFitToRequirements(clicker, this))
{
diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h
index 2b1d27243a8..57d9204ad1c 100644
--- a/src/server/game/Entities/Vehicle/VehicleDefines.h
+++ b/src/server/game/Entities/Vehicle/VehicleDefines.h
@@ -65,14 +65,14 @@ struct VehicleAccessory
VehicleAccessory(uint32 entry, int8 seatId, bool isMinion, uint8 summonType, uint32 summonTime) :
AccessoryEntry(entry), SeatId(seatId), IsMinion(isMinion), SummonedType(summonType), SummonTime(summonTime) {}
uint32 AccessoryEntry;
- int8 SeatId;
uint32 IsMinion;
- uint8 SummonedType;
uint32 SummonTime;
+ int8 SeatId;
+ uint8 SummonedType;
};
typedef std::vector<VehicleAccessory> VehicleAccessoryList;
-typedef std::map<uint32, VehicleAccessoryList> VehicleAccessoryMap;
+typedef std::map<uint32, VehicleAccessoryList> VehicleAccessoryContainer;
typedef std::map<int8, VehicleSeat> SeatMap;
#endif
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index dc78489070e..2feb2eddf76 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -251,32 +251,32 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
return true;
}
-ObjectMgr::ObjectMgr(): m_auctionid(1), m_equipmentSetGuid(1),
- m_ItemTextId(1), m_mailid(1), m_hiPetNumber(1), m_hiCharGuid(1),
- m_hiCreatureGuid(1), m_hiPetGuid(1), m_hiVehicleGuid(1), m_hiItemGuid(1),
- m_hiGoGuid(1), m_hiDoGuid(1), m_hiCorpseGuid(1), m_hiMoTransGuid(1)
+ObjectMgr::ObjectMgr(): _auctionId(1), _equipmentSetGuid(1),
+ _itemTextId(1), _mailId(1), _hiPetNumber(1), _hiCharGuid(1),
+ _hiCreatureGuid(1), _hiPetGuid(1), _hiVehicleGuid(1), _hiItemGuid(1),
+ _hiGoGuid(1), _hiDoGuid(1), _hiCorpseGuid(1), _hiMoTransGuid(1)
{}
ObjectMgr::~ObjectMgr()
{
- for (QuestMap::iterator i = mQuestTemplates.begin(); i != mQuestTemplates.end(); ++i)
+ for (QuestMap::iterator i = _questTemplates.begin(); i != _questTemplates.end(); ++i)
delete i->second;
- for (PetLevelInfoMap::iterator i = petInfo.begin(); i != petInfo.end(); ++i)
+ for (PetLevelInfoContainer::iterator i = _petInfoStore.begin(); i != _petInfoStore.end(); ++i)
delete[] i->second;
// free only if loaded
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] playerClassInfo[class_].levelInfo;
+ delete[] _playerClassInfo[class_].levelInfo;
for (int race = 0; race < MAX_RACES; ++race)
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] playerInfo[race][class_].levelInfo;
+ delete[] _playerInfo[race][class_].levelInfo;
- for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
+ for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
- m_mCacheTrainerSpellMap.clear();
+ _cacheTrainerSpellStore.clear();
}
void ObjectMgr::AddLocaleString(std::string const& s, LocaleConstant locale, StringVector& data)
@@ -294,7 +294,7 @@ void ObjectMgr::LoadCreatureLocales()
{
uint32 oldMSTime = getMSTime();
- mCreatureLocaleMap.clear(); // need for reload case
+ _creatureLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, name_loc1, subname_loc1, name_loc2, subname_loc2, name_loc3, subname_loc3, name_loc4, subname_loc4, name_loc5, subname_loc5, name_loc6, subname_loc6, name_loc7, subname_loc7, name_loc8, subname_loc8 FROM locales_creature");
@@ -307,7 +307,7 @@ void ObjectMgr::LoadCreatureLocales()
uint32 entry = fields[0].GetUInt32();
- CreatureLocale& data = mCreatureLocaleMap[entry];
+ CreatureLocale& data = _creatureLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -317,7 +317,7 @@ void ObjectMgr::LoadCreatureLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)mCreatureLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -325,7 +325,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
{
uint32 oldMSTime = getMSTime();
- mGossipMenuItemsLocaleMap.clear(); // need for reload case
+ _gossipMenuItemsLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT menu_id, id, "
"option_text_loc1, box_text_loc1, option_text_loc2, box_text_loc2, "
@@ -344,7 +344,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
uint16 menuId = fields[0].GetUInt16();
uint16 id = fields[1].GetUInt16();
- GossipMenuItemsLocale& data = mGossipMenuItemsLocaleMap[MAKE_PAIR32(menuId, id)];
+ GossipMenuItemsLocale& data = _gossipMenuItemsLocaleStore[MAKE_PAIR32(menuId, id)];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -354,7 +354,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)mGossipMenuItemsLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -362,7 +362,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
{
uint32 oldMSTime = getMSTime();
- mPointOfInterestLocaleMap.clear(); // need for reload case
+ _pointOfInterestLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, icon_name_loc1, icon_name_loc2, icon_name_loc3, icon_name_loc4, icon_name_loc5, icon_name_loc6, icon_name_loc7, icon_name_loc8 FROM locales_points_of_interest");
@@ -375,13 +375,13 @@ void ObjectMgr::LoadPointOfInterestLocales()
uint32 entry = fields[0].GetUInt32();
- PointOfInterestLocale& data = mPointOfInterestLocaleMap[entry];
+ PointOfInterestLocale& data = _pointOfInterestLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)mPointOfInterestLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -422,19 +422,15 @@ void ObjectMgr::LoadCreatureTemplates()
uint32 entry = fields[0].GetUInt32();
- CreatureTemplate& creatureTemplate = CreatureTemplateStore[entry];
+ CreatureTemplate& creatureTemplate = _creatureTemplateStore[entry];
creatureTemplate.Entry = entry;
for (uint8 i = 0; i < MAX_DIFFICULTY - 1; ++i)
- {
creatureTemplate.DifficultyEntry[i] = fields[1 + i].GetUInt32();
- }
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
- {
creatureTemplate.KillCredit[i] = fields[4 + i].GetUInt32();
- }
creatureTemplate.Modelid1 = fields[6].GetUInt32();
creatureTemplate.Modelid2 = fields[7].GetUInt32();
@@ -479,14 +475,10 @@ void ObjectMgr::LoadCreatureTemplates()
creatureTemplate.SkinLootId = fields[46].GetUInt32();
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
- {
creatureTemplate.resistance[i] = fields[47 + i -1].GetInt32();
- }
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
- {
creatureTemplate.spells[i] = fields[53 + i].GetUInt32();
- }
creatureTemplate.PetSpellDataId = fields[61].GetUInt32();
creatureTemplate.VehicleId = fields[62].GetUInt32();
@@ -501,9 +493,7 @@ void ObjectMgr::LoadCreatureTemplates()
creatureTemplate.RacialLeader = fields[71].GetBool();
for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
- {
creatureTemplate.questItems[i] = fields[72 + i].GetUInt32();
- }
creatureTemplate.movementId = fields[78].GetUInt32();
creatureTemplate.RegenHealth = fields[79].GetBool();
@@ -517,10 +507,8 @@ void ObjectMgr::LoadCreatureTemplates()
while (result->NextRow());
// Checking needs to be done after loading because of the difficulty self referencing
- for (CreatureTemplateContainer::const_iterator itr = CreatureTemplateStore.begin(); itr != CreatureTemplateStore.end(); ++itr)
- {
+ for (CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr)
CheckCreatureTemplate(&itr->second);
- }
sLog->outString(">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
@@ -553,7 +541,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
continue;
}
- CreatureAddon& creatureAddon = CreatureTemplateAddonStore[entry];
+ CreatureAddon& creatureAddon = _creatureTemplateAddonStore[entry];
creatureAddon.path_id = fields[1].GetUInt32();
creatureAddon.mount = fields[2].GetUInt32();
@@ -619,20 +607,20 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
for (uint32 diff2 = 0; diff2 < MAX_DIFFICULTY - 1 && ok2; ++diff2)
{
ok2 = false;
- if (difficultyEntries[diff2].find(cInfo->Entry) != difficultyEntries[diff2].end())
+ if (_difficultyEntries[diff2].find(cInfo->Entry) != _difficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.",
cInfo->Entry, diff2 + 1, cInfo->DifficultyEntry[diff], diff + 1);
continue;
}
- if (difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != difficultyEntries[diff2].end())
+ if (_difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _difficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1);
continue;
}
- if (hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != hasDifficultyEntries[diff2].end())
+ if (_hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _hasDifficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff], diff2 + 1);
@@ -694,8 +682,8 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
continue;
}
- hasDifficultyEntries[diff].insert(cInfo->Entry);
- difficultyEntries[diff].insert(cInfo->DifficultyEntry[diff]);
+ _hasDifficultyEntries[diff].insert(cInfo->Entry);
+ _difficultyEntries[diff].insert(cInfo->DifficultyEntry[diff]);
ok = true;
}
@@ -915,13 +903,13 @@ void ObjectMgr::LoadCreatureAddons()
uint32 guid = fields[0].GetUInt32();
- if (mCreatureDataMap.find(guid) == mCreatureDataMap.end())
+ if (_creatureDataStore.find(guid) == _creatureDataStore.end())
{
sLog->outErrorDb("Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid);
continue;
}
- CreatureAddon& creatureAddon = CreatureAddonStore[guid];
+ CreatureAddon& creatureAddon = _creatureAddonStore[guid];
creatureAddon.path_id = fields[1].GetUInt32();
creatureAddon.mount = fields[2].GetUInt32();
@@ -965,8 +953,8 @@ void ObjectMgr::LoadCreatureAddons()
CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
{
- CreatureAddonContainer::const_iterator itr = CreatureAddonStore.find(lowguid);
- if (itr != CreatureAddonStore.end())
+ CreatureAddonContainer::const_iterator itr = _creatureAddonStore.find(lowguid);
+ if (itr != _creatureAddonStore.end())
return &(itr->second);
return NULL;
@@ -974,8 +962,8 @@ CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
{
- CreatureAddonContainer::const_iterator itr = CreatureTemplateAddonStore.find(entry);
- if (itr != CreatureTemplateAddonStore.end())
+ CreatureAddonContainer::const_iterator itr = _creatureTemplateAddonStore.find(entry);
+ if (itr != _creatureTemplateAddonStore.end())
return &(itr->second);
return NULL;
@@ -983,8 +971,8 @@ CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
EquipmentInfo const* ObjectMgr::GetEquipmentInfo(uint32 entry)
{
- EquipmentInfoContainer::const_iterator itr = EquipmentInfoStore.find(entry);
- if (itr != EquipmentInfoStore.end())
+ EquipmentInfoContainer::const_iterator itr = _equipmentInfoStore.find(entry);
+ if (itr != _equipmentInfoStore.end())
return &(itr->second);
return NULL;
@@ -1010,7 +998,7 @@ void ObjectMgr::LoadEquipmentTemplates()
uint16 entry = fields[0].GetUInt16();
- EquipmentInfo& equipmentInfo = EquipmentInfoStore[entry];
+ EquipmentInfo& equipmentInfo = _equipmentInfoStore[entry];
equipmentInfo.ItemEntry[0] = fields[1].GetUInt32();
equipmentInfo.ItemEntry[1] = fields[2].GetUInt32();
@@ -1057,8 +1045,8 @@ void ObjectMgr::LoadEquipmentTemplates()
CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId)
{
- CreatureModelContainer::const_iterator itr = CreatureModelStore.find(modelId);
- if (itr != CreatureModelStore.end())
+ CreatureModelContainer::const_iterator itr = _creatureModelStore.find(modelId);
+ if (itr != _creatureModelStore.end())
return &(itr->second);
return NULL;
@@ -1142,7 +1130,7 @@ void ObjectMgr::LoadCreatureModelInfo()
uint32 modelId = fields[0].GetUInt32();
- CreatureModelInfo& modelInfo = CreatureModelStore[modelId];
+ CreatureModelInfo& modelInfo = _creatureModelStore[modelId];
modelInfo.bounding_radius = fields[1].GetFloat();
modelInfo.combat_reach = fields[2].GetFloat();
@@ -1183,7 +1171,7 @@ void ObjectMgr::LoadLinkedRespawn()
{
uint32 oldMSTime = getMSTime();
- mLinkedRespawnMap.clear();
+ _linkedRespawnStore.clear();
QueryResult result = WorldDatabase.Query("SELECT guid, linkedGuid, linkType FROM linked_respawn ORDER BY guid ASC");
if (!result)
@@ -1356,12 +1344,12 @@ void ObjectMgr::LoadLinkedRespawn()
}
if (!error)
- mLinkedRespawnMap[guid] = linkedGuid;
+ _linkedRespawnStore[guid] = linkedGuid;
}
while (result->NextRow());
- sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(mLinkedRespawnMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1375,7 +1363,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
if (!linkedGuidLow) // we're removing the linking
{
- mLinkedRespawnMap.erase(guid);
+ _linkedRespawnStore.erase(guid);
PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CRELINKED_RESPAWN);
stmt->setUInt32(0, guidLow);
WorldDatabase.Execute(stmt);
@@ -1399,7 +1387,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
uint64 linkedGuid = MAKE_NEW_GUID(linkedGuidLow, slave->id, HIGHGUID_UNIT);
- mLinkedRespawnMap[guid] = linkedGuid;
+ _linkedRespawnStore[guid] = linkedGuid;
PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_REP_CREATURE_LINKED_RESPAWN);
stmt->setUInt32(0, guidLow);
stmt->setUInt32(1, linkedGuidLow);
@@ -1426,15 +1414,6 @@ void ObjectMgr::LoadCreatures()
return;
}
- // Build single time for check creature data
- std::set<uint32> difficultyCreatures[MAX_DIFFICULTY - 1];
-
- CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
- for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
- for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1; ++diff)
- if (itr->second.DifficultyEntry[diff])
- difficultyCreatures[diff].insert(itr->second.DifficultyEntry[diff]);
-
// Build single time for check spawnmask
std::map<uint32, uint32> spawnMasks;
for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i)
@@ -1458,7 +1437,7 @@ void ObjectMgr::LoadCreatures()
continue;
}
- CreatureData& data = mCreatureDataMap[guid];
+ CreatureData& data = _creatureDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
@@ -1495,7 +1474,7 @@ void ObjectMgr::LoadCreatures()
bool ok = true;
for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff)
{
- if (difficultyCreatures[diff].find(data.id) != difficultyCreatures[diff].end())
+ if (_difficultyEntries[diff].find(data.id) != _difficultyEntries[diff].end())
{
sLog->outErrorDb("Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.",
guid, diff + 1, data.id);
@@ -1569,7 +1548,7 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.creatures.insert(guid);
}
}
@@ -1583,7 +1562,7 @@ void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.creatures.erase(guid);
}
}
@@ -1786,7 +1765,7 @@ void ObjectMgr::LoadGameobjects()
continue;
}
- GameObjectData& data = mGameObjectDataMap[guid];
+ GameObjectData& data = _gameObjectDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
@@ -1862,7 +1841,7 @@ void ObjectMgr::LoadGameobjects()
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)mGameObjectDataMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1874,7 +1853,7 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.gameobjects.insert(guid);
}
}
@@ -1888,7 +1867,7 @@ void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.gameobjects.erase(guid);
}
}
@@ -1916,12 +1895,12 @@ void ObjectMgr::LoadCreatureRespawnTimes()
uint32 respawn_time = fields[1].GetUInt32();
uint32 instance = fields[2].GetUInt32();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
++count;
} while (result->NextRow());
- sLog->outString(">> Loaded %lu creature respawn times in %u ms", (unsigned long)mCreatureRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu creature respawn times in %u ms", (unsigned long)_creatureRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1950,13 +1929,13 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
uint32 respawn_time = fields[1].GetUInt32();
uint32 instance = fields[2].GetUInt32();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
++count;
} while (result->NextRow());
sLog->outString();
- sLog->outString(">> Loaded %lu gameobject respawn times in %u ms", (unsigned long)mGORespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobject respawn times in %u ms", (unsigned long)_goRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
}
Player* ObjectMgr::GetPlayerByLowGUID(uint32 lowguid) const
@@ -2053,7 +2032,7 @@ void ObjectMgr::LoadItemLocales()
{
uint32 oldMSTime = getMSTime();
- mItemLocaleMap.clear(); // need for reload case
+ _itemLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, name_loc1, description_loc1, name_loc2, description_loc2, name_loc3, description_loc3, name_loc4, description_loc4, name_loc5, description_loc5, name_loc6, description_loc6, name_loc7, description_loc7, name_loc8, description_loc8 FROM locales_item");
@@ -2066,7 +2045,7 @@ void ObjectMgr::LoadItemLocales()
uint32 entry = fields[0].GetUInt32();
- ItemLocale& data = mItemLocaleMap[entry];
+ ItemLocale& data = _itemLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -2076,7 +2055,7 @@ void ObjectMgr::LoadItemLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)mItemLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -2133,7 +2112,7 @@ void ObjectMgr::LoadItemTemplates()
uint32 entry = fields[0].GetUInt32();
- ItemTemplate& itemTemplate = ItemTemplateStore[entry];
+ ItemTemplate& itemTemplate = _itemTemplateStore[entry];
itemTemplate.ItemId = entry;
itemTemplate.Class = uint32(fields[1].GetUInt8());
@@ -2679,8 +2658,8 @@ void ObjectMgr::LoadItemTemplates()
ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry)
{
- ItemTemplateContainer::const_iterator itr = ItemTemplateStore.find(entry);
- if (itr != ItemTemplateStore.end())
+ ItemTemplateContainer::const_iterator itr = _itemTemplateStore.find(entry);
+ if (itr != _itemTemplateStore.end())
return &(itr->second);
return NULL;
@@ -2690,7 +2669,7 @@ void ObjectMgr::LoadItemSetNameLocales()
{
uint32 oldMSTime = getMSTime();
- mItemSetNameLocaleMap.clear(); // need for reload case
+ _itemSetNameLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT `entry`, `name_loc1`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc5`, `name_loc6`, `name_loc7`, `name_loc8` FROM `locales_item_set_names`");
@@ -2703,13 +2682,13 @@ void ObjectMgr::LoadItemSetNameLocales()
uint32 entry = fields[0].GetUInt32();
- ItemSetNameLocale& data = mItemSetNameLocaleMap[entry];
+ ItemSetNameLocale& data = _itemSetNameLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
} while (result->NextRow());
- sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(mItemSetNameLocaleMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -2717,7 +2696,7 @@ void ObjectMgr::LoadItemSetNames()
{
uint32 oldMSTime = getMSTime();
- mItemSetNameMap.clear(); // needed for reload case
+ _itemSetNameStore.clear(); // needed for reload case
std::set<uint32> itemSetItems;
@@ -2755,7 +2734,7 @@ void ObjectMgr::LoadItemSetNames()
continue;
}
- ItemSetNameEntry &data = mItemSetNameMap[entry];
+ ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = fields[1].GetString();
uint32 invType = fields[2].GetUInt32();
@@ -2781,7 +2760,7 @@ void ObjectMgr::LoadItemSetNames()
if (pProto)
{
sLog->outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry);
- ItemSetNameEntry &data = mItemSetNameMap[entry];
+ ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = pProto->Name1;
data.InventoryType = pProto->InventoryType;
++count;
@@ -2799,7 +2778,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
{
uint32 oldMSTime = getMSTime();
- m_VehicleTemplateAccessoryMap.clear(); // needed for reload case
+ _vehicleTemplateAccessoryStore.clear(); // needed for reload case
uint32 count = 0;
@@ -2835,13 +2814,13 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
continue;
}
- if (mSpellClickInfoMap.find(uiEntry) == mSpellClickInfoMap.end())
+ if (_spellClickInfoStore.find(uiEntry) == _spellClickInfoStore.end())
{
sLog->outErrorDb("Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry);
continue;
}
- m_VehicleTemplateAccessoryMap[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
+ _vehicleTemplateAccessoryStore[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
}
@@ -2855,7 +2834,7 @@ void ObjectMgr::LoadVehicleAccessories()
{
uint32 oldMSTime = getMSTime();
- m_VehicleAccessoryMap.clear(); // needed for reload case
+ _vehicleAccessoryStore.clear(); // needed for reload case
uint32 count = 0;
@@ -2885,7 +2864,7 @@ void ObjectMgr::LoadVehicleAccessories()
continue;
}
- m_VehicleAccessoryMap[uiGUID].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
+ _vehicleAccessoryStore[uiGUID].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
}
@@ -2940,7 +2919,7 @@ void ObjectMgr::LoadPetLevelInfo()
continue;
}
- PetLevelInfo*& pInfoMapEntry = petInfo[creature_id];
+ PetLevelInfo*& pInfoMapEntry = _petInfoStore[creature_id];
if (pInfoMapEntry == NULL)
pInfoMapEntry = new PetLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -2962,7 +2941,7 @@ void ObjectMgr::LoadPetLevelInfo()
while (result->NextRow());
// Fill gaps and check integrity
- for (PetLevelInfoMap::iterator itr = petInfo.begin(); itr != petInfo.end(); ++itr)
+ for (PetLevelInfoContainer::iterator itr = _petInfoStore.begin(); itr != _petInfoStore.end(); ++itr)
{
PetLevelInfo* pInfo = itr->second;
@@ -2993,8 +2972,8 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
- PetLevelInfoMap::const_iterator itr = petInfo.find(creature_id);
- if (itr == petInfo.end())
+ PetLevelInfoContainer::const_iterator itr = _petInfoStore.find(creature_id);
+ if (itr == _petInfoStore.end())
return NULL;
return &itr->second[level-1]; // data for level 1 stored in [0] array element, ...
@@ -3003,7 +2982,7 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
{
if (count > 0)
- playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
+ _playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
else
{
if (count < -1)
@@ -3110,7 +3089,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
pInfo->mapId = mapId;
pInfo->areaId = areaId;
@@ -3249,10 +3228,10 @@ void ObjectMgr::LoadPlayerInfo()
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
for (uint32 r = min_race; r < max_race; ++r)
for (uint32 c = min_class; c < max_class; ++c)
- playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
+ _playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
}
else
- playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
+ _playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
++count;
}
@@ -3298,7 +3277,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt8(), fields[3].GetUInt32(), fields[4].GetUInt8()));
++count;
@@ -3346,7 +3325,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerClassInfo* pClassInfo = &playerClassInfo[current_class];
+ PlayerClassInfo* pClassInfo = &_playerClassInfo[current_class];
if (!pClassInfo->levelInfo)
pClassInfo->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -3367,7 +3346,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerClassInfo* pClassInfo = &playerClassInfo[class_];
+ PlayerClassInfo* pClassInfo = &_playerClassInfo[class_];
// fatal error if no level 1 data
if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0)
@@ -3439,7 +3418,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
if (!pInfo->levelInfo)
pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -3468,7 +3447,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerInfo* pInfo = &playerInfo[race][class_];
+ PlayerInfo* pInfo = &_playerInfo[race][class_];
// skip non loaded combinations
if (!pInfo->displayId_m || !pInfo->displayId_f)
@@ -3510,9 +3489,9 @@ void ObjectMgr::LoadPlayerInfo()
{
uint32 oldMSTime = getMSTime();
- mPlayerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
+ _playerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
for (uint8 level = 0; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
- mPlayerXPperLevel[level] = 0;
+ _playerXPperLevel[level] = 0;
// 0 1
QueryResult result = WorldDatabase.Query("SELECT lvl, xp_for_next_level FROM player_xp_for_level");
@@ -3545,7 +3524,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
//PlayerXPperLevel
- mPlayerXPperLevel[current_level] = current_xp;
+ _playerXPperLevel[current_level] = current_xp;
++count;
}
while (result->NextRow());
@@ -3553,10 +3532,10 @@ void ObjectMgr::LoadPlayerInfo()
// fill level gaps
for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
{
- if (mPlayerXPperLevel[level] == 0)
+ if (_playerXPperLevel[level] == 0)
{
sLog->outErrorDb("Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level);
- mPlayerXPperLevel[level] = mPlayerXPperLevel[level-1]+100;
+ _playerXPperLevel[level] = _playerXPperLevel[level-1]+100;
}
}
@@ -3570,7 +3549,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassL
if (level < 1 || class_ >= MAX_CLASSES)
return;
- PlayerClassInfo const* pInfo = &playerClassInfo[class_];
+ PlayerClassInfo const* pInfo = &_playerClassInfo[class_];
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
@@ -3583,7 +3562,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES)
return;
- PlayerInfo const* pInfo = &playerInfo[race][class_];
+ PlayerInfo const* pInfo = &_playerInfo[race][class_];
if (pInfo->displayId_m == 0 || pInfo->displayId_f == 0)
return;
@@ -3596,7 +3575,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const
{
// base data (last known level)
- *info = playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
+ *info = _playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
@@ -3674,9 +3653,9 @@ void ObjectMgr::LoadQuests()
uint32 oldMSTime = getMSTime();
// For reload case
- for (QuestMap::const_iterator itr=mQuestTemplates.begin(); itr != mQuestTemplates.end(); ++itr)
+ for (QuestMap::const_iterator itr=_questTemplates.begin(); itr != _questTemplates.end(); ++itr)
delete itr->second;
- mQuestTemplates.clear();
+ _questTemplates.clear();
mExclusiveQuestGroups.clear();
@@ -3731,13 +3710,13 @@ void ObjectMgr::LoadQuests()
Field* fields = result->Fetch();
Quest * newQuest = new Quest(fields);
- mQuestTemplates[newQuest->GetQuestId()] = newQuest;
+ _questTemplates[newQuest->GetQuestId()] = newQuest;
} while (result->NextRow());
std::map<uint32, uint32> usedMailTemplates;
// Post processing
- for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
+ for (QuestMap::iterator iter = _questTemplates.begin(); iter != _questTemplates.end(); ++iter)
{
// skip post-loading checks for disabled quests
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, iter->first, NULL))
@@ -4273,8 +4252,8 @@ void ObjectMgr::LoadQuests()
if (qinfo->NextQuestIdChain)
{
- QuestMap::iterator qNextItr = mQuestTemplates.find(qinfo->NextQuestIdChain);
- if (qNextItr == mQuestTemplates.end())
+ QuestMap::iterator qNextItr = _questTemplates.find(qinfo->NextQuestIdChain);
+ if (qNextItr == _questTemplates.end())
{
sLog->outErrorDb("Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.",
qinfo->GetQuestId(), qinfo->NextQuestIdChain, qinfo->NextQuestIdChain);
@@ -4287,7 +4266,7 @@ void ObjectMgr::LoadQuests()
// fill additional data stores
if (qinfo->PrevQuestId)
{
- if (mQuestTemplates.find(abs(qinfo->GetPrevQuestId())) == mQuestTemplates.end())
+ if (_questTemplates.find(abs(qinfo->GetPrevQuestId())) == _questTemplates.end())
{
sLog->outErrorDb("Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId());
}
@@ -4299,8 +4278,8 @@ void ObjectMgr::LoadQuests()
if (qinfo->NextQuestId)
{
- QuestMap::iterator qNextItr = mQuestTemplates.find(abs(qinfo->GetNextQuestId()));
- if (qNextItr == mQuestTemplates.end())
+ QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId()));
+ if (qNextItr == _questTemplates.end())
{
sLog->outErrorDb("Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
}
@@ -4349,7 +4328,7 @@ void ObjectMgr::LoadQuests()
}
}
- sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)mQuestTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -4357,7 +4336,7 @@ void ObjectMgr::LoadQuestLocales()
{
uint32 oldMSTime = getMSTime();
- mQuestLocaleMap.clear(); // need for reload case
+ _questLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"Title_loc1, Details_loc1, Objectives_loc1, OfferRewardText_loc1, RequestItemsText_loc1, EndText_loc1, CompletedText_loc1, ObjectiveText1_loc1, ObjectiveText2_loc1, ObjectiveText3_loc1, ObjectiveText4_loc1, "
@@ -4379,7 +4358,7 @@ void ObjectMgr::LoadQuestLocales()
uint32 entry = fields[0].GetUInt32();
- QuestLocale& data = mQuestLocaleMap[entry];
+ QuestLocale& data = _questLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -4398,7 +4377,7 @@ void ObjectMgr::LoadQuestLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)mQuestLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -4858,7 +4837,7 @@ void ObjectMgr::LoadSpellScriptNames()
{
uint32 oldMSTime = getMSTime();
- mSpellScripts.clear(); // need for reload case
+ _spellScriptsStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT spell_id, ScriptName FROM spell_script_names");
@@ -4902,12 +4881,12 @@ void ObjectMgr::LoadSpellScriptNames()
}
while (spellInfo)
{
- mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName)));
+ _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
spellInfo = sSpellMgr->GetSpellInfo(spellInfo->Id)->GetNextRankSpell();
}
}
else
- mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName)));
+ _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
++count;
}
while (result->NextRow());
@@ -4920,7 +4899,7 @@ void ObjectMgr::ValidateSpellScripts()
{
uint32 oldMSTime = getMSTime();
- if (mSpellScripts.empty())
+ if (_spellScriptsStore.empty())
{
sLog->outString(">> Validated 0 scripts.");
sLog->outString();
@@ -4929,14 +4908,14 @@ void ObjectMgr::ValidateSpellScripts()
uint32 count = 0;
- for (SpellScriptsMap::iterator itr = mSpellScripts.begin(); itr != mSpellScripts.end();)
+ for (SpellScriptsContainer::iterator itr = _spellScriptsStore.begin(); itr != _spellScriptsStore.end();)
{
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->first);
- std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> > SpellScriptLoaders;
+ std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> > SpellScriptLoaders;
sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders);
- itr = mSpellScripts.upper_bound(itr->first);
+ itr = _spellScriptsStore.upper_bound(itr->first);
- for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
+ for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
{
SpellScript* spellScript = sitr->first->GetSpellScript();
AuraScript* auraScript = sitr->first->GetAuraScript();
@@ -4964,7 +4943,7 @@ void ObjectMgr::ValidateSpellScripts()
}
if (!valid)
{
- mSpellScripts.erase(sitr->second);
+ _spellScriptsStore.erase(sitr->second);
}
}
++count;
@@ -4992,7 +4971,7 @@ void ObjectMgr::LoadPageTexts()
{
Field* fields = result->Fetch();
- PageText& pageText = PageTextStore[fields[0].GetUInt32()];
+ PageText& pageText = _pageTextStore[fields[0].GetUInt32()];
pageText.Text = fields[1].GetString();
pageText.NextPage = fields[2].GetInt16();
@@ -5001,12 +4980,12 @@ void ObjectMgr::LoadPageTexts()
}
while (result->NextRow());
- for (PageTextContainer::const_iterator itr = PageTextStore.begin(); itr != PageTextStore.end(); ++itr)
+ for (PageTextContainer::const_iterator itr = _pageTextStore.begin(); itr != _pageTextStore.end(); ++itr)
{
if (itr->second.NextPage)
{
- PageTextContainer::const_iterator itr2 = PageTextStore.find(itr->second.NextPage);
- if (itr2 == PageTextStore.end())
+ PageTextContainer::const_iterator itr2 = _pageTextStore.find(itr->second.NextPage);
+ if (itr2 == _pageTextStore.end())
sLog->outErrorDb("Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage);
}
@@ -5018,8 +4997,8 @@ void ObjectMgr::LoadPageTexts()
PageText const* ObjectMgr::GetPageText(uint32 pageEntry)
{
- PageTextContainer::const_iterator itr = PageTextStore.find(pageEntry);
- if (itr != PageTextStore.end())
+ PageTextContainer::const_iterator itr = _pageTextStore.find(pageEntry);
+ if (itr != _pageTextStore.end())
return &(itr->second);
return NULL;
@@ -5029,7 +5008,7 @@ void ObjectMgr::LoadPageTextLocales()
{
uint32 oldMSTime = getMSTime();
- mPageTextLocaleMap.clear(); // need for reload case
+ _pageTextLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_page_text");
@@ -5042,13 +5021,13 @@ void ObjectMgr::LoadPageTextLocales()
uint32 entry = fields[0].GetUInt32();
- PageTextLocale& data = mPageTextLocaleMap[entry];
+ PageTextLocale& data = _pageTextLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)mPageTextLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -5084,7 +5063,7 @@ void ObjectMgr::LoadInstanceTemplate()
instanceTemplate.Parent = uint32(fields[1].GetUInt16());
instanceTemplate.ScriptId = sObjectMgr->GetScriptId(fields[2].GetCString());
- InstanceTemplateStore[mapID] = instanceTemplate;
+ _instanceTemplateStore[mapID] = instanceTemplate;
++count;
}
@@ -5096,8 +5075,8 @@ void ObjectMgr::LoadInstanceTemplate()
InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID)
{
- InstanceTemplateContainer::const_iterator itr = InstanceTemplateStore.find(uint16(mapID));
- if (itr != InstanceTemplateStore.end())
+ InstanceTemplateContainer::const_iterator itr = _instanceTemplateStore.find(uint16(mapID));
+ if (itr != _instanceTemplateStore.end())
return &(itr->second);
return NULL;
@@ -5174,7 +5153,7 @@ void ObjectMgr::LoadInstanceEncounters()
continue;
}
- DungeonEncounterList& encounters = mDungeonEncounters[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)];
+ DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)];
encounters.push_back(new DungeonEncounter(dungeonEncounter, EncounterCreditType(creditType), creditEntry, lastEncounterDungeon));
++count;
} while (result->NextRow());
@@ -5185,8 +5164,8 @@ void ObjectMgr::LoadInstanceEncounters()
GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const
{
- GossipTextMap::const_iterator itr = mGossipText.find(Text_ID);
- if (itr != mGossipText.end())
+ GossipTextContainer::const_iterator itr = _gossipTextStore.find(Text_ID);
+ if (itr != _gossipTextStore.end())
return &itr->second;
return NULL;
}
@@ -5222,7 +5201,7 @@ void ObjectMgr::LoadGossipText()
continue;
}
- GossipText& gText = mGossipText[Text_ID];
+ GossipText& gText = _gossipTextStore[Text_ID];
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; i++)
{
@@ -5248,7 +5227,7 @@ void ObjectMgr::LoadNpcTextLocales()
{
uint32 oldMSTime = getMSTime();
- mNpcTextLocaleMap.clear(); // need for reload case
+ _npcTextLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"Text0_0_loc1, Text0_1_loc1, Text1_0_loc1, Text1_1_loc1, Text2_0_loc1, Text2_1_loc1, Text3_0_loc1, Text3_1_loc1, Text4_0_loc1, Text4_1_loc1, Text5_0_loc1, Text5_1_loc1, Text6_0_loc1, Text6_1_loc1, Text7_0_loc1, Text7_1_loc1, "
@@ -5270,7 +5249,7 @@ void ObjectMgr::LoadNpcTextLocales()
uint32 entry = fields[0].GetUInt32();
- NpcTextLocale& data = mNpcTextLocaleMap[entry];
+ NpcTextLocale& data = _npcTextLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -5283,7 +5262,7 @@ void ObjectMgr::LoadNpcTextLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)mNpcTextLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -5422,7 +5401,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
{
uint32 oldMSTime = getMSTime();
- mQuestAreaTriggerMap.clear(); // need for reload case
+ _questAreaTriggerStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id, quest FROM areatrigger_involvedrelation");
@@ -5469,7 +5448,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
// continue; - quest modified to required objective and trigger can be allowed.
}
- mQuestAreaTriggerMap[trigger_ID] = quest_ID;
+ _questAreaTriggerStore[trigger_ID] = quest_ID;
} while (result->NextRow());
@@ -5481,7 +5460,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
{
uint32 oldMSTime = getMSTime();
- mTavernAreaTriggerSet.clear(); // need for reload case
+ _tavernAreaTriggerStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id FROM areatrigger_tavern");
@@ -5509,7 +5488,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
continue;
}
- mTavernAreaTriggerSet.insert(Trigger_ID);
+ _tavernAreaTriggerStore.insert(Trigger_ID);
} while (result->NextRow());
sLog->outString(">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -5520,7 +5499,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
{
uint32 oldMSTime = getMSTime();
- mAreaTriggerScripts.clear(); // need for reload case
+ _areaTriggerScriptStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, ScriptName FROM areatrigger_scripts");
if (!result)
@@ -5547,7 +5526,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
- mAreaTriggerScripts[Trigger_ID] = GetScriptId(scriptName);
+ _areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName);
} while (result->NextRow());
sLog->outString(">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -5662,7 +5641,7 @@ void ObjectMgr::LoadGraveyardZones()
{
uint32 oldMSTime = getMSTime();
- mGraveYardMap.clear(); // need for reload case
+ GraveYardStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id, ghost_zone, faction FROM game_graveyard_zone");
@@ -5755,8 +5734,8 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
// then check faction
// if mapId != graveyard.mapId (ghost in instance) and search any graveyard associated
// then check faction
- GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::const_iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::const_iterator graveUp = GraveYardStore.upper_bound(zoneId);
MapEntry const* map = sMapStore.LookupEntry(MapId);
// not need to check validity of map object; MapId _MUST_ be valid here
@@ -5781,7 +5760,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
MapEntry const* mapEntry = sMapStore.LookupEntry(MapId);
- for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardContainer::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
GraveYardData const& data = itr->second;
@@ -5861,10 +5840,10 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
GraveYardData const* ObjectMgr::FindGraveYardData(uint32 id, uint32 zoneId)
{
- GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::const_iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::const_iterator graveUp = GraveYardStore.upper_bound(zoneId);
- for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardContainer::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
if (itr->second.safeLocId == id)
return &itr->second;
@@ -5883,7 +5862,7 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool per
data.safeLocId = id;
data.team = team;
- mGraveYardMap.insert(GraveYardMap::value_type(zoneId, data));
+ GraveYardStore.insert(GraveYardContainer::value_type(zoneId, data));
// add link to DB
if (persist)
@@ -5902,8 +5881,8 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool per
void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist /*= false*/)
{
- GraveYardMap::iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::iterator graveUp = GraveYardStore.upper_bound(zoneId);
if (graveLow == graveUp)
{
//sLog->outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
@@ -5912,7 +5891,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
bool found = false;
- GraveYardMap::iterator itr;
+ GraveYardContainer::iterator itr;
for (itr = graveLow; itr != graveUp; ++itr)
{
@@ -5936,7 +5915,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
return;
// remove from links
- mGraveYardMap.erase(itr);
+ GraveYardStore.erase(itr);
// remove link from DB
if (persist)
@@ -5957,7 +5936,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
{
uint32 oldMSTime = getMSTime();
- mAreaTriggers.clear(); // need for reload case
+ _areaTriggerStore.clear(); // need for reload case
// 0 1 2 3 4 5
QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
@@ -6006,7 +5985,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
continue;
}
- mAreaTriggers[Trigger_ID] = at;
+ _areaTriggerStore[Trigger_ID] = at;
} while (result->NextRow());
@@ -6018,7 +5997,7 @@ void ObjectMgr::LoadAccessRequirements()
{
uint32 oldMSTime = getMSTime();
- mAccessRequirements.clear(); // need for reload case
+ _accessRequirementStore.clear(); // need for reload case
// 0 1 2 3 4 5 6 7 8 9
QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement");
@@ -6099,7 +6078,7 @@ void ObjectMgr::LoadAccessRequirements()
}
}
- mAccessRequirements[requirement_ID] = ar;
+ _accessRequirementStore[requirement_ID] = ar;
} while (result->NextRow());
sLog->outString(">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -6129,7 +6108,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
}
uint32 entrance_map = uint32(mapEntry->entrance_map);
- for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
+ for (AreaTriggerContainer::const_iterator itr = _areaTriggerStore.begin(); itr != _areaTriggerStore.end(); ++itr)
if ((!useParentDbValue && itr->second.target_mapId == entrance_map) || (useParentDbValue && itr->second.target_mapId == parentId))
{
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
@@ -6144,7 +6123,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
*/
AreaTrigger const* ObjectMgr::GetMapEntranceTrigger(uint32 Map) const
{
- for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
+ for (AreaTriggerContainer::const_iterator itr = _areaTriggerStore.begin(); itr != _areaTriggerStore.end(); ++itr)
{
if (itr->second.target_mapId == Map)
{
@@ -6160,41 +6139,41 @@ void ObjectMgr::SetHighestGuids()
{
QueryResult result = CharacterDatabase.Query("SELECT MAX(guid) FROM characters");
if (result)
- m_hiCharGuid = (*result)[0].GetUInt32()+1;
+ _hiCharGuid = (*result)[0].GetUInt32()+1;
result = WorldDatabase.Query("SELECT MAX(guid) FROM creature");
if (result)
- m_hiCreatureGuid = (*result)[0].GetUInt32()+1;
+ _hiCreatureGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(guid) FROM item_instance");
if (result)
- m_hiItemGuid = (*result)[0].GetUInt32()+1;
+ _hiItemGuid = (*result)[0].GetUInt32()+1;
- // Cleanup other tables from not existed guids ( >= m_hiItemGuid)
- CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query
+ // Cleanup other tables from not existed guids ( >= _hiItemGuid)
+ CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", _hiItemGuid); // One-time query
result = WorldDatabase.Query("SELECT MAX(guid) FROM gameobject");
if (result)
- m_hiGoGuid = (*result)[0].GetUInt32()+1;
+ _hiGoGuid = (*result)[0].GetUInt32()+1;
result = WorldDatabase.Query("SELECT MAX(guid) FROM transports");
if (result)
- m_hiMoTransGuid = (*result)[0].GetUInt32()+1;
+ _hiMoTransGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(id) FROM auctionhouse");
if (result)
- m_auctionid = (*result)[0].GetUInt32()+1;
+ _auctionId = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(id) FROM mail");
if (result)
- m_mailid = (*result)[0].GetUInt32()+1;
+ _mailId = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(corpseGuid) FROM corpse");
if (result)
- m_hiCorpseGuid = (*result)[0].GetUInt32()+1;
+ _hiCorpseGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(arenateamid) FROM arena_team");
if (result)
@@ -6202,7 +6181,7 @@ void ObjectMgr::SetHighestGuids()
result = CharacterDatabase.Query("SELECT MAX(setguid) FROM character_equipmentsets");
if (result)
- m_equipmentSetGuid = (*result)[0].GetUInt64()+1;
+ _equipmentSetGuid = (*result)[0].GetUInt64()+1;
result = CharacterDatabase.Query("SELECT MAX(guildId) FROM guild");
if (result)
@@ -6215,32 +6194,32 @@ void ObjectMgr::SetHighestGuids()
uint32 ObjectMgr::GenerateAuctionID()
{
- if (m_auctionid >= 0xFFFFFFFE)
+ if (_auctionId >= 0xFFFFFFFE)
{
sLog->outError("Auctions ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_auctionid++;
+ return _auctionId++;
}
uint64 ObjectMgr::GenerateEquipmentSetGuid()
{
- if (m_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
+ if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
{
sLog->outError("EquipmentSet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_equipmentSetGuid++;
+ return _equipmentSetGuid++;
}
uint32 ObjectMgr::GenerateMailID()
{
- if (m_mailid >= 0xFFFFFFFE)
+ if (_mailId >= 0xFFFFFFFE)
{
sLog->outError("Mail ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_mailid++;
+ return _mailId++;
}
uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
@@ -6248,68 +6227,68 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
switch (guidhigh)
{
case HIGHGUID_ITEM:
- if (m_hiItemGuid >= 0xFFFFFFFE)
+ if (_hiItemGuid >= 0xFFFFFFFE)
{
sLog->outError("Item guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiItemGuid++;
+ return _hiItemGuid++;
case HIGHGUID_UNIT:
- if (m_hiCreatureGuid >= 0x00FFFFFE)
+ if (_hiCreatureGuid >= 0x00FFFFFE)
{
sLog->outError("Creature guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCreatureGuid++;
+ return _hiCreatureGuid++;
case HIGHGUID_PET:
- if (m_hiPetGuid >= 0x00FFFFFE)
+ if (_hiPetGuid >= 0x00FFFFFE)
{
sLog->outError("Pet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiPetGuid++;
+ return _hiPetGuid++;
case HIGHGUID_VEHICLE:
- if (m_hiVehicleGuid >= 0x00FFFFFF)
+ if (_hiVehicleGuid >= 0x00FFFFFF)
{
sLog->outError("Vehicle guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiVehicleGuid++;
+ return _hiVehicleGuid++;
case HIGHGUID_PLAYER:
- if (m_hiCharGuid >= 0xFFFFFFFE)
+ if (_hiCharGuid >= 0xFFFFFFFE)
{
sLog->outError("Players guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCharGuid++;
+ return _hiCharGuid++;
case HIGHGUID_GAMEOBJECT:
- if (m_hiGoGuid >= 0x00FFFFFE)
+ if (_hiGoGuid >= 0x00FFFFFE)
{
sLog->outError("Gameobject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiGoGuid++;
+ return _hiGoGuid++;
case HIGHGUID_CORPSE:
- if (m_hiCorpseGuid >= 0xFFFFFFFE)
+ if (_hiCorpseGuid >= 0xFFFFFFFE)
{
sLog->outError("Corpse guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCorpseGuid++;
+ return _hiCorpseGuid++;
case HIGHGUID_DYNAMICOBJECT:
- if (m_hiDoGuid >= 0xFFFFFFFE)
+ if (_hiDoGuid >= 0xFFFFFFFE)
{
sLog->outError("DynamicObject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiDoGuid++;
+ return _hiDoGuid++;
case HIGHGUID_MO_TRANSPORT:
- if (m_hiMoTransGuid >= 0xFFFFFFFE)
+ if (_hiMoTransGuid >= 0xFFFFFFFE)
{
sLog->outError("MO Transport guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiMoTransGuid++;
+ return _hiMoTransGuid++;
default:
ASSERT(0);
}
@@ -6322,7 +6301,7 @@ void ObjectMgr::LoadGameObjectLocales()
{
uint32 oldMSTime = getMSTime();
- mGameObjectLocaleMap.clear(); // need for reload case
+ _gameObjectLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"name_loc1, name_loc2, name_loc3, name_loc4, name_loc5, name_loc6, name_loc7, name_loc8, "
@@ -6338,7 +6317,7 @@ void ObjectMgr::LoadGameObjectLocales()
uint32 entry = fields[0].GetUInt32();
- GameObjectLocale& data = mGameObjectLocaleMap[entry];
+ GameObjectLocale& data = _gameObjectLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
@@ -6347,7 +6326,7 @@ void ObjectMgr::LoadGameObjectLocales()
AddLocaleString(fields[i + (TOTAL_LOCALES - 1)].GetString(), LocaleConstant(i), data.CastBarCaption);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)mGameObjectLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -6436,7 +6415,7 @@ void ObjectMgr::LoadGameObjectTemplate()
uint32 entry = fields[0].GetUInt32();
- GameObjectTemplate& got = GameObjectTemplateStore[entry];
+ GameObjectTemplate& got = _gameObjectTemplateStore[entry];
got.entry = entry;
got.type = uint32(fields[1].GetUInt8());
@@ -6622,7 +6601,7 @@ void ObjectMgr::LoadExplorationBaseXP()
Field* fields = result->Fetch();
uint8 level = fields[0].GetUInt8();
uint32 basexp = fields[1].GetUInt32();
- mBaseXPTable[level] = basexp;
+ _baseXPTable[level] = basexp;
++count;
}
while (result->NextRow());
@@ -6633,13 +6612,13 @@ void ObjectMgr::LoadExplorationBaseXP()
uint32 ObjectMgr::GetBaseXP(uint8 level)
{
- return mBaseXPTable[level] ? mBaseXPTable[level] : 0;
+ return _baseXPTable[level] ? _baseXPTable[level] : 0;
}
uint32 ObjectMgr::GetXPForLevel(uint8 level)
{
- if (level < mPlayerXPperLevel.size())
- return mPlayerXPperLevel[level];
+ if (level < _playerXPperLevel.size())
+ return _playerXPperLevel[level];
return 0;
}
@@ -6666,9 +6645,9 @@ void ObjectMgr::LoadPetNames()
uint32 entry = fields[1].GetUInt32();
bool half = fields[2].GetBool();
if (half)
- PetHalfName1[entry].push_back(word);
+ _petHalfName1[entry].push_back(word);
else
- PetHalfName0[entry].push_back(word);
+ _petHalfName0[entry].push_back(word);
++count;
}
while (result->NextRow());
@@ -6685,17 +6664,17 @@ void ObjectMgr::LoadPetNumber()
if (result)
{
Field* fields = result->Fetch();
- m_hiPetNumber = fields[0].GetUInt32()+1;
+ _hiPetNumber = fields[0].GetUInt32()+1;
}
- sLog->outString(">> Loaded the max pet number: %d in %u ms", m_hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
std::string ObjectMgr::GeneratePetName(uint32 entry)
{
- StringVector & list0 = PetHalfName0[entry];
- StringVector & list1 = PetHalfName1[entry];
+ StringVector & list0 = _petHalfName0[entry];
+ StringVector & list1 = _petHalfName1[entry];
if (list0.empty() || list1.empty())
{
@@ -6712,7 +6691,7 @@ std::string ObjectMgr::GeneratePetName(uint32 entry)
uint32 ObjectMgr::GeneratePetNumber()
{
- return ++m_hiPetNumber;
+ return ++_hiPetNumber;
}
void ObjectMgr::LoadCorpses()
@@ -6759,7 +6738,7 @@ void ObjectMgr::LoadReputationRewardRate()
{
uint32 oldMSTime = getMSTime();
- m_RepRewardRateMap.clear(); // for reload case
+ _repRewardRateStore.clear(); // for reload case
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, creature_rate, spell_rate FROM reputation_reward_rate");
@@ -6809,7 +6788,7 @@ void ObjectMgr::LoadReputationRewardRate()
continue;
}
- m_RepRewardRateMap[factionId] = repRate;
+ _repRewardRateStore[factionId] = repRate;
++count;
}
@@ -6824,7 +6803,7 @@ void ObjectMgr::LoadReputationOnKill()
uint32 oldMSTime = getMSTime();
// For reload case
- mRepOnKill.clear();
+ _repOnKillStore.clear();
uint32 count = 0;
@@ -6848,15 +6827,15 @@ void ObjectMgr::LoadReputationOnKill()
uint32 creature_id = fields[0].GetUInt32();
ReputationOnKillEntry repOnKill;
- repOnKill.repfaction1 = fields[1].GetUInt32();
- repOnKill.repfaction2 = fields[2].GetUInt32();
- repOnKill.is_teamaward1 = fields[3].GetBool();
- repOnKill.reputation_max_cap1 = fields[4].GetUInt32();
- repOnKill.repvalue1 = fields[5].GetInt32();
- repOnKill.is_teamaward2 = fields[6].GetBool();
- repOnKill.reputation_max_cap2 = fields[7].GetUInt32();
- repOnKill.repvalue2 = fields[8].GetInt32();
- repOnKill.team_dependent = fields[9].GetUInt8();
+ repOnKill.RepFaction1 = fields[1].GetUInt32();
+ repOnKill.RepFaction2 = fields[2].GetUInt32();
+ repOnKill.IsTeamAward1 = fields[3].GetBool();
+ repOnKill.ReputationMaxCap1 = fields[4].GetUInt32();
+ repOnKill.RepValue1 = fields[5].GetInt32();
+ repOnKill.IsTeamAward2 = fields[6].GetBool();
+ repOnKill.ReputationMaxCap2 = fields[7].GetUInt32();
+ repOnKill.RepValue2 = fields[8].GetInt32();
+ repOnKill.TeamDependent = fields[9].GetUInt8();
if (!GetCreatureTemplate(creature_id))
{
@@ -6864,27 +6843,27 @@ void ObjectMgr::LoadReputationOnKill()
continue;
}
- if (repOnKill.repfaction1)
+ if (repOnKill.RepFaction1)
{
- FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1);
+ FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.RepFaction1);
if (!factionEntry1)
{
- sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction1);
+ sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction1);
continue;
}
}
- if (repOnKill.repfaction2)
+ if (repOnKill.RepFaction2)
{
- FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2);
+ FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.RepFaction2);
if (!factionEntry2)
{
- sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction2);
+ sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction2);
continue;
}
}
- mRepOnKill[creature_id] = repOnKill;
+ _repOnKillStore[creature_id] = repOnKill;
++count;
} while (result->NextRow());
@@ -6897,7 +6876,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
{
uint32 oldMSTime = getMSTime();
- m_RepSpilloverTemplateMap.clear(); // for reload case
+ _repSpilloverTemplateStore.clear(); // for reload case
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4 FROM reputation_spillover_template");
@@ -6996,7 +6975,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
continue;
}
- m_RepSpilloverTemplateMap[factionId] = repTemplate;
+ _repSpilloverTemplateStore[factionId] = repTemplate;
++count;
}
@@ -7010,7 +6989,7 @@ void ObjectMgr::LoadPointsOfInterest()
{
uint32 oldMSTime = getMSTime();
- mPointsOfInterest.clear(); // need for reload case
+ _pointsOfInterestStore.clear(); // need for reload case
uint32 count = 0;
@@ -7044,7 +7023,7 @@ void ObjectMgr::LoadPointsOfInterest()
continue;
}
- mPointsOfInterest[point_id] = POI;
+ _pointsOfInterestStore[point_id] = POI;
++count;
} while (result->NextRow());
@@ -7057,7 +7036,7 @@ void ObjectMgr::LoadQuestPOI()
{
uint32 oldMSTime = getMSTime();
- mQuestPOIMap.clear(); // need for reload case
+ _questPOIStore.clear(); // need for reload case
uint32 count = 0;
@@ -7117,7 +7096,7 @@ void ObjectMgr::LoadQuestPOI()
QuestPOI POI(id, objIndex, mapId, WorldMapAreaId, FloorId, unk3, unk4);
POI.points = POIs[questId][id];
- mQuestPOIMap[questId].push_back(POI);
+ _questPOIStore[questId].push_back(POI);
++count;
} while (result->NextRow());
@@ -7130,7 +7109,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
{
uint32 oldMSTime = getMSTime();
- mSpellClickInfoMap.clear();
+ _spellClickInfoStore.clear();
// 0 1 2 3 4 5 6 7 8
QueryResult result = WorldDatabase.Query("SELECT npc_entry, spell_id, quest_start, quest_start_active, quest_end, cast_flags, aura_required, aura_forbidden, user_type FROM npc_spellclick_spells");
@@ -7190,7 +7169,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
// quest might be 0 to enable spellclick independent of any quest
if (quest_start)
{
- if (mQuestTemplates.find(quest_start) == mQuestTemplates.end())
+ if (_questTemplates.find(quest_start) == _questTemplates.end())
{
sLog->outErrorDb("Table npc_spellclick_spells references unknown start quest %u. Skipping entry.", quest_start);
continue;
@@ -7203,7 +7182,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
// quest might be 0 to enable spellclick active infinity after start quest
if (quest_end)
{
- if (mQuestTemplates.find(quest_end) == mQuestTemplates.end())
+ if (_questTemplates.find(quest_end) == _questTemplates.end())
{
sLog->outErrorDb("Table npc_spellclick_spells references unknown end quest %u. Skipping entry.", quest_end);
continue;
@@ -7224,7 +7203,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
info.auraRequired = auraRequired;
info.auraForbidden = auraForbidden;
info.userType = SpellClickUserTypes(userType);
- mSpellClickInfoMap.insert(SpellClickInfoMap::value_type(npc_entry, info));
+ _spellClickInfoStore.insert(SpellClickInfoContainer::value_type(npc_entry, info));
++count;
}
@@ -7235,7 +7214,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
{
- if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && mSpellClickInfoMap.find(itr->second.Entry) == mSpellClickInfoMap.end())
+ if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && _spellClickInfoStore.find(itr->second.Entry) == _spellClickInfoStore.end())
{
sLog->outErrorDb("npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry);
const_cast<CreatureTemplate*>(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_SPELLCLICK;
@@ -7257,9 +7236,9 @@ void ObjectMgr::SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t
// This function can be called from various map threads concurrently
{
- m_CreatureRespawnTimesMtx.acquire();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.acquire();
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CREATURE_RESPAWN);
@@ -7273,9 +7252,9 @@ void ObjectMgr::RemoveCreatureRespawnTime(uint32 loguid, uint32 instance)
{
// This function can be called from various map threads concurrently
{
- m_CreatureRespawnTimesMtx.acquire();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.acquire();
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN);
@@ -7291,7 +7270,7 @@ void ObjectMgr::DeleteCreatureData(uint32 guid)
if (data)
RemoveCreatureFromGrid(guid, data);
- mCreatureDataMap.erase(guid);
+ _creatureDataStore.erase(guid);
}
void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
@@ -7305,9 +7284,9 @@ void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
// This function can be called from different map threads concurrently
{
- m_GORespawnTimesMtx.acquire();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.acquire();
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
+ _goRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GO_RESPAWN);
@@ -7321,9 +7300,9 @@ void ObjectMgr::RemoveGORespawnTime(uint32 loguid, uint32 instance)
{
// This function can be called from different map threads concurrently
{
- m_GORespawnTimesMtx.acquire();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.acquire();
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
+ _goRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GO_RESPAWN);
@@ -7338,28 +7317,28 @@ void ObjectMgr::DeleteRespawnTimeForInstance(uint32 instance)
RespawnTimes::iterator next;
{
- m_GORespawnTimesMtx.acquire();
- for (RespawnTimes::iterator itr = mGORespawnTimes.begin(); itr != mGORespawnTimes.end(); itr = next)
+ _goRespawnTimesMutex.acquire();
+ for (RespawnTimes::iterator itr = _goRespawnTimes.begin(); itr != _goRespawnTimes.end(); itr = next)
{
next = itr;
++next;
if (GUID_HIPART(itr->first) == instance)
- mGORespawnTimes.erase(itr);
+ _goRespawnTimes.erase(itr);
}
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.release();
}
{
- m_CreatureRespawnTimesMtx.acquire();
- for (RespawnTimes::iterator itr = mCreatureRespawnTimes.begin(); itr != mCreatureRespawnTimes.end(); itr = next)
+ _creatureRespawnTimesMutex.acquire();
+ for (RespawnTimes::iterator itr = _creatureRespawnTimes.begin(); itr != _creatureRespawnTimes.end(); itr = next)
{
next = itr;
++next;
if (GUID_HIPART(itr->first) == instance)
- mCreatureRespawnTimes.erase(itr);
+ _creatureRespawnTimes.erase(itr);
}
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN_BY_INSTANCE);
stmt->setUInt32(0, instance);
@@ -7376,20 +7355,20 @@ void ObjectMgr::DeleteGOData(uint32 guid)
if (data)
RemoveGameobjectFromGrid(guid, data);
- mGameObjectDataMap.erase(guid);
+ _gameObjectDataStore.erase(guid);
}
void ObjectMgr::AddCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid, uint32 instance)
{
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(mapid, 0)][cellid];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(mapid, 0)][cellid];
cell_guids.corpses[player_guid] = instance;
}
void ObjectMgr::DeleteCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid)
{
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(mapid, 0)][cellid];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(mapid, 0)][cellid];
cell_guids.corpses.erase(player_guid);
}
@@ -7421,7 +7400,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
uint32 quest = result->Fetch()[1].GetUInt32();
uint32 poolId = result->Fetch()[2].GetUInt32();
- if (mQuestTemplates.find(quest) == mQuestTemplates.end())
+ if (_questTemplates.find(quest) == _questTemplates.end())
{
sLog->outErrorDb("Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
continue;
@@ -7441,9 +7420,9 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
void ObjectMgr::LoadGameobjectQuestRelations()
{
- LoadQuestRelationsHelper(mGOQuestRelations, "gameobject_questrelation", true, true);
+ LoadQuestRelationsHelper(_goQuestRelations, "gameobject_questrelation", true, true);
- for (QuestRelations::iterator itr = mGOQuestRelations.begin(); itr != mGOQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _goQuestRelations.begin(); itr != _goQuestRelations.end(); ++itr)
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
@@ -7455,9 +7434,9 @@ void ObjectMgr::LoadGameobjectQuestRelations()
void ObjectMgr::LoadGameobjectInvolvedRelations()
{
- LoadQuestRelationsHelper(mGOQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
+ LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
- for (QuestRelations::iterator itr = mGOQuestInvolvedRelations.begin(); itr != mGOQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _goQuestInvolvedRelations.begin(); itr != _goQuestInvolvedRelations.end(); ++itr)
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
@@ -7469,9 +7448,9 @@ void ObjectMgr::LoadGameobjectInvolvedRelations()
void ObjectMgr::LoadCreatureQuestRelations()
{
- LoadQuestRelationsHelper(mCreatureQuestRelations, "creature_questrelation", true, false);
+ LoadQuestRelationsHelper(_creatureQuestRelations, "creature_questrelation", true, false);
- for (QuestRelations::iterator itr = mCreatureQuestRelations.begin(); itr != mCreatureQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _creatureQuestRelations.begin(); itr != _creatureQuestRelations.end(); ++itr)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
@@ -7483,9 +7462,9 @@ void ObjectMgr::LoadCreatureQuestRelations()
void ObjectMgr::LoadCreatureInvolvedRelations()
{
- LoadQuestRelationsHelper(mCreatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
+ LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
- for (QuestRelations::iterator itr = mCreatureQuestInvolvedRelations.begin(); itr != mCreatureQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _creatureQuestInvolvedRelations.begin(); itr != _creatureQuestInvolvedRelations.end(); ++itr)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
@@ -7499,7 +7478,7 @@ void ObjectMgr::LoadReservedPlayersNames()
{
uint32 oldMSTime = getMSTime();
- m_ReservedNames.clear(); // need for reload case
+ _reservedNamesStore.clear(); // need for reload case
QueryResult result = CharacterDatabase.Query("SELECT name FROM reserved_name");
@@ -7527,7 +7506,7 @@ void ObjectMgr::LoadReservedPlayersNames()
wstrToLower(wstr);
- m_ReservedNames.insert(wstr);
+ _reservedNamesStore.insert(wstr);
++count;
}
while (result->NextRow());
@@ -7544,7 +7523,7 @@ bool ObjectMgr::IsReservedName(const std::string& name) const
wstrToLower(wstr);
- return m_ReservedNames.find(wstr) != m_ReservedNames.end();
+ return _reservedNamesStore.find(wstr) != _reservedNamesStore.end();
}
enum LanguageType
@@ -7682,7 +7661,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
uint32 oldMSTime = getMSTime();
- mGameObjectForQuestSet.clear(); // need for reload case
+ _gameObjectForQuestStore.clear(); // need for reload case
if (sObjectMgr->GetGameObjectTemplates()->empty())
{
@@ -7707,7 +7686,7 @@ void ObjectMgr::LoadGameObjectForQuests()
// find quest loot for GO
if (itr->second.chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
++count;
}
break;
@@ -7716,7 +7695,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
if (itr->second._generic.questID > 0) //quests objects
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
count++;
}
break;
@@ -7725,7 +7704,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
if (itr->second.goober.questId > 0) //quests objects
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
count++;
}
break;
@@ -7769,10 +7748,10 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
}
// cleanup affected map part for reloading case
- for (TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end();)
+ for (TrinityStringLocaleContainer::iterator itr = _trinityStringLocaleStore.begin(); itr != _trinityStringLocaleStore.end();)
{
if (itr->first >= start_value && itr->first < end_value)
- mTrinityStringLocaleMap.erase(itr++);
+ _trinityStringLocaleStore.erase(itr++);
else
++itr;
}
@@ -7809,7 +7788,7 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
continue;
}
- TrinityStringLocale& data = mTrinityStringLocaleMap[entry];
+ TrinityStringLocale& data = _trinityStringLocaleStore[entry];
if (!data.Content.empty())
{
@@ -7854,7 +7833,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
{
uint32 oldMSTime = getMSTime();
- mFishingBaseForArea.clear(); // for reload case
+ _fishingBaseForAreaStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, skill FROM skill_fishing_base_level");
@@ -7881,7 +7860,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
continue;
}
- mFishingBaseForArea[entry] = skill;
+ _fishingBaseForAreaStore[entry] = skill;
++count;
}
while (result->NextRow());
@@ -7916,15 +7895,15 @@ bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& n
uint32 ObjectMgr::GetAreaTriggerScriptId(uint32 trigger_id)
{
- AreaTriggerScriptMap::const_iterator i = mAreaTriggerScripts.find(trigger_id);
- if (i!= mAreaTriggerScripts.end())
+ AreaTriggerScriptContainer::const_iterator i = _areaTriggerScriptStore.find(trigger_id);
+ if (i!= _areaTriggerScriptStore.end())
return i->second;
return 0;
}
SpellScriptsBounds ObjectMgr::GetSpellScriptsBounds(uint32 spell_id)
{
- return SpellScriptsBounds(mSpellScripts.lower_bound(spell_id), mSpellScripts.upper_bound(spell_id));
+ return SpellScriptsBounds(_spellScriptsStore.lower_bound(spell_id), _spellScriptsStore.upper_bound(spell_id));
}
SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial)
@@ -7963,7 +7942,7 @@ void ObjectMgr::LoadGameTele()
{
uint32 oldMSTime = getMSTime();
- m_GameTeleMap.clear(); // for reload case
+ _gameTeleStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, map, name FROM game_tele");
@@ -8006,7 +7985,7 @@ void ObjectMgr::LoadGameTele()
wstrToLower(gt.wnameLow);
- m_GameTeleMap[id] = gt;
+ _gameTeleStore[id] = gt;
++count;
}
@@ -8028,7 +8007,7 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
// Alternative first GameTele what contains wnameLow as substring in case no GameTele location found
const GameTele* alt = NULL;
- for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
{
if (itr->second.wnameLow == wname)
return &itr->second;
@@ -8043,7 +8022,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
{
// find max id
uint32 new_id = 0;
- for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
if (itr->first > new_id)
new_id = itr->first;
@@ -8055,7 +8034,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
wstrToLower(tele.wnameLow);
- m_GameTeleMap[new_id] = tele;
+ _gameTeleStore[new_id] = tele;
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GAME_TELE);
@@ -8082,7 +8061,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
// converting string that we try to find to lower case
wstrToLower(wname);
- for (GameTeleMap::iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
{
if (itr->second.wnameLow == wname)
{
@@ -8092,7 +8071,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
WorldDatabase.Execute(stmt);
- m_GameTeleMap.erase(itr);
+ _gameTeleStore.erase(itr);
return true;
}
}
@@ -8104,7 +8083,7 @@ void ObjectMgr::LoadMailLevelRewards()
{
uint32 oldMSTime = getMSTime();
- m_mailLevelRewardMap.clear(); // for reload case
+ _mailLevelRewardStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT level, raceMask, mailTemplateId, senderEntry FROM mail_level_reward");
@@ -8151,7 +8130,7 @@ void ObjectMgr::LoadMailLevelRewards()
continue;
}
- m_mailLevelRewardMap[level].push_back(MailLevelReward(raceMask, mailTemplateId, senderEntry));
+ _mailLevelRewardStore[level].push_back(MailLevelReward(raceMask, mailTemplateId, senderEntry));
++count;
}
@@ -8198,7 +8177,7 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost,
return;
}
- TrainerSpellData& data = m_mCacheTrainerSpellMap[entry];
+ TrainerSpellData& data = _cacheTrainerSpellStore[entry];
TrainerSpell& trainerSpell = data.spellList[spell];
trainerSpell.spell = spell;
@@ -8244,7 +8223,7 @@ void ObjectMgr::LoadTrainerSpell()
uint32 oldMSTime = getMSTime();
// For reload case
- m_mCacheTrainerSpellMap.clear();
+ _cacheTrainerSpellStore.clear();
std::set<uint32> skip_trainers;
@@ -8310,7 +8289,7 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *s
if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, NULL, skip_vendors))
continue;
- VendorItemData& vList = m_mCacheVendorItemMap[vendor];
+ VendorItemData& vList = _cacheVendorItemStore[vendor];
vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
@@ -8326,9 +8305,9 @@ void ObjectMgr::LoadVendors()
uint32 oldMSTime = getMSTime();
// For reload case
- for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
+ for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
- m_mCacheVendorItemMap.clear();
+ _cacheVendorItemStore.clear();
std::set<uint32> skip_vendors;
@@ -8361,7 +8340,7 @@ void ObjectMgr::LoadVendors()
if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, NULL, &skip_vendors))
continue;
- VendorItemData& vList = m_mCacheVendorItemMap[entry];
+ VendorItemData& vList = _cacheVendorItemStore[entry];
vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
@@ -8378,7 +8357,7 @@ void ObjectMgr::LoadGossipMenu()
{
uint32 oldMSTime = getMSTime();
- m_mGossipMenusMap.clear();
+ _gossipMenusStore.clear();
QueryResult result = WorldDatabase.Query("SELECT entry, text_id FROM gossip_menu");
@@ -8407,7 +8386,7 @@ void ObjectMgr::LoadGossipMenu()
continue;
}
- m_mGossipMenusMap.insert(GossipMenusMap::value_type(gMenu.entry, gMenu));
+ _gossipMenusStore.insert(GossipMenusContainer::value_type(gMenu.entry, gMenu));
++count;
}
@@ -8421,7 +8400,7 @@ void ObjectMgr::LoadGossipMenuItems()
{
uint32 oldMSTime = getMSTime();
- m_mGossipMenuItemsMap.clear();
+ _gossipMenuItemsStore.clear();
QueryResult result = WorldDatabase.Query(
"SELECT menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, "
@@ -8470,7 +8449,7 @@ void ObjectMgr::LoadGossipMenuItems()
gMenuItem.ActionPoiId = 0;
}
- m_mGossipMenuItemsMap.insert(GossipMenuItemsMap::value_type(gMenuItem.MenuId, gMenuItem));
+ _gossipMenuItemsStore.insert(GossipMenuItemsContainer::value_type(gMenuItem.MenuId, gMenuItem));
++count;
}
while (result->NextRow());
@@ -8481,7 +8460,7 @@ void ObjectMgr::LoadGossipMenuItems()
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
{
- VendorItemData& vList = m_mCacheVendorItemMap[entry];
+ VendorItemData& vList = _cacheVendorItemStore[entry];
vList.AddItem(item, maxcount, incrtime, extendedCost);
if (persist)
@@ -8500,8 +8479,8 @@ void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32
bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool persist /*= true*/)
{
- CacheVendorItemMap::iterator iter = m_mCacheVendorItemMap.find(entry);
- if (iter == m_mCacheVendorItemMap.end())
+ CacheVendorItemContainer::iterator iter = _cacheVendorItemStore.find(entry);
+ if (iter == _cacheVendorItemStore.end())
return false;
if (!iter->second.RemoveItem(item))
@@ -8611,7 +8590,7 @@ void ObjectMgr::LoadScriptNames()
{
uint32 oldMSTime = getMSTime();
- m_scriptNames.push_back("");
+ _scriptNamesStore.push_back("");
QueryResult result = WorldDatabase.Query(
"SELECT DISTINCT(ScriptName) FROM achievement_criteria_data WHERE ScriptName <> '' AND type = 11 "
"UNION "
@@ -8648,12 +8627,12 @@ void ObjectMgr::LoadScriptNames()
do
{
- m_scriptNames.push_back((*result)[0].GetString());
+ _scriptNamesStore.push_back((*result)[0].GetString());
++count;
}
while (result->NextRow());
- std::sort(m_scriptNames.begin(), m_scriptNames.end());
+ std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end());
sLog->outString(">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -8663,10 +8642,10 @@ uint32 ObjectMgr::GetScriptId(const char *name)
// use binary search to find the script name in the sorted vector
// assume "" is the first element
if (!name) return 0;
- ScriptNameMap::const_iterator itr =
- std::lower_bound(m_scriptNames.begin(), m_scriptNames.end(), name);
- if (itr == m_scriptNames.end() || *itr != name) return 0;
- return uint32(itr - m_scriptNames.begin());
+ ScriptNameContainer::const_iterator itr =
+ std::lower_bound(_scriptNamesStore.begin(), _scriptNamesStore.end(), name);
+ if (itr == _scriptNamesStore.end() || *itr != name) return 0;
+ return uint32(itr - _scriptNamesStore.begin());
}
void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids)
@@ -8727,9 +8706,9 @@ bool LoadTrinityStrings(char const* table, int32 start_value, int32 end_value)
CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unitClass)
{
- CreatureBaseStatsMap::const_iterator it = m_creatureBaseStatsMap.find(MAKE_PAIR16(level, unitClass));
+ CreatureBaseStatsContainer::const_iterator it = _creatureBaseStatsStore.find(MAKE_PAIR16(level, unitClass));
- if (it != m_creatureBaseStatsMap.end())
+ if (it != _creatureBaseStatsStore.end())
return &(it->second);
struct DefaultCreatureBaseStats : public CreatureBaseStats
@@ -8787,7 +8766,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
}
}
- m_creatureBaseStatsMap[MAKE_PAIR16(Level, Class)] = stats;
+ _creatureBaseStatsStore[MAKE_PAIR16(Level, Class)] = stats;
++count;
}
@@ -8798,7 +8777,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
{
for (uint16 lvl = itr->second.minlevel; lvl <= itr->second.maxlevel; ++lvl)
{
- if (m_creatureBaseStatsMap.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == m_creatureBaseStatsMap.end())
+ if (_creatureBaseStatsStore.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == _creatureBaseStatsStore.end())
sLog->outErrorDb("Missing base stats for creature class %u level %u", itr->second.unit_class, lvl);
}
}
@@ -8834,7 +8813,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
else if (!sAchievementStore.LookupEntry(horde))
sLog->outErrorDb("Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
else
- factionchange_achievements[alliance] = horde;
+ FactionChange_Achievements[alliance] = horde;
++count;
}
@@ -8871,7 +8850,7 @@ void ObjectMgr::LoadFactionChangeItems()
else if (!GetItemTemplate(horde))
sLog->outErrorDb("Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", horde);
else
- factionchange_items[alliance] = horde;
+ FactionChange_Items[alliance] = horde;
++count;
}
@@ -8908,7 +8887,7 @@ void ObjectMgr::LoadFactionChangeSpells()
else if (!sSpellMgr->GetSpellInfo(horde))
sLog->outErrorDb("Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", horde);
else
- factionchange_spells[alliance] = horde;
+ FactionChange_Spells[alliance] = horde;
++count;
}
@@ -8945,7 +8924,7 @@ void ObjectMgr::LoadFactionChangeReputations()
else if (!sFactionStore.LookupEntry(horde))
sLog->outErrorDb("Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
else
- factionchange_reputations[alliance] = horde;
+ FactionChange_Reputation[alliance] = horde;
++count;
}
@@ -8957,8 +8936,8 @@ void ObjectMgr::LoadFactionChangeReputations()
GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
{
- GameObjectTemplateContainer::const_iterator itr = GameObjectTemplateStore.find(entry);
- if (itr != GameObjectTemplateStore.end())
+ GameObjectTemplateContainer::const_iterator itr = _gameObjectTemplateStore.find(entry);
+ if (itr != _gameObjectTemplateStore.end())
return &(itr->second);
return NULL;
@@ -8966,8 +8945,8 @@ GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
CreatureTemplate const* ObjectMgr::GetCreatureTemplate(uint32 entry)
{
- CreatureTemplateContainer::const_iterator itr = CreatureTemplateStore.find(entry);
- if (itr != CreatureTemplateStore.end())
+ CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.find(entry);
+ if (itr != _creatureTemplateStore.end())
return &(itr->second);
return NULL;
@@ -8978,14 +8957,14 @@ VehicleAccessoryList const* ObjectMgr::GetVehicleAccessoryList(Vehicle* veh) con
if (Creature* cre = veh->GetBase()->ToCreature())
{
// Give preference to GUID-based accessories
- VehicleAccessoryMap::const_iterator itr = m_VehicleAccessoryMap.find(cre->GetDBTableGUIDLow());
- if (itr != m_VehicleAccessoryMap.end())
+ VehicleAccessoryContainer::const_iterator itr = _vehicleAccessoryStore.find(cre->GetDBTableGUIDLow());
+ if (itr != _vehicleAccessoryStore.end())
return &itr->second;
}
// Otherwise return entry-based
- VehicleAccessoryMap::const_iterator itr = m_VehicleTemplateAccessoryMap.find(veh->GetCreatureEntry());
- if (itr != m_VehicleTemplateAccessoryMap.end())
+ VehicleAccessoryContainer::const_iterator itr = _vehicleTemplateAccessoryStore.find(veh->GetCreatureEntry());
+ if (itr != _vehicleTemplateAccessoryStore.end())
return &itr->second;
return NULL;
}
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 126cca59ef0..fc342bfb534 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -82,7 +82,7 @@ struct GameTele
std::wstring wnameLow;
};
-typedef UNORDERED_MAP<uint32, GameTele > GameTeleMap;
+typedef UNORDERED_MAP<uint32, GameTele > GameTeleContainer;
enum ScriptsType
{
@@ -321,8 +321,8 @@ struct ScriptInfo
typedef std::multimap<uint32, ScriptInfo> ScriptMap;
typedef std::map<uint32, ScriptMap > ScriptMapMap;
-typedef std::multimap<uint32, uint32> SpellScriptsMap;
-typedef std::pair<SpellScriptsMap::iterator, SpellScriptsMap::iterator> SpellScriptsBounds;
+typedef std::multimap<uint32, uint32> SpellScriptsContainer;
+typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds;
extern ScriptMapMap sQuestEndScripts;
extern ScriptMapMap sQuestStartScripts;
extern ScriptMapMap sSpellScripts;
@@ -349,8 +349,8 @@ struct SpellClickInfo
bool IsFitToRequirements(Unit const* clicker, Unit const* clickee) const;
};
-typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoMap;
-typedef std::pair<SpellClickInfoMap::const_iterator, SpellClickInfoMap::const_iterator> SpellClickInfoMapBounds;
+typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoContainer;
+typedef std::pair<SpellClickInfoContainer::const_iterator, SpellClickInfoContainer::const_iterator> SpellClickInfoMapBounds;
struct AreaTrigger
{
@@ -390,24 +390,22 @@ struct TrinityStringLocale
StringVector Content;
};
-typedef std::map<uint64, uint64> LinkedRespawnMap;
-typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataMap;
-typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataMap;
-typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleMap;
-typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleMap;
-typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleMap;
-typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleMap;
-typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleMap;
-typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleMap;
-typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleMap;
-typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleMap;
-typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleMap;
-typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleMap;
+typedef std::map<uint64, uint64> LinkedRespawnContainer;
+typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataContainer;
+typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataContainer;
+typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleContainer;
+typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleContainer;
+typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleContainer;
+typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer;
+typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleContainer;
+typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleContainer;
+typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleContainer;
+typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleContainer;
+typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
+typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
typedef std::multimap<uint32, uint32> QuestRelations;
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds;
-typedef std::multimap<uint32, ItemRequiredTarget> ItemRequiredTargetMap;
-typedef std::pair<ItemRequiredTargetMap::const_iterator, ItemRequiredTargetMap::const_iterator> ItemRequiredTargetMapBounds;
struct PetLevelInfo
{
@@ -430,7 +428,7 @@ struct MailLevelReward
};
typedef std::list<MailLevelReward> MailLevelRewardList;
-typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardMap;
+typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardContainer;
// We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization
struct RepRewardRate
@@ -442,15 +440,15 @@ struct RepRewardRate
struct ReputationOnKillEntry
{
- uint32 repfaction1;
- uint32 repfaction2;
- bool is_teamaward1;
- uint32 reputation_max_cap1;
- int32 repvalue1;
- bool is_teamaward2;
- uint32 reputation_max_cap2;
- int32 repvalue2;
- bool team_dependent;
+ uint32 RepFaction1;
+ uint32 RepFaction2;
+ uint32 ReputationMaxCap1;
+ int32 RepValue1;
+ uint32 ReputationMaxCap2;
+ int32 RepValue2;
+ bool IsTeamAward1;
+ bool IsTeamAward2;
+ bool TeamDependent;
};
struct RepSpilloverTemplate
@@ -494,12 +492,12 @@ struct GossipMenus
ConditionList conditions;
};
-typedef std::multimap<uint32, GossipMenus> GossipMenusMap;
-typedef std::pair<GossipMenusMap::const_iterator, GossipMenusMap::const_iterator> GossipMenusMapBounds;
-typedef std::pair<GossipMenusMap::iterator, GossipMenusMap::iterator> GossipMenusMapBoundsNonConst;
-typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsMap;
-typedef std::pair<GossipMenuItemsMap::const_iterator, GossipMenuItemsMap::const_iterator> GossipMenuItemsMapBounds;
-typedef std::pair<GossipMenuItemsMap::iterator, GossipMenuItemsMap::iterator> GossipMenuItemsMapBoundsNonConst;
+typedef std::multimap<uint32, GossipMenus> GossipMenusContainer;
+typedef std::pair<GossipMenusContainer::const_iterator, GossipMenusContainer::const_iterator> GossipMenusMapBounds;
+typedef std::pair<GossipMenusContainer::iterator, GossipMenusContainer::iterator> GossipMenusMapBoundsNonConst;
+typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsContainer;
+typedef std::pair<GossipMenuItemsContainer::const_iterator, GossipMenuItemsContainer::const_iterator> GossipMenuItemsMapBounds;
+typedef std::pair<GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator> GossipMenuItemsMapBoundsNonConst;
struct QuestPOIPoint
{
@@ -526,17 +524,17 @@ struct QuestPOI
};
typedef std::vector<QuestPOI> QuestPOIVector;
-typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIMap;
+typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIContainer;
struct GraveYardData
{
uint32 safeLocId;
uint32 team;
};
-typedef std::multimap<uint32, GraveYardData> GraveYardMap;
+typedef std::multimap<uint32, GraveYardData> GraveYardContainer;
-typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap;
-typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellMap;
+typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemContainer;
+typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellContainer;
enum SkillRangeType
{
@@ -584,7 +582,7 @@ struct DungeonEncounter
};
typedef std::list<DungeonEncounter const*> DungeonEncounterList;
-typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterMap;
+typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterContainer;
class PlayerDumpReader;
@@ -602,33 +600,33 @@ class ObjectMgr
typedef UNORDERED_MAP<uint32, Quest*> QuestMap;
- typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerMap;
+ typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerContainer;
- typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptMap;
+ typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
- typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementMap;
+ typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementContainer;
- typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateMap;
- typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillMap;
- typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateMap;
+ typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer;
+ typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer;
+ typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer;
- typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestMap;
+ typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestContainer;
- typedef std::vector<std::string> ScriptNameMap;
+ typedef std::vector<std::string> ScriptNameContainer;
typedef std::map<uint32, uint32> CharacterConversionMap;
Player* GetPlayerByLowGUID(uint32 lowguid) const;
GameObjectTemplate const* GetGameObjectTemplate(uint32 entry);
- GameObjectTemplateContainer const* GetGameObjectTemplates() { return &GameObjectTemplateStore; }
+ GameObjectTemplateContainer const* GetGameObjectTemplates() { return &_gameObjectTemplateStore; }
int LoadReferenceVendor(int32 vendor, int32 item_id, std::set<uint32> *skip_vendors);
void LoadGameObjectTemplate();
void AddGameobjectInfo(GameObjectTemplate* goinfo);
CreatureTemplate const* GetCreatureTemplate(uint32 entry);
- CreatureTemplateContainer const* GetCreatureTemplates() { return &CreatureTemplateStore; }
+ CreatureTemplateContainer const* GetCreatureTemplates() { return &_creatureTemplateStore; }
CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId);
CreatureModelInfo const* GetCreatureModelRandomGender(uint32* displayID);
static uint32 ChooseDisplayId(uint32 team, const CreatureTemplate* cinfo, const CreatureData* data = NULL);
@@ -637,12 +635,12 @@ class ObjectMgr
CreatureAddon const* GetCreatureAddon(uint32 lowguid);
CreatureAddon const* GetCreatureTemplateAddon(uint32 entry);
ItemTemplate const* GetItemTemplate(uint32 entry);
- ItemTemplateContainer const* GetItemTemplateStore() { return &ItemTemplateStore; }
+ ItemTemplateContainer const* GetItemTemplateStore() { return &_itemTemplateStore; }
ItemSetNameEntry const* GetItemSetNameEntry(uint32 itemId)
{
- ItemSetNameMap::iterator itr = mItemSetNameMap.find(itemId);
- if (itr != mItemSetNameMap.end())
+ ItemSetNameContainer::iterator itr = _itemSetNameStore.find(itemId);
+ if (itr != _itemSetNameStore.end())
return &itr->second;
return NULL;
}
@@ -655,7 +653,7 @@ class ObjectMgr
{
if (class_ >= MAX_CLASSES)
return NULL;
- return &playerClassInfo[class_];
+ return &_playerClassInfo[class_];
}
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
@@ -665,7 +663,7 @@ class ObjectMgr
return NULL;
if (class_ >= MAX_CLASSES)
return NULL;
- PlayerInfo const* info = &playerInfo[race][class_];
+ PlayerInfo const* info = &_playerInfo[race][class_];
if (info->displayId_m == 0 || info->displayId_f == 0)
return NULL;
return info;
@@ -685,28 +683,28 @@ class ObjectMgr
Quest const* GetQuestTemplate(uint32 quest_id) const
{
- QuestMap::const_iterator itr = mQuestTemplates.find(quest_id);
- return itr != mQuestTemplates.end() ? itr->second : NULL;
+ QuestMap::const_iterator itr = _questTemplates.find(quest_id);
+ return itr != _questTemplates.end() ? itr->second : NULL;
}
- QuestMap const& GetQuestTemplates() const { return mQuestTemplates; }
+ QuestMap const& GetQuestTemplates() const { return _questTemplates; }
uint32 GetQuestForAreaTrigger(uint32 Trigger_ID) const
{
- QuestAreaTriggerMap::const_iterator itr = mQuestAreaTriggerMap.find(Trigger_ID);
- if (itr != mQuestAreaTriggerMap.end())
+ QuestAreaTriggerContainer::const_iterator itr = _questAreaTriggerStore.find(Trigger_ID);
+ if (itr != _questAreaTriggerStore.end())
return itr->second;
return 0;
}
bool IsTavernAreaTrigger(uint32 Trigger_ID) const
{
- return mTavernAreaTriggerSet.find(Trigger_ID) != mTavernAreaTriggerSet.end();
+ return _tavernAreaTriggerStore.find(Trigger_ID) != _tavernAreaTriggerStore.end();
}
bool IsGameObjectForQuests(uint32 entry) const
{
- return mGameObjectForQuestSet.find(entry) != mGameObjectForQuestSet.end();
+ return _gameObjectForQuestStore.find(entry) != _gameObjectForQuestStore.end();
}
GossipText const* GetGossipText(uint32 Text_ID) const;
@@ -720,16 +718,16 @@ class ObjectMgr
AreaTrigger const* GetAreaTrigger(uint32 trigger) const
{
- AreaTriggerMap::const_iterator itr = mAreaTriggers.find(trigger);
- if (itr != mAreaTriggers.end())
+ AreaTriggerContainer::const_iterator itr = _areaTriggerStore.find(trigger);
+ if (itr != _areaTriggerStore.end())
return &itr->second;
return NULL;
}
AccessRequirement const* GetAccessRequirement(uint32 mapid, Difficulty difficulty) const
{
- AccessRequirementMap::const_iterator itr = mAccessRequirements.find(MAKE_PAIR32(mapid, difficulty));
- if (itr != mAccessRequirements.end())
+ AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
+ if (itr != _accessRequirementStore.end())
return &itr->second;
return NULL;
}
@@ -742,8 +740,8 @@ class ObjectMgr
RepRewardRate const* GetRepRewardRate(uint32 factionId) const
{
- RepRewardRateMap::const_iterator itr = m_RepRewardRateMap.find(factionId);
- if (itr != m_RepRewardRateMap.end())
+ RepRewardRateContainer::const_iterator itr = _repRewardRateStore.find(factionId);
+ if (itr != _repRewardRateStore.end())
return &itr->second;
return NULL;
@@ -751,16 +749,16 @@ class ObjectMgr
ReputationOnKillEntry const* GetReputationOnKilEntry(uint32 id) const
{
- RepOnKillMap::const_iterator itr = mRepOnKill.find(id);
- if (itr != mRepOnKill.end())
+ RepOnKillContainer::const_iterator itr = _repOnKillStore.find(id);
+ if (itr != _repOnKillStore.end())
return &itr->second;
return NULL;
}
RepSpilloverTemplate const* GetRepSpilloverTemplate(uint32 factionId) const
{
- RepSpilloverTemplateMap::const_iterator itr = m_RepSpilloverTemplateMap.find(factionId);
- if (itr != m_RepSpilloverTemplateMap.end())
+ RepSpilloverTemplateContainer::const_iterator itr = _repSpilloverTemplateStore.find(factionId);
+ if (itr != _repSpilloverTemplateStore.end())
return &itr->second;
return NULL;
@@ -768,16 +766,16 @@ class ObjectMgr
PointOfInterest const* GetPointOfInterest(uint32 id) const
{
- PointOfInterestMap::const_iterator itr = mPointsOfInterest.find(id);
- if (itr != mPointsOfInterest.end())
+ PointOfInterestContainer::const_iterator itr = _pointsOfInterestStore.find(id);
+ if (itr != _pointsOfInterestStore.end())
return &itr->second;
return NULL;
}
QuestPOIVector const* GetQuestPOIVector(uint32 questId)
{
- QuestPOIMap::const_iterator itr = mQuestPOIMap.find(questId);
- if (itr != mQuestPOIMap.end())
+ QuestPOIContainer::const_iterator itr = _questPOIStore.find(questId);
+ if (itr != _questPOIStore.end())
return &itr->second;
return NULL;
}
@@ -786,8 +784,8 @@ class ObjectMgr
DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty)
{
- UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = mDungeonEncounters.find(MAKE_PAIR32(mapId, difficulty));
- if (itr != mDungeonEncounters.end())
+ UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
+ if (itr != _dungeonEncounterStore.end())
return &itr->second;
return NULL;
}
@@ -811,32 +809,32 @@ class ObjectMgr
QuestRelations* GetGOQuestRelationMap()
{
- return &mGOQuestRelations;
+ return &_goQuestRelations;
}
QuestRelationBounds GetGOQuestRelationBounds(uint32 go_entry)
{
- return mGOQuestRelations.equal_range(go_entry);
+ return _goQuestRelations.equal_range(go_entry);
}
QuestRelationBounds GetGOQuestInvolvedRelationBounds(uint32 go_entry)
{
- return mGOQuestInvolvedRelations.equal_range(go_entry);
+ return _goQuestInvolvedRelations.equal_range(go_entry);
}
QuestRelations* GetCreatureQuestRelationMap()
{
- return &mCreatureQuestRelations;
+ return &_creatureQuestRelations;
}
QuestRelationBounds GetCreatureQuestRelationBounds(uint32 creature_entry)
{
- return mCreatureQuestRelations.equal_range(creature_entry);
+ return _creatureQuestRelations.equal_range(creature_entry);
}
QuestRelationBounds GetCreatureQuestInvolvedRelationBounds(uint32 creature_entry)
{
- return mCreatureQuestInvolvedRelations.equal_range(creature_entry);
+ return _creatureQuestInvolvedRelations.equal_range(creature_entry);
}
void LoadGameObjectScripts();
@@ -926,8 +924,8 @@ class ObjectMgr
int32 GetFishingBaseSkillLevel(uint32 entry) const
{
- FishingBaseSkillMap::const_iterator itr = mFishingBaseForArea.find(entry);
- return itr != mFishingBaseForArea.end() ? itr->second : 0;
+ FishingBaseSkillContainer::const_iterator itr = _fishingBaseForAreaStore.find(entry);
+ return itr != _fishingBaseForAreaStore.end() ? itr->second : 0;
}
void ReturnOrDeleteOldMails(bool serverUp);
@@ -946,8 +944,8 @@ class ObjectMgr
MailLevelReward const* GetMailLevelReward(uint32 level, uint32 raceMask)
{
- MailLevelRewardMap::const_iterator map_itr = m_mailLevelRewardMap.find(level);
- if (map_itr == m_mailLevelRewardMap.end())
+ MailLevelRewardContainer::const_iterator map_itr = _mailLevelRewardStore.find(level);
+ if (map_itr == _mailLevelRewardStore.end())
return NULL;
for (MailLevelRewardList::const_iterator set_itr = map_itr->second.begin(); set_itr != map_itr->second.end(); ++set_itr)
@@ -959,81 +957,81 @@ class ObjectMgr
CellObjectGuids const& GetCellObjectGuids(uint16 mapid, uint8 spawnMode, uint32 cell_id)
{
- return mMapObjectGuids[MAKE_PAIR32(mapid, spawnMode)][cell_id];
+ return _mapObjectGuidsStore[MAKE_PAIR32(mapid, spawnMode)][cell_id];
}
CreatureData const* GetCreatureData(uint32 guid) const
{
- CreatureDataMap::const_iterator itr = mCreatureDataMap.find(guid);
- if (itr == mCreatureDataMap.end()) return NULL;
+ CreatureDataContainer::const_iterator itr = _creatureDataStore.find(guid);
+ if (itr == _creatureDataStore.end()) return NULL;
return &itr->second;
}
- CreatureData& NewOrExistCreatureData(uint32 guid) { return mCreatureDataMap[guid]; }
+ CreatureData& NewOrExistCreatureData(uint32 guid) { return _creatureDataStore[guid]; }
void DeleteCreatureData(uint32 guid);
uint64 GetLinkedRespawnGuid(uint64 guid) const
{
- LinkedRespawnMap::const_iterator itr = mLinkedRespawnMap.find(guid);
- if (itr == mLinkedRespawnMap.end()) return 0;
+ LinkedRespawnContainer::const_iterator itr = _linkedRespawnStore.find(guid);
+ if (itr == _linkedRespawnStore.end()) return 0;
return itr->second;
}
CreatureLocale const* GetCreatureLocale(uint32 entry) const
{
- CreatureLocaleMap::const_iterator itr = mCreatureLocaleMap.find(entry);
- if (itr == mCreatureLocaleMap.end()) return NULL;
+ CreatureLocaleContainer::const_iterator itr = _creatureLocaleStore.find(entry);
+ if (itr == _creatureLocaleStore.end()) return NULL;
return &itr->second;
}
GameObjectLocale const* GetGameObjectLocale(uint32 entry) const
{
- GameObjectLocaleMap::const_iterator itr = mGameObjectLocaleMap.find(entry);
- if (itr == mGameObjectLocaleMap.end()) return NULL;
+ GameObjectLocaleContainer::const_iterator itr = _gameObjectLocaleStore.find(entry);
+ if (itr == _gameObjectLocaleStore.end()) return NULL;
return &itr->second;
}
ItemLocale const* GetItemLocale(uint32 entry) const
{
- ItemLocaleMap::const_iterator itr = mItemLocaleMap.find(entry);
- if (itr == mItemLocaleMap.end()) return NULL;
+ ItemLocaleContainer::const_iterator itr = _itemLocaleStore.find(entry);
+ if (itr == _itemLocaleStore.end()) return NULL;
return &itr->second;
}
ItemSetNameLocale const* GetItemSetNameLocale(uint32 entry) const
{
- ItemSetNameLocaleMap::const_iterator itr = mItemSetNameLocaleMap.find(entry);
- if (itr == mItemSetNameLocaleMap.end())return NULL;
+ ItemSetNameLocaleContainer::const_iterator itr = _itemSetNameLocaleStore.find(entry);
+ if (itr == _itemSetNameLocaleStore.end())return NULL;
return &itr->second;
}
QuestLocale const* GetQuestLocale(uint32 entry) const
{
- QuestLocaleMap::const_iterator itr = mQuestLocaleMap.find(entry);
- if (itr == mQuestLocaleMap.end()) return NULL;
+ QuestLocaleContainer::const_iterator itr = _questLocaleStore.find(entry);
+ if (itr == _questLocaleStore.end()) return NULL;
return &itr->second;
}
NpcTextLocale const* GetNpcTextLocale(uint32 entry) const
{
- NpcTextLocaleMap::const_iterator itr = mNpcTextLocaleMap.find(entry);
- if (itr == mNpcTextLocaleMap.end()) return NULL;
+ NpcTextLocaleContainer::const_iterator itr = _npcTextLocaleStore.find(entry);
+ if (itr == _npcTextLocaleStore.end()) return NULL;
return &itr->second;
}
PageTextLocale const* GetPageTextLocale(uint32 entry) const
{
- PageTextLocaleMap::const_iterator itr = mPageTextLocaleMap.find(entry);
- if (itr == mPageTextLocaleMap.end()) return NULL;
+ PageTextLocaleContainer::const_iterator itr = _pageTextLocaleStore.find(entry);
+ if (itr == _pageTextLocaleStore.end()) return NULL;
return &itr->second;
}
GossipMenuItemsLocale const* GetGossipMenuItemsLocale(uint32 entry) const
{
- GossipMenuItemsLocaleMap::const_iterator itr = mGossipMenuItemsLocaleMap.find(entry);
- if (itr == mGossipMenuItemsLocaleMap.end()) return NULL;
+ GossipMenuItemsLocaleContainer::const_iterator itr = _gossipMenuItemsLocaleStore.find(entry);
+ if (itr == _gossipMenuItemsLocaleStore.end()) return NULL;
return &itr->second;
}
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
{
- PointOfInterestLocaleMap::const_iterator itr = mPointOfInterestLocaleMap.find(poi_id);
- if (itr == mPointOfInterestLocaleMap.end()) return NULL;
+ PointOfInterestLocaleContainer::const_iterator itr = _pointOfInterestLocaleStore.find(poi_id);
+ if (itr == _pointOfInterestLocaleStore.end()) return NULL;
return &itr->second;
}
bool IsGoOfSpecificEntrySpawned(uint32 entry) const
{
- for (GameObjectDataMap::const_iterator it = mGameObjectDataMap.begin(); it != mGameObjectDataMap.end(); ++it)
+ for (GameObjectDataContainer::const_iterator it = _gameObjectDataStore.begin(); it != _gameObjectDataStore.end(); ++it)
if (it->second.id == entry)
return true;
@@ -1042,17 +1040,17 @@ class ObjectMgr
GameObjectData const* GetGOData(uint32 guid) const
{
- GameObjectDataMap::const_iterator itr = mGameObjectDataMap.find(guid);
- if (itr == mGameObjectDataMap.end()) return NULL;
+ GameObjectDataContainer::const_iterator itr = _gameObjectDataStore.find(guid);
+ if (itr == _gameObjectDataStore.end()) return NULL;
return &itr->second;
}
- GameObjectData& NewGOData(uint32 guid) { return mGameObjectDataMap[guid]; }
+ GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
void DeleteGOData(uint32 guid);
TrinityStringLocale const* GetTrinityStringLocale(int32 entry) const
{
- TrinityStringLocaleMap::const_iterator itr = mTrinityStringLocaleMap.find(entry);
- if (itr == mTrinityStringLocaleMap.end()) return NULL;
+ TrinityStringLocaleContainer::const_iterator itr = _trinityStringLocaleStore.find(entry);
+ if (itr == _trinityStringLocaleStore.end()) return NULL;
return &itr->second;
}
const char *GetTrinityString(int32 entry, LocaleConstant locale_idx) const;
@@ -1079,15 +1077,15 @@ class ObjectMgr
time_t GetCreatureRespawnTime(uint32 loguid, uint32 instance)
{
- TRINITY_GUARD(ACE_Thread_Mutex, m_CreatureRespawnTimesMtx);
- return mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)];
+ TRINITY_GUARD(ACE_Thread_Mutex, _creatureRespawnTimesMutex);
+ return _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t);
void RemoveCreatureRespawnTime(uint32 loguid, uint32 instance);
time_t GetGORespawnTime(uint32 loguid, uint32 instance)
{
- TRINITY_GUARD(ACE_Thread_Mutex, m_GORespawnTimesMtx);
- return mGORespawnTimes[MAKE_PAIR64(loguid, instance)];
+ TRINITY_GUARD(ACE_Thread_Mutex, _goRespawnTimesMutex);
+ return _goRespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t);
void RemoveGORespawnTime(uint32 loguid, uint32 instance);
@@ -1115,19 +1113,19 @@ class ObjectMgr
GameTele const* GetGameTele(uint32 id) const
{
- GameTeleMap::const_iterator itr = m_GameTeleMap.find(id);
- if (itr == m_GameTeleMap.end()) return NULL;
+ GameTeleContainer::const_iterator itr = _gameTeleStore.find(id);
+ if (itr == _gameTeleStore.end()) return NULL;
return &itr->second;
}
GameTele const* GetGameTele(const std::string& name) const;
- GameTeleMap const& GetGameTeleMap() const { return m_GameTeleMap; }
+ GameTeleContainer const& GetGameTeleMap() const { return _gameTeleStore; }
bool AddGameTele(GameTele& data);
bool DeleteGameTele(const std::string& name);
TrainerSpellData const* GetNpcTrainerSpells(uint32 entry) const
{
- CacheTrainerSpellMap::const_iterator iter = m_mCacheTrainerSpellMap.find(entry);
- if (iter == m_mCacheTrainerSpellMap.end())
+ CacheTrainerSpellContainer::const_iterator iter = _cacheTrainerSpellStore.find(entry);
+ if (iter == _cacheTrainerSpellStore.end())
return NULL;
return &iter->second;
@@ -1135,8 +1133,8 @@ class ObjectMgr
VendorItemData const* GetNpcVendorItemList(uint32 entry) const
{
- CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry);
- if (iter == m_mCacheVendorItemMap.end())
+ CacheVendorItemContainer::const_iterator iter = _cacheVendorItemStore.find(entry);
+ if (iter == _cacheVendorItemStore.end())
return NULL;
return &iter->second;
@@ -1146,36 +1144,36 @@ class ObjectMgr
bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const;
void LoadScriptNames();
- ScriptNameMap &GetScriptNames() { return m_scriptNames; }
- const char * GetScriptName(uint32 id) { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; }
+ ScriptNameContainer &GetScriptNames() { return _scriptNamesStore; }
+ const char * GetScriptName(uint32 id) { return id < _scriptNamesStore.size() ? _scriptNamesStore[id].c_str() : ""; }
uint32 GetScriptId(const char *name);
SpellClickInfoMapBounds GetSpellClickInfoMapBounds(uint32 creature_id) const
{
- return SpellClickInfoMapBounds(mSpellClickInfoMap.lower_bound(creature_id), mSpellClickInfoMap.upper_bound(creature_id));
+ return SpellClickInfoMapBounds(_spellClickInfoStore.lower_bound(creature_id), _spellClickInfoStore.upper_bound(creature_id));
}
GossipMenusMapBounds GetGossipMenusMapBounds(uint32 uiMenuId) const
{
- return GossipMenusMapBounds(m_mGossipMenusMap.lower_bound(uiMenuId), m_mGossipMenusMap.upper_bound(uiMenuId));
+ return GossipMenusMapBounds(_gossipMenusStore.lower_bound(uiMenuId), _gossipMenusStore.upper_bound(uiMenuId));
}
GossipMenusMapBoundsNonConst GetGossipMenusMapBoundsNonConst(uint32 uiMenuId)
{
- return GossipMenusMapBoundsNonConst(m_mGossipMenusMap.lower_bound(uiMenuId), m_mGossipMenusMap.upper_bound(uiMenuId));
+ return GossipMenusMapBoundsNonConst(_gossipMenusStore.lower_bound(uiMenuId), _gossipMenusStore.upper_bound(uiMenuId));
}
GossipMenuItemsMapBounds GetGossipMenuItemsMapBounds(uint32 uiMenuId) const
{
- return GossipMenuItemsMapBounds(m_mGossipMenuItemsMap.lower_bound(uiMenuId), m_mGossipMenuItemsMap.upper_bound(uiMenuId));
+ return GossipMenuItemsMapBounds(_gossipMenuItemsStore.lower_bound(uiMenuId), _gossipMenuItemsStore.upper_bound(uiMenuId));
}
GossipMenuItemsMapBoundsNonConst GetGossipMenuItemsMapBoundsNonConst(uint32 uiMenuId)
{
- return GossipMenuItemsMapBoundsNonConst(m_mGossipMenuItemsMap.lower_bound(uiMenuId), m_mGossipMenuItemsMap.upper_bound(uiMenuId));
+ return GossipMenuItemsMapBoundsNonConst(_gossipMenuItemsStore.lower_bound(uiMenuId), _gossipMenuItemsStore.upper_bound(uiMenuId));
}
// for wintergrasp only
- GraveYardMap mGraveYardMap;
+ GraveYardContainer GraveYardStore;
static void AddLocaleString(const std::string& s, LocaleConstant locale, StringVector& data);
static inline void GetLocaleString(const StringVector& data, int loc_idx, std::string& value)
@@ -1184,10 +1182,10 @@ class ObjectMgr
value = data[loc_idx];
}
- CharacterConversionMap factionchange_achievements;
- CharacterConversionMap factionchange_items;
- CharacterConversionMap factionchange_spells;
- CharacterConversionMap factionchange_reputations;
+ CharacterConversionMap FactionChange_Achievements;
+ CharacterConversionMap FactionChange_Items;
+ CharacterConversionMap FactionChange_Spells;
+ CharacterConversionMap FactionChange_Reputation;
void LoadFactionChangeAchievements();
void LoadFactionChangeItems();
@@ -1196,80 +1194,73 @@ class ObjectMgr
private:
// first free id for selected id type
- uint32 m_auctionid;
- uint64 m_equipmentSetGuid;
- uint32 m_ItemTextId;
- uint32 m_mailid;
- uint32 m_hiPetNumber;
+ uint32 _auctionId;
+ uint64 _equipmentSetGuid;
+ uint32 _itemTextId;
+ uint32 _mailId;
+ uint32 _hiPetNumber;
// first free low guid for selected guid type
- uint32 m_hiCharGuid;
- uint32 m_hiCreatureGuid;
- uint32 m_hiPetGuid;
- uint32 m_hiVehicleGuid;
- uint32 m_hiItemGuid;
- uint32 m_hiGoGuid;
- uint32 m_hiDoGuid;
- uint32 m_hiCorpseGuid;
- uint32 m_hiMoTransGuid;
-
- QuestMap mQuestTemplates;
-
- typedef UNORDERED_MAP<uint32, GossipText> GossipTextMap;
- typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerMap;
- typedef std::set<uint32> TavernAreaTriggerSet;
- typedef std::set<uint32> GameObjectForQuestSet;
-
- QuestAreaTriggerMap mQuestAreaTriggerMap;
- TavernAreaTriggerSet mTavernAreaTriggerSet;
- GameObjectForQuestSet mGameObjectForQuestSet;
- GossipTextMap mGossipText;
- AreaTriggerMap mAreaTriggers;
- AreaTriggerScriptMap mAreaTriggerScripts;
- AccessRequirementMap mAccessRequirements;
- DungeonEncounterMap mDungeonEncounters;
-
- RepRewardRateMap m_RepRewardRateMap;
- RepOnKillMap mRepOnKill;
- RepSpilloverTemplateMap m_RepSpilloverTemplateMap;
-
- GossipMenusMap m_mGossipMenusMap;
- GossipMenuItemsMap m_mGossipMenuItemsMap;
- PointOfInterestMap mPointsOfInterest;
-
- QuestPOIMap mQuestPOIMap;
-
- QuestRelations mGOQuestRelations;
- QuestRelations mGOQuestInvolvedRelations;
- QuestRelations mCreatureQuestRelations;
- QuestRelations mCreatureQuestInvolvedRelations;
+ uint32 _hiCharGuid;
+ uint32 _hiCreatureGuid;
+ uint32 _hiPetGuid;
+ uint32 _hiVehicleGuid;
+ uint32 _hiItemGuid;
+ uint32 _hiGoGuid;
+ uint32 _hiDoGuid;
+ uint32 _hiCorpseGuid;
+ uint32 _hiMoTransGuid;
+
+ QuestMap _questTemplates;
+
+ typedef UNORDERED_MAP<uint32, GossipText> GossipTextContainer;
+ typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerContainer;
+ typedef std::set<uint32> TavernAreaTriggerContainer;
+ typedef std::set<uint32> GameObjectForQuestContainer;
+
+ QuestAreaTriggerContainer _questAreaTriggerStore;
+ TavernAreaTriggerContainer _tavernAreaTriggerStore;
+ GameObjectForQuestContainer _gameObjectForQuestStore;
+ GossipTextContainer _gossipTextStore;
+ AreaTriggerContainer _areaTriggerStore;
+ AreaTriggerScriptContainer _areaTriggerScriptStore;
+ AccessRequirementContainer _accessRequirementStore;
+ DungeonEncounterContainer _dungeonEncounterStore;
+
+ RepRewardRateContainer _repRewardRateStore;
+ RepOnKillContainer _repOnKillStore;
+ RepSpilloverTemplateContainer _repSpilloverTemplateStore;
+
+ GossipMenusContainer _gossipMenusStore;
+ GossipMenuItemsContainer _gossipMenuItemsStore;
+ PointOfInterestContainer _pointsOfInterestStore;
+
+ QuestPOIContainer _questPOIStore;
+
+ QuestRelations _goQuestRelations;
+ QuestRelations _goQuestInvolvedRelations;
+ QuestRelations _creatureQuestRelations;
+ QuestRelations _creatureQuestInvolvedRelations;
//character reserved names
- typedef std::set<std::wstring> ReservedNamesMap;
- ReservedNamesMap m_ReservedNames;
+ typedef std::set<std::wstring> ReservedNamesContainer;
+ ReservedNamesContainer _reservedNamesStore;
-// GraveYardMap mGraveYardMap;
+ GameTeleContainer _gameTeleStore;
- GameTeleMap m_GameTeleMap;
+ ScriptNameContainer _scriptNamesStore;
- ScriptNameMap m_scriptNames;
+ SpellClickInfoContainer _spellClickInfoStore;
- SpellClickInfoMap mSpellClickInfoMap;
+ SpellScriptsContainer _spellScriptsStore;
- SpellScriptsMap mSpellScripts;
-
- ItemRequiredTargetMap m_ItemRequiredTarget;
-
- VehicleAccessoryMap m_VehicleTemplateAccessoryMap;
- VehicleAccessoryMap m_VehicleAccessoryMap;
-
- typedef std::vector<LocaleConstant> LocalForIndex;
- LocalForIndex m_LocalForIndex;
+ VehicleAccessoryContainer _vehicleTemplateAccessoryStore;
+ VehicleAccessoryContainer _vehicleAccessoryStore;
LocaleConstant DBCLocaleIndex;
- PageTextContainer PageTextStore;
- InstanceTemplateContainer InstanceTemplateStore;
+ PageTextContainer _pageTextStore;
+ InstanceTemplateContainer _instanceTemplateStore;
private:
void LoadScripts(ScriptsType type);
@@ -1277,68 +1268,68 @@ class ObjectMgr
void LoadQuestRelationsHelper(QuestRelations& map, std::string table, bool starter, bool go);
void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count);
- MailLevelRewardMap m_mailLevelRewardMap;
+ MailLevelRewardContainer _mailLevelRewardStore;
- CreatureBaseStatsMap m_creatureBaseStatsMap;
+ CreatureBaseStatsContainer _creatureBaseStatsStore;
- typedef std::map<uint32, PetLevelInfo*> PetLevelInfoMap;
- // PetLevelInfoMap[creature_id][level]
- PetLevelInfoMap petInfo; // [creature_id][level]
+ typedef std::map<uint32, PetLevelInfo*> PetLevelInfoContainer;
+ // PetLevelInfoContainer[creature_id][level]
+ PetLevelInfoContainer _petInfoStore; // [creature_id][level]
- PlayerClassInfo playerClassInfo[MAX_CLASSES];
+ PlayerClassInfo _playerClassInfo[MAX_CLASSES];
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
- PlayerInfo playerInfo[MAX_RACES][MAX_CLASSES];
+ PlayerInfo _playerInfo[MAX_RACES][MAX_CLASSES];
typedef std::vector<uint32> PlayerXPperLevel; // [level]
- PlayerXPperLevel mPlayerXPperLevel;
-
- typedef std::map<uint32, uint32> BaseXPMap; // [area level][base xp]
- BaseXPMap mBaseXPTable;
-
- typedef std::map<uint32, int32> FishingBaseSkillMap; // [areaId][base skill level]
- FishingBaseSkillMap mFishingBaseForArea;
-
- typedef std::map<uint32, StringVector> HalfNameMap;
- HalfNameMap PetHalfName0;
- HalfNameMap PetHalfName1;
-
- typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameMap;
- ItemSetNameMap mItemSetNameMap;
-
- MapObjectGuids mMapObjectGuids;
- CreatureDataMap mCreatureDataMap;
- CreatureTemplateContainer CreatureTemplateStore;
- CreatureModelContainer CreatureModelStore;
- CreatureAddonContainer CreatureAddonStore;
- CreatureAddonContainer CreatureTemplateAddonStore;
- EquipmentInfoContainer EquipmentInfoStore;
- LinkedRespawnMap mLinkedRespawnMap;
- CreatureLocaleMap mCreatureLocaleMap;
- GameObjectDataMap mGameObjectDataMap;
- GameObjectLocaleMap mGameObjectLocaleMap;
- GameObjectTemplateContainer GameObjectTemplateStore;
-
- ItemTemplateContainer ItemTemplateStore;
- ItemLocaleMap mItemLocaleMap;
- ItemSetNameLocaleMap mItemSetNameLocaleMap;
- QuestLocaleMap mQuestLocaleMap;
- NpcTextLocaleMap mNpcTextLocaleMap;
- PageTextLocaleMap mPageTextLocaleMap;
- TrinityStringLocaleMap mTrinityStringLocaleMap;
- GossipMenuItemsLocaleMap mGossipMenuItemsLocaleMap;
- PointOfInterestLocaleMap mPointOfInterestLocaleMap;
- RespawnTimes mCreatureRespawnTimes;
- ACE_Thread_Mutex m_CreatureRespawnTimesMtx;
- RespawnTimes mGORespawnTimes;
- ACE_Thread_Mutex m_GORespawnTimesMtx;
-
- CacheVendorItemMap m_mCacheVendorItemMap;
- CacheTrainerSpellMap m_mCacheTrainerSpellMap;
-
- std::set<uint32> difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
- std::set<uint32> hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
+ PlayerXPperLevel _playerXPperLevel;
+
+ typedef std::map<uint32, uint32> BaseXPContainer; // [area level][base xp]
+ BaseXPContainer _baseXPTable;
+
+ typedef std::map<uint32, int32> FishingBaseSkillContainer; // [areaId][base skill level]
+ FishingBaseSkillContainer _fishingBaseForAreaStore;
+
+ typedef std::map<uint32, StringVector> HalfNameContainer;
+ HalfNameContainer _petHalfName0;
+ HalfNameContainer _petHalfName1;
+
+ typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameContainer;
+ ItemSetNameContainer _itemSetNameStore;
+
+ MapObjectGuids _mapObjectGuidsStore;
+ CreatureDataContainer _creatureDataStore;
+ CreatureTemplateContainer _creatureTemplateStore;
+ CreatureModelContainer _creatureModelStore;
+ CreatureAddonContainer _creatureAddonStore;
+ CreatureAddonContainer _creatureTemplateAddonStore;
+ EquipmentInfoContainer _equipmentInfoStore;
+ LinkedRespawnContainer _linkedRespawnStore;
+ CreatureLocaleContainer _creatureLocaleStore;
+ GameObjectDataContainer _gameObjectDataStore;
+ GameObjectLocaleContainer _gameObjectLocaleStore;
+ GameObjectTemplateContainer _gameObjectTemplateStore;
+
+ ItemTemplateContainer _itemTemplateStore;
+ ItemLocaleContainer _itemLocaleStore;
+ ItemSetNameLocaleContainer _itemSetNameLocaleStore;
+ QuestLocaleContainer _questLocaleStore;
+ NpcTextLocaleContainer _npcTextLocaleStore;
+ PageTextLocaleContainer _pageTextLocaleStore;
+ TrinityStringLocaleContainer _trinityStringLocaleStore;
+ GossipMenuItemsLocaleContainer _gossipMenuItemsLocaleStore;
+ PointOfInterestLocaleContainer _pointOfInterestLocaleStore;
+ RespawnTimes _creatureRespawnTimes;
+ ACE_Thread_Mutex _creatureRespawnTimesMutex;
+ RespawnTimes _goRespawnTimes;
+ ACE_Thread_Mutex _goRespawnTimesMutex;
+
+ CacheVendorItemContainer _cacheVendorItemStore;
+ CacheTrainerSpellContainer _cacheTrainerSpellStore;
+
+ std::set<uint32> _difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
+ std::set<uint32> _hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
enum CreatureLinkedRespawnType
{
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index e3029a1be65..4112711ad3c 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -530,20 +530,38 @@ namespace Trinity
class RaiseDeadObjectCheck
{
public:
- RaiseDeadObjectCheck(Unit* funit, float range) : i_funit(funit), i_range(range) {}
+ RaiseDeadObjectCheck(Unit* source, float range) : _source(source), i_range(range) {}
bool operator()(Creature* u)
{
- if (i_funit->GetTypeId() != TYPEID_PLAYER || !((Player*)i_funit)->isHonorOrXPTarget(u) ||
- u->getDeathState() != CORPSE || u->isInFlight() ||
+ if (_source->GetTypeId() != TYPEID_PLAYER || !((Player*)_source)->isHonorOrXPTarget(u) ||
+ u->getDeathState() != CORPSE ||
(u->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0 ||
(u->GetDisplayId() != u->GetNativeDisplayId()))
return false;
- return i_funit->IsWithinDistInMap(u, i_range);
+ return _source->IsWithinDistInMap(u, i_range);
+ }
+
+ bool operator()(Player* u)
+ {
+ if (_source == u || _source->GetTypeId() != TYPEID_PLAYER || !((Player*)_source)->isHonorOrXPTarget(u) ||
+ u->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST) || u->isInFlight() || !u->isDead() ||
+ (u->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0)
+ return false;
+
+ return _source->IsWithinDistInMap(u, i_range);
+ }
+
+ bool operator()(Corpse* u)
+ {
+ if (_source->GetTypeId() != TYPEID_PLAYER || u->GetType() == CORPSE_BONES)
+ return false;
+
+ return _source->IsWithinDistInMap(u, i_range);
}
template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; }
private:
- Unit* const i_funit;
+ Unit* const _source;
float i_range;
};
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 8a98b038efd..fc87d3ed8d6 100755
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -115,42 +115,53 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
//this void creates new auction and adds auction to some auctionhouse
void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_SELL_ITEM");
-
- uint64 auctioneer, item;
- uint32 etime, bid, buyout, count;
+ uint64 auctioneer;
+ uint32 itemsCount, etime, bid, buyout;
recv_data >> auctioneer;
- recv_data.read_skip<uint32>(); // const 1?
- recv_data >> item;
- recv_data >> count; // 3.2.2, number of items being auctioned
+ recv_data >> itemsCount;
+
+ uint64 itemGUIDs[MAX_AUCTION_ITEMS]; // 160 slot = 4x 36 slot bag + backpack 16 slot
+ uint32 count[MAX_AUCTION_ITEMS];
+
+ for (uint32 i = 0; i < itemsCount; ++i)
+ {
+ recv_data >> itemGUIDs[i];
+ recv_data >> count[i];
+
+ if (!itemGUIDs[i] || !count[i] || count[i] > 1000 )
+ return;
+ }
+
recv_data >> bid;
recv_data >> buyout;
recv_data >> etime;
- Player* player = GetPlayer();
-
- if (!item || !bid || !etime)
- return; //check for cheaters
+ if (!bid || !etime)
+ return;
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(auctioneer));
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
if (!auctionHouseEntry)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer)));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", GUID_LOPART(auctioneer));
+ return;
+ }
+
+ if (itemsCount > MAX_AUCTION_ITEMS)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
- // client send time in minutes, convert to common used sec time
etime *= MINUTE;
- // client understand only 3 auction time
- switch (etime)
+ switch(etime)
{
case 1*MIN_AUCTION_TIME:
case 2*MIN_AUCTION_TIME:
@@ -160,96 +171,181 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
- // remove fake death
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- Item* it = player->GetItemByGuid(item);
- //do not allow to sell already auctioned items
- if (sAuctionMgr->GetAItem(GUID_LOPART(item)))
- {
- sLog->outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", player->GetName(), GUID_LOPART(item));
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
- }
- // prevent sending bag with items (cheat: can be placed in bag after adding equiped empty bag to auction)
- if (!it)
+ Item* items[MAX_AUCTION_ITEMS];
+
+ uint32 finalCount = 0;
+
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
- return;
+ Item* item = _player->GetItemByGuid(itemGUIDs[i]);
+
+ if (!item)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
+ return;
+ }
+
+ if (sAuctionMgr->GetAItem(item->GetGUIDLow()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
+ item->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
+ item->GetCount() < count[i])
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
+
+ items[i] = item;
+ finalCount += count[i];
}
- if (!it->CanBeTraded())
+ if (!finalCount)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
- if (it->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || it->GetUInt32Value(ITEM_FIELD_DURATION))
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
+ Item* item = items[i];
+
+ if (item->GetMaxStackCount() < finalCount)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
}
- if (it->IsNotEmptyBag())
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
- }
+ Item* item = items[i];
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
- //we have to take deposit :
- uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, it, count);
- if (!player->HasEnoughMoney(deposit))
- {
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
- return;
- }
+ uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
+ if (!_player->HasEnoughMoney(deposit))
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
+ return;
+ }
- if (AccountMgr::IsGMAccount(GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
- {
- sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
- GetPlayerName(), GetAccountId(), it->GetTemplate()->Name1.c_str(), it->GetEntry(), count);
- }
+ _player->ModifyMoney(-int32(deposit));
- player->ModifyMoney(-int32(deposit));
+ AuctionEntry* AH = new AuctionEntry;
+ AH->Id = sObjectMgr->GenerateAuctionID();
- uint32 auction_time = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
+ AH->auctioneer = 23442;
+ else
+ AH->auctioneer = GUID_LOPART(auctioneer);
- AuctionEntry* AH = new AuctionEntry;
- AH->Id = sObjectMgr->GenerateAuctionID();
- if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
- AH->auctioneer = 23442;
- else
- AH->auctioneer = GUID_LOPART(auctioneer);
- AH->item_guidlow = GUID_LOPART(item);
- AH->item_template = it->GetEntry();
- AH->owner = player->GetGUIDLow();
- AH->startbid = bid;
- AH->bidder = 0;
- AH->bid = 0;
- AH->buyout = buyout;
- AH->expire_time = time(NULL) + auction_time;
- AH->deposit = deposit;
- AH->auctionHouseEntry = auctionHouseEntry;
-
- sLog->outDetail("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
- sAuctionMgr->AddAItem(it);
- auctionHouse->AddAuction(AH);
-
- player->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
+ if (itemsCount == 1 && item->GetCount() == count[i])
+ {
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
+ {
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ GetPlayerName(), GetAccountId(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount());
+ }
- SQLTransaction trans = CharacterDatabase.BeginTransaction();
- it->DeleteFromInventoryDB(trans);
- it->SaveToDB(trans); // recursive and not have transaction guard into self, not in inventiory and can be save standalone
- AH->SaveToDB(trans);
- player->SaveInventoryAndGoldToDB(trans);
- CharacterDatabase.CommitTransaction(trans);
+ AH->item_guidlow = item->GetGUIDLow();
+ AH->item_template = item->GetEntry();
+ AH->owner = _player->GetGUIDLow();
+ AH->startbid = bid;
+ AH->bidder = 0;
+ AH->bid = 0;
+ AH->buyout = buyout;
+ AH->expire_time = time(NULL) + auctionTime;
+ AH->deposit = deposit;
+ AH->auctionHouseEntry = auctionHouseEntry;
+
+ sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ sAuctionMgr->AddAItem(item);
+ auctionHouse->AddAuction(AH);
+
+ _player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->DeleteFromInventoryDB(trans);
+ item->SaveToDB(trans);
+ AH->SaveToDB(trans);
+ _player->SaveInventoryAndGoldToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+
+ GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ return;
+ }
+ else
+ {
+ Item* newItem = item->CloneItem(finalCount, _player);
+ if (!newItem)
+ {
+ sLog->outError("CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
- SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
+ {
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ GetPlayerName(), GetAccountId(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetCount());
+ }
+
+ AH->item_guidlow = newItem->GetGUIDLow();
+ AH->item_template = newItem->GetEntry();
+ AH->owner = _player->GetGUIDLow();
+ AH->startbid = bid;
+ AH->bidder = 0;
+ AH->bid = 0;
+ AH->buyout = buyout;
+ AH->expire_time = time(NULL) + auctionTime;
+ AH->deposit = deposit;
+ AH->auctionHouseEntry = auctionHouseEntry;
+
+ sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ sAuctionMgr->AddAItem(newItem);
+ auctionHouse->AddAuction(AH);
+
+ for (uint32 i = 0; i < itemsCount; ++i)
+ {
+ Item* item = items[i];
+
+ if (item->GetCount() == count[i])
+ {
+ _player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->DeleteFromInventoryDB(trans);
+ item->SaveToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+ }
+ else
+ {
+ item->SetCount(item->GetCount() - count[i]);
+ item->SetState(ITEM_CHANGED, _player);
+ _player->ItemRemovedQuestCheck(item->GetEntry(), count[i]);
+ item->SendUpdateToPlayer(_player);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->SaveToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+ }
+ }
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ AH->SaveToDB(trans);
+ _player->SaveInventoryAndGoldToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
- GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+
+ GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ return;
+ }
+ }
}
//this function is called when client bids or buys out auction
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 0094c20d927..310bda92739 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1853,7 +1853,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
trans->Append(stmt);
// Achievement conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_achievements.begin(); it != sObjectMgr->factionchange_achievements.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Achievements.begin(); it != sObjectMgr->FactionChange_Achievements.end(); ++it)
{
uint32 achiev_alliance = it->first;
uint32 achiev_horde = it->second;
@@ -1864,7 +1864,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Item conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_items.begin(); it != sObjectMgr->factionchange_items.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Items.begin(); it != sObjectMgr->FactionChange_Items.end(); ++it)
{
uint32 item_alliance = it->first;
uint32 item_horde = it->second;
@@ -1873,7 +1873,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Spell conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_spells.begin(); it != sObjectMgr->factionchange_spells.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Spells.begin(); it != sObjectMgr->FactionChange_Spells.end(); ++it)
{
uint32 spell_alliance = it->first;
uint32 spell_horde = it->second;
@@ -1884,7 +1884,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Reputation conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_reputations.begin(); it != sObjectMgr->factionchange_reputations.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Reputation.begin(); it != sObjectMgr->FactionChange_Reputation.end(); ++it)
{
uint32 reputation_alliance = it->first;
uint32 reputation_horde = it->second;
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index b4c07811598..38d17d8c3b6 100755
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -241,9 +241,8 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction(trans);
}
-void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
+void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recv_data)
{
- // ok
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
uint8 signs = 0;
@@ -256,7 +255,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
QueryResult result = CharacterDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", petitionguid_low);
if (!result)
{
- sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
+ sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
return;
}
Field* fields = result->Fetch();
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 89c13dd6b5c..564d0cce8b7 100755
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -102,9 +102,7 @@ uint32 LootStore::LoadLootTable()
QueryResult result = WorldDatabase.PQuery("SELECT entry, item, ChanceOrQuestChance, lootmode, groupid, mincountOrRef, maxcount FROM %s", GetName());
if (!result)
- {
return 0;
-}
uint32 count = 0;
@@ -1366,7 +1364,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
for (LootStoreItemList::iterator i = Entries.begin(); i != Entries.end(); ++i)
{
- if (i->itemid == cond->mSourceEntry)
+ if (i->itemid == cond->SourceEntry)
{
i->conditions.push_back(cond);
return true;
@@ -1382,7 +1380,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
for (LootStoreItemList::iterator i = itemList->begin(); i != itemList->end(); ++i)
{
- if ((*i).itemid == cond->mSourceEntry)
+ if ((*i).itemid == cond->SourceEntry)
{
(*i).conditions.push_back(cond);
return true;
@@ -1394,7 +1392,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
for (LootStoreItemList::iterator i = itemList->begin(); i != itemList->end(); ++i)
{
- if ((*i).itemid == cond->mSourceEntry)
+ if ((*i).itemid == cond->SourceEntry)
{
(*i).conditions.push_back(cond);
return true;
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index b8c35d45e98..39f695c0868 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -1022,24 +1022,24 @@ void Map::UnloadAll()
// *****************************
GridMap::GridMap()
{
- m_flags = 0;
+ _flags = 0;
// Area data
- m_gridArea = 0;
- m_area_map = NULL;
+ _gridArea = 0;
+ _areaMap = NULL;
// Height level data
- m_gridHeight = INVALID_HEIGHT;
- m_gridGetHeight = &GridMap::getHeightFromFlat;
+ _gridHeight = INVALID_HEIGHT;
+ _gridGetHeight = &GridMap::getHeightFromFlat;
m_V9 = NULL;
m_V8 = NULL;
// Liquid data
- m_liquidType = 0;
- m_liquid_offX = 0;
- m_liquid_offY = 0;
- m_liquid_width = 0;
- m_liquid_height = 0;
- m_liquidLevel = INVALID_HEIGHT;
- m_liquid_type = NULL;
- m_liquid_map = NULL;
+ _liquidType = 0;
+ _liquidOffX = 0;
+ _liquidOffY = 0;
+ _liquidWidth = 0;
+ _liquidHeight = 0;
+ _liquidLevel = INVALID_HEIGHT;
+ _liquidData = NULL;
+ _liquidMap = NULL;
}
GridMap::~GridMap()
@@ -1097,17 +1097,17 @@ bool GridMap::loadData(char *filename)
void GridMap::unloadData()
{
- delete[] m_area_map;
+ delete[] _areaMap;
delete[] m_V9;
delete[] m_V8;
- delete[] m_liquid_type;
- delete[] m_liquid_map;
- m_area_map = NULL;
+ delete[] _liquidData;
+ delete[] _liquidMap;
+ _areaMap = NULL;
m_V9 = NULL;
m_V8 = NULL;
- m_liquid_type = NULL;
- m_liquid_map = NULL;
- m_gridGetHeight = &GridMap::getHeightFromFlat;
+ _liquidData = NULL;
+ _liquidMap = NULL;
+ _gridGetHeight = &GridMap::getHeightFromFlat;
}
bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/)
@@ -1118,11 +1118,11 @@ bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(&header, sizeof(header), 1, in) != 1 || header.fourcc != MapAreaMagic.asUInt)
return false;
- m_gridArea = header.gridArea;
+ _gridArea = header.gridArea;
if (!(header.flags & MAP_AREA_NO_AREA))
{
- m_area_map = new uint16 [16*16];
- if (fread(m_area_map, sizeof(uint16), 16*16, in) != 16*16)
+ _areaMap = new uint16 [16*16];
+ if (fread(_areaMap, sizeof(uint16), 16*16, in) != 16*16)
return false;
}
return true;
@@ -1136,7 +1136,7 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(&header, sizeof(header), 1, in) != 1 || header.fourcc != MapHeightMagic.asUInt)
return false;
- m_gridHeight = header.gridHeight;
+ _gridHeight = header.gridHeight;
if (!(header.flags & MAP_HEIGHT_NO_HEIGHT))
{
if ((header.flags & MAP_HEIGHT_AS_INT16))
@@ -1146,8 +1146,8 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(m_uint16_V9, sizeof(uint16), 129*129, in) != 129*129 ||
fread(m_uint16_V8, sizeof(uint16), 128*128, in) != 128*128)
return false;
- m_gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 65535;
- m_gridGetHeight = &GridMap::getHeightFromUint16;
+ _gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 65535;
+ _gridGetHeight = &GridMap::getHeightFromUint16;
}
else if ((header.flags & MAP_HEIGHT_AS_INT8))
{
@@ -1156,8 +1156,8 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(m_uint8_V9, sizeof(uint8), 129*129, in) != 129*129 ||
fread(m_uint8_V8, sizeof(uint8), 128*128, in) != 128*128)
return false;
- m_gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 255;
- m_gridGetHeight = &GridMap::getHeightFromUint8;
+ _gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 255;
+ _gridGetHeight = &GridMap::getHeightFromUint8;
}
else
{
@@ -1166,11 +1166,11 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(m_V9, sizeof(float), 129*129, in) != 129*129 ||
fread(m_V8, sizeof(float), 128*128, in) != 128*128)
return false;
- m_gridGetHeight = &GridMap::getHeightFromFloat;
+ _gridGetHeight = &GridMap::getHeightFromFloat;
}
}
else
- m_gridGetHeight = &GridMap::getHeightFromFlat;
+ _gridGetHeight = &GridMap::getHeightFromFlat;
return true;
}
@@ -1182,23 +1182,23 @@ bool GridMap::loadLiquidData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(&header, sizeof(header), 1, in) != 1 || header.fourcc != MapLiquidMagic.asUInt)
return false;
- m_liquidType = header.liquidType;
- m_liquid_offX = header.offsetX;
- m_liquid_offY = header.offsetY;
- m_liquid_width = header.width;
- m_liquid_height= header.height;
- m_liquidLevel = header.liquidLevel;
+ _liquidType = header.liquidType;
+ _liquidOffX = header.offsetX;
+ _liquidOffY = header.offsetY;
+ _liquidWidth = header.width;
+ _liquidHeight= header.height;
+ _liquidLevel = header.liquidLevel;
if (!(header.flags & MAP_LIQUID_NO_TYPE))
{
- m_liquid_type = new uint8 [16*16];
- if (fread(m_liquid_type, sizeof(uint8), 16*16, in) != 16*16)
+ _liquidData = new uint8 [16*16];
+ if (fread(_liquidData, sizeof(uint8), 16*16, in) != 16*16)
return false;
}
if (!(header.flags & MAP_LIQUID_NO_HEIGHT))
{
- m_liquid_map = new float [m_liquid_width*m_liquid_height];
- if (fread(m_liquid_map, sizeof(float), m_liquid_width*m_liquid_height, in) != m_liquid_width*m_liquid_height)
+ _liquidMap = new float [_liquidWidth*_liquidHeight];
+ if (fread(_liquidMap, sizeof(float), _liquidWidth*_liquidHeight, in) != _liquidWidth*_liquidHeight)
return false;
}
return true;
@@ -1206,25 +1206,25 @@ bool GridMap::loadLiquidData(FILE* in, uint32 offset, uint32 /*size*/)
uint16 GridMap::getArea(float x, float y)
{
- if (!m_area_map)
- return m_gridArea;
+ if (!_areaMap)
+ return _gridArea;
x = 16 * (32 - x/SIZE_OF_GRIDS);
y = 16 * (32 - y/SIZE_OF_GRIDS);
int lx = (int)x & 15;
int ly = (int)y & 15;
- return m_area_map[lx*16 + ly];
+ return _areaMap[lx*16 + ly];
}
float GridMap::getHeightFromFlat(float /*x*/, float /*y*/) const
{
- return m_gridHeight;
+ return _gridHeight;
}
float GridMap::getHeightFromFloat(float x, float y) const
{
if (!m_V8 || !m_V9)
- return m_gridHeight;
+ return _gridHeight;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
@@ -1306,7 +1306,7 @@ float GridMap::getHeightFromFloat(float x, float y) const
float GridMap::getHeightFromUint8(float x, float y) const
{
if (!m_uint8_V8 || !m_uint8_V9)
- return m_gridHeight;
+ return _gridHeight;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
@@ -1367,13 +1367,13 @@ float GridMap::getHeightFromUint8(float x, float y) const
}
}
// Calculate height
- return (float)((a * x) + (b * y) + c)*m_gridIntHeightMultiplier + m_gridHeight;
+ return (float)((a * x) + (b * y) + c)*_gridIntHeightMultiplier + _gridHeight;
}
float GridMap::getHeightFromUint16(float x, float y) const
{
if (!m_uint16_V8 || !m_uint16_V9)
- return m_gridHeight;
+ return _gridHeight;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
@@ -1434,45 +1434,45 @@ float GridMap::getHeightFromUint16(float x, float y) const
}
}
// Calculate height
- return (float)((a * x) + (b * y) + c)*m_gridIntHeightMultiplier + m_gridHeight;
+ return (float)((a * x) + (b * y) + c)*_gridIntHeightMultiplier + _gridHeight;
}
float GridMap::getLiquidLevel(float x, float y)
{
- if (!m_liquid_map)
- return m_liquidLevel;
+ if (!_liquidMap)
+ return _liquidLevel;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
- int cx_int = ((int)x & (MAP_RESOLUTION-1)) - m_liquid_offY;
- int cy_int = ((int)y & (MAP_RESOLUTION-1)) - m_liquid_offX;
+ int cx_int = ((int)x & (MAP_RESOLUTION-1)) - _liquidOffY;
+ int cy_int = ((int)y & (MAP_RESOLUTION-1)) - _liquidOffX;
- if (cx_int < 0 || cx_int >=m_liquid_height)
+ if (cx_int < 0 || cx_int >=_liquidHeight)
return INVALID_HEIGHT;
- if (cy_int < 0 || cy_int >=m_liquid_width)
+ if (cy_int < 0 || cy_int >=_liquidWidth)
return INVALID_HEIGHT;
- return m_liquid_map[cx_int*m_liquid_width + cy_int];
+ return _liquidMap[cx_int*_liquidWidth + cy_int];
}
uint8 GridMap::getTerrainType(float x, float y)
{
- if (!m_liquid_type)
+ if (!_liquidData)
return 0;
x = 16 * (32 - x/SIZE_OF_GRIDS);
y = 16 * (32 - y/SIZE_OF_GRIDS);
int lx = (int)x & 15;
int ly = (int)y & 15;
- return m_liquid_type[lx*16 + ly];
+ return _liquidData[lx*16 + ly];
}
// Get water state on map
inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data)
{
// Check water type (if no water return)
- if (!m_liquid_type && !m_liquidType)
+ if (!_liquidType && !_liquidData)
return LIQUID_MAP_NO_WATER;
// Get cell
@@ -1483,7 +1483,7 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R
int y_int = (int)cy & (MAP_RESOLUTION-1);
// Check water type in cell
- uint8 type = m_liquid_type ? m_liquid_type[(x_int>>3)*16 + (y_int>>3)] : m_liquidType;
+ uint8 type = _liquidData ? _liquidData[(x_int>>3)*16 + (y_int>>3)] : _liquidType;
if (type == 0)
return LIQUID_MAP_NO_WATER;
@@ -1493,15 +1493,15 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R
// Check water level:
// Check water height map
- int lx_int = x_int - m_liquid_offY;
- int ly_int = y_int - m_liquid_offX;
- if (lx_int < 0 || lx_int >=m_liquid_height)
+ int lx_int = x_int - _liquidOffY;
+ int ly_int = y_int - _liquidOffX;
+ if (lx_int < 0 || lx_int >=_liquidHeight)
return LIQUID_MAP_NO_WATER;
- if (ly_int < 0 || ly_int >=m_liquid_width)
+ if (ly_int < 0 || ly_int >=_liquidWidth)
return LIQUID_MAP_NO_WATER;
// Get water level
- float liquid_level = m_liquid_map ? m_liquid_map[lx_int*m_liquid_width + ly_int] : m_liquidLevel;
+ float liquid_level = _liquidMap ? _liquidMap[lx_int*_liquidWidth + ly_int] : _liquidLevel;
// Get ground level (sub 0.2 for fix some errors)
float ground_level = getHeight(x, y);
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 148a55d4691..9f4dbb23b63 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -143,55 +143,58 @@ struct LiquidData
class GridMap
{
- uint32 m_flags;
- // Area data
- uint16 m_gridArea;
- uint16 *m_area_map;
- // Height level data
- float m_gridHeight;
- float m_gridIntHeightMultiplier;
+ uint32 _flags;
union{
- float *m_V9;
- uint16 *m_uint16_V9;
- uint8 *m_uint8_V9;
+ float* m_V9;
+ uint16* m_uint16_V9;
+ uint8* m_uint8_V9;
};
union{
- float *m_V8;
- uint16 *m_uint16_V8;
- uint8 *m_uint8_V8;
+ float* m_V8;
+ uint16* m_uint16_V8;
+ uint8* m_uint8_V8;
};
+ // Height level data
+ float _gridHeight;
+ float _gridIntHeightMultiplier;
+
+ // Area data
+ uint16* _areaMap;
+
// Liquid data
- uint16 m_liquidType;
- uint8 m_liquid_offX;
- uint8 m_liquid_offY;
- uint8 m_liquid_width;
- uint8 m_liquid_height;
- float m_liquidLevel;
- uint8 *m_liquid_type;
- float *m_liquid_map;
-
- bool loadAreaData(FILE* in, uint32 offset, uint32 size);
- bool loadHeihgtData(FILE* in, uint32 offset, uint32 size);
- bool loadLiquidData(FILE* in, uint32 offset, uint32 size);
+ float _liquidLevel;
+ uint8* _liquidData;
+ float* _liquidMap;
+ uint16 _gridArea;
+ uint16 _liquidType;
+ uint8 _liquidOffX;
+ uint8 _liquidOffY;
+ uint8 _liquidWidth;
+ uint8 _liquidHeight;
+
+
+ bool loadAreaData(FILE* in, uint32 offset, uint32 size);
+ bool loadHeihgtData(FILE* in, uint32 offset, uint32 size);
+ bool loadLiquidData(FILE* in, uint32 offset, uint32 size);
// Get height functions and pointers
- typedef float (GridMap::*pGetHeightPtr) (float x, float y) const;
- pGetHeightPtr m_gridGetHeight;
- float getHeightFromFloat(float x, float y) const;
- float getHeightFromUint16(float x, float y) const;
- float getHeightFromUint8(float x, float y) const;
- float getHeightFromFlat(float x, float y) const;
+ typedef float (GridMap::*GetHeightPtr) (float x, float y) const;
+ GetHeightPtr _gridGetHeight;
+ float getHeightFromFloat(float x, float y) const;
+ float getHeightFromUint16(float x, float y) const;
+ float getHeightFromUint8(float x, float y) const;
+ float getHeightFromFlat(float x, float y) const;
public:
GridMap();
~GridMap();
- bool loadData(char *filaname);
- void unloadData();
+ bool loadData(char* filaname);
+ void unloadData();
uint16 getArea(float x, float y);
- inline float getHeight(float x, float y) {return (this->*m_gridGetHeight)(x, y);}
- float getLiquidLevel(float x, float y);
- uint8 getTerrainType(float x, float y);
+ inline float getHeight(float x, float y) {return (this->*_gridGetHeight)(x, y);}
+ float getLiquidLevel(float x, float y);
+ uint8 getTerrainType(float x, float y);
ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0);
};
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index c7cf9be9a38..954a193c498 100755
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -53,9 +53,9 @@ void MotionMaster::Initialize()
// set new default movement generator
void MotionMaster::InitDefault()
{
- if (i_owner->GetTypeId() == TYPEID_UNIT)
+ if (_owner->GetTypeId() == TYPEID_UNIT)
{
- MovementGenerator* movement = FactorySelector::selectMovementGenerator(i_owner->ToCreature());
+ MovementGenerator* movement = FactorySelector::selectMovementGenerator(_owner->ToCreature());
Mutate(movement == NULL ? &si_idleMovement : movement, MOTION_SLOT_IDLE);
}
else
@@ -77,42 +77,42 @@ MotionMaster::~MotionMaster()
void MotionMaster::UpdateMotion(uint32 diff)
{
- if (!i_owner)
+ if (!_owner)
return;
- if (i_owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) // what about UNIT_STATE_DISTRACTED? Why is this not included?
+ if (_owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) // what about UNIT_STATE_DISTRACTED? Why is this not included?
return;
ASSERT(!empty());
- m_cleanFlag |= MMCF_UPDATE;
- if (!top()->Update(*i_owner, diff))
+ _cleanFlag |= MMCF_UPDATE;
+ if (!top()->Update(*_owner, diff))
{
- m_cleanFlag &= ~MMCF_UPDATE;
+ _cleanFlag &= ~MMCF_UPDATE;
MovementExpired();
}
else
- m_cleanFlag &= ~MMCF_UPDATE;
+ _cleanFlag &= ~MMCF_UPDATE;
- if (m_expList)
+ if (_expList)
{
- for (size_t i = 0; i < m_expList->size(); ++i)
+ for (size_t i = 0; i < _expList->size(); ++i)
{
- MovementGenerator* mg = (*m_expList)[i];
+ MovementGenerator* mg = (*_expList)[i];
DirectDelete(mg);
}
- delete m_expList;
- m_expList = NULL;
+ delete _expList;
+ _expList = NULL;
if (empty())
Initialize();
else if (needInitTop())
InitTop();
- else if (m_cleanFlag & MMCF_RESET)
- top()->Reset(*i_owner);
+ else if (_cleanFlag & MMCF_RESET)
+ top()->Reset(*_owner);
- m_cleanFlag &= ~MMCF_RESET;
+ _cleanFlag &= ~MMCF_RESET;
}
}
@@ -128,7 +128,7 @@ void MotionMaster::DirectClean(bool reset)
if (needInitTop())
InitTop();
else if (reset)
- top()->Reset(*i_owner);
+ top()->Reset(*_owner);
}
void MotionMaster::DelayedClean()
@@ -152,14 +152,14 @@ void MotionMaster::DirectExpire(bool reset)
}
while (!top())
- --i_top;
+ --_top;
if (empty())
Initialize();
else if (needInitTop())
InitTop();
else if (reset)
- top()->Reset(*i_owner);
+ top()->Reset(*_owner);
}
void MotionMaster::DelayedExpire()
@@ -172,7 +172,7 @@ void MotionMaster::DelayedExpire()
}
while (!top())
- --i_top;
+ --_top;
}
void MotionMaster::MoveIdle()
@@ -184,9 +184,9 @@ void MotionMaster::MoveIdle()
void MotionMaster::MoveRandom(float spawndist)
{
- if (i_owner->GetTypeId() == TYPEID_UNIT)
+ if (_owner->GetTypeId() == TYPEID_UNIT)
{
- sLog->outStaticDebug("Creature (GUID: %u) start moving random", i_owner->GetGUIDLow());
+ sLog->outStaticDebug("Creature (GUID: %u) start moving random", _owner->GetGUIDLow());
Mutate(new RandomMovementGenerator<Creature>(spawndist), MOTION_SLOT_IDLE);
}
}
@@ -195,15 +195,15 @@ void MotionMaster::MoveTargetedHome()
{
Clear(false);
- if (i_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)i_owner)->GetCharmerOrOwnerGUID())
+ if (_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)_owner)->GetCharmerOrOwnerGUID())
{
- sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", i_owner->GetEntry(), i_owner->GetGUIDLow());
+ sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE);
}
- else if (i_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)i_owner)->GetCharmerOrOwnerGUID())
+ else if (_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)_owner)->GetCharmerOrOwnerGUID())
{
- sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", i_owner->GetEntry(), i_owner->GetGUIDLow() );
- Unit *target = ((Creature*)i_owner)->GetCharmerOrOwner();
+ sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow() );
+ Unit *target = ((Creature*)_owner)->GetCharmerOrOwner();
if (target)
{
sLog->outStaticDebug("Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow() );
@@ -212,21 +212,21 @@ void MotionMaster::MoveTargetedHome()
}
else
{
- sLog->outError("Player (GUID: %u) attempt targeted home", i_owner->GetGUIDLow());
+ sLog->outError("Player (GUID: %u) attempt targeted home", _owner->GetGUIDLow());
}
}
void MotionMaster::MoveConfused()
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) move confused", i_owner->GetGUIDLow());
+ sLog->outStaticDebug("Player (GUID: %u) move confused", _owner->GetGUIDLow());
Mutate(new ConfusedMovementGenerator<Player>(), MOTION_SLOT_CONTROLLED);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) move confused",
- i_owner->GetEntry(), i_owner->GetGUIDLow());
+ _owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new ConfusedMovementGenerator<Creature>(), MOTION_SLOT_CONTROLLED);
}
}
@@ -234,14 +234,14 @@ void MotionMaster::MoveConfused()
void MotionMaster::MoveChase(Unit* target, float dist, float angle)
{
// ignore movement request if target not exist
- if (!target || target == i_owner || i_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
+ if (!target || target == _owner || _owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
return;
- //i_owner->ClearUnitState(UNIT_STATE_FOLLOW);
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ //_owner->ClearUnitState(UNIT_STATE_FOLLOW);
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
sLog->outStaticDebug("Player (GUID: %u) chase to %s (GUID: %u)",
- i_owner->GetGUIDLow(),
+ _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new ChaseMovementGenerator<Player>(*target,dist,angle), MOTION_SLOT_ACTIVE);
@@ -249,7 +249,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(),
+ _owner->GetEntry(), _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new ChaseMovementGenerator<Creature>(*target,dist,angle), MOTION_SLOT_ACTIVE);
@@ -259,13 +259,13 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlot slot)
{
// ignore movement request if target not exist
- if (!target || target == i_owner || i_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
+ if (!target || target == _owner || _owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
return;
- //i_owner->AddUnitState(UNIT_STATE_FOLLOW);
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ //_owner->AddUnitState(UNIT_STATE_FOLLOW);
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", i_owner->GetGUIDLow(),
+ sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new FollowMovementGenerator<Player>(*target,dist,angle), slot);
@@ -273,7 +273,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(),
+ _owner->GetEntry(), _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new FollowMovementGenerator<Creature>(*target,dist,angle), slot);
@@ -282,15 +282,15 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
void MotionMaster::MovePoint(uint32 id, float x, float y, float z)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), id, x, y, z);
+ sLog->outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), id, x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z), MOTION_SLOT_ACTIVE);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), id, x, y, z);
+ _owner->GetEntry(), _owner->GetGUIDLow(), id, x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z), MOTION_SLOT_ACTIVE);
}
}
@@ -300,9 +300,9 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed)
float x, y, z;
pos.GetPosition(x, y, z);
- sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z);
+ sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
- Movement::MoveSplineInit init(*i_owner);
+ Movement::MoveSplineInit init(*_owner);
init.MoveTo(x,y,z);
init.SetVelocity(speed);
init.SetAnimation(Movement::ToGround);
@@ -315,9 +315,9 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed)
float x, y, z;
pos.GetPosition(x, y, z);
- sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z);
+ sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
- Movement::MoveSplineInit init(*i_owner);
+ Movement::MoveSplineInit init(*_owner);
init.MoveTo(x,y,z);
init.SetVelocity(speed);
init.SetAnimation(Movement::ToFly);
@@ -328,44 +328,44 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed)
void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ)
{
//this function may make players fall below map
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
return;
float x, y, z;
float moveTimeHalf = speedZ / Movement::gravity;
float dist = 2 * moveTimeHalf * speedXY;
- i_owner->GetNearPoint(i_owner, x, y, z, i_owner->GetObjectSize(), dist, i_owner->GetAngle(srcX, srcY) + M_PI);
+ _owner->GetNearPoint(_owner, x, y, z, _owner->GetObjectSize(), dist, _owner->GetAngle(srcX, srcY) + M_PI);
MoveJump(x, y, z, speedXY, speedZ);
}
void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ)
{
//this function may make players fall below map
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
return;
float x, y, z;
float moveTimeHalf = speedZ / Movement::gravity;
float dist = 2 * moveTimeHalf * speedXY;
- i_owner->GetClosePoint(x, y, z, i_owner->GetObjectSize(), dist, angle);
+ _owner->GetClosePoint(x, y, z, _owner->GetObjectSize(), dist, angle);
MoveJump(x, y, z, speedXY, speedZ);
}
void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id)
{
- sLog->outStaticDebug("Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z);
+ sLog->outStaticDebug("Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
float moveTimeHalf = speedZ / Movement::gravity;
float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ);
- Movement::MoveSplineInit init(*i_owner);
+ Movement::MoveSplineInit init(*_owner);
init.MoveTo(x,y,z);
init.SetParabolic(max_height,0);
init.SetVelocity(speedXY);
init.Launch();
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
else
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
@@ -374,20 +374,20 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
void MotionMaster::MoveFall(uint32 id/*=0*/)
{
// use larger distance for vmap height search than in most other cases
- float tz = i_owner->GetMap()->GetHeight(i_owner->GetPhaseMask(), i_owner->GetPositionX(), i_owner->GetPositionY(), i_owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
+ float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
sLog->outStaticDebug("MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
- i_owner->GetMap()->GetId(), i_owner->GetPositionX(), i_owner->GetPositionX(), i_owner->GetPositionZ());
+ _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionX(), _owner->GetPositionZ());
return;
}
// Abort too if the ground is very near
- if (fabs(i_owner->GetPositionZ() - tz) < 0.1f)
+ if (fabs(_owner->GetPositionZ() - tz) < 0.1f)
return;
- Movement::MoveSplineInit init(*i_owner);
- init.MoveTo(i_owner->GetPositionX(), i_owner->GetPositionY(), tz);
+ Movement::MoveSplineInit init(*_owner);
+ init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz);
init.SetFall();
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
@@ -398,45 +398,45 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id)
if (Impl[MOTION_SLOT_CONTROLLED] && Impl[MOTION_SLOT_CONTROLLED]->GetMovementGeneratorType() != DISTRACT_MOTION_TYPE)
return;
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z);
+ sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z, speed), MOTION_SLOT_CONTROLLED);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z);
+ _owner->GetEntry(), _owner->GetGUIDLow(), x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, speed), MOTION_SLOT_CONTROLLED);
}
}
void MotionMaster::MoveSeekAssistance(float x, float y, float z)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outError("Player (GUID: %u) attempt to seek assistance", i_owner->GetGUIDLow());
+ sLog->outError("Player (GUID: %u) attempt to seek assistance", _owner->GetGUIDLow());
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z);
- i_owner->AttackStop();
- i_owner->ToCreature()->SetReactState(REACT_PASSIVE);
+ _owner->GetEntry(), _owner->GetGUIDLow(), x, y, z);
+ _owner->AttackStop();
+ _owner->ToCreature()->SetReactState(REACT_PASSIVE);
Mutate(new AssistanceMovementGenerator(x, y, z), MOTION_SLOT_ACTIVE);
}
}
void MotionMaster::MoveSeekAssistanceDistract(uint32 time)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outError("Player (GUID: %u) attempt to call distract after assistance", i_owner->GetGUIDLow());
+ sLog->outError("Player (GUID: %u) attempt to call distract after assistance", _owner->GetGUIDLow());
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), time);
+ _owner->GetEntry(), _owner->GetGUIDLow(), time);
Mutate(new AssistanceDistractMovementGenerator(time), MOTION_SLOT_ACTIVE);
}
}
@@ -446,12 +446,12 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
if (!enemy)
return;
- if (i_owner->HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
+ if (_owner->HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
return;
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", i_owner->GetGUIDLow(),
+ sLog->outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(),
enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow());
Mutate(new FleeingMovementGenerator<Player>(enemy->GetGUID()), MOTION_SLOT_CONTROLLED);
@@ -459,7 +459,7 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s",
- i_owner->GetEntry(), i_owner->GetGUIDLow(),
+ _owner->GetEntry(), _owner->GetGUIDLow(),
enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow(),
time ? " for a limited time" : "");
@@ -472,24 +472,24 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
void MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
if (path < sTaxiPathNodesByPath.size())
{
- sLog->outStaticDebug("%s taxi to (Path %u node %u)", i_owner->GetName(), path, pathnode);
+ sLog->outStaticDebug("%s taxi to (Path %u node %u)", _owner->GetName(), path, pathnode);
FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path], pathnode);
Mutate(mgen, MOTION_SLOT_CONTROLLED);
}
else
{
sLog->outError("%s attempt taxi to (not existed Path %u node %u)",
- i_owner->GetName(), path, pathnode);
+ _owner->GetName(), path, pathnode);
}
}
else
{
sLog->outError("Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), path, pathnode);
+ _owner->GetEntry(), _owner->GetGUIDLow(), path, pathnode);
}
}
@@ -498,14 +498,14 @@ void MotionMaster::MoveDistract(uint32 timer)
if (Impl[MOTION_SLOT_CONTROLLED])
return;
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) distracted (timer: %u)", i_owner->GetGUIDLow(), timer);
+ sLog->outStaticDebug("Player (GUID: %u) distracted (timer: %u)", _owner->GetGUIDLow(), timer);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) (timer: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), timer);
+ _owner->GetEntry(), _owner->GetGUIDLow(), timer);
}
DistractMovementGenerator* mgen = new DistractMovementGenerator(timer);
@@ -517,23 +517,23 @@ void MotionMaster::Mutate(MovementGenerator *m, MovementSlot slot)
if (MovementGenerator *curr = Impl[slot])
{
Impl[slot] = NULL; // in case a new one is generated in this slot during directdelete
- if (i_top == slot && (m_cleanFlag & MMCF_UPDATE))
+ if (_top == slot && (_cleanFlag & MMCF_UPDATE))
DelayedDelete(curr);
else
DirectDelete(curr);
}
- else if (i_top < slot)
+ else if (_top < slot)
{
- i_top = slot;
+ _top = slot;
}
Impl[slot] = m;
- if (i_top > slot)
- needInit[slot] = true;
+ if (_top > slot)
+ _needInit[slot] = true;
else
{
- needInit[slot] = false;
- m->Initialize(*i_owner);
+ _needInit[slot] = false;
+ m->Initialize(*_owner);
}
}
@@ -546,19 +546,19 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable)
/*while (!empty())
{
MovementGenerator *curr = top();
- curr->Finalize(*i_owner);
+ curr->Finalize(*_owner);
pop();
if (!isStatic(curr))
delete curr;
}*/
- //i_owner->GetTypeId() == TYPEID_PLAYER ?
+ //_owner->GetTypeId() == TYPEID_PLAYER ?
//Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)):
Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE);
sLog->outStaticDebug("%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)",
- i_owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature",
- i_owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO");
+ _owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature",
+ _owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO");
}
void MotionMaster::MoveRotate(uint32 time, RotateDirection direction)
@@ -576,7 +576,7 @@ void MotionMaster::propagateSpeedChange()
{
(*it)->unitSpeedChanged();
}*/
- for (int i = 0; i <= i_top; ++i)
+ for (int i = 0; i <= _top; ++i)
{
if (Impl[i])
Impl[i]->unitSpeedChanged();
@@ -601,34 +601,34 @@ MovementGeneratorType MotionMaster::GetMotionSlotType(int slot) const
void MotionMaster::InitTop()
{
- top()->Initialize(*i_owner);
- needInit[i_top] = false;
+ top()->Initialize(*_owner);
+ _needInit[_top] = false;
}
void MotionMaster::DirectDelete(_Ty curr)
{
if (isStatic(curr))
return;
- curr->Finalize(*i_owner);
+ curr->Finalize(*_owner);
delete curr;
}
void MotionMaster::DelayedDelete(_Ty curr)
{
- sLog->outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", i_owner->GetEntry(), curr->GetMovementGeneratorType());
+ sLog->outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType());
if (isStatic(curr))
return;
- if (!m_expList)
- m_expList = new ExpireList();
- m_expList->push_back(curr);
+ if (!_expList)
+ _expList = new ExpireList();
+ _expList->push_back(curr);
}
bool MotionMaster::GetDestination(float &x, float &y, float &z)
{
- if (i_owner->movespline->Finalized())
+ if (_owner->movespline->Finalized())
return false;
- const G3D::Vector3& dest = i_owner->movespline->FinalDestination();
+ const G3D::Vector3& dest = _owner->movespline->FinalDestination();
x = dest.x;
y = dest.y;
z = dest.z;
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index a5bd0861b04..83ff81ab30b 100755
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -83,24 +83,20 @@ class MotionMaster //: private std::stack<MovementGenerator *>
private:
//typedef std::stack<MovementGenerator *> Impl;
typedef MovementGenerator* _Ty;
- _Ty Impl[MAX_MOTION_SLOT];
- bool needInit[MAX_MOTION_SLOT];
- typedef std::vector<_Ty> ExpireList;
- int i_top;
- void pop() { Impl[i_top] = NULL; --i_top; }
- void push(_Ty _Val) { ++i_top; Impl[i_top] = _Val; }
+ void pop() { Impl[_top] = NULL; --_top; }
+ void push(_Ty _Val) { ++_top; Impl[_top] = _Val; }
- bool needInitTop() const { return needInit[i_top]; }
+ bool needInitTop() const { return _needInit[_top]; }
void InitTop();
public:
- explicit MotionMaster(Unit* unit) : i_top(-1), i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE)
+ explicit MotionMaster(Unit* unit) : _top(-1), _owner(unit), _expList(NULL), _cleanFlag(MMCF_NONE)
{
for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
{
Impl[i] = NULL;
- needInit[i] = true;
+ _needInit[i] = true;
}
}
~MotionMaster();
@@ -108,9 +104,9 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void Initialize();
void InitDefault();
- bool empty() const { return (i_top < 0); }
- int size() const { return i_top + 1; }
- _Ty top() const { return Impl[i_top]; }
+ bool empty() const { return (_top < 0); }
+ int size() const { return _top + 1; }
+ _Ty top() const { return Impl[_top]; }
_Ty GetMotionSlot(int slot) const { return Impl[slot]; }
void DirectDelete(_Ty curr);
@@ -119,12 +115,12 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void UpdateMotion(uint32 diff);
void Clear(bool reset = true)
{
- if (m_cleanFlag & MMCF_UPDATE)
+ if (_cleanFlag & MMCF_UPDATE)
{
if (reset)
- m_cleanFlag |= MMCF_RESET;
+ _cleanFlag |= MMCF_RESET;
else
- m_cleanFlag &= ~MMCF_RESET;
+ _cleanFlag &= ~MMCF_RESET;
DelayedClean();
}
else
@@ -132,12 +128,12 @@ class MotionMaster //: private std::stack<MovementGenerator *>
}
void MovementExpired(bool reset = true)
{
- if (m_cleanFlag & MMCF_UPDATE)
+ if (_cleanFlag & MMCF_UPDATE)
{
if (reset)
- m_cleanFlag |= MMCF_RESET;
+ _cleanFlag |= MMCF_RESET;
else
- m_cleanFlag &= ~MMCF_RESET;
+ _cleanFlag &= ~MMCF_RESET;
DelayedExpire();
}
else
@@ -187,9 +183,13 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void DirectExpire(bool reset);
void DelayedExpire();
- Unit *i_owner;
- ExpireList* m_expList;
- uint8 m_cleanFlag;
+ typedef std::vector<_Ty> ExpireList;
+ ExpireList* _expList;
+ _Ty Impl[MAX_MOTION_SLOT];
+ int _top;
+ Unit* _owner;
+ bool _needInit[MAX_MOTION_SLOT];
+ uint8 _cleanFlag;
};
#endif
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index a235991e6b4..eaaaeaac9ca 100755
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -360,17 +360,17 @@ class Quest
struct QuestStatusData
{
- QuestStatusData(): m_status(QUEST_STATUS_NONE), m_explored(false), m_timer(0), m_playercount(0)
+ QuestStatusData(): Status(QUEST_STATUS_NONE), Explored(false), Timer(0), PlayerCount(0)
{
- memset(m_itemcount, 0, QUEST_ITEM_OBJECTIVES_COUNT * sizeof(uint16));
- memset(m_creatureOrGOcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint16));
+ memset(ItemCount, 0, QUEST_ITEM_OBJECTIVES_COUNT * sizeof(uint16));
+ memset(CreatureOrGOCount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint16));
}
- QuestStatus m_status;
- bool m_explored;
- uint32 m_timer;
- uint16 m_itemcount[QUEST_ITEM_OBJECTIVES_COUNT];
- uint16 m_creatureOrGOcount[QUEST_OBJECTIVES_COUNT];
- uint16 m_playercount;
+ QuestStatus Status;
+ uint32 Timer;
+ uint16 ItemCount[QUEST_ITEM_OBJECTIVES_COUNT];
+ uint16 CreatureOrGOCount[QUEST_OBJECTIVES_COUNT];
+ uint16 PlayerCount;
+ bool Explored;
};
#endif
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index d988959f890..b1f38dfb86d 100755
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -45,7 +45,7 @@ bool ReputationMgr::IsAtWar(uint32 faction_id) const
if (!factionEntry)
{
- sLog->outError("ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", m_player->GetName(), faction_id);
+ sLog->outError("ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id);
return 0;
}
@@ -68,7 +68,7 @@ int32 ReputationMgr::GetReputation(uint32 faction_id) const
if (!factionEntry)
{
- sLog->outError("ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", m_player->GetName(), faction_id);
+ sLog->outError("ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id);
return 0;
}
@@ -80,8 +80,8 @@ int32 ReputationMgr::GetBaseReputation(FactionEntry const* factionEntry) const
if (!factionEntry)
return 0;
- uint32 raceMask = m_player->getRaceMask();
- uint32 classMask = m_player->getClassMask();
+ uint32 raceMask = _player->getRaceMask();
+ uint32 classMask = _player->getClassMask();
for (int i=0; i < 4; i++)
{
if ((factionEntry->BaseRepRaceMask[i] & raceMask ||
@@ -124,9 +124,9 @@ ReputationRank ReputationMgr::GetBaseRank(FactionEntry const* factionEntry) cons
void ReputationMgr::ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply)
{
if (apply)
- m_forcedReactions[faction_id] = rank;
+ _forcedReactions[faction_id] = rank;
else
- m_forcedReactions.erase(faction_id);
+ _forcedReactions.erase(faction_id);
}
uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) const
@@ -134,8 +134,8 @@ uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) con
if (!factionEntry)
return 0;
- uint32 raceMask = m_player->getRaceMask();
- uint32 classMask = m_player->getClassMask();
+ uint32 raceMask = _player->getRaceMask();
+ uint32 classMask = _player->getClassMask();
for (int i=0; i < 4; i++)
{
if ((factionEntry->BaseRepRaceMask[i] & raceMask ||
@@ -152,14 +152,14 @@ uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) con
void ReputationMgr::SendForceReactions()
{
WorldPacket data;
- data.Initialize(SMSG_SET_FORCED_REACTIONS, 4+m_forcedReactions.size()*(4+4));
- data << uint32(m_forcedReactions.size());
- for (ForcedReactions::const_iterator itr = m_forcedReactions.begin(); itr != m_forcedReactions.end(); ++itr)
+ data.Initialize(SMSG_SET_FORCED_REACTIONS, 4+_forcedReactions.size()*(4+4));
+ data << uint32(_forcedReactions.size());
+ for (ForcedReactions::const_iterator itr = _forcedReactions.begin(); itr != _forcedReactions.end(); ++itr)
{
data << uint32(itr->first); // faction_id (Faction.dbc)
data << uint32(itr->second); // reputation rank
}
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::SendState(FactionState const* faction)
@@ -176,7 +176,7 @@ void ReputationMgr::SendState(FactionState const* faction)
data << (uint32) faction->ReputationListID;
data << (uint32) faction->Standing;
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
if (itr->second.needSend)
{
@@ -191,7 +191,7 @@ void ReputationMgr::SendState(FactionState const* faction)
}
data.put<uint32>(p_count, count);
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::SendInitialReputations()
@@ -201,7 +201,7 @@ void ReputationMgr::SendInitialReputations()
RepListID a = 0;
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
// fill in absent fields
for (; a != itr->first; a++)
@@ -226,33 +226,33 @@ void ReputationMgr::SendInitialReputations()
data << uint32 (0x00000000);
}
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::SendStates()
{
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
SendState(&(itr->second));
}
void ReputationMgr::SendVisible(FactionState const* faction) const
{
- if (m_player->GetSession()->PlayerLoading())
+ if (_player->GetSession()->PlayerLoading())
return;
// make faction visible in reputation list at client
WorldPacket data(SMSG_SET_FACTION_VISIBLE, 4);
data << faction->ReputationListID;
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::Initialize()
{
- m_factions.clear();
- m_visibleFactionCount = 0;
- m_honoredFactionCount = 0;
- m_reveredFactionCount = 0;
- m_exaltedFactionCount = 0;
+ _factions.clear();
+ _visibleFactionCount = 0;
+ _honoredFactionCount = 0;
+ _reveredFactionCount = 0;
+ _exaltedFactionCount = 0;
for (unsigned int i = 1; i < sFactionStore.GetNumRows(); i++)
{
@@ -269,18 +269,18 @@ void ReputationMgr::Initialize()
newFaction.needSave = true;
if (newFaction.Flags & FACTION_FLAG_VISIBLE)
- ++m_visibleFactionCount;
+ ++_visibleFactionCount;
UpdateRankCounters(REP_HOSTILE, GetBaseRank(factionEntry));
- m_factions[newFaction.ReputationListID] = newFaction;
+ _factions[newFaction.ReputationListID] = newFaction;
}
}
}
bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental)
{
- sScriptMgr->OnPlayerReputationChange(m_player, factionEntry->ID, standing, incremental);
+ sScriptMgr->OnPlayerReputationChange(_player, factionEntry->ID, standing, incremental);
bool res = false;
// if spillover definition exists in DB, override DBC
if (const RepSpilloverTemplate* repTemplate = sObjectMgr->GetRepSpilloverTemplate(factionEntry->ID))
@@ -289,7 +289,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
{
if (repTemplate->faction[i])
{
- if (m_player->GetReputationRank(repTemplate->faction[i]) <= ReputationRank(repTemplate->faction_rank[i]))
+ if (_player->GetReputationRank(repTemplate->faction[i]) <= ReputationRank(repTemplate->faction_rank[i]))
{
// bonuses are already given, so just modify standing by rate
int32 spilloverRep = int32(standing * repTemplate->faction_rate[i]);
@@ -309,9 +309,9 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
spillOverRepOut *= factionEntry->spilloverRateOut;
if (FactionEntry const* parent = sFactionStore.LookupEntry(factionEntry->team))
{
- FactionStateList::iterator parentState = m_factions.find(parent->reputationListID);
+ FactionStateList::iterator parentState = _factions.find(parent->reputationListID);
// some team factions have own reputation standing, in this case do not spill to other sub-factions
- if (parentState != m_factions.end() && (parentState->second.Flags & FACTION_FLAG_SPECIAL))
+ if (parentState != _factions.end() && (parentState->second.Flags & FACTION_FLAG_SPECIAL))
{
SetOneFactionReputation(parent, int32(spillOverRepOut), incremental);
}
@@ -338,8 +338,8 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
}
}
// spillover done, update faction itself
- FactionStateList::iterator faction = m_factions.find(factionEntry->reputationListID);
- if (faction != m_factions.end())
+ FactionStateList::iterator faction = _factions.find(factionEntry->reputationListID);
+ if (faction != _factions.end())
{
res = SetOneFactionReputation(factionEntry, standing, incremental);
// only this faction gets reported to client, even if it has no own visible standing
@@ -350,8 +350,8 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental)
{
- FactionStateList::iterator itr = m_factions.find(factionEntry->reputationListID);
- if (itr != m_factions.end())
+ FactionStateList::iterator itr = _factions.find(factionEntry->reputationListID);
+ if (itr != _factions.end())
{
int32 BaseRep = GetBaseReputation(factionEntry);
@@ -381,12 +381,12 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
UpdateRankCounters(old_rank, new_rank);
- m_player->ReputationChanged(factionEntry);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION, factionEntry->ID);
+ _player->ReputationChanged(factionEntry);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION, factionEntry->ID);
return true;
}
@@ -400,7 +400,7 @@ void ReputationMgr::SetVisible(FactionTemplateEntry const*factionTemplateEntry)
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction))
// Never show factions of the opposing team
- if (!(factionEntry->BaseRepRaceMask[1] & m_player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom))
+ if (!(factionEntry->BaseRepRaceMask[1] & _player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom))
SetVisible(factionEntry);
}
@@ -409,8 +409,8 @@ void ReputationMgr::SetVisible(FactionEntry const* factionEntry)
if (factionEntry->reputationListID < 0)
return;
- FactionStateList::iterator itr = m_factions.find(factionEntry->reputationListID);
- if (itr == m_factions.end())
+ FactionStateList::iterator itr = _factions.find(factionEntry->reputationListID);
+ if (itr == _factions.end())
return;
SetVisible(&itr->second);
@@ -431,15 +431,15 @@ void ReputationMgr::SetVisible(FactionState* faction)
faction->needSend = true;
faction->needSave = true;
- ++m_visibleFactionCount;
+ ++_visibleFactionCount;
SendVisible(faction);
}
void ReputationMgr::SetAtWar(RepListID repListID, bool on)
{
- FactionStateList::iterator itr = m_factions.find(repListID);
- if (itr == m_factions.end())
+ FactionStateList::iterator itr = _factions.find(repListID);
+ if (itr == _factions.end())
return;
// always invisible or hidden faction can't change war state
@@ -470,8 +470,8 @@ void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
void ReputationMgr::SetInactive(RepListID repListID, bool on)
{
- FactionStateList::iterator itr = m_factions.find(repListID);
- if (itr == m_factions.end())
+ FactionStateList::iterator itr = _factions.find(repListID);
+ if (itr == _factions.end())
return;
SetInactive(&itr->second, on);
@@ -512,7 +512,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result)
FactionEntry const* factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16());
if (factionEntry && (factionEntry->reputationListID >= 0))
{
- FactionState* faction = &m_factions[factionEntry->reputationListID];
+ FactionState* faction = &_factions[factionEntry->reputationListID];
// update standing to current
faction->Standing = int32(fields[1].GetUInt32());
@@ -558,12 +558,12 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result)
void ReputationMgr::SaveToDB(SQLTransaction& trans)
{
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
if (itr->second.needSave)
{
- trans->PAppend("DELETE FROM character_reputation WHERE guid = '%u' AND faction='%u'", m_player->GetGUIDLow(), itr->second.ID);
- trans->PAppend("INSERT INTO character_reputation (guid, faction, standing, flags) VALUES ('%u', '%u', '%i', '%u')", m_player->GetGUIDLow(), itr->second.ID, itr->second.Standing, itr->second.Flags);
+ trans->PAppend("DELETE FROM character_reputation WHERE guid = '%u' AND faction='%u'", _player->GetGUIDLow(), itr->second.ID);
+ trans->PAppend("INSERT INTO character_reputation (guid, faction, standing, flags) VALUES ('%u', '%u', '%i', '%u')", _player->GetGUIDLow(), itr->second.ID, itr->second.Standing, itr->second.Flags);
itr->second.needSave = false;
}
}
@@ -572,16 +572,16 @@ void ReputationMgr::SaveToDB(SQLTransaction& trans)
void ReputationMgr::UpdateRankCounters(ReputationRank old_rank, ReputationRank new_rank)
{
if (old_rank >= REP_EXALTED)
- --m_exaltedFactionCount;
+ --_exaltedFactionCount;
if (old_rank >= REP_REVERED)
- --m_reveredFactionCount;
+ --_reveredFactionCount;
if (old_rank >= REP_HONORED)
- --m_honoredFactionCount;
+ --_honoredFactionCount;
if (new_rank >= REP_EXALTED)
- ++m_exaltedFactionCount;
+ ++_exaltedFactionCount;
if (new_rank >= REP_REVERED)
- ++m_reveredFactionCount;
+ ++_reveredFactionCount;
if (new_rank >= REP_HONORED)
- ++m_honoredFactionCount;
+ ++_honoredFactionCount;
}
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index b73574d288f..84013f7ec20 100755
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
@@ -50,8 +50,8 @@ struct FactionState
{
uint32 ID;
RepListID ReputationListID;
- uint8 Flags;
int32 Standing;
+ uint8 Flags;
bool needSend;
bool needSave;
};
@@ -64,8 +64,8 @@ class Player;
class ReputationMgr
{
public: // constructors and global modifiers
- explicit ReputationMgr(Player* owner) : m_player(owner),
- m_visibleFactionCount(0), m_honoredFactionCount(0), m_reveredFactionCount(0), m_exaltedFactionCount(0) {}
+ explicit ReputationMgr(Player* owner) : _player(owner),
+ _visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0) {}
~ReputationMgr() {}
void SaveToDB(SQLTransaction& trans);
@@ -77,12 +77,12 @@ class ReputationMgr
static ReputationRank ReputationToRank(int32 standing);
public: // accessors
- uint8 GetVisibleFactionCount() const { return m_visibleFactionCount; }
- uint8 GetHonoredFactionCount() const { return m_honoredFactionCount; }
- uint8 GetReveredFactionCount() const { return m_reveredFactionCount; }
- uint8 GetExaltedFactionCount() const { return m_exaltedFactionCount; }
+ uint8 GetVisibleFactionCount() const { return _visibleFactionCount; }
+ uint8 GetHonoredFactionCount() const { return _honoredFactionCount; }
+ uint8 GetReveredFactionCount() const { return _reveredFactionCount; }
+ uint8 GetExaltedFactionCount() const { return _exaltedFactionCount; }
- FactionStateList const& GetStateList() const { return m_factions; }
+ FactionStateList const& GetStateList() const { return _factions; }
FactionState const* GetState(FactionEntry const* factionEntry) const
{
@@ -91,8 +91,8 @@ class ReputationMgr
FactionState const* GetState(RepListID id) const
{
- FactionStateList::const_iterator repItr = m_factions.find (id);
- return repItr != m_factions.end() ? &repItr->second : NULL;
+ FactionStateList::const_iterator repItr = _factions.find (id);
+ return repItr != _factions.end() ? &repItr->second : NULL;
}
bool IsAtWar(uint32 faction_id) const;
@@ -111,8 +111,8 @@ class ReputationMgr
ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const
{
- ForcedReactions::const_iterator forceItr = m_forcedReactions.find(factionTemplateEntry->faction);
- return forceItr != m_forcedReactions.end() ? &forceItr->second : NULL;
+ ForcedReactions::const_iterator forceItr = _forcedReactions.find(factionTemplateEntry->faction);
+ return forceItr != _forcedReactions.end() ? &forceItr->second : NULL;
}
public: // modifiers
@@ -149,13 +149,13 @@ class ReputationMgr
void SendVisible(FactionState const* faction) const;
void UpdateRankCounters(ReputationRank old_rank, ReputationRank new_rank);
private:
- Player* m_player;
- FactionStateList m_factions;
- ForcedReactions m_forcedReactions;
- uint8 m_visibleFactionCount :8;
- uint8 m_honoredFactionCount :8;
- uint8 m_reveredFactionCount :8;
- uint8 m_exaltedFactionCount :8;
+ Player* _player;
+ FactionStateList _factions;
+ ForcedReactions _forcedReactions;
+ uint8 _visibleFactionCount :8;
+ uint8 _honoredFactionCount :8;
+ uint8 _reveredFactionCount :8;
+ uint8 _exaltedFactionCount :8;
};
#endif
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index b40319358b6..47751338d66 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -395,7 +395,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scri
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -416,7 +416,7 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -433,12 +433,12 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
}
}
-void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsMap::iterator> >& scriptVector)
+void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::iterator> >& scriptVector)
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
scriptVector.reserve(std::distance(bounds.first, bounds.second));
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -1040,7 +1040,7 @@ bool ScriptMgr::OnConditionCheck(Condition* condition, ConditionSourceInfo& sour
{
ASSERT(condition);
- GET_SCRIPT_RET(ConditionScript, condition->mScriptId, tmpscript, true);
+ GET_SCRIPT_RET(ConditionScript, condition->ScriptId, tmpscript, true);
return tmpscript->OnConditionCheck(condition, sourceInfo);
}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 31dd3ad7471..490f33f46e1 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -95,18 +95,19 @@ class AuraEffect
Aura* const m_base;
SpellInfo const* const m_spellInfo;
- uint8 const m_effIndex;
int32 const m_baseAmount;
int32 m_amount;
- bool m_canBeRecalculated;
SpellModifier* m_spellmod;
- bool m_isPeriodic;
int32 m_periodicTimer;
int32 m_amplitude;
uint32 m_tickNumber;
+
+ uint8 const m_effIndex;
+ bool m_canBeRecalculated;
+ bool m_isPeriodic;
private:
bool IsPeriodicTickCrit(Unit* target, Unit const* caster) const;
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index d49ac829ef9..4bc193b49d2 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -37,8 +37,8 @@
#include "Vehicle.h"
AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 effMask):
-m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE),
-m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(false)
+_target(target), _base(aura), _slot(MAX_AURAS), _flags(AFLAG_NONE),
+_effectsToApply(effMask), _removeMode(AURA_REMOVE_NONE), _needClientUpdate(false)
{
ASSERT(GetTarget() && GetBase());
@@ -70,7 +70,7 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa
// Register Visible Aura
if (slot < MAX_AURAS)
{
- m_slot = slot;
+ _slot = slot;
GetTarget()->SetVisibleAura(slot, this);
SetNeedClientUpdate();
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
@@ -89,7 +89,7 @@ void AuraApplication::_Remove()
if (slot >= MAX_AURAS)
return;
- if (AuraApplication * foundAura = m_target->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID(), GetBase()->GetCastItemGUID()))
+ if (AuraApplication * foundAura = _target->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID(), GetBase()->GetCastItemGUID()))
{
// Reuse visible aura slot by aura which is still applied - prevent storing dead pointers
if (slot == foundAura->GetSlot())
@@ -115,7 +115,7 @@ void AuraApplication::_Remove()
void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
{
// mark as selfcasted if needed
- m_flags |= (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE;
+ _flags |= (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE;
// aura is casted by self or an enemy
// one negative effect and we know aura is negative
@@ -130,7 +130,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
break;
}
}
- m_flags |= negativeFound ? AFLAG_NEGATIVE : AFLAG_POSITIVE;
+ _flags |= negativeFound ? AFLAG_NEGATIVE : AFLAG_POSITIVE;
}
// aura is casted by friend
// one positive effect and we know aura is positive
@@ -145,7 +145,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
break;
}
}
- m_flags |= positiveFound ? AFLAG_POSITIVE : AFLAG_NEGATIVE;
+ _flags |= positiveFound ? AFLAG_POSITIVE : AFLAG_NEGATIVE;
}
}
@@ -154,19 +154,19 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
AuraEffect* aurEff = GetBase()->GetEffect(effIndex);
ASSERT(aurEff);
ASSERT(HasEffect(effIndex) == (!apply));
- ASSERT((1<<effIndex) & m_effectsToApply);
+ ASSERT((1<<effIndex) & _effectsToApply);
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
if (apply)
{
- ASSERT(!(m_flags & (1<<effIndex)));
- m_flags |= 1<<effIndex;
+ ASSERT(!(_flags & (1<<effIndex)));
+ _flags |= 1<<effIndex;
aurEff->HandleEffect(this, AURA_EFFECT_HANDLE_REAL, true);
}
else
{
- ASSERT(m_flags & (1<<effIndex));
- m_flags &= ~(1<<effIndex);
+ ASSERT(_flags & (1<<effIndex));
+ _flags &= ~(1<<effIndex);
aurEff->HandleEffect(this, AURA_EFFECT_HANDLE_REAL, false);
// Remove all triggered by aura spells vs unlimited duration
@@ -177,19 +177,19 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
void AuraApplication::BuildUpdatePacket(ByteBuffer& data, bool remove) const
{
- data << uint8(m_slot);
+ data << uint8(_slot);
if (remove)
{
- ASSERT(!m_target->GetVisibleAura(m_slot));
+ ASSERT(!_target->GetVisibleAura(_slot));
data << uint32(0);
return;
}
- ASSERT(m_target->GetVisibleAura(m_slot));
+ ASSERT(_target->GetVisibleAura(_slot));
Aura const* aura = GetBase();
data << uint32(aura->GetId());
- uint32 flags = m_flags;
+ uint32 flags = _flags;
if (aura->GetMaxDuration() > 0 && !(aura->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_HIDE_DURATION))
flags |= AFLAG_DURATION;
data << uint8(flags);
@@ -210,13 +210,13 @@ void AuraApplication::BuildUpdatePacket(ByteBuffer& data, bool remove) const
void AuraApplication::ClientUpdate(bool remove)
{
- m_needClientUpdate = false;
+ _needClientUpdate = false;
WorldPacket data(SMSG_AURA_UPDATE);
data.append(GetTarget()->GetPackGUID());
BuildUpdatePacket(data, remove);
- m_target->SendMessageToSet(&data, true);
+ _target->SendMessageToSet(&data, true);
}
uint8 Aura::BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleEffectMask, WorldObject* owner)
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index 4d87abccda3..0af8d132211 100755
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -46,13 +46,13 @@ class AuraApplication
friend void Unit::RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode);
friend AuraApplication * Unit::_CreateAuraApplication(Aura* aura, uint8 effMask);
private:
- Unit* const m_target;
- Aura* const m_base;
- uint8 m_slot; // Aura slot on unit
- uint8 m_flags; // Aura info flag
- uint8 m_effectsToApply; // Used only at spell hit to determine which effect should be applied
- AuraRemoveMode m_removeMode:8; // Store info for know remove aura reason
- bool m_needClientUpdate:1;
+ Unit* const _target;
+ Aura* const _base;
+ AuraRemoveMode _removeMode:8; // Store info for know remove aura reason
+ uint8 _slot; // Aura slot on unit
+ uint8 _flags; // Aura info flag
+ uint8 _effectsToApply; // Used only at spell hit to determine which effect should be applied
+ bool _needClientUpdate:1;
explicit AuraApplication(Unit* target, Unit* caster, Aura* base, uint8 effMask);
void _Remove();
@@ -61,22 +61,22 @@ class AuraApplication
void _HandleEffect(uint8 effIndex, bool apply);
public:
- Unit* GetTarget() const { return m_target; }
- Aura* GetBase() const { return m_base; }
+ Unit* GetTarget() const { return _target; }
+ Aura* GetBase() const { return _base; }
- uint8 GetSlot() const { return m_slot; }
- uint8 GetFlags() const { return m_flags; }
- uint8 GetEffectMask() const { return m_flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2); }
- bool HasEffect(uint8 effect) const { ASSERT(effect < MAX_SPELL_EFFECTS); return m_flags & (1<<effect); }
- bool IsPositive() const { return m_flags & AFLAG_POSITIVE; }
- bool IsSelfcasted() const { return m_flags & AFLAG_CASTER; }
- uint8 GetEffectsToApply() const { return m_effectsToApply; }
+ uint8 GetSlot() const { return _slot; }
+ uint8 GetFlags() const { return _flags; }
+ uint8 GetEffectMask() const { return _flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2); }
+ bool HasEffect(uint8 effect) const { ASSERT(effect < MAX_SPELL_EFFECTS); return _flags & (1<<effect); }
+ bool IsPositive() const { return _flags & AFLAG_POSITIVE; }
+ bool IsSelfcasted() const { return _flags & AFLAG_CASTER; }
+ uint8 GetEffectsToApply() const { return _effectsToApply; }
- void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; }
- AuraRemoveMode GetRemoveMode() const {return m_removeMode;}
+ void SetRemoveMode(AuraRemoveMode mode) { _removeMode = mode; }
+ AuraRemoveMode GetRemoveMode() const {return _removeMode;}
- void SetNeedClientUpdate() { m_needClientUpdate = true;}
- bool IsNeedClientUpdate() const { return m_needClientUpdate;}
+ void SetNeedClientUpdate() { _needClientUpdate = true;}
+ bool IsNeedClientUpdate() const { return _needClientUpdate;}
void BuildUpdatePacket(ByteBuffer& data, bool remove) const;
void ClientUpdate(bool remove = false);
};
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 7c578a39355..6cacf5e7e5a 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -598,24 +598,10 @@ WorldObject* Spell::FindCorpseUsing()
// non-standard target selection
float max_range = m_spellInfo->GetMaxRange(false);
- CellCoord p(Trinity::ComputeCellCoord(m_caster->GetPositionX(), m_caster->GetPositionY()));
- Cell cell(p);
- cell.SetNoCreate();
-
WorldObject* result = NULL;
-
T u_check(m_caster, max_range);
Trinity::WorldObjectSearcher<T> searcher(m_caster, result, u_check);
-
- TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher);
- cell.Visit(p, grid_searcher, *m_caster->GetMap(), *m_caster, max_range);
-
- if (!result)
- {
- TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher);
- cell.Visit(p, world_searcher, *m_caster->GetMap(), *m_caster, max_range);
- }
-
+ m_caster->GetMap()->VisitFirstFound(m_caster->GetPositionX(), m_caster->GetPositionY(), max_range, searcher);
return result;
}
@@ -1928,15 +1914,15 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe
for (ConditionList::const_iterator i_spellST = conditions.begin(); i_spellST != conditions.end(); ++i_spellST)
{
- if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
+ if ((*i_spellST)->ConditionType != CONDITION_SPELL_SCRIPT_TARGET)
continue;
- if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & (1 << uint32(effIndex))))
+ if ((*i_spellST)->ConditionValue3 && !((*i_spellST)->ConditionValue3 & (1 << uint32(effIndex))))
continue;
- switch ((*i_spellST)->mConditionValue1)
+ switch ((*i_spellST)->ConditionValue1)
{
case SPELL_TARGET_TYPE_CONTROLLED:
for (Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
- if ((*itr)->GetEntry() == (*i_spellST)->mConditionValue2 && (*itr)->IsWithinDistInMap(m_caster, range))
+ if ((*itr)->GetEntry() == (*i_spellST)->ConditionValue2 && (*itr)->IsWithinDistInMap(m_caster, range))
{
goScriptTarget = NULL;
creatureScriptTarget = (*itr)->ToCreature();
@@ -1944,9 +1930,9 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe
}
break;
case SPELL_TARGET_TYPE_GAMEOBJECT:
- if ((*i_spellST)->mConditionValue2)
+ if ((*i_spellST)->ConditionValue2)
{
- if (GameObject* go = m_caster->FindNearestGameObject((*i_spellST)->mConditionValue2, range))
+ if (GameObject* go = m_caster->FindNearestGameObject((*i_spellST)->ConditionValue2, range))
{
// remember found target and range, next attempt will find more near target with another entry
goScriptTarget = go;
@@ -1966,11 +1952,11 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe
}
break;
case SPELL_TARGET_TYPE_CREATURE:
- if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetEntry() == (*i_spellST)->mConditionValue2)
+ if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetEntry() == (*i_spellST)->ConditionValue2)
return m_targets.GetUnitTarget();
case SPELL_TARGET_TYPE_DEAD:
default:
- if (Creature* cre = m_caster->FindNearestCreature((*i_spellST)->mConditionValue2, range, (*i_spellST)->mConditionValue1 != SPELL_TARGET_TYPE_DEAD))
+ if (Creature* cre = m_caster->FindNearestCreature((*i_spellST)->ConditionValue2, range, (*i_spellST)->ConditionValue1 != SPELL_TARGET_TYPE_DEAD))
{
creatureScriptTarget = cre;
goScriptTarget = NULL;
@@ -2531,16 +2517,16 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
{
for (ConditionList::const_iterator i_spellST = conditions.begin(); i_spellST != conditions.end(); ++i_spellST)
{
- if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
+ if ((*i_spellST)->ConditionType != CONDITION_SPELL_SCRIPT_TARGET)
continue;
- if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & effectMask))
+ if ((*i_spellST)->ConditionValue3 && !((*i_spellST)->ConditionValue3 & effectMask))
continue;
- if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_CREATURE)
- SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, (*i_spellST)->mConditionValue2);
- else if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_CONTROLLED)
+ if ((*i_spellST)->ConditionValue1 == SPELL_TARGET_TYPE_CREATURE)
+ SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, (*i_spellST)->ConditionValue2);
+ else if ((*i_spellST)->ConditionValue1 == SPELL_TARGET_TYPE_CONTROLLED)
{
for (Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
- if ((*itr)->GetEntry() == (*i_spellST)->mConditionValue2 &&
+ if ((*itr)->GetEntry() == (*i_spellST)->ConditionValue2 &&
(*itr)->IsInMap(m_caster)) // For 60243 and 52173 need skip radius check or use range (no radius entry for effect)
unitList.push_back(*itr);
}
@@ -2554,11 +2540,15 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
{
case 46584: // Raise Dead
{
- if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck> ())
+ if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck>())
{
switch (result->GetTypeId())
{
case TYPEID_UNIT:
+ case TYPEID_PLAYER:
+ unitList.push_back(result->ToUnit());
+ // no break;
+ case TYPEID_CORPSE: // wont work until corpses are allowed in target lists, but at least will send dest in packet
m_targets.SetDst(*result);
break;
default:
@@ -2582,7 +2572,7 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
{
CleanupTargetList();
- WorldObject* result = FindCorpseUsing <Trinity::ExplodeCorpseObjectCheck> ();
+ WorldObject* result = FindCorpseUsing<Trinity::ExplodeCorpseObjectCheck>();
if (result)
{
@@ -2626,12 +2616,12 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
{
for (ConditionList::const_iterator i_spellST = conditions.begin(); i_spellST != conditions.end(); ++i_spellST)
{
- if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
+ if ((*i_spellST)->ConditionType != CONDITION_SPELL_SCRIPT_TARGET)
continue;
- if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & effectMask))
+ if ((*i_spellST)->ConditionValue3 && !((*i_spellST)->ConditionValue3 & effectMask))
continue;
- if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_GAMEOBJECT)
- SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO, (*i_spellST)->mConditionValue2);
+ if ((*i_spellST)->ConditionValue1 == SPELL_TARGET_TYPE_GAMEOBJECT)
+ SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO, (*i_spellST)->ConditionValue2);
}
}
else
@@ -2824,12 +2814,12 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
unitList.remove(m_targets.GetUnitTarget());
Trinity::RandomResizeList(unitList, maxTargets);
}
+ }
- CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i));
+ CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i));
- for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
- AddUnitTarget(*itr, effectMask, false);
- }
+ for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
+ AddUnitTarget(*itr, effectMask, false);
if (!gobjectList.empty())
{
@@ -3725,6 +3715,27 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint8 cas
case SPELL_FAILED_CUSTOM_ERROR:
data << uint32(customError);
break;
+ case SPELL_FAILED_REAGENTS:
+ {
+ uint32 missingItem = 0;
+ for (uint32 i = 0; i < MAX_SPELL_REAGENTS; i++)
+ {
+ if (spellInfo->Reagent[i] <= 0)
+ continue;
+
+ uint32 itemid = spellInfo->Reagent[i];
+ uint32 itemcount = spellInfo->ReagentCount[i];
+
+ if (!caster->HasItemCount(itemid, itemcount))
+ {
+ missingItem = itemid;
+ break;
+ }
+ }
+
+ data << uint32(missingItem); // first missing item
+ break;
+ }
default:
break;
}
@@ -4728,8 +4739,8 @@ SpellCastResult Spell::CheckCast(bool strict)
if (Player* playerCaster = m_caster->ToPlayer())
{
if (playerCaster->GetSession() && condInfo.mLastFailedCondition
- && condInfo.mLastFailedCondition->ErrorTextd)
- playerCaster->GetSession()->SendNotification(condInfo.mLastFailedCondition->ErrorTextd);
+ && condInfo.mLastFailedCondition->ErrorTextId)
+ playerCaster->GetSession()->SendNotification(condInfo.mLastFailedCondition->ErrorTextId);
}
return SPELL_FAILED_DONT_REPORT;
}
@@ -5926,7 +5937,7 @@ SpellCastResult Spell::CheckItems()
}
}
if (!p_caster->HasItemCount(itemid, itemcount))
- return SPELL_FAILED_ITEM_NOT_READY; //0x54
+ return SPELL_FAILED_REAGENTS;
}
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index ef5f32b5575..a8f6ece7102 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5665,7 +5665,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
if (target->isInFlight())
return;
- target->TeleportTo(target->GetStartPosition(), m_caster == m_caster ? TELE_TO_SPELL : 0);
+ target->TeleportTo(target->GetStartPosition(), TELE_TO_SPELL);
// homebind location is loaded always
// target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation(), (m_caster == m_caster ? TELE_TO_SPELL : 0));
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index b076447dd90..4d9c5a93875 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -404,15 +404,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// make sure the same guid doesn't already exist and is safe to use
bool incHighest = true;
- if (guid != 0 && guid < sObjectMgr->m_hiCharGuid)
+ if (guid != 0 && guid < sObjectMgr->_hiCharGuid)
{
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE guid = '%d'", guid);
if (result)
- guid = sObjectMgr->m_hiCharGuid; // use first free if exists
+ guid = sObjectMgr->_hiCharGuid; // use first free if exists
else incHighest = false;
}
else
- guid = sObjectMgr->m_hiCharGuid;
+ guid = sObjectMgr->_hiCharGuid;
// normalize the name if specified and check if it exists
if (!normalizePlayerName(name))
@@ -564,15 +564,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
if (!changenth(line, 1, newguid)) // character_inventory.guid update
ROLLBACK(DUMP_FILE_BROKEN);
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid, true))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid, true))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.bag update
- if (!changeGuid(line, 4, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 4, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
break;
}
case DTT_MAIL: // mail
{
- if (!changeGuid(line, 1, mails, sObjectMgr->m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
if (!changenth(line, 6, newguid)) // mail.receiver update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -580,9 +580,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
}
case DTT_MAIL_ITEM: // mail_items
{
- if (!changeGuid(line, 1, mails, sObjectMgr->m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
if (!changenth(line, 3, newguid)) // mail_items.receiver
ROLLBACK(DUMP_FILE_BROKEN);
@@ -591,7 +591,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
case DTT_ITEM:
{
// item, owner, data field:item, owner guid
- if (!changeGuid(line, 1, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 1, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // item_instance.guid update
if (!changenth(line, 3, newguid)) // item_instance.owner_guid update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -601,7 +601,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
{
if (!changenth(line, 1, newguid)) // character_gifts.guid update
ROLLBACK(DUMP_FILE_BROKEN);
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update
break;
}
@@ -662,11 +662,11 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// in case of name conflict player has to rename at login anyway
sWorld->AddCharacterNameData(guid, name, gender, race, playerClass);
- sObjectMgr->m_hiItemGuid += items.size();
- sObjectMgr->m_mailid += mails.size();
+ sObjectMgr->_hiItemGuid += items.size();
+ sObjectMgr->_mailId += mails.size();
if (incHighest)
- ++sObjectMgr->m_hiCharGuid;
+ ++sObjectMgr->_hiCharGuid;
fclose(fin);
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
index 4e1b9da0adb..2789bc48a4c 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -402,7 +402,8 @@ public:
if (!CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerok)
CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerokFail = true;
- boss->AI()->DoAction(ACTION_INITIAND_KILLED);
+ if (Killer->GetTypeId() == TYPEID_PLAYER)
+ boss->AI()->DoAction(ACTION_INITIAND_KILLED);
}
instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0);
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index 40e1051f218..79e8da6fd77 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -551,7 +551,7 @@ public:
return;
QuestStatusMap::const_iterator itr = caster->ToPlayer()->getQuestStatusMap().find(QUEST_ENTRY);
- if (itr->second.m_status != QUEST_STATUS_INCOMPLETE)
+ if (itr->second.Status != QUEST_STATUS_INCOMPLETE)
return;
for (uint8 i=0; i<3; i++)
@@ -575,7 +575,7 @@ public:
break;
}
- if (itr->second.m_creatureOrGOcount[i] != 0)
+ if (itr->second.CreatureOrGOCount[i] != 0)
continue;
caster->ToPlayer()->KilledMonsterCredit(me->GetEntry(), 0);
diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp
index dff055b8d3d..95034387089 100755
--- a/src/server/shared/Database/QueryResult.cpp
+++ b/src/server/shared/Database/QueryResult.cpp
@@ -20,13 +20,13 @@
#include "Log.h"
ResultSet::ResultSet(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount) :
-m_rowCount(rowCount),
-m_fieldCount(fieldCount),
-m_result(result),
-m_fields(fields)
+_rowCount(rowCount),
+_fieldCount(fieldCount),
+_result(result),
+_fields(fields)
{
- m_currentRow = new Field[m_fieldCount];
- ASSERT(m_currentRow);
+ _currentRow = new Field[_fieldCount];
+ ASSERT(_currentRow);
}
PreparedResultSet::PreparedResultSet(MYSQL_STMT* stmt, MYSQL_RES *result, uint64 rowCount, uint32 fieldCount) :
@@ -150,18 +150,18 @@ bool ResultSet::NextRow()
{
MYSQL_ROW row;
- if (!m_result)
+ if (!_result)
return false;
- row = mysql_fetch_row(m_result);
+ row = mysql_fetch_row(_result);
if (!row)
{
CleanUp();
return false;
}
- for (uint32 i = 0; i < m_fieldCount; i++)
- m_currentRow[i].SetStructuredValue(row[i], m_fields[i].type);
+ for (uint32 i = 0; i < _fieldCount; i++)
+ _currentRow[i].SetStructuredValue(row[i], _fields[i].type);
return true;
}
@@ -196,16 +196,16 @@ bool PreparedResultSet::_NextRow()
void ResultSet::CleanUp()
{
- if (m_currentRow)
+ if (_currentRow)
{
- delete [] m_currentRow;
- m_currentRow = NULL;
+ delete [] _currentRow;
+ _currentRow = NULL;
}
- if (m_result)
+ if (_result)
{
- mysql_free_result(m_result);
- m_result = NULL;
+ mysql_free_result(_result);
+ _result = NULL;
}
}
diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h
index c165a9456f5..524532f30ec 100755
--- a/src/server/shared/Database/QueryResult.h
+++ b/src/server/shared/Database/QueryResult.h
@@ -33,29 +33,29 @@
class ResultSet
{
public:
- ResultSet(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount);
+ ResultSet(MYSQL_RES* result, MYSQL_FIELD* fields, uint64 rowCount, uint32 fieldCount);
~ResultSet();
bool NextRow();
- uint64 GetRowCount() const { return m_rowCount; }
- uint32 GetFieldCount() const { return m_fieldCount; }
+ uint64 GetRowCount() const { return _rowCount; }
+ uint32 GetFieldCount() const { return _fieldCount; }
- Field* Fetch() const { return m_currentRow; }
+ Field* Fetch() const { return _currentRow; }
const Field & operator [] (uint32 index) const
{
- ASSERT(index < m_fieldCount);
- return m_currentRow[index];
+ ASSERT(index < _fieldCount);
+ return _currentRow[index];
}
protected:
- Field* m_currentRow;
- uint64 m_rowCount;
- uint32 m_fieldCount;
+ uint64 _rowCount;
+ Field* _currentRow;
+ uint32 _fieldCount;
private:
void CleanUp();
- MYSQL_RES *m_result;
- MYSQL_FIELD *m_fields;
+ MYSQL_RES* _result;
+ MYSQL_FIELD* _fields;
};
typedef ACE_Refcounted_Auto_Ptr<ResultSet, ACE_Null_Mutex> QueryResult;
@@ -63,7 +63,7 @@ typedef ACE_Refcounted_Auto_Ptr<ResultSet, ACE_Null_Mutex> QueryResult;
class PreparedResultSet
{
public:
- PreparedResultSet(MYSQL_STMT* stmt, MYSQL_RES *result, uint64 rowCount, uint32 fieldCount);
+ PreparedResultSet(MYSQL_STMT* stmt, MYSQL_RES* result, uint64 rowCount, uint32 fieldCount);
~PreparedResultSet();
bool NextRow();
@@ -84,9 +84,9 @@ class PreparedResultSet
}
protected:
+ std::vector<Field*> m_rows;
uint64 m_rowCount;
uint64 m_rowPosition;
- std::vector<Field*> m_rows;
uint32 m_fieldCount;
private:
diff --git a/src/tools/vmap4_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp
index 117c594b41a..ac28e1ff086 100644
--- a/src/tools/vmap4_extractor/model.cpp
+++ b/src/tools/vmap4_extractor/model.cpp
@@ -37,7 +37,8 @@ bool Model::open()
if (!ok)
{
f.close();
- printf("Error loading model %s\n", filename.c_str());
+ // Do not show this error on console to avoid confusion, the extractor can continue working even if some models fail to load
+ //printf("Error loading model %s\n", filename.c_str());
return false;
}