diff options
| -rw-r--r-- | sql/old/3.3.5a/2012_02_13_00_world_version.sql (renamed from sql/updates/world/2012_02_13_00_world_version.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_14_00_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_00_world_quest_template.sql (renamed from sql/updates/world/2012_02_15_00_world_quest_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql (renamed from sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_02_world_item_template.sql (renamed from sql/updates/world/2012_02_15_02_world_item_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql (renamed from sql/updates/world/2012_02_15_03_world_quest_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_04_world_quest_template.sql (renamed from sql/updates/world/2012_02_15_04_world_quest_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_06_world_creature_involvedrelation.sql (renamed from sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_07_00_world_creature.sql (renamed from sql/updates/world/2012_02_15_07_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_07_01_world_waypoint_data.sql (renamed from sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql (renamed from sql/updates/world/2012_02_15_07_02_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_08_world_sai.sql (renamed from sql/updates/world/2012_02_15_08_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql (renamed from sql/updates/world/2012_02_15_09_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_16_00_world_conditions.sql (renamed from sql/updates/world/2012_02_16_00_world_conditions.sql) | 10 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_16_01_world_conditions.sql (renamed from sql/updates/world/2012_02_16_01_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql (renamed from sql/updates/world/2012_02_17_00_world_waypoints.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_02_18_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql (renamed from sql/updates/world/2012_02_18_01_world_spell_dbc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_02_world_gossip.sql (renamed from sql/updates/world/2012_02_18_02_world_gossip.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_03_world_gossip.sql (renamed from sql/updates/world/2012_02_18_03_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql (renamed from sql/updates/world/2012_02_18_04_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_05_world_creatures.sql (renamed from sql/updates/world/2012_02_18_05_world_creatures.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_06_world_gossip.sql (renamed from sql/updates/world/2012_02_18_06_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_07_world_gossip.sql (renamed from sql/updates/world/2012_02_18_07_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_18_08_world_gossip.sql (renamed from sql/updates/world/2012_02_18_08_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_00_auth_account.sql (renamed from sql/updates/auth/2012_02_19_00_auth_account.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_00_characters_warden_action.sql (renamed from sql/updates/characters/2012_02_19_00_characters_warden_action.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_00_world_quest_template.sql (renamed from sql/updates/world/2012_02_19_00_world_quest_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_01_world_quest_template.sql (renamed from sql/updates/world/2012_02_19_01_world_quest_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_02_world_gameobject.sql (renamed from sql/updates/world/2012_02_19_02_world_gameobject.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql (renamed from sql/updates/world/2012_02_19_03_world_warden_checks.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_04_world_misc_db_updates.sql (renamed from sql/updates/world/2012_02_19_04_world_misc_db_updates.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_05_world_creature_text.sql (renamed from sql/updates/world/2012_02_19_05_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_19_06_world_creature_text.sql (renamed from sql/updates/world/2012_02_19_06_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_20_00_world_sai.sql (renamed from sql/updates/world/2012_02_20_00_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_20_01_world_gossip.sql (renamed from sql/updates/world/2012_02_20_01_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_20_02_world_conditons.sql (renamed from sql/updates/world/2012_02_20_02_world_conditons.sql) | 20 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql (renamed from sql/updates/world/2012_02_21_00_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_01_world_conditions.sql (renamed from sql/updates/world/2012_02_21_01_world_conditions.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_02_21_02_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_03_world_creature_loot_template.sql (renamed from sql/updates/world/2012_02_21_03_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_04_world_creature_loot_template.sql (renamed from sql/updates/world/2012_02_21_04_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_05_world_gossip.sql (renamed from sql/updates/world/2012_02_21_05_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql (renamed from sql/updates/world/2012_02_21_06_world_Gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_22_00_world_sai.sql (renamed from sql/updates/world/2012_02_22_00_world_SAI.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_22_01_world_creature_text.sql (renamed from sql/updates/world/2012_02_22_01_world_creature_text.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_22_02_world_misc.sql (renamed from sql/updates/world/2012_02_22_02_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_22_03_world_conditions.sql (renamed from sql/updates/world/2012_02_22_03_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_23_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_02_23_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_24_00_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_02_24_00_world_gameobject_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_24_01_world_sai.sql (renamed from sql/updates/world/2012_02_24_01_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_25_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_02_25_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_25_01_world_command.sql (renamed from sql/updates/world/2012_02_25_01_world_command.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_25_01_world_misc.sql (renamed from sql/updates/world/2012_02_25_01_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_25_02_world_sai.sql (renamed from sql/updates/world/2012_02_25_02_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_26_00_world_misc.sql (renamed from sql/updates/world/2012_02_26_00_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_02_26_01_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_27_00_world_creature_template.sql (renamed from sql/updates/world/2012_02_27_00_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql (renamed from sql/updates/world/2012_02_28_00_world_wintergrasp_spawns.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql (renamed from sql/updates/world/2012_02_29_00_world_conditions_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_29_01_world_conditions.sql (renamed from sql/updates/world/2012_02_29_01_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_29_02_world_conditions.sql (renamed from sql/updates/world/2012_02_29_02_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_29_03_world_creature_text.sql (renamed from sql/updates/world/2012_02_29_03_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_29_04_world_creature_text.sql (renamed from sql/updates/world/2012_02_29_04_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_02_29_05_world_creature_text.sql (renamed from sql/updates/world/2012_02_29_05_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_01_00_world_conditions.sql (renamed from sql/updates/world/2012_03_01_00_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_01_01_world_creature_text.sql (renamed from sql/updates/world/2012_03_01_01_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_01_02_world_locales_creature_text.sql (renamed from sql/updates/world/2012_03_01_02_world_locales_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_03_00_world_command.sql (renamed from sql/updates/world/2012_03_03_00_world_command.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_04_00_world_misc.sql (renamed from sql/updates/world/2012_03_04_00_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_04_01_world_areatrigger_scripts.sql (renamed from sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_06_00_world_commands.sql (renamed from sql/updates/world/2012_03_06_00_world_commands.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_06_01_world_misc.sql (renamed from sql/updates/world/2012_03_06_01_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_06_02_world_queststatus_seasonal.sql (renamed from sql/updates/world/2012_03_06_02_world_queststatus_seasonal.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_06_03_world_smart_scripts.sql (renamed from sql/updates/world/2012_03_06_03_world_smart_scripts.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_06_04_world_creature_text.sql (renamed from sql/updates/world/2012_03_06_04_world_creature_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_07_00_world_trinity_string.sql (renamed from sql/updates/world/2012_03_07_00_world_trinity_string.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_10_00_world_creature.sql (renamed from sql/updates/world/2012_03_10_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_10_00_world_smart_scripts.sql (renamed from sql/updates/world/2012_03_10_00_world_smart_scripts.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_10_00_world_waypoint_data.sql (renamed from sql/updates/world/2012_03_10_00_world_waypoint_data.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_11_00_world_sai.sql (renamed from sql/updates/world/2012_03_11_00_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_12_00_world_creature_template.sql (renamed from sql/updates/world/2012_03_12_00_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_12_01_world_conditions.sql (renamed from sql/updates/world/2012_03_12_01_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_12_01_world_gameobject.sql (renamed from sql/updates/world/2012_03_12_01_world_gameobject.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_12_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_03_12_01_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_14_00_world_creature_addon.sql (renamed from sql/updates/world/2012_03_14_00_world_creature_addon.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_19_00_world_smart_scripts.sql (renamed from sql/updates/world/2012_03_19_00_world_smart_scripts.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_20_00_world_gossip.sql (renamed from sql/updates/world/2012_03_20_00_world_gossip.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_21_00_world_creature.sql (renamed from sql/updates/world/2012_03_21_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_22_00_world_creature_template.sql (renamed from sql/updates/world/2012_03_22_00_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_22_01_world_conditions.sql (renamed from sql/updates/world/2012_03_22_01_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_23_00_world_ip2nation.sql (renamed from sql/updates/world/2012_03_23_00_world_ip2nation.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_24_00_world_misc.sql (renamed from sql/updates/world/2012_03_24_00_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql (renamed from sql/updates/world/2012_03_24_01_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_24_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_03_24_02_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_25_00_auth_misc.sql (renamed from sql/updates/auth/2012_03_25_00_auth_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_25_00_world_game_event.sql (renamed from sql/updates/world/2012_03_25_00_world_game_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_26_00_auth_realmlist.sql (renamed from sql/updates/auth/2012_03_26_00_auth_realmlist.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_26_00_world_creature_template.sql (renamed from sql/updates/world/2012_03_26_00_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_03_26_01_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_27_00_world_misc.sql (renamed from sql/updates/world/2012_03_27_00_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_27_01_world_misc.sql (renamed from sql/updates/world/2012_03_27_01_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_27_02_world_misc.sql (renamed from sql/updates/world/2012_03_27_02_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_27_03_world_misc.sql (renamed from sql/updates/world/2012_03_27_03_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_27_04_world_misc.sql (renamed from sql/updates/world/2012_03_27_04_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_00_auth_account.sql (renamed from sql/updates/auth/2012_03_28_00_auth_account.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_01_auth_account_access.sql (renamed from sql/updates/auth/2012_03_28_01_auth_account_access.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_01_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_03_28_01_world_spell_bonus_data.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_02_auth_account_banned.sql (renamed from sql/updates/auth/2012_03_28_02_auth_account_banned.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_03_auth_ip_banned.sql (renamed from sql/updates/auth/2012_03_28_03_auth_ip_banned.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_04_auth_logs.sql (renamed from sql/updates/auth/2012_03_28_04_auth_logs.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_05_auth_realmcharacters.sql (renamed from sql/updates/auth/2012_03_28_05_auth_realmcharacters.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_06_auth_realmlist.sql (renamed from sql/updates/auth/2012_03_28_06_auth_realmlist.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_28_07_auth_uptime.sql (renamed from sql/updates/auth/2012_03_28_07_auth_uptime.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql (renamed from sql/updates/world/2012_03_30_00_world_smart_scripts.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql (renamed from sql/updates/world/2012_03_31_00_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_00_auth_realmlist.sql (renamed from sql/updates/auth/2012_04_01_00_auth_realmlist.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_00_world_creature.sql (renamed from sql/updates/world/2012_04_01_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_01_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_01_world_creature.sql (renamed from sql/updates/world/2012_04_01_01_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql (renamed from sql/updates/world/2012_04_01_02_world_spell_group_stack_rules.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_03_world_trainers.sql (renamed from sql/updates/world/2012_04_01_03_world_trainers.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_04_world_conditions.sql (renamed from sql/updates/world/2012_04_01_04_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_05_world_creature_template.sql (renamed from sql/updates/world/2012_04_01_05_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_06_world_sai.sql (renamed from sql/updates/world/2012_04_01_06_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_01_07_world_misc.sql (renamed from sql/updates/world/2012_04_01_07_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_03_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_03_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_04_00_auth_realmlist.sql (renamed from sql/updates/auth/2012_04_04_00_auth_realmlist.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_04_00_world_conditions.sql (renamed from sql/updates/world/2012_04_04_00_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_04_01_world_spell_dbc.sql (renamed from sql/updates/world/2012_04_04_01_world_spell_dbc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_05_00_world_gameobject_template.sql (renamed from sql/updates/world/2012_04_05_00_world_gameobject_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_05_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_05_01_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_05_01_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_06_00_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_06_00_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_06_01_world_spell_dbc.sql (renamed from sql/updates/world/2012_04_06_01_world_spell_dbc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_06_02_world_gameobject_template.sql (renamed from sql/updates/world/2012_04_06_02_world_gameobject_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_06_03_world_spell_dbc.sql (renamed from sql/updates/world/2012_04_06_03_world_spell_dbc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_06_04_world_page_text.sql (renamed from sql/updates/world/2012_04_06_04_world_page_text.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_07_00_characters_lag_reports.sql (renamed from sql/updates/characters/2012_04_07_00_characters_lag_reports.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_07_00_world_gameobject.sql (renamed from sql/updates/world/2012_04_07_00_world_gameobject.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_07_01_world_game_event.sql (renamed from sql/updates/world/2012_04_07_01_world_game_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_07_02_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_07_02_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_08_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_08_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_08_01_world_creature_template.sql (renamed from sql/updates/world/2012_04_08_01_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_08_02_world_spell_dbc.sql (renamed from sql/updates/world/2012_04_08_02_world_spell_dbc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_08_02_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_08_02_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_08_03_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_08_03_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_12_00_world_creature_template.sql (renamed from sql/updates/world/2012_04_12_00_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_12_01_world_creature_template.sql (renamed from sql/updates/world/2012_04_12_01_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_12_02_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_04_12_02_world_spell_bonus_data.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_12_03_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_04_12_03_world_spell_bonus_data.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_12_04_world_creature_template.sql (renamed from sql/updates/world/2012_04_12_04_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_12_05_world_command.sql (renamed from sql/updates/world/2012_04_12_05_world_command.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_13_00_world_sai.sql (renamed from sql/updates/world/2012_04_13_00_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_13_01_world_misc.sql (renamed from sql/updates/world/2012_04_13_01_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_13_02_world_misc.sql (renamed from sql/updates/world/2012_04_13_02_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_13_03_world_bg_template.sql (renamed from sql/updates/world/2012_04_13_03_world_bg_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_13_04_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_13_04_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_14_00_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_14_02_world_creature_template_addon.sql (renamed from sql/updates/world/2012_04_14_02_world_creature_template_addon.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_14_03_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_14_04_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_14_04_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_14_05_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_14_05_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_16_00_world_game_event.sql (renamed from sql/updates/world/2012_04_16_00_world_game_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_17_00_world_creature.sql (renamed from sql/updates/world/2012_04_17_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_00_world_npc_spellclick_spells.sql (renamed from sql/updates/world/2012_04_18_00_world_npc_spellclick_spells.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_01_world_creature.sql (renamed from sql/updates/world/2012_04_18_01_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql (renamed from sql/updates/world/2012_04_18_02_world_reference_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_03_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_18_03_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_04_world_pickpocketing_loot_template.sql (renamed from sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_05_world_conditions.sql (renamed from sql/updates/world/2012_04_18_05_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_06_world_creature_template.sql (renamed from sql/updates/world/2012_04_18_06_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_07_world_fishing_loot_template.sql (renamed from sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_18_08_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_18_08_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql (renamed from sql/updates/world/2012_04_19_00_world_creature_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql (renamed from sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_19_02_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_19_03_world_instance_ulduar.sql (renamed from sql/updates/world/2012_04_19_03_world_instance_ulduar.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_20_01_world_item_loot_template.sql (renamed from sql/updates/world/2012_04_20_01_world_item_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_20_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_20_02_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_20_03_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_20_03_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_20_04_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_20_05_gameobject_template.sql (renamed from sql/updates/world/2012_04_20_05_gameobject_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_21_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_21_00_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_22_00_world_sai.sql (renamed from sql/updates/world/2012_04_22_00_world_sai.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_23_00_world_creatures.sql (renamed from sql/updates/world/2012_04_23_00_world_creatures.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_23_01_world_conditions.sql (renamed from sql/updates/world/2012_04_23_01_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql (renamed from sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_23_03_world_skinning_loot_template.sql (renamed from sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_23_04_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_23_04_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_23_05_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_23_05_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_00_world_command.sql (renamed from sql/updates/world/2012_04_24_00_world_command.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_01_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_24_01_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_02_world_warden_checks.sql (renamed from sql/updates/world/2012_04_24_02_world_warden_checks.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_03_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_24_03_world_spell_script_names.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql (renamed from sql/updates/world/2012_04_24_04_world_spell_proc_event.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_05_world_creature_loot_template.sql (renamed from sql/updates/world/2012_04_24_05_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_24_06_world_misc.sql (renamed from sql/updates/world/2012_04_24_06_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_25_00_world_misc.sql (renamed from sql/updates/world/2012_04_25_00_world_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_25_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_25_01_world_spell_script_names.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_25_02_world_spell_script_names.sql (renamed from sql/updates/world/2012_04_25_02_world_spell_script_names.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_25_03_world_spell_group.sql (renamed from sql/updates/world/2012_04_25_03_world_spell_group.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_26_00_world_conditions.sql (renamed from sql/updates/world/2012_04_26_00_world_conditions.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_26_01_world_smart_scripts.sql (renamed from sql/updates/world/2012_04_26_01_world_smart_scripts.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_27_00_world_instance_icc.sql (renamed from sql/updates/world/2012_04_27_00_world_instance_icc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql (renamed from sql/updates/world/2012_04_28_00_world_reference_loot_template.sql) | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_04_28_01_world_reference_loot_template.sql (renamed from sql/updates/world/2012_04_28_01_world_reference_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_01_00_world_creature.sql (renamed from sql/updates/world/2012_05_01_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_02_00_world_creature_loot_template.sql (renamed from sql/updates/world/2012_05_02_00_world_creature_loot_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_03_00_world_creature.sql (renamed from sql/updates/world/2012_05_03_00_world_creature.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql (renamed from sql/updates/world/2012_05_03_01_world_cos_misc.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_03_02_world_quest_template.sql (renamed from sql/updates/world/2012_05_03_02_world_quest_template.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_03_03_world_creature_questrelation.sql (renamed from sql/updates/world/2012_05_03_03_world_creature_questrelation.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql (renamed from sql/updates/world/2012_05_03_04_world_game_event_creature_quest.sql) | 0 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_04_00_world_waypoints.sql | 137 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_04_01_world_sai.sql | 32 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_00_world_sai.sql | 205 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_01_world_creature_template.sql | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql | 10 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_03_world_sai.sql | 17 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_04_world_creature_template.sql | 27 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_05_world_creature_template.sql | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_05_06_world_sai.sql | 13 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_06_00_world_creature_template.sql | 5 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_06_01_world_creature_template.sql | 11 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_07_00_world_waypoints.sql | 73 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_07_01_world_sai.sql | 51 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_08_00_world_sai.sql | 89 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql | 5 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_08_01_world_misc.sql | 9 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_09_00_world_spell_target_position.sql | 7 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_09_01_world_commands.sql | 8 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_09_02_world_sai.sql | 116 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_09_03_world_misc.sql | 56 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_00_world_sai.sql | 42 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_01_world_misc.sql | 37 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_02_world_creature_template.sql | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_03_world_misc.sql | 129 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_04_world_ceature_sai.sql | 14 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_05_world_waypoints.sql | 88 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_10_06_world_waypoints.sql | 40 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_11_00_world_waypoints.sql | 31 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_11_01_world_gameobject_template.sql | 4 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_11_02_world_conditions.sql | 23 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_12_00_world_gameobject_template.sql | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_12_01_world_item_loot_template.sql | 92 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql | 37 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_13_00_world_creature_text.sql | 13 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_13_01_world_creature_text.sql | 14 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_16_00_world_scripts.sql | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_17_00_world_creature_text.sql | 7 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_18_00_world_conditions.sql | 3 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_18_01_world_misc.sql | 7 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_18_01_world_spell_target_position.sql | 9 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_19_00_world_quest_template.sql | 2 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_19_01_world_smart_scripts.sql | 7 | ||||
| -rw-r--r-- | sql/old/3.3.5a/2012_05_19_02_world_misc.sql | 6 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_19_03_world_version.sql | 1 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_19_04_creature_loot_template.sql | 1 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_19_05_gameobject_loot_template.sql | 93 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_19_06_gameobject_loot_template.sql | 13 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_20_00_world_misc.sql | 16 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql | 2 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_22_00_world_spell_proc_event.sql | 1 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_22_01_world_creature_loot_template.sql | 2 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_23_00_world_creature.sql | 55 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_23_01_world_sai.sql | 14 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_23_02_world_sai.sql | 21 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql | 32 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_23_04_world_gameobject.sql | 3 | ||||
| -rw-r--r-- | sql/updates/world/2012_05_23_05_world_creature.sql | 12 | ||||
| -rwxr-xr-x | src/server/game/AI/CoreAI/GuardAI.cpp | 87 | ||||
| -rwxr-xr-x | src/server/game/AI/CoreAI/GuardAI.h | 23 | ||||
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 6 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 3 | ||||
| -rwxr-xr-x | src/server/game/Accounts/AccountMgr.cpp | 9 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/ArenaTeam.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/Battleground.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp | 11 | ||||
| -rw-r--r-- | src/server/game/Calendar/CalendarMgr.cpp | 24 | ||||
| -rwxr-xr-x | src/server/game/Combat/ThreatManager.cpp | 1 | ||||
| -rwxr-xr-x | src/server/game/Conditions/ConditionMgr.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Entities/Creature/Creature.cpp | 16 | ||||
| -rwxr-xr-x | src/server/game/Entities/GameObject/GameObject.cpp | 6 | ||||
| -rwxr-xr-x | src/server/game/Entities/Pet/Pet.cpp | 10 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 53 | ||||
| -rwxr-xr-x | src/server/game/Entities/Transport/Transport.cpp | 7 | ||||
| -rwxr-xr-x | src/server/game/Entities/Unit/StatSystem.cpp | 6 | ||||
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 822 | ||||
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.h | 28 | ||||
| -rwxr-xr-x | src/server/game/Globals/ObjectMgr.cpp | 78 | ||||
| -rwxr-xr-x | src/server/game/Grids/Notifiers/GridNotifiers.h | 4 | ||||
| -rwxr-xr-x | src/server/game/Handlers/CalendarHandler.cpp | 56 | ||||
| -rwxr-xr-x | src/server/game/Handlers/MiscHandler.cpp | 45 | ||||
| -rwxr-xr-x | src/server/game/Handlers/MovementHandler.cpp | 68 | ||||
| -rwxr-xr-x | src/server/game/Maps/Map.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Miscellaneous/Language.h | 3 | ||||
| -rwxr-xr-x | src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp | 1 | ||||
| -rwxr-xr-x | src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp | 5 | ||||
| -rwxr-xr-x | src/server/game/Scripting/ScriptMgr.cpp | 16 | ||||
| -rwxr-xr-x | src/server/game/Scripting/ScriptMgr.h | 8 | ||||
| -rwxr-xr-x | src/server/game/Server/Protocol/Opcodes.cpp | 10 | ||||
| -rwxr-xr-x | src/server/game/Server/WorldSession.h | 3 | ||||
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 133 | ||||
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuras.cpp | 10 | ||||
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 46 | ||||
| -rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 55 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 29 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellInfo.h | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 35 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h | 30 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp | 23 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/undercity.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/ashenvale.cpp | 196 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/azshara.cpp | 225 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/azuremyst_isle.cpp | 186 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/bloodmyst_isle.cpp | 16 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/boss_azuregos.cpp | 119 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/darkshore.cpp | 135 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/desolace.cpp | 27 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/durotar.cpp | 20 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/dustwallow_marsh.cpp | 61 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/felwood.cpp | 25 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/feralas.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/moonglade.cpp | 212 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/mulgore.cpp | 171 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/orgrimmar.cpp | 53 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/silithus.cpp | 32 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/stonetalon_mountains.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/tanaris.cpp | 306 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/teldrassil.cpp | 17 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/the_barrens.cpp | 138 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/thousand_needles.cpp | 85 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/thunder_bluff.cpp | 67 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/ungoro_crater.cpp | 117 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/winterspring.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp | 579 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp | 33 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp | 30 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp | 76 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp | 31 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 14 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 58 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 29 | ||||
| -rw-r--r-- | src/server/scripts/World/npcs_special.cpp | 223 | ||||
| -rw-r--r-- | src/server/shared/Database/Implementation/CharacterDatabase.cpp | 1 | ||||
| -rw-r--r-- | src/server/shared/Database/Implementation/CharacterDatabase.h | 1 | ||||
| -rwxr-xr-x | src/server/shared/Database/Implementation/LoginDatabase.cpp | 2 | ||||
| -rwxr-xr-x | src/server/shared/Database/Implementation/LoginDatabase.h | 1 | ||||
| -rwxr-xr-x | src/server/shared/Debugging/Errors.h | 8 | ||||
| -rw-r--r-- | src/tools/map_extractor/System.cpp | 14 | ||||
| -rw-r--r-- | src/tools/map_extractor/mpq_libmpq04.h | 4 |
368 files changed, 4220 insertions, 2759 deletions
diff --git a/sql/updates/world/2012_02_13_00_world_version.sql b/sql/old/3.3.5a/2012_02_13_00_world_version.sql index 2dd7ab92ddb..2dd7ab92ddb 100644 --- a/sql/updates/world/2012_02_13_00_world_version.sql +++ b/sql/old/3.3.5a/2012_02_13_00_world_version.sql diff --git a/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_02_14_00_world_achievement_criteria_data.sql index 4361f33cf38..e7993726132 100644 --- a/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql +++ b/sql/old/3.3.5a/2012_02_14_00_world_achievement_criteria_data.sql @@ -4,4 +4,4 @@ INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`, (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 +(12780, 12, 0, 0, ""); -- normal diff --git a/sql/updates/world/2012_02_15_00_world_quest_template.sql b/sql/old/3.3.5a/2012_02_15_00_world_quest_template.sql index e26f52fd0fe..e26f52fd0fe 100644 --- a/sql/updates/world/2012_02_15_00_world_quest_template.sql +++ b/sql/old/3.3.5a/2012_02_15_00_world_quest_template.sql diff --git a/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql b/sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql index 1c3d45dc490..1c3d45dc490 100644 --- a/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql +++ b/sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql diff --git a/sql/updates/world/2012_02_15_02_world_item_template.sql b/sql/old/3.3.5a/2012_02_15_02_world_item_template.sql index 463d43368cd..463d43368cd 100644 --- a/sql/updates/world/2012_02_15_02_world_item_template.sql +++ b/sql/old/3.3.5a/2012_02_15_02_world_item_template.sql diff --git a/sql/updates/world/2012_02_15_03_world_quest_template.sql b/sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql index 833d36b246c..833d36b246c 100644 --- a/sql/updates/world/2012_02_15_03_world_quest_template.sql +++ b/sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql diff --git a/sql/updates/world/2012_02_15_04_world_quest_template.sql b/sql/old/3.3.5a/2012_02_15_04_world_quest_template.sql index 8b6ad1d2cf9..8b6ad1d2cf9 100644 --- a/sql/updates/world/2012_02_15_04_world_quest_template.sql +++ b/sql/old/3.3.5a/2012_02_15_04_world_quest_template.sql diff --git a/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql b/sql/old/3.3.5a/2012_02_15_06_world_creature_involvedrelation.sql index 431e23b53b8..431e23b53b8 100644 --- a/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql +++ b/sql/old/3.3.5a/2012_02_15_06_world_creature_involvedrelation.sql diff --git a/sql/updates/world/2012_02_15_07_00_world_creature.sql b/sql/old/3.3.5a/2012_02_15_07_00_world_creature.sql index 75beec97d67..75beec97d67 100644 --- a/sql/updates/world/2012_02_15_07_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_02_15_07_00_world_creature.sql diff --git a/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql b/sql/old/3.3.5a/2012_02_15_07_01_world_waypoint_data.sql index e47572b2074..e47572b2074 100644 --- a/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql +++ b/sql/old/3.3.5a/2012_02_15_07_01_world_waypoint_data.sql diff --git a/sql/updates/world/2012_02_15_07_02_world_misc.sql b/sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql index e7ffe54e922..e7ffe54e922 100644 --- a/sql/updates/world/2012_02_15_07_02_world_misc.sql +++ b/sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql diff --git a/sql/updates/world/2012_02_15_08_world_sai.sql b/sql/old/3.3.5a/2012_02_15_08_world_sai.sql index ef49ff484f3..ef49ff484f3 100644 --- a/sql/updates/world/2012_02_15_08_world_sai.sql +++ b/sql/old/3.3.5a/2012_02_15_08_world_sai.sql diff --git a/sql/updates/world/2012_02_15_09_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql index 4811e5d66fe..4811e5d66fe 100644 --- a/sql/updates/world/2012_02_15_09_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_02_16_00_world_conditions.sql b/sql/old/3.3.5a/2012_02_16_00_world_conditions.sql index a01792ef838..5bef38fc485 100644 --- a/sql/updates/world/2012_02_16_00_world_conditions.sql +++ b/sql/old/3.3.5a/2012_02_16_00_world_conditions.sql @@ -4,8 +4,8 @@ CREATE TABLE `temp_convert_spells` PRIMARY KEY (`id`) ); -# spells with EffectImplicitTarget In (6,21, 25) + spells having Targets & 1115534 -# those spells are the ones which require explicit unit target to cast +-- spells with EffectImplicitTarget In (6,21, 25) + spells having Targets & 1115534 +-- those spells are the ones which require explicit unit target to cast INSERT INTO `temp_convert_spells` VALUES (5), (11), @@ -12783,13 +12783,13 @@ INSERT IGNORE INTO `temp_item_spell` SELECT `entry`, `spellid_5` FROM `item_temp INSERT INTO `temp_cond_vals` (`spellId`, `entry`, `dead`, `errorTextId`, `comment`) SELECT DISTINCT (SELECT `spellId` FROM `temp_item_spell` WHERE `itemId` = `SourceEntry`), `ConditionValue2`, (`ConditionValue1` - 1), `ErrorTextId`, `Comment` FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18; -#use CONDITION_OBJECT_ENTRY instead of CONDITION_ITEM_TARGET +-- use CONDITION_OBJECT_ENTRY instead of CONDITION_ITEM_TARGET INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `Comment`) SELECT DISTINCT 17, 0, `spellId`, 0, `elseGroup` - 1, 31, 1, 3, `entry`, 0, 0, `errorTextId`, `comment` FROM `temp_cond_vals`; -#for CONDITION_ITEM_TARGET with ConditionValue1 = DEAD we're adding !CONDITION_ALIVE as a second requirement +-- for CONDITION_ITEM_TARGET with ConditionValue1 = DEAD we're adding !CONDITION_ALIVE as a second requirement INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `Comment`) SELECT DISTINCT 17, 0, `spellId`, 0, `elseGroup` - 1, 36, 1, 0, 0, 0, 1, `errorTextId`, `comment` FROM `temp_cond_vals` WHERE `dead`; -#remove entries which could be converted by this sql +-- remove entries which could be converted by this sql DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18 AND `SourceEntry` IN (SELECT `itemId` FROM `temp_item_spell`); DROP TABLE `temp_convert_spells`; DROP TABLE `temp_cond_vals`; diff --git a/sql/updates/world/2012_02_16_01_world_conditions.sql b/sql/old/3.3.5a/2012_02_16_01_world_conditions.sql index 4bcf997b8e4..4bcf997b8e4 100644 --- a/sql/updates/world/2012_02_16_01_world_conditions.sql +++ b/sql/old/3.3.5a/2012_02_16_01_world_conditions.sql diff --git a/sql/updates/world/2012_02_17_00_world_waypoints.sql b/sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql index 1cff86f5d51..1cff86f5d51 100644 --- a/sql/updates/world/2012_02_17_00_world_waypoints.sql +++ b/sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql diff --git a/sql/updates/world/2012_02_18_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql index 993fe3a2f38..993fe3a2f38 100644 --- a/sql/updates/world/2012_02_18_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_02_18_01_world_spell_dbc.sql b/sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql index b343399d7f2..b343399d7f2 100644 --- a/sql/updates/world/2012_02_18_01_world_spell_dbc.sql +++ b/sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql diff --git a/sql/updates/world/2012_02_18_02_world_gossip.sql b/sql/old/3.3.5a/2012_02_18_02_world_gossip.sql index c72532e3f21..47882d4eb36 100644 --- a/sql/updates/world/2012_02_18_02_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_18_02_world_gossip.sql @@ -49,4 +49,4 @@ INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,` (573,0,0,'These dwarves are the same ones today, yes? Do dwarves maintain any other links to the Earthen?',1,1,574,0,0,0,''), (574,0,0,'Who are the Creators?',1,1,575,0,0,0,''), (575,0,0,'This is a lot to think about.',1,1,576,0,0,0,''), -(576,0,0,'I will access the discs now.',1,1,0,0,0,0,'');
\ No newline at end of file +(576,0,0,'I will access the discs now.',1,1,0,0,0,0,''); diff --git a/sql/updates/world/2012_02_18_03_world_gossip.sql b/sql/old/3.3.5a/2012_02_18_03_world_gossip.sql index 990006f5098..990006f5098 100644 --- a/sql/updates/world/2012_02_18_03_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_18_03_world_gossip.sql diff --git a/sql/updates/world/2012_02_18_04_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql index 8fa5bc55197..8fa5bc55197 100644 --- a/sql/updates/world/2012_02_18_04_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql diff --git a/sql/updates/world/2012_02_18_05_world_creatures.sql b/sql/old/3.3.5a/2012_02_18_05_world_creatures.sql index 3fdac99c854..3fdac99c854 100644 --- a/sql/updates/world/2012_02_18_05_world_creatures.sql +++ b/sql/old/3.3.5a/2012_02_18_05_world_creatures.sql diff --git a/sql/updates/world/2012_02_18_06_world_gossip.sql b/sql/old/3.3.5a/2012_02_18_06_world_gossip.sql index e3385ceb5b0..e3385ceb5b0 100644 --- a/sql/updates/world/2012_02_18_06_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_18_06_world_gossip.sql diff --git a/sql/updates/world/2012_02_18_07_world_gossip.sql b/sql/old/3.3.5a/2012_02_18_07_world_gossip.sql index 6246f12cefc..6246f12cefc 100644 --- a/sql/updates/world/2012_02_18_07_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_18_07_world_gossip.sql diff --git a/sql/updates/world/2012_02_18_08_world_gossip.sql b/sql/old/3.3.5a/2012_02_18_08_world_gossip.sql index a9fef9bcd76..a9fef9bcd76 100644 --- a/sql/updates/world/2012_02_18_08_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_18_08_world_gossip.sql diff --git a/sql/updates/auth/2012_02_19_00_auth_account.sql b/sql/old/3.3.5a/2012_02_19_00_auth_account.sql index a5b48ede3b4..a5b48ede3b4 100644 --- a/sql/updates/auth/2012_02_19_00_auth_account.sql +++ b/sql/old/3.3.5a/2012_02_19_00_auth_account.sql diff --git a/sql/updates/characters/2012_02_19_00_characters_warden_action.sql b/sql/old/3.3.5a/2012_02_19_00_characters_warden_action.sql index 587f65fedc5..587f65fedc5 100644 --- a/sql/updates/characters/2012_02_19_00_characters_warden_action.sql +++ b/sql/old/3.3.5a/2012_02_19_00_characters_warden_action.sql diff --git a/sql/updates/world/2012_02_19_00_world_quest_template.sql b/sql/old/3.3.5a/2012_02_19_00_world_quest_template.sql index 76ab51f803b..76ab51f803b 100644 --- a/sql/updates/world/2012_02_19_00_world_quest_template.sql +++ b/sql/old/3.3.5a/2012_02_19_00_world_quest_template.sql diff --git a/sql/updates/world/2012_02_19_01_world_quest_template.sql b/sql/old/3.3.5a/2012_02_19_01_world_quest_template.sql index 2f888f08cdd..2f888f08cdd 100644 --- a/sql/updates/world/2012_02_19_01_world_quest_template.sql +++ b/sql/old/3.3.5a/2012_02_19_01_world_quest_template.sql diff --git a/sql/updates/world/2012_02_19_02_world_gameobject.sql b/sql/old/3.3.5a/2012_02_19_02_world_gameobject.sql index 88a1f2e3a4c..88a1f2e3a4c 100644 --- a/sql/updates/world/2012_02_19_02_world_gameobject.sql +++ b/sql/old/3.3.5a/2012_02_19_02_world_gameobject.sql diff --git a/sql/updates/world/2012_02_19_03_world_warden_checks.sql b/sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql index 3698c461358..3698c461358 100644 --- a/sql/updates/world/2012_02_19_03_world_warden_checks.sql +++ b/sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql diff --git a/sql/updates/world/2012_02_19_04_world_misc_db_updates.sql b/sql/old/3.3.5a/2012_02_19_04_world_misc_db_updates.sql index 32fada1e895..32fada1e895 100644 --- a/sql/updates/world/2012_02_19_04_world_misc_db_updates.sql +++ b/sql/old/3.3.5a/2012_02_19_04_world_misc_db_updates.sql diff --git a/sql/updates/world/2012_02_19_05_world_creature_text.sql b/sql/old/3.3.5a/2012_02_19_05_world_creature_text.sql index b70385660a1..b70385660a1 100644 --- a/sql/updates/world/2012_02_19_05_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_02_19_05_world_creature_text.sql diff --git a/sql/updates/world/2012_02_19_06_world_creature_text.sql b/sql/old/3.3.5a/2012_02_19_06_world_creature_text.sql index f69c4cb86a9..f69c4cb86a9 100644 --- a/sql/updates/world/2012_02_19_06_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_02_19_06_world_creature_text.sql diff --git a/sql/updates/world/2012_02_20_00_world_sai.sql b/sql/old/3.3.5a/2012_02_20_00_world_sai.sql index 44f8ab68d70..44f8ab68d70 100644 --- a/sql/updates/world/2012_02_20_00_world_sai.sql +++ b/sql/old/3.3.5a/2012_02_20_00_world_sai.sql diff --git a/sql/updates/world/2012_02_20_01_world_gossip.sql b/sql/old/3.3.5a/2012_02_20_01_world_gossip.sql index f3943ded29a..f3943ded29a 100644 --- a/sql/updates/world/2012_02_20_01_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_20_01_world_gossip.sql diff --git a/sql/updates/world/2012_02_20_02_world_conditons.sql b/sql/old/3.3.5a/2012_02_20_02_world_conditons.sql index 832d8dbdae5..f87a95fb1c9 100644 --- a/sql/updates/world/2012_02_20_02_world_conditons.sql +++ b/sql/old/3.3.5a/2012_02_20_02_world_conditons.sql @@ -1,9 +1,10 @@ -# Update a typo in original data entry +-- Update a typo in original data entry UPDATE `npc_spellclick_spells` SET `quest_end`=11999 WHERE `npc_entry`=26477 AND `spell_id`=61832 AND `quest_start`=11999; -# Delete redundant data with invalid condition type + +-- Delete redundant data with invalid condition type DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18; -# Static Data +-- Static Data INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`, `ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`Comment`) VALUES (18,24752,44363,0,8,0,11460,0,0,1,'Forbidden rewarded quest for spellclick'), @@ -167,9 +168,10 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`, (18,40176,74905,0,8,0,25444,0,0,1,'Forbidden rewarded quest for spellclick'), (18,40176,74905,0,9,0,25444,0,0,0,'Required quest active for spellclick'); -# Below is a procedure to dynamically convert custom content to conditions table. -# However this procedure only works for MySQL server versions >= 5.6 due to -# a bug / missing feature in older MySQL versions. +-- Below is a procedure to dynamically convert custom content to conditions table. +-- However this procedure only works for MySQL server versions >= 5.6 due to +-- a bug / missing feature in older MySQL versions. + /* DROP PROCEDURE IF EXISTS ConvertSpellClickConditions; @@ -185,7 +187,7 @@ BEGIN DECLARE quest INT DEFAULT 0; DECLARE quest2 INT DEFAULT 0; DECLARE questStartCanActive INT DEFAULT 0; - DECLARE maxElseGroupId INT DEFAULT 14; # Change this for custom content + DECLARE maxElseGroupId INT DEFAULT 14; -- Change this for custom content SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `aura_required` !=0; WHILE counter < recordCount DO SELECT `npc_entry`, `spell_id`, `aura_required` @@ -228,12 +230,12 @@ BEGIN `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) VALUES (18,npcEntry,spellId,maxElseGroupId+1,8,0,quest,0,0,'Required quest rewarded for spellclick'); SET maxElseGroupId = maxElseGroupId+1; - # ELSE IF quest2 != 0 is handled in next loop (forbidden rewarded quest) + -- ELSE IF quest2 != 0 is handled in next loop (forbidden rewarded quest) ELSEIF questStartCanActive = 1 && quest2 = quest THEN INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`, `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) VALUES (18,npcEntry,spellId,9,0,quest,0,0,'Required quest active for spellclick'); - # ^Adds the required active quest condition. Prohibit quest reward is done in next loop + -- ^Adds the required active quest condition. Prohibit quest reward is done in next loop ELSEIF questStartCanActive = 0 THEN INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`, `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) diff --git a/sql/updates/world/2012_02_21_00_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql index 1d05c031868..1d05c031868 100644 --- a/sql/updates/world/2012_02_21_00_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_02_21_01_world_conditions.sql b/sql/old/3.3.5a/2012_02_21_01_world_conditions.sql index 54685868186..95c32703ea4 100644 --- a/sql/updates/world/2012_02_21_01_world_conditions.sql +++ b/sql/old/3.3.5a/2012_02_21_01_world_conditions.sql @@ -3589,4 +3589,4 @@ UPDATE `conditions` SET `ConditionTypeOrReference` = 32, `ConditionValue1` = 0x9 UPDATE `conditions` SET `ConditionTypeOrReference` = 31, `ConditionValue1` = 5 WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 0; DROP TABLE `temp_convert_spells`; -DROP TABLE `temp_cond_vals`;
\ No newline at end of file +DROP TABLE `temp_cond_vals`; diff --git a/sql/updates/world/2012_02_21_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_02_21_02_world_creature_loot_template.sql index 6c6af7ed2a3..6c6af7ed2a3 100644 --- a/sql/updates/world/2012_02_21_02_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_02_21_02_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_02_21_03_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_02_21_03_world_creature_loot_template.sql index d7d043cbda9..d7d043cbda9 100644 --- a/sql/updates/world/2012_02_21_03_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_02_21_03_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_02_21_04_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_02_21_04_world_creature_loot_template.sql index 3deedbf0b0d..3deedbf0b0d 100644 --- a/sql/updates/world/2012_02_21_04_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_02_21_04_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_02_21_05_world_gossip.sql b/sql/old/3.3.5a/2012_02_21_05_world_gossip.sql index 1bdccae5c39..1bdccae5c39 100644 --- a/sql/updates/world/2012_02_21_05_world_gossip.sql +++ b/sql/old/3.3.5a/2012_02_21_05_world_gossip.sql diff --git a/sql/updates/world/2012_02_21_06_world_Gossip.sql b/sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql index a59d330c6a3..a59d330c6a3 100644 --- a/sql/updates/world/2012_02_21_06_world_Gossip.sql +++ b/sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql diff --git a/sql/updates/world/2012_02_22_00_world_SAI.sql b/sql/old/3.3.5a/2012_02_22_00_world_sai.sql index 2e392f3a45f..2e392f3a45f 100644 --- a/sql/updates/world/2012_02_22_00_world_SAI.sql +++ b/sql/old/3.3.5a/2012_02_22_00_world_sai.sql diff --git a/sql/updates/world/2012_02_22_01_world_creature_text.sql b/sql/old/3.3.5a/2012_02_22_01_world_creature_text.sql index 035962e11c3..8b7761e48a0 100644 --- a/sql/updates/world/2012_02_22_01_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_02_22_01_world_creature_text.sql @@ -31,4 +31,4 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr (15214,27,0, 'The Horde has defended Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'), (15214,28,0, 'The Horde has captured Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'), (15214,29,0, 'The Alliance has defended Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'), -(15214,30,0, 'The Alliance has captured Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker');
\ No newline at end of file +(15214,30,0, 'The Alliance has captured Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'); diff --git a/sql/updates/world/2012_02_22_02_world_misc.sql b/sql/old/3.3.5a/2012_02_22_02_world_misc.sql index 33bec2a9b78..33bec2a9b78 100644 --- a/sql/updates/world/2012_02_22_02_world_misc.sql +++ b/sql/old/3.3.5a/2012_02_22_02_world_misc.sql diff --git a/sql/updates/world/2012_02_22_03_world_conditions.sql b/sql/old/3.3.5a/2012_02_22_03_world_conditions.sql index 9c4d0cdec95..9c4d0cdec95 100644 --- a/sql/updates/world/2012_02_22_03_world_conditions.sql +++ b/sql/old/3.3.5a/2012_02_22_03_world_conditions.sql diff --git a/sql/updates/world/2012_02_23_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_23_00_world_spell_script_names.sql index 6ea96033091..6ea96033091 100644 --- a/sql/updates/world/2012_02_23_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_02_23_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_02_24_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_02_24_00_world_gameobject_loot_template.sql index daecfc02dfc..daecfc02dfc 100644 --- a/sql/updates/world/2012_02_24_00_world_gameobject_loot_template.sql +++ b/sql/old/3.3.5a/2012_02_24_00_world_gameobject_loot_template.sql diff --git a/sql/updates/world/2012_02_24_01_world_sai.sql b/sql/old/3.3.5a/2012_02_24_01_world_sai.sql index 19e4e8fb772..19e4e8fb772 100644 --- a/sql/updates/world/2012_02_24_01_world_sai.sql +++ b/sql/old/3.3.5a/2012_02_24_01_world_sai.sql diff --git a/sql/updates/world/2012_02_25_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_25_00_world_spell_script_names.sql index 9619121e982..9619121e982 100644 --- a/sql/updates/world/2012_02_25_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_02_25_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_02_25_01_world_command.sql b/sql/old/3.3.5a/2012_02_25_01_world_command.sql index de708b7a9cc..de708b7a9cc 100644 --- a/sql/updates/world/2012_02_25_01_world_command.sql +++ b/sql/old/3.3.5a/2012_02_25_01_world_command.sql diff --git a/sql/updates/world/2012_02_25_01_world_misc.sql b/sql/old/3.3.5a/2012_02_25_01_world_misc.sql index deedd50a819..deedd50a819 100644 --- a/sql/updates/world/2012_02_25_01_world_misc.sql +++ b/sql/old/3.3.5a/2012_02_25_01_world_misc.sql diff --git a/sql/updates/world/2012_02_25_02_world_sai.sql b/sql/old/3.3.5a/2012_02_25_02_world_sai.sql index e2ff99534b4..e2ff99534b4 100644 --- a/sql/updates/world/2012_02_25_02_world_sai.sql +++ b/sql/old/3.3.5a/2012_02_25_02_world_sai.sql diff --git a/sql/updates/world/2012_02_26_00_world_misc.sql b/sql/old/3.3.5a/2012_02_26_00_world_misc.sql index 3df42934aa9..3df42934aa9 100644 --- a/sql/updates/world/2012_02_26_00_world_misc.sql +++ b/sql/old/3.3.5a/2012_02_26_00_world_misc.sql diff --git a/sql/updates/world/2012_02_26_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql index 7bb38d5f2e0..7bb38d5f2e0 100644 --- a/sql/updates/world/2012_02_26_01_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql diff --git a/sql/updates/world/2012_02_27_00_world_creature_template.sql b/sql/old/3.3.5a/2012_02_27_00_world_creature_template.sql index b8936774e36..b8936774e36 100644 --- a/sql/updates/world/2012_02_27_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_02_27_00_world_creature_template.sql diff --git a/sql/updates/world/2012_02_28_00_world_wintergrasp_spawns.sql b/sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql index 99c2444f20b..9c07709246f 100644 --- a/sql/updates/world/2012_02_28_00_world_wintergrasp_spawns.sql +++ b/sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql @@ -363,4 +363,4 @@ INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x` (@OGUID+16,192400,571,1,32,5041.650879,3294.318604,381.919952,-1.605702,0,0,0,1,180,0,1), (@OGUID+17,192401,571,1,32,4855.444336,3297.600830,376.495758,-3.115388,0,0,0,1,180,0,1), (@OGUID+18,192281,571,1,32,4857.971191,3335.415771,369.291901,-2.888511,0,0,0,1,180,0,1), -(@OGUID+19,192282,571,1,32,5006.322754,3280.362061,371.242249,2.242746,0,0,0,1,180,0,1);
\ No newline at end of file +(@OGUID+19,192282,571,1,32,5006.322754,3280.362061,371.242249,2.242746,0,0,0,1,180,0,1); diff --git a/sql/updates/world/2012_02_29_00_world_conditions_misc.sql b/sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql index 34eb1261ed1..34eb1261ed1 100644 --- a/sql/updates/world/2012_02_29_00_world_conditions_misc.sql +++ b/sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql diff --git a/sql/updates/world/2012_02_29_01_world_conditions.sql b/sql/old/3.3.5a/2012_02_29_01_world_conditions.sql index bae8baf51a9..bae8baf51a9 100644 --- a/sql/updates/world/2012_02_29_01_world_conditions.sql +++ b/sql/old/3.3.5a/2012_02_29_01_world_conditions.sql diff --git a/sql/updates/world/2012_02_29_02_world_conditions.sql b/sql/old/3.3.5a/2012_02_29_02_world_conditions.sql index a28e6d6424f..a28e6d6424f 100644 --- a/sql/updates/world/2012_02_29_02_world_conditions.sql +++ b/sql/old/3.3.5a/2012_02_29_02_world_conditions.sql diff --git a/sql/updates/world/2012_02_29_03_world_creature_text.sql b/sql/old/3.3.5a/2012_02_29_03_world_creature_text.sql index 2e1d3d77dde..2e1d3d77dde 100644 --- a/sql/updates/world/2012_02_29_03_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_02_29_03_world_creature_text.sql diff --git a/sql/updates/world/2012_02_29_04_world_creature_text.sql b/sql/old/3.3.5a/2012_02_29_04_world_creature_text.sql index d8b7c2c048a..d8b7c2c048a 100644 --- a/sql/updates/world/2012_02_29_04_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_02_29_04_world_creature_text.sql diff --git a/sql/updates/world/2012_02_29_05_world_creature_text.sql b/sql/old/3.3.5a/2012_02_29_05_world_creature_text.sql index 332fecf6326..332fecf6326 100644 --- a/sql/updates/world/2012_02_29_05_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_02_29_05_world_creature_text.sql diff --git a/sql/updates/world/2012_03_01_00_world_conditions.sql b/sql/old/3.3.5a/2012_03_01_00_world_conditions.sql index 794a5ce1210..794a5ce1210 100644 --- a/sql/updates/world/2012_03_01_00_world_conditions.sql +++ b/sql/old/3.3.5a/2012_03_01_00_world_conditions.sql diff --git a/sql/updates/world/2012_03_01_01_world_creature_text.sql b/sql/old/3.3.5a/2012_03_01_01_world_creature_text.sql index dd4f6693654..dd4f6693654 100644 --- a/sql/updates/world/2012_03_01_01_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_03_01_01_world_creature_text.sql diff --git a/sql/updates/world/2012_03_01_02_world_locales_creature_text.sql b/sql/old/3.3.5a/2012_03_01_02_world_locales_creature_text.sql index c44ca191835..c44ca191835 100644 --- a/sql/updates/world/2012_03_01_02_world_locales_creature_text.sql +++ b/sql/old/3.3.5a/2012_03_01_02_world_locales_creature_text.sql diff --git a/sql/updates/world/2012_03_03_00_world_command.sql b/sql/old/3.3.5a/2012_03_03_00_world_command.sql index 52938c0b76b..52938c0b76b 100644 --- a/sql/updates/world/2012_03_03_00_world_command.sql +++ b/sql/old/3.3.5a/2012_03_03_00_world_command.sql diff --git a/sql/updates/world/2012_03_04_00_world_misc.sql b/sql/old/3.3.5a/2012_03_04_00_world_misc.sql index af556f648b8..af556f648b8 100644 --- a/sql/updates/world/2012_03_04_00_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_04_00_world_misc.sql diff --git a/sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql b/sql/old/3.3.5a/2012_03_04_01_world_areatrigger_scripts.sql index ae4a0bc1f77..ae4a0bc1f77 100644 --- a/sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql +++ b/sql/old/3.3.5a/2012_03_04_01_world_areatrigger_scripts.sql diff --git a/sql/updates/world/2012_03_06_00_world_commands.sql b/sql/old/3.3.5a/2012_03_06_00_world_commands.sql index d782a76c70d..d782a76c70d 100644 --- a/sql/updates/world/2012_03_06_00_world_commands.sql +++ b/sql/old/3.3.5a/2012_03_06_00_world_commands.sql diff --git a/sql/updates/world/2012_03_06_01_world_misc.sql b/sql/old/3.3.5a/2012_03_06_01_world_misc.sql index 7eb208a9673..7eb208a9673 100644 --- a/sql/updates/world/2012_03_06_01_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_06_01_world_misc.sql diff --git a/sql/updates/world/2012_03_06_02_world_queststatus_seasonal.sql b/sql/old/3.3.5a/2012_03_06_02_world_queststatus_seasonal.sql index 0efbb6609cf..0efbb6609cf 100644 --- a/sql/updates/world/2012_03_06_02_world_queststatus_seasonal.sql +++ b/sql/old/3.3.5a/2012_03_06_02_world_queststatus_seasonal.sql diff --git a/sql/updates/world/2012_03_06_03_world_smart_scripts.sql b/sql/old/3.3.5a/2012_03_06_03_world_smart_scripts.sql index cb2468c4d5c..cb2468c4d5c 100644 --- a/sql/updates/world/2012_03_06_03_world_smart_scripts.sql +++ b/sql/old/3.3.5a/2012_03_06_03_world_smart_scripts.sql diff --git a/sql/updates/world/2012_03_06_04_world_creature_text.sql b/sql/old/3.3.5a/2012_03_06_04_world_creature_text.sql index f49599e1ba0..f49599e1ba0 100644 --- a/sql/updates/world/2012_03_06_04_world_creature_text.sql +++ b/sql/old/3.3.5a/2012_03_06_04_world_creature_text.sql diff --git a/sql/updates/world/2012_03_07_00_world_trinity_string.sql b/sql/old/3.3.5a/2012_03_07_00_world_trinity_string.sql index 96344520236..df5afea5d4f 100644 --- a/sql/updates/world/2012_03_07_00_world_trinity_string.sql +++ b/sql/old/3.3.5a/2012_03_07_00_world_trinity_string.sql @@ -1,3 +1,3 @@ DELETE FROM `trinity_string` WHERE `entry`=175; INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES -(175, 'Liquid level: %f, ground: %f, type: %u, flags %u, status: %d.');
\ No newline at end of file +(175, 'Liquid level: %f, ground: %f, type: %u, flags %u, status: %d.'); diff --git a/sql/updates/world/2012_03_10_00_world_creature.sql b/sql/old/3.3.5a/2012_03_10_00_world_creature.sql index a0143af73c7..a0143af73c7 100644 --- a/sql/updates/world/2012_03_10_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_03_10_00_world_creature.sql diff --git a/sql/updates/world/2012_03_10_00_world_smart_scripts.sql b/sql/old/3.3.5a/2012_03_10_00_world_smart_scripts.sql index aaa02c2e3df..aaa02c2e3df 100644 --- a/sql/updates/world/2012_03_10_00_world_smart_scripts.sql +++ b/sql/old/3.3.5a/2012_03_10_00_world_smart_scripts.sql diff --git a/sql/updates/world/2012_03_10_00_world_waypoint_data.sql b/sql/old/3.3.5a/2012_03_10_00_world_waypoint_data.sql index 01c2bc50402..01c2bc50402 100644 --- a/sql/updates/world/2012_03_10_00_world_waypoint_data.sql +++ b/sql/old/3.3.5a/2012_03_10_00_world_waypoint_data.sql diff --git a/sql/updates/world/2012_03_11_00_world_sai.sql b/sql/old/3.3.5a/2012_03_11_00_world_sai.sql index a8cab265ac0..a8cab265ac0 100644 --- a/sql/updates/world/2012_03_11_00_world_sai.sql +++ b/sql/old/3.3.5a/2012_03_11_00_world_sai.sql diff --git a/sql/updates/world/2012_03_12_00_world_creature_template.sql b/sql/old/3.3.5a/2012_03_12_00_world_creature_template.sql index cc70ff7a557..cc70ff7a557 100644 --- a/sql/updates/world/2012_03_12_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_03_12_00_world_creature_template.sql diff --git a/sql/updates/world/2012_03_12_01_world_conditions.sql b/sql/old/3.3.5a/2012_03_12_01_world_conditions.sql index d58d8f54ddf..d58d8f54ddf 100644 --- a/sql/updates/world/2012_03_12_01_world_conditions.sql +++ b/sql/old/3.3.5a/2012_03_12_01_world_conditions.sql diff --git a/sql/updates/world/2012_03_12_01_world_gameobject.sql b/sql/old/3.3.5a/2012_03_12_01_world_gameobject.sql index 38c615a3b0a..38c615a3b0a 100644 --- a/sql/updates/world/2012_03_12_01_world_gameobject.sql +++ b/sql/old/3.3.5a/2012_03_12_01_world_gameobject.sql diff --git a/sql/updates/world/2012_03_12_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_03_12_01_world_spell_script_names.sql index db98aa0fbea..db98aa0fbea 100644 --- a/sql/updates/world/2012_03_12_01_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_03_12_01_world_spell_script_names.sql diff --git a/sql/updates/world/2012_03_14_00_world_creature_addon.sql b/sql/old/3.3.5a/2012_03_14_00_world_creature_addon.sql index c7e4edb97ed..c7e4edb97ed 100644 --- a/sql/updates/world/2012_03_14_00_world_creature_addon.sql +++ b/sql/old/3.3.5a/2012_03_14_00_world_creature_addon.sql diff --git a/sql/updates/world/2012_03_19_00_world_smart_scripts.sql b/sql/old/3.3.5a/2012_03_19_00_world_smart_scripts.sql index 20241efa9cc..20241efa9cc 100644 --- a/sql/updates/world/2012_03_19_00_world_smart_scripts.sql +++ b/sql/old/3.3.5a/2012_03_19_00_world_smart_scripts.sql diff --git a/sql/updates/world/2012_03_20_00_world_gossip.sql b/sql/old/3.3.5a/2012_03_20_00_world_gossip.sql index 00214d805e7..00214d805e7 100644 --- a/sql/updates/world/2012_03_20_00_world_gossip.sql +++ b/sql/old/3.3.5a/2012_03_20_00_world_gossip.sql diff --git a/sql/updates/world/2012_03_21_00_world_creature.sql b/sql/old/3.3.5a/2012_03_21_00_world_creature.sql index def72f74cd6..def72f74cd6 100644 --- a/sql/updates/world/2012_03_21_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_03_21_00_world_creature.sql diff --git a/sql/updates/world/2012_03_22_00_world_creature_template.sql b/sql/old/3.3.5a/2012_03_22_00_world_creature_template.sql index e6c03ed589c..e6c03ed589c 100644 --- a/sql/updates/world/2012_03_22_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_03_22_00_world_creature_template.sql diff --git a/sql/updates/world/2012_03_22_01_world_conditions.sql b/sql/old/3.3.5a/2012_03_22_01_world_conditions.sql index 074328137a5..074328137a5 100644 --- a/sql/updates/world/2012_03_22_01_world_conditions.sql +++ b/sql/old/3.3.5a/2012_03_22_01_world_conditions.sql diff --git a/sql/updates/world/2012_03_23_00_world_ip2nation.sql b/sql/old/3.3.5a/2012_03_23_00_world_ip2nation.sql index dadeaddf85a..dadeaddf85a 100644 --- a/sql/updates/world/2012_03_23_00_world_ip2nation.sql +++ b/sql/old/3.3.5a/2012_03_23_00_world_ip2nation.sql diff --git a/sql/updates/world/2012_03_24_00_world_misc.sql b/sql/old/3.3.5a/2012_03_24_00_world_misc.sql index e6f6ce77307..e6f6ce77307 100644 --- a/sql/updates/world/2012_03_24_00_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_24_00_world_misc.sql diff --git a/sql/updates/world/2012_03_24_01_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql index 078c48a47b7..078c48a47b7 100644 --- a/sql/updates/world/2012_03_24_01_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_03_24_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_03_24_02_world_creature_loot_template.sql index cdac3335aed..cdac3335aed 100644 --- a/sql/updates/world/2012_03_24_02_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_03_24_02_world_creature_loot_template.sql diff --git a/sql/updates/auth/2012_03_25_00_auth_misc.sql b/sql/old/3.3.5a/2012_03_25_00_auth_misc.sql index f34882af8f6..f34882af8f6 100644 --- a/sql/updates/auth/2012_03_25_00_auth_misc.sql +++ b/sql/old/3.3.5a/2012_03_25_00_auth_misc.sql diff --git a/sql/updates/world/2012_03_25_00_world_game_event.sql b/sql/old/3.3.5a/2012_03_25_00_world_game_event.sql index 82dfaa3f494..82dfaa3f494 100644 --- a/sql/updates/world/2012_03_25_00_world_game_event.sql +++ b/sql/old/3.3.5a/2012_03_25_00_world_game_event.sql diff --git a/sql/updates/auth/2012_03_26_00_auth_realmlist.sql b/sql/old/3.3.5a/2012_03_26_00_auth_realmlist.sql index 0a570a31773..0a570a31773 100644 --- a/sql/updates/auth/2012_03_26_00_auth_realmlist.sql +++ b/sql/old/3.3.5a/2012_03_26_00_auth_realmlist.sql diff --git a/sql/updates/world/2012_03_26_00_world_creature_template.sql b/sql/old/3.3.5a/2012_03_26_00_world_creature_template.sql index f60849476bd..f60849476bd 100644 --- a/sql/updates/world/2012_03_26_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_03_26_00_world_creature_template.sql diff --git a/sql/updates/world/2012_03_26_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql index 0a5c90f798f..0a5c90f798f 100644 --- a/sql/updates/world/2012_03_26_01_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql diff --git a/sql/updates/world/2012_03_27_00_world_misc.sql b/sql/old/3.3.5a/2012_03_27_00_world_misc.sql index 132c91b81d7..132c91b81d7 100644 --- a/sql/updates/world/2012_03_27_00_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_27_00_world_misc.sql diff --git a/sql/updates/world/2012_03_27_01_world_misc.sql b/sql/old/3.3.5a/2012_03_27_01_world_misc.sql index 38c11c8ae65..38c11c8ae65 100644 --- a/sql/updates/world/2012_03_27_01_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_27_01_world_misc.sql diff --git a/sql/updates/world/2012_03_27_02_world_misc.sql b/sql/old/3.3.5a/2012_03_27_02_world_misc.sql index f83a98b8100..f83a98b8100 100644 --- a/sql/updates/world/2012_03_27_02_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_27_02_world_misc.sql diff --git a/sql/updates/world/2012_03_27_03_world_misc.sql b/sql/old/3.3.5a/2012_03_27_03_world_misc.sql index aba847dbc3f..aba847dbc3f 100644 --- a/sql/updates/world/2012_03_27_03_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_27_03_world_misc.sql diff --git a/sql/updates/world/2012_03_27_04_world_misc.sql b/sql/old/3.3.5a/2012_03_27_04_world_misc.sql index e85350476c9..e85350476c9 100644 --- a/sql/updates/world/2012_03_27_04_world_misc.sql +++ b/sql/old/3.3.5a/2012_03_27_04_world_misc.sql diff --git a/sql/updates/auth/2012_03_28_00_auth_account.sql b/sql/old/3.3.5a/2012_03_28_00_auth_account.sql index 199baac5178..199baac5178 100644 --- a/sql/updates/auth/2012_03_28_00_auth_account.sql +++ b/sql/old/3.3.5a/2012_03_28_00_auth_account.sql diff --git a/sql/updates/auth/2012_03_28_01_auth_account_access.sql b/sql/old/3.3.5a/2012_03_28_01_auth_account_access.sql index 456dbf6c104..456dbf6c104 100644 --- a/sql/updates/auth/2012_03_28_01_auth_account_access.sql +++ b/sql/old/3.3.5a/2012_03_28_01_auth_account_access.sql diff --git a/sql/updates/world/2012_03_28_01_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_03_28_01_world_spell_bonus_data.sql index e150cad1c2e..e150cad1c2e 100644 --- a/sql/updates/world/2012_03_28_01_world_spell_bonus_data.sql +++ b/sql/old/3.3.5a/2012_03_28_01_world_spell_bonus_data.sql diff --git a/sql/updates/auth/2012_03_28_02_auth_account_banned.sql b/sql/old/3.3.5a/2012_03_28_02_auth_account_banned.sql index 917cea1a684..917cea1a684 100644 --- a/sql/updates/auth/2012_03_28_02_auth_account_banned.sql +++ b/sql/old/3.3.5a/2012_03_28_02_auth_account_banned.sql diff --git a/sql/updates/auth/2012_03_28_03_auth_ip_banned.sql b/sql/old/3.3.5a/2012_03_28_03_auth_ip_banned.sql index 2e754effc60..2e754effc60 100644 --- a/sql/updates/auth/2012_03_28_03_auth_ip_banned.sql +++ b/sql/old/3.3.5a/2012_03_28_03_auth_ip_banned.sql diff --git a/sql/updates/auth/2012_03_28_04_auth_logs.sql b/sql/old/3.3.5a/2012_03_28_04_auth_logs.sql index 4c837a47ed1..4c837a47ed1 100644 --- a/sql/updates/auth/2012_03_28_04_auth_logs.sql +++ b/sql/old/3.3.5a/2012_03_28_04_auth_logs.sql diff --git a/sql/updates/auth/2012_03_28_05_auth_realmcharacters.sql b/sql/old/3.3.5a/2012_03_28_05_auth_realmcharacters.sql index e50b3c3f331..e50b3c3f331 100644 --- a/sql/updates/auth/2012_03_28_05_auth_realmcharacters.sql +++ b/sql/old/3.3.5a/2012_03_28_05_auth_realmcharacters.sql diff --git a/sql/updates/auth/2012_03_28_06_auth_realmlist.sql b/sql/old/3.3.5a/2012_03_28_06_auth_realmlist.sql index 725702a9803..725702a9803 100644 --- a/sql/updates/auth/2012_03_28_06_auth_realmlist.sql +++ b/sql/old/3.3.5a/2012_03_28_06_auth_realmlist.sql diff --git a/sql/updates/auth/2012_03_28_07_auth_uptime.sql b/sql/old/3.3.5a/2012_03_28_07_auth_uptime.sql index 0ea4e3321df..0ea4e3321df 100644 --- a/sql/updates/auth/2012_03_28_07_auth_uptime.sql +++ b/sql/old/3.3.5a/2012_03_28_07_auth_uptime.sql diff --git a/sql/updates/world/2012_03_30_00_world_smart_scripts.sql b/sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql index 3ec709d76c1..3ec709d76c1 100644 --- a/sql/updates/world/2012_03_30_00_world_smart_scripts.sql +++ b/sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql diff --git a/sql/updates/world/2012_03_31_00_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql index a817cdccf50..a817cdccf50 100644 --- a/sql/updates/world/2012_03_31_00_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql diff --git a/sql/updates/auth/2012_04_01_00_auth_realmlist.sql b/sql/old/3.3.5a/2012_04_01_00_auth_realmlist.sql index e2e1efaf993..e2e1efaf993 100644 --- a/sql/updates/auth/2012_04_01_00_auth_realmlist.sql +++ b/sql/old/3.3.5a/2012_04_01_00_auth_realmlist.sql diff --git a/sql/updates/world/2012_04_01_00_world_creature.sql b/sql/old/3.3.5a/2012_04_01_00_world_creature.sql index f6a42a6ef08..f6a42a6ef08 100644 --- a/sql/updates/world/2012_04_01_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_04_01_00_world_creature.sql diff --git a/sql/updates/world/2012_04_01_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_01_00_world_spell_script_names.sql index 9d37f6ad4cb..9d37f6ad4cb 100644 --- a/sql/updates/world/2012_04_01_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_01_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_01_01_world_creature.sql b/sql/old/3.3.5a/2012_04_01_01_world_creature.sql index f6dff34cfa9..f6dff34cfa9 100644 --- a/sql/updates/world/2012_04_01_01_world_creature.sql +++ b/sql/old/3.3.5a/2012_04_01_01_world_creature.sql diff --git a/sql/updates/world/2012_04_01_02_world_spell_group_stack_rules.sql b/sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql index d42afd1d955..d42afd1d955 100644 --- a/sql/updates/world/2012_04_01_02_world_spell_group_stack_rules.sql +++ b/sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql diff --git a/sql/updates/world/2012_04_01_03_world_trainers.sql b/sql/old/3.3.5a/2012_04_01_03_world_trainers.sql index 1edc9ae09af..1edc9ae09af 100644 --- a/sql/updates/world/2012_04_01_03_world_trainers.sql +++ b/sql/old/3.3.5a/2012_04_01_03_world_trainers.sql diff --git a/sql/updates/world/2012_04_01_04_world_conditions.sql b/sql/old/3.3.5a/2012_04_01_04_world_conditions.sql index e84307e0b05..e84307e0b05 100644 --- a/sql/updates/world/2012_04_01_04_world_conditions.sql +++ b/sql/old/3.3.5a/2012_04_01_04_world_conditions.sql diff --git a/sql/updates/world/2012_04_01_05_world_creature_template.sql b/sql/old/3.3.5a/2012_04_01_05_world_creature_template.sql index a4d13f1513a..a4d13f1513a 100644 --- a/sql/updates/world/2012_04_01_05_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_01_05_world_creature_template.sql diff --git a/sql/updates/world/2012_04_01_06_world_sai.sql b/sql/old/3.3.5a/2012_04_01_06_world_sai.sql index 9b8857da1e4..9b8857da1e4 100644 --- a/sql/updates/world/2012_04_01_06_world_sai.sql +++ b/sql/old/3.3.5a/2012_04_01_06_world_sai.sql diff --git a/sql/updates/world/2012_04_01_07_world_misc.sql b/sql/old/3.3.5a/2012_04_01_07_world_misc.sql index 346627fd88b..346627fd88b 100644 --- a/sql/updates/world/2012_04_01_07_world_misc.sql +++ b/sql/old/3.3.5a/2012_04_01_07_world_misc.sql diff --git a/sql/updates/world/2012_04_03_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_03_00_world_spell_script_names.sql index 70f675daa20..70f675daa20 100644 --- a/sql/updates/world/2012_04_03_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_03_00_world_spell_script_names.sql diff --git a/sql/updates/auth/2012_04_04_00_auth_realmlist.sql b/sql/old/3.3.5a/2012_04_04_00_auth_realmlist.sql index 18f2d7b3d4c..18f2d7b3d4c 100644 --- a/sql/updates/auth/2012_04_04_00_auth_realmlist.sql +++ b/sql/old/3.3.5a/2012_04_04_00_auth_realmlist.sql diff --git a/sql/updates/world/2012_04_04_00_world_conditions.sql b/sql/old/3.3.5a/2012_04_04_00_world_conditions.sql index 55cab4ca730..55cab4ca730 100644 --- a/sql/updates/world/2012_04_04_00_world_conditions.sql +++ b/sql/old/3.3.5a/2012_04_04_00_world_conditions.sql diff --git a/sql/updates/world/2012_04_04_01_world_spell_dbc.sql b/sql/old/3.3.5a/2012_04_04_01_world_spell_dbc.sql index 7eccdf811e4..7eccdf811e4 100644 --- a/sql/updates/world/2012_04_04_01_world_spell_dbc.sql +++ b/sql/old/3.3.5a/2012_04_04_01_world_spell_dbc.sql diff --git a/sql/updates/world/2012_04_05_00_world_gameobject_template.sql b/sql/old/3.3.5a/2012_04_05_00_world_gameobject_template.sql index d50c4ad8d1c..d50c4ad8d1c 100644 --- a/sql/updates/world/2012_04_05_00_world_gameobject_template.sql +++ b/sql/old/3.3.5a/2012_04_05_00_world_gameobject_template.sql diff --git a/sql/updates/world/2012_04_05_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql index 43f6760e8d6..43f6760e8d6 100644 --- a/sql/updates/world/2012_04_05_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_05_01_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_05_01_world_spell_proc_event.sql index 076f97b8736..076f97b8736 100644 --- a/sql/updates/world/2012_04_05_01_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_05_01_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_06_00_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_06_00_world_spell_proc_event.sql index 0fba3bb46d6..0fba3bb46d6 100644 --- a/sql/updates/world/2012_04_06_00_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_06_00_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_06_01_world_spell_dbc.sql b/sql/old/3.3.5a/2012_04_06_01_world_spell_dbc.sql index c0dc38ebf83..c0dc38ebf83 100644 --- a/sql/updates/world/2012_04_06_01_world_spell_dbc.sql +++ b/sql/old/3.3.5a/2012_04_06_01_world_spell_dbc.sql diff --git a/sql/updates/world/2012_04_06_02_world_gameobject_template.sql b/sql/old/3.3.5a/2012_04_06_02_world_gameobject_template.sql index 5089579998d..5089579998d 100644 --- a/sql/updates/world/2012_04_06_02_world_gameobject_template.sql +++ b/sql/old/3.3.5a/2012_04_06_02_world_gameobject_template.sql diff --git a/sql/updates/world/2012_04_06_03_world_spell_dbc.sql b/sql/old/3.3.5a/2012_04_06_03_world_spell_dbc.sql index 90ac4ac0f51..90ac4ac0f51 100644 --- a/sql/updates/world/2012_04_06_03_world_spell_dbc.sql +++ b/sql/old/3.3.5a/2012_04_06_03_world_spell_dbc.sql diff --git a/sql/updates/world/2012_04_06_04_world_page_text.sql b/sql/old/3.3.5a/2012_04_06_04_world_page_text.sql index 97c0d9afe2d..97c0d9afe2d 100644 --- a/sql/updates/world/2012_04_06_04_world_page_text.sql +++ b/sql/old/3.3.5a/2012_04_06_04_world_page_text.sql diff --git a/sql/updates/characters/2012_04_07_00_characters_lag_reports.sql b/sql/old/3.3.5a/2012_04_07_00_characters_lag_reports.sql index 151ace1c976..151ace1c976 100644 --- a/sql/updates/characters/2012_04_07_00_characters_lag_reports.sql +++ b/sql/old/3.3.5a/2012_04_07_00_characters_lag_reports.sql diff --git a/sql/updates/world/2012_04_07_00_world_gameobject.sql b/sql/old/3.3.5a/2012_04_07_00_world_gameobject.sql index c63fc753d32..c63fc753d32 100644 --- a/sql/updates/world/2012_04_07_00_world_gameobject.sql +++ b/sql/old/3.3.5a/2012_04_07_00_world_gameobject.sql diff --git a/sql/updates/world/2012_04_07_01_world_game_event.sql b/sql/old/3.3.5a/2012_04_07_01_world_game_event.sql index 7b74a90b49d..7b74a90b49d 100644 --- a/sql/updates/world/2012_04_07_01_world_game_event.sql +++ b/sql/old/3.3.5a/2012_04_07_01_world_game_event.sql diff --git a/sql/updates/world/2012_04_07_02_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_07_02_world_spell_proc_event.sql index 62ef49bc657..62ef49bc657 100644 --- a/sql/updates/world/2012_04_07_02_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_07_02_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_08_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_08_00_world_spell_script_names.sql index ca97f419e11..ca97f419e11 100644 --- a/sql/updates/world/2012_04_08_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_08_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_08_01_world_creature_template.sql b/sql/old/3.3.5a/2012_04_08_01_world_creature_template.sql index c6665729b75..c6665729b75 100644 --- a/sql/updates/world/2012_04_08_01_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_08_01_world_creature_template.sql diff --git a/sql/updates/world/2012_04_08_02_world_spell_dbc.sql b/sql/old/3.3.5a/2012_04_08_02_world_spell_dbc.sql index 5775428668d..5775428668d 100644 --- a/sql/updates/world/2012_04_08_02_world_spell_dbc.sql +++ b/sql/old/3.3.5a/2012_04_08_02_world_spell_dbc.sql diff --git a/sql/updates/world/2012_04_08_02_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_08_02_world_spell_script_names.sql index dd23c9ef560..dd23c9ef560 100644 --- a/sql/updates/world/2012_04_08_02_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_08_02_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_08_03_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_08_03_world_spell_script_names.sql index 744a8bad10d..744a8bad10d 100644 --- a/sql/updates/world/2012_04_08_03_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_08_03_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_12_00_world_creature_template.sql b/sql/old/3.3.5a/2012_04_12_00_world_creature_template.sql index ef4596939f5..ef4596939f5 100644 --- a/sql/updates/world/2012_04_12_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_12_00_world_creature_template.sql diff --git a/sql/updates/world/2012_04_12_01_world_creature_template.sql b/sql/old/3.3.5a/2012_04_12_01_world_creature_template.sql index bfe7b698ae9..bfe7b698ae9 100644 --- a/sql/updates/world/2012_04_12_01_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_12_01_world_creature_template.sql diff --git a/sql/updates/world/2012_04_12_02_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_04_12_02_world_spell_bonus_data.sql index db35f5d97ee..db35f5d97ee 100644 --- a/sql/updates/world/2012_04_12_02_world_spell_bonus_data.sql +++ b/sql/old/3.3.5a/2012_04_12_02_world_spell_bonus_data.sql diff --git a/sql/updates/world/2012_04_12_03_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_04_12_03_world_spell_bonus_data.sql index d2262e52e98..d2262e52e98 100644 --- a/sql/updates/world/2012_04_12_03_world_spell_bonus_data.sql +++ b/sql/old/3.3.5a/2012_04_12_03_world_spell_bonus_data.sql diff --git a/sql/updates/world/2012_04_12_04_world_creature_template.sql b/sql/old/3.3.5a/2012_04_12_04_world_creature_template.sql index 35664ec5198..35664ec5198 100644 --- a/sql/updates/world/2012_04_12_04_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_12_04_world_creature_template.sql diff --git a/sql/updates/world/2012_04_12_05_world_command.sql b/sql/old/3.3.5a/2012_04_12_05_world_command.sql index 8eb87155cb2..8eb87155cb2 100644 --- a/sql/updates/world/2012_04_12_05_world_command.sql +++ b/sql/old/3.3.5a/2012_04_12_05_world_command.sql diff --git a/sql/updates/world/2012_04_13_00_world_sai.sql b/sql/old/3.3.5a/2012_04_13_00_world_sai.sql index 0fd4bdddd9b..0fd4bdddd9b 100644 --- a/sql/updates/world/2012_04_13_00_world_sai.sql +++ b/sql/old/3.3.5a/2012_04_13_00_world_sai.sql diff --git a/sql/updates/world/2012_04_13_01_world_misc.sql b/sql/old/3.3.5a/2012_04_13_01_world_misc.sql index e4d04449a3f..e4d04449a3f 100644 --- a/sql/updates/world/2012_04_13_01_world_misc.sql +++ b/sql/old/3.3.5a/2012_04_13_01_world_misc.sql diff --git a/sql/updates/world/2012_04_13_02_world_misc.sql b/sql/old/3.3.5a/2012_04_13_02_world_misc.sql index 7c71af78cd7..7c71af78cd7 100644 --- a/sql/updates/world/2012_04_13_02_world_misc.sql +++ b/sql/old/3.3.5a/2012_04_13_02_world_misc.sql diff --git a/sql/updates/world/2012_04_13_03_world_bg_template.sql b/sql/old/3.3.5a/2012_04_13_03_world_bg_template.sql index a426d7c6831..a426d7c6831 100644 --- a/sql/updates/world/2012_04_13_03_world_bg_template.sql +++ b/sql/old/3.3.5a/2012_04_13_03_world_bg_template.sql diff --git a/sql/updates/world/2012_04_13_04_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_13_04_world_spell_proc_event.sql index 3ea68187687..3ea68187687 100644 --- a/sql/updates/world/2012_04_13_04_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_13_04_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_04_14_00_world_gameobject_loot_template.sql index dea4b771068..dea4b771068 100644 --- a/sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_14_00_world_gameobject_loot_template.sql diff --git a/sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql index a3dd0c39865..a3dd0c39865 100644 --- a/sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql diff --git a/sql/updates/world/2012_04_14_02_world_creature_template_addon.sql b/sql/old/3.3.5a/2012_04_14_02_world_creature_template_addon.sql index 6aaa7da383e..6aaa7da383e 100644 --- a/sql/updates/world/2012_04_14_02_world_creature_template_addon.sql +++ b/sql/old/3.3.5a/2012_04_14_02_world_creature_template_addon.sql diff --git a/sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_04_14_03_world_spell_bonus_data.sql index ee081c17078..ee081c17078 100644 --- a/sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql +++ b/sql/old/3.3.5a/2012_04_14_03_world_spell_bonus_data.sql diff --git a/sql/updates/world/2012_04_14_04_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_14_04_world_spell_proc_event.sql index 78a869e655a..78a869e655a 100644 --- a/sql/updates/world/2012_04_14_04_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_14_04_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_14_05_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_14_05_world_spell_proc_event.sql index 8cb2b1d3d2b..8cb2b1d3d2b 100644 --- a/sql/updates/world/2012_04_14_05_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_14_05_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_16_00_world_game_event.sql b/sql/old/3.3.5a/2012_04_16_00_world_game_event.sql index 1dc3fe3ad91..1dc3fe3ad91 100644 --- a/sql/updates/world/2012_04_16_00_world_game_event.sql +++ b/sql/old/3.3.5a/2012_04_16_00_world_game_event.sql diff --git a/sql/updates/world/2012_04_17_00_world_creature.sql b/sql/old/3.3.5a/2012_04_17_00_world_creature.sql index ebf0fb42a59..ebf0fb42a59 100644 --- a/sql/updates/world/2012_04_17_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_04_17_00_world_creature.sql diff --git a/sql/updates/world/2012_04_18_00_world_npc_spellclick_spells.sql b/sql/old/3.3.5a/2012_04_18_00_world_npc_spellclick_spells.sql index 3bad860290b..3bad860290b 100644 --- a/sql/updates/world/2012_04_18_00_world_npc_spellclick_spells.sql +++ b/sql/old/3.3.5a/2012_04_18_00_world_npc_spellclick_spells.sql diff --git a/sql/updates/world/2012_04_18_01_world_creature.sql b/sql/old/3.3.5a/2012_04_18_01_world_creature.sql index e2d6bdac95b..e2d6bdac95b 100644 --- a/sql/updates/world/2012_04_18_01_world_creature.sql +++ b/sql/old/3.3.5a/2012_04_18_01_world_creature.sql diff --git a/sql/updates/world/2012_04_18_02_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql index 4ed922060d9..4ed922060d9 100644 --- a/sql/updates/world/2012_04_18_02_world_reference_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql diff --git a/sql/updates/world/2012_04_18_03_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_18_03_world_creature_loot_template.sql index 5ad26809cdf..5ad26809cdf 100644 --- a/sql/updates/world/2012_04_18_03_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_18_03_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql b/sql/old/3.3.5a/2012_04_18_04_world_pickpocketing_loot_template.sql index ab1c562f7dd..ab1c562f7dd 100644 --- a/sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_18_04_world_pickpocketing_loot_template.sql diff --git a/sql/updates/world/2012_04_18_05_world_conditions.sql b/sql/old/3.3.5a/2012_04_18_05_world_conditions.sql index ecf80f270a3..ecf80f270a3 100644 --- a/sql/updates/world/2012_04_18_05_world_conditions.sql +++ b/sql/old/3.3.5a/2012_04_18_05_world_conditions.sql diff --git a/sql/updates/world/2012_04_18_06_world_creature_template.sql b/sql/old/3.3.5a/2012_04_18_06_world_creature_template.sql index 8c167c2ffa1..8c167c2ffa1 100644 --- a/sql/updates/world/2012_04_18_06_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_18_06_world_creature_template.sql diff --git a/sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql b/sql/old/3.3.5a/2012_04_18_07_world_fishing_loot_template.sql index 6c39cc95b48..6c39cc95b48 100644 --- a/sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_18_07_world_fishing_loot_template.sql diff --git a/sql/updates/world/2012_04_18_08_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_18_08_world_creature_loot_template.sql index 4b00685ed55..4b00685ed55 100644 --- a/sql/updates/world/2012_04_18_08_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_18_08_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_19_00_world_creature_template.sql b/sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql index e9abd40095e..e9abd40095e 100644 --- a/sql/updates/world/2012_04_19_00_world_creature_template.sql +++ b/sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql diff --git a/sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql b/sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql index 997b16ff65d..997b16ff65d 100644 --- a/sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql diff --git a/sql/updates/world/2012_04_19_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql index 336cd61c0eb..336cd61c0eb 100644 --- a/sql/updates/world/2012_04_19_02_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_19_03_world_instance_ulduar.sql b/sql/old/3.3.5a/2012_04_19_03_world_instance_ulduar.sql index a39ed9c01d5..a39ed9c01d5 100644 --- a/sql/updates/world/2012_04_19_03_world_instance_ulduar.sql +++ b/sql/old/3.3.5a/2012_04_19_03_world_instance_ulduar.sql diff --git a/sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql index 47a22d519d0..47a22d519d0 100644 --- a/sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql diff --git a/sql/updates/world/2012_04_20_01_world_item_loot_template.sql b/sql/old/3.3.5a/2012_04_20_01_world_item_loot_template.sql index af52ade0b25..af52ade0b25 100644 --- a/sql/updates/world/2012_04_20_01_world_item_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_20_01_world_item_loot_template.sql diff --git a/sql/updates/world/2012_04_20_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_20_02_world_creature_loot_template.sql index 09b5beee75c..09b5beee75c 100644 --- a/sql/updates/world/2012_04_20_02_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_20_02_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_20_03_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_20_03_world_creature_loot_template.sql index a0b586ee0d9..a0b586ee0d9 100644 --- a/sql/updates/world/2012_04_20_03_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_20_03_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_20_04_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql index 73e01efa23e..73e01efa23e 100644 --- a/sql/updates/world/2012_04_20_04_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_20_05_gameobject_template.sql b/sql/old/3.3.5a/2012_04_20_05_gameobject_template.sql index 24400b16a5c..24400b16a5c 100644 --- a/sql/updates/world/2012_04_20_05_gameobject_template.sql +++ b/sql/old/3.3.5a/2012_04_20_05_gameobject_template.sql diff --git a/sql/updates/world/2012_04_21_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_21_00_world_spell_script_names.sql index e61ef4aec74..e61ef4aec74 100644 --- a/sql/updates/world/2012_04_21_00_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_21_00_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_22_00_world_sai.sql b/sql/old/3.3.5a/2012_04_22_00_world_sai.sql index f223883c8a7..f223883c8a7 100644 --- a/sql/updates/world/2012_04_22_00_world_sai.sql +++ b/sql/old/3.3.5a/2012_04_22_00_world_sai.sql diff --git a/sql/updates/world/2012_04_23_00_world_creatures.sql b/sql/old/3.3.5a/2012_04_23_00_world_creatures.sql index 3730fabf552..3730fabf552 100644 --- a/sql/updates/world/2012_04_23_00_world_creatures.sql +++ b/sql/old/3.3.5a/2012_04_23_00_world_creatures.sql diff --git a/sql/updates/world/2012_04_23_01_world_conditions.sql b/sql/old/3.3.5a/2012_04_23_01_world_conditions.sql index c731426aa3f..c731426aa3f 100644 --- a/sql/updates/world/2012_04_23_01_world_conditions.sql +++ b/sql/old/3.3.5a/2012_04_23_01_world_conditions.sql diff --git a/sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql b/sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql index 6ea44d92722..6ea44d92722 100644 --- a/sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql diff --git a/sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql b/sql/old/3.3.5a/2012_04_23_03_world_skinning_loot_template.sql index a1aa9e070f2..a1aa9e070f2 100644 --- a/sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_23_03_world_skinning_loot_template.sql diff --git a/sql/updates/world/2012_04_23_04_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_23_04_world_creature_loot_template.sql index 94d2b092d12..94d2b092d12 100644 --- a/sql/updates/world/2012_04_23_04_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_23_04_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_23_05_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_23_05_world_creature_loot_template.sql index ddf0780d362..ddf0780d362 100644 --- a/sql/updates/world/2012_04_23_05_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_23_05_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_24_00_world_command.sql b/sql/old/3.3.5a/2012_04_24_00_world_command.sql index 25912392347..25912392347 100644 --- a/sql/updates/world/2012_04_24_00_world_command.sql +++ b/sql/old/3.3.5a/2012_04_24_00_world_command.sql diff --git a/sql/updates/world/2012_04_24_01_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_24_01_world_spell_proc_event.sql index 6e997931bb5..6e997931bb5 100644 --- a/sql/updates/world/2012_04_24_01_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_24_01_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_24_02_world_warden_checks.sql b/sql/old/3.3.5a/2012_04_24_02_world_warden_checks.sql index 74539f99fb3..74539f99fb3 100644 --- a/sql/updates/world/2012_04_24_02_world_warden_checks.sql +++ b/sql/old/3.3.5a/2012_04_24_02_world_warden_checks.sql diff --git a/sql/updates/world/2012_04_24_03_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_24_03_world_spell_script_names.sql index a53d8bd585c..a53d8bd585c 100644 --- a/sql/updates/world/2012_04_24_03_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_24_03_world_spell_script_names.sql diff --git a/sql/updates/world/2012_04_24_04_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql index 5ba6f24ccf8..5ba6f24ccf8 100644 --- a/sql/updates/world/2012_04_24_04_world_spell_proc_event.sql +++ b/sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql diff --git a/sql/updates/world/2012_04_24_05_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_24_05_world_creature_loot_template.sql index c524999b492..c524999b492 100644 --- a/sql/updates/world/2012_04_24_05_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_24_05_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_04_24_06_world_misc.sql b/sql/old/3.3.5a/2012_04_24_06_world_misc.sql index 2e095a76cd9..2e095a76cd9 100644 --- a/sql/updates/world/2012_04_24_06_world_misc.sql +++ b/sql/old/3.3.5a/2012_04_24_06_world_misc.sql diff --git a/sql/updates/world/2012_04_25_00_world_misc.sql b/sql/old/3.3.5a/2012_04_25_00_world_misc.sql index 3d2f20fdc8c..3d2f20fdc8c 100644 --- a/sql/updates/world/2012_04_25_00_world_misc.sql +++ b/sql/old/3.3.5a/2012_04_25_00_world_misc.sql diff --git a/sql/updates/world/2012_04_25_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_25_01_world_spell_script_names.sql index e42f1979229..7b7135860ab 100644 --- a/sql/updates/world/2012_04_25_01_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_25_01_world_spell_script_names.sql @@ -1,3 +1,3 @@ DELETE FROM `spell_script_names` WHERE `spell_id` = 33110; INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES -(33110,'spell_pri_prayer_of_mending_heal');
\ No newline at end of file +(33110,'spell_pri_prayer_of_mending_heal'); diff --git a/sql/updates/world/2012_04_25_02_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_25_02_world_spell_script_names.sql index ea6b95559c6..ad63bc87837 100644 --- a/sql/updates/world/2012_04_25_02_world_spell_script_names.sql +++ b/sql/old/3.3.5a/2012_04_25_02_world_spell_script_names.sql @@ -8,4 +8,4 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES (51592, 'spell_gen_despawn_self'), (51910, 'spell_gen_despawn_self'), (52267, 'spell_gen_despawn_self'), -(54420, 'spell_gen_despawn_self');
\ No newline at end of file +(54420, 'spell_gen_despawn_self'); diff --git a/sql/updates/world/2012_04_25_03_world_spell_group.sql b/sql/old/3.3.5a/2012_04_25_03_world_spell_group.sql index a6fa90ad41d..a6fa90ad41d 100644 --- a/sql/updates/world/2012_04_25_03_world_spell_group.sql +++ b/sql/old/3.3.5a/2012_04_25_03_world_spell_group.sql diff --git a/sql/updates/world/2012_04_26_00_world_conditions.sql b/sql/old/3.3.5a/2012_04_26_00_world_conditions.sql index 8d525cad057..8d525cad057 100644 --- a/sql/updates/world/2012_04_26_00_world_conditions.sql +++ b/sql/old/3.3.5a/2012_04_26_00_world_conditions.sql diff --git a/sql/updates/world/2012_04_26_01_world_smart_scripts.sql b/sql/old/3.3.5a/2012_04_26_01_world_smart_scripts.sql index e90e7b58433..e90e7b58433 100644 --- a/sql/updates/world/2012_04_26_01_world_smart_scripts.sql +++ b/sql/old/3.3.5a/2012_04_26_01_world_smart_scripts.sql diff --git a/sql/updates/world/2012_04_27_00_world_instance_icc.sql b/sql/old/3.3.5a/2012_04_27_00_world_instance_icc.sql index 6738e4904ab..6738e4904ab 100644 --- a/sql/updates/world/2012_04_27_00_world_instance_icc.sql +++ b/sql/old/3.3.5a/2012_04_27_00_world_instance_icc.sql diff --git a/sql/updates/world/2012_04_28_00_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql index b59ba90fdbc..07c53a8f7c9 100644 --- a/sql/updates/world/2012_04_28_00_world_reference_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql @@ -155,4 +155,4 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot (@Yogg25,45693,100,16,0,1,1); -- Mimiron's Head -- Cleanups -DELETE FROM `conditions` WHERE `SourceEntry`=45897 AND `SourceGroup`=33955;
\ No newline at end of file +DELETE FROM `conditions` WHERE `SourceEntry`=45897 AND `SourceGroup`=33955; diff --git a/sql/updates/world/2012_04_28_01_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_04_28_01_world_reference_loot_template.sql index e46c45e497a..e46c45e497a 100644 --- a/sql/updates/world/2012_04_28_01_world_reference_loot_template.sql +++ b/sql/old/3.3.5a/2012_04_28_01_world_reference_loot_template.sql diff --git a/sql/updates/world/2012_05_01_00_world_creature.sql b/sql/old/3.3.5a/2012_05_01_00_world_creature.sql index c0509d0d132..c0509d0d132 100644 --- a/sql/updates/world/2012_05_01_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_05_01_00_world_creature.sql diff --git a/sql/updates/world/2012_05_02_00_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_05_02_00_world_creature_loot_template.sql index f0721e63635..f0721e63635 100644 --- a/sql/updates/world/2012_05_02_00_world_creature_loot_template.sql +++ b/sql/old/3.3.5a/2012_05_02_00_world_creature_loot_template.sql diff --git a/sql/updates/world/2012_05_03_00_world_creature.sql b/sql/old/3.3.5a/2012_05_03_00_world_creature.sql index d906dba78bc..d906dba78bc 100644 --- a/sql/updates/world/2012_05_03_00_world_creature.sql +++ b/sql/old/3.3.5a/2012_05_03_00_world_creature.sql diff --git a/sql/updates/world/2012_05_03_01_world_cos_misc.sql b/sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql index 6c2ea6d3a95..6c2ea6d3a95 100644 --- a/sql/updates/world/2012_05_03_01_world_cos_misc.sql +++ b/sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql diff --git a/sql/updates/world/2012_05_03_02_world_quest_template.sql b/sql/old/3.3.5a/2012_05_03_02_world_quest_template.sql index 49953bd2166..49953bd2166 100644 --- a/sql/updates/world/2012_05_03_02_world_quest_template.sql +++ b/sql/old/3.3.5a/2012_05_03_02_world_quest_template.sql diff --git a/sql/updates/world/2012_05_03_03_world_creature_questrelation.sql b/sql/old/3.3.5a/2012_05_03_03_world_creature_questrelation.sql index 1da4f6d29ad..1da4f6d29ad 100644 --- a/sql/updates/world/2012_05_03_03_world_creature_questrelation.sql +++ b/sql/old/3.3.5a/2012_05_03_03_world_creature_questrelation.sql diff --git a/sql/updates/world/2012_05_03_04_world_game_event_creature_quest.sql b/sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql index 62fd4415549..62fd4415549 100644 --- a/sql/updates/world/2012_05_03_04_world_game_event_creature_quest.sql +++ b/sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql diff --git a/sql/old/3.3.5a/2012_05_04_00_world_waypoints.sql b/sql/old/3.3.5a/2012_05_04_00_world_waypoints.sql new file mode 100644 index 00000000000..a07bde59d49 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_04_00_world_waypoints.sql @@ -0,0 +1,137 @@ +-- Thrallmar Grunt pathing +SET @NPC := 57505; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=168.3949,`position_y`=2641.357,`position_z`=86.32077 WHERE `guid`=@NPC; +UPDATE `creature_addon` SET `path_id`=@PATH WHERE `guid`=@NPC; +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,168.3949,2641.357,86.32077,0,0,0,100,0), +(@PATH,2,186.5067,2615.882,87.28357,0,0,0,100,0), +(@PATH,3,188.9113,2601.655,87.28357,0,0,0,100,0), +(@PATH,4,198.3909,2602.661,87.28357,0,0,0,100,0), +(@PATH,5,201.5686,2609.845,87.28357,0,0,0,100,0), +(@PATH,6,187.2484,2616.44,87.28357,0,0,0,100,0), +(@PATH,7,168.7871,2641.268,86.32077,0,0,0,100,0), +(@PATH,8,155.2003,2681.998,84.82113,0,0,0,100,0), +(@PATH,9,194.6133,2692.07,90.61374,0,0,0,100,0), +(@PATH,10,215.4427,2693.589,90.69872,0,0,0,100,0), +(@PATH,11,219.0203,2692.25,90.69665,0,0,0,100,0), +(@PATH,12,225.5117,2680.063,90.68996,0,0,0,100,0), +(@PATH,13,235.309,2679.308,90.69373,0,0,0,100,0), +(@PATH,14,246.9184,2682.646,90.70419,0,0,0,100,0), +(@PATH,15,252.4411,2688.479,90.70386,0,0,0,100,0), +(@PATH,16,255.0155,2699.197,90.70283,0,0,0,100,0), +(@PATH,17,251.5234,2707.998,90.70486,0,0,0,100,0), +(@PATH,18,243.2346,2712.791,90.70392,0,0,0,100,0), +(@PATH,19,231.9871,2713.626,90.70399,0,0,0,100,0), +(@PATH,20,221.1457,2709.591,90.69753,0,0,0,100,0), +(@PATH,21,218.8803,2695.845,90.69318,0,0,0,100,0), +(@PATH,22,215.4517,2693.612,90.69869,0,0,0,100,0), +(@PATH,23,194.7944,2692.039,90.65273,0,0,0,100,0), +(@PATH,24,175.8115,2687.591,86.68189,0,0,0,100,0), +(@PATH,25,155.2143,2682.375,84.82113,0,0,0,100,0), +(@PATH,26,131.8727,2679.832,84.56969,0,0,0,100,0), +(@PATH,27,130.0859,2666.262,84.1262,0,0,0,100,0), +(@PATH,28,153.1291,2650.22,86.15128,0,0,0,100,0); + +-- Remove dup Thrallmar Grunt spawn +DELETE FROM `creature` WHERE `guid`=57532; +DELETE FROM `creature_addon` WHERE `guid`=57532; + +-- Bat Rider Guard pathing +SET @NPC := 54840; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=156.9029,`position_y`=2554.784,`position_z`=170.8949 WHERE `guid`=@NPC; +UPDATE `creature_addon` SET `path_id`=@PATH WHERE `guid`=@NPC; +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,156.9029,2554.784,170.8949,0,0,0,100,0), +(@PATH,2,52.51677,2602.816,139.7838,0,0,0,100,0), +(@PATH,3,42.10146,2627.056,139.7838,0,0,0,100,0), +(@PATH,4,37.17329,2663.729,139.7838,0,0,0,100,0), +(@PATH,5,62.91933,2687.96,139.7838,0,0,0,100,0), +(@PATH,6,96.1871,2688.141,148.4226,0,0,0,100,0), +(@PATH,7,129.818,2690.786,151.256,0,0,0,100,0), +(@PATH,8,165.6888,2715.398,170.8949,0,0,0,100,0), +(@PATH,9,199.7751,2744.93,170.8949,0,0,0,100,0), +(@PATH,10,246.0857,2761.154,170.8949,0,0,0,100,0), +(@PATH,11,295.0904,2757.991,170.8949,0,0,0,100,0), +(@PATH,12,309.3468,2726.089,170.8949,0,0,0,100,0), +(@PATH,13,303.8448,2682.588,170.8949,0,0,0,100,0), +(@PATH,14,289.3104,2650.866,170.8949,0,0,0,100,0), +(@PATH,15,261.2743,2618.831,170.8949,0,0,0,100,0), +(@PATH,16,233.6436,2578.997,170.8949,0,0,0,100,0), +(@PATH,17,199.3375,2546.226,170.8949,0,0,0,100,0); + +-- Bat Rider Guard pathing +SET @NPC := 54841; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=65.97776,`position_y`=2661.205,`position_z`=163.6752 WHERE `guid`=@NPC; +UPDATE `creature_addon` SET `path_id`=@PATH WHERE `guid`=@NPC; +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,65.97776,2661.205,163.6752,0,0,0,100,0), +(@PATH,2,85.52612,2668.312,163.6752,0,0,0,100,0), +(@PATH,3,119.9537,2689.26,163.6752,0,0,0,100,0), +(@PATH,4,121.8238,2721.88,163.6752,0,0,0,100,0), +(@PATH,5,142.6907,2750.891,163.6752,0,0,0,100,0), +(@PATH,6,149.9812,2788.504,163.6752,0,0,0,100,0), +(@PATH,7,142.9353,2830.464,163.6752,0,0,0,100,0), +(@PATH,8,115.1711,2822.444,163.6752,0,0,0,100,0), +(@PATH,9,57.16672,2791.644,163.6752,0,0,0,100,0), +(@PATH,10,38.80463,2758.823,163.6752,0,0,0,100,0), +(@PATH,11,19.69282,2714.784,163.6752,0,0,0,100,0), +(@PATH,12,23.22027,2677.714,163.6752,0,0,0,100,0); + +-- Bat Rider Guard pathing +SET @NPC := 54842; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=263.5968,`position_y`=2694.818,`position_z`=169.7312 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,4097); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,263.5968,2694.818,169.7312,0,0,0,100,0), +(@PATH,2,184.0861,2784.899,154.4534,0,0,0,100,0), +(@PATH,3,154.2815,2754.787,154.3701,0,0,0,100,0), +(@PATH,4,127.0308,2740.488,154.3701,0,0,0,100,0), +(@PATH,5,118.0444,2706.509,154.3701,0,0,0,100,0), +(@PATH,6,115.7577,2669.386,158.6756,0,0,0,100,0), +(@PATH,7,131.4314,2622.531,162.1478,0,0,0,100,0), +(@PATH,8,154.8241,2607.207,164.4812,0,0,0,100,0), +(@PATH,9,176.3283,2571.343,168.5645,0,0,0,100,0), +(@PATH,10,221.6267,2559.683,172.1201,0,0,0,100,0), +(@PATH,11,245.392,2593.423,169.8978,0,0,0,100,0), +(@PATH,12,251.0069,2617.749,169.7312,0,0,0,100,0), +(@PATH,13,263.0581,2644.614,169.7312,0,0,0,100,0); + +-- Bat Rider Guard pathing +SET @NPC := 54843; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=62.42025,`position_y`=2785.719,`position_z`=192.1124 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,4097); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,62.42025,2785.719,192.1124,0,0,0,100,0), +(@PATH,2,159.9371,2842.977,208.279,0,0,0,100,0), +(@PATH,3,183.0578,2845.035,208.279,0,0,0,100,0), +(@PATH,4,211.2432,2864.757,214.2235,0,0,0,100,0), +(@PATH,5,238.1182,2871.979,220.9457,0,0,0,100,0), +(@PATH,6,252.9173,2853.913,220.9457,0,0,0,100,0), +(@PATH,7,255.0203,2812.634,220.9457,0,0,0,100,0), +(@PATH,8,240.4993,2780.929,220.9457,0,0,0,100,0), +(@PATH,9,195.4901,2773.965,209.3901,0,0,0,100,0), +(@PATH,10,162.1341,2742.294,212.9179,0,0,0,100,0), +(@PATH,11,125.4935,2720.611,197.9457,0,0,0,100,0), +(@PATH,12,93.49241,2699.757,192.1124,0,0,0,100,0), +(@PATH,13,58.35324,2681.49,192.1124,0,0,0,100,0), +(@PATH,14,22.8833,2715.123,192.1124,0,0,0,100,0), +(@PATH,15,30.10514,2764.5,192.1124,0,0,0,100,0); + +-- Fix Bat Rider Guard InhabitType +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=15242; + +-- Remove dup Bat Rider Guard spawns +DELETE FROM `creature` WHERE `guid` IN (54839,54844,54845); +DELETE FROM `creature_addon` WHERE `guid` IN (54839,54844,54845); diff --git a/sql/old/3.3.5a/2012_05_04_01_world_sai.sql b/sql/old/3.3.5a/2012_05_04_01_world_sai.sql new file mode 100644 index 00000000000..7021fc92548 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_04_01_world_sai.sql @@ -0,0 +1,32 @@ +-- Speech by Martik Tor'seldoi, Thrallmar +SET @ENTRY := 16577; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,30000,50000,360000,360000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Martik Tor''seldoi - OOC - Load script every 6 min ooc'), +(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,11,18100,32,0,0,0,0,1,0,0,0,0,0,0,0, 'Martik Tor''seldoi - Reset - Cast Frost Armor'), +(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi Say text 0'), +(@ENTRY*100,9,1,0,0,0,100,0,3000,3000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi emote'), +(@ENTRY*100,9,2,0,0,0,100,0,3000,3000,0,0,5,6,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi emote'), +(@ENTRY*100,9,3,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,10,57487,16578,0,0,0,0,0,'Blood Elf Pilgrim Say text 0'), +(@ENTRY*100,9,4,0,0,0,100,0,3000,3000,0,0,5,6,0,0,0,0,0,10,57487,16578,0,0,0,0,0,'Blood Elf Pilgrim emote'), +(@ENTRY*100,9,5,0,0,0,100,0,3000,3000,0,0,66,0,0,0,0,0,0,10,57487,16578,0,0,0,0,0,'Martik Tor''seldoi turn to'), +(@ENTRY*100,9,6,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi Say text 1'), +(@ENTRY*100,9,7,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,10,57487,16578,0,0,0,0,0,'Blood Elf Pilgrim Say text 1'), +(@ENTRY*100,9,8,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi Say text 2'), +(@ENTRY*100,9,9,0,0,0,100,0,3000,3000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi emote'), +(@ENTRY*100,9,10,0,0,0,100,0,3000,3000,0,0,5,273,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi emote'), +(@ENTRY*100,9,11,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,10,57487,16578,0,0,0,0,0,'Blood Elf Pilgrim Say text 2'), +(@ENTRY*100,9,12,0,0,0,100,0,1000,1000,0,0,5,15,0,0,0,0,0,9,16578,0,20,0,0,0,0,'Blood Elf Pilgrim emote'), +(@ENTRY*100,9,13,0,0,0,100,0,3000,3000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Martik Tor''seldoi turn to'); +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry` IN (16577,16578); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(16577,0,0, 'Brothers and sisters, I have been to the promised land. I have tasted in the sublim energy. I have felt bliss - bliss so engrossing and all encompassing that I was left wondering if I had stumbled upon the dreams of gods.!',12,0,100,5,0,0, 'Martik Tor''seldoi'), +(16577,1,0, 'In paradise, you merely reach out and take from the Nether.',12,0,100,1,0,0, 'Martik Tor''seldoi'), +(16577,2,0, 'From the very air! Tendrils of arcane energy light up the obsidian sky as plumes of raw magic rise up from fissures in the land. Kneel and drink from the fissure as you do from a stream or well. Pluck a tendril from the heavens as if it were an apple hanging from a branch.',12,0,100,5,0,0, 'Martik Tor''seldoi'), +(16578,0,0, 'Tell us more, Martik. What is it? What does it feel like?',12,0,100,1,0,0, 'Blood Elf Pilgrim'), +(16578,1,0, 'But how?',12,0,100,6,0,0, 'Blood Elf Pilgrim'), +(16578,2,0, '%s smiles/gasps.',16,0,100,0,0,0, 'Blood Elf Pilgrim'); diff --git a/sql/old/3.3.5a/2012_05_05_00_world_sai.sql b/sql/old/3.3.5a/2012_05_05_00_world_sai.sql new file mode 100644 index 00000000000..e03c36337af --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_00_world_sai.sql @@ -0,0 +1,205 @@ +-- Forge of Souls Trash update + +-- Npc Updates + +-- Spiteful Apparition +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=36551; +UPDATE `creature` SET `spawndist`=20,`MovementType`=1,`curhealth`=1,`curmana`=0 WHERE `id`=36551; +DELETE FROM `creature_template_addon` WHERE `entry`=36551; +INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`auras`) VALUES (36551,1, '69105 69136'); +-- Spiteful Apparition (Ambient) +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=36967; +UPDATE `creature` SET `spawndist`=20,`MovementType`=1,`curhealth`=1,`curmana`=0 WHERE `id`=36967; +DELETE FROM `creature_template_addon` WHERE `entry`=36967; +INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`auras`) VALUES (36967,1, '69663 69658'); +-- Spectral Warden +UPDATE `creature_addon` SET `auras`='69144' WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=36666); + +-- SAI Updates + +-- Spiteful Apparition SAI +SET @ENTRY := 36551; -- NPC entry +SET @SPELL1 := 41253; -- Greater Invisibility +SET @SPELL2 := 68895; -- Spite (Normal) +SET @SPELL3 := 70212; -- Spite (Heroic) +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,25,0,100,6,0,0,0,0,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Spiteful Apparition - On Reset - Cast Greater Invisibility'), +(@ENTRY,0,1,0,10,0,100,6,0,10,3000,4000,28,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Spiteful Apparition - OOC range - Remove Greater Invisibility'), +(@ENTRY,0,2,0,0,0,100,2,7000,9000,7000,9000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Spiteful Apparition - Combat - Cast Spite "Normal"'), +(@ENTRY,0,3,0,0,0,100,4,7000,9000,7000,9000,11,@SPELL3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Spiteful Apparition - Combat - Cast Spite "Heroic"'); + +-- Soulguard Reaper SAI +SET @ENTRY := 36499; -- NPC entry +SET @SPELL1 := 68797; -- Soulguard Channel +SET @SPELL2 := 69058; -- Shadow Lance +SET @SPELL3 := 69060; -- Frost Nova (Normal) +SET @SPELL4 := 70209; -- Frost Nova (Heroic) +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,7,0,0,0,0,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Reaper - OOC - Cast Soulguard Channel'), +(@ENTRY,0,1,0,0,0,100,6,5000,6000,7000,9000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Reaper - Combat - Cast Shadow Lance'), +(@ENTRY,0,2,0,0,0,100,2,7000,9000,8000,10000,11,@SPELL3,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Soulguard Reaper - Combat - Cast Frost Nova "Normal"'), +(@ENTRY,0,3,0,0,0,100,4,7000,9000,8000,10000,11,@SPELL4,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Soulguard Reaper - Combat - Cast Frost Nova "Heroic"'), +(@ENTRY,0,4,0,4,0,100,6,0,0,0,0,39,30,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Reaper - Aggro - Call for help'); + +-- Soulguard Beam Focus Target +SET @ENTRY := 36508; -- NPC entry +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (-201770,-201785,-201741); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(-201770,0,0,0,1,0,100,6,1000,1000,5000,5000,45,0,1,0,0,0,0,19,36620,60,0,0,0,0,0, 'Soulguard Beam Focus Target - OOC - Set data on Soulguard Adept'), +(-201785,0,0,0,1,0,100,6,1000,1000,5000,5000,45,0,1,0,0,0,0,19,36620,60,0,0,0,0,0, 'Soulguard Beam Focus Target - OOC - Set data on Soulguard Adept'), +(-201741,0,0,0,1,0,100,6,1000,1000,5000,5000,45,0,1,0,0,0,0,19,36620,60,0,0,0,0,0, 'Soulguard Beam Focus Target - OOC - Set data on Soulguard Adept'), +(-201741,0,1,0,1,0,100,6,1000,1000,5000,5000,45,0,1,0,0,0,0,19,36564,60,0,0,0,0,0, 'Soulguard Beam Focus Target - OOC - Set data on Soulguard Bonecaster'); + +-- Spectral Warden SAI +SET @ENTRY := 36666; -- NPC entry +SET @SPELL1 := 69633; -- Veil of Shadow +SET @SPELL2 := 69148; -- Wail of Souls (Normal) +SET @SPELL3 := 70210; -- Wail of Souls (Heroic) +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,6,5000,6000,9000,10000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Spectral Warden - Combat - Cast Veil of Shadow'), +(@ENTRY,0,1,0,0,0,100,2,9000,11000,5000,6000,11,@SPELL1,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Spectral Warden - Combat - Cast Wail of Souls'), +(@ENTRY,0,2,0,0,0,100,4,9000,11000,5000,6000,11,@SPELL2,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Spectral Warden - Combat - Cast Wail of Souls'); + +-- Soulguard Watchman SAI +SET @ENTRY := 36478; -- NPC entry +SET @SPELL1 := 69056; -- Shroud of Runes +SET @SPELL2 := 69053; -- Unholy Rage +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,50,6,0,10000,16000,20000,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Watchman - Combat - Cast Shroud of Runes'), +(@ENTRY,0,1,2,0,0,100,6,8000,16000,32000,40000,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Watchman - Combat - Cast Unholy Rage'), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Watchman - Combat - Say 0'), +(@ENTRY,0,3,0,4,0,100,6,0,0,0,0,39,20,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Watchman - Aggro - Call for help'); +-- NPC talk text insert +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0, '%s goes into a frenzy!',16,0,100,0,0,0, 'Soulguard Watchman'); + +-- Soul Horror SAI +SET @ENTRY := 36522; -- NPC entry +SET @SPELL1 := 69088; -- Soul Strike (Normal) +SET @SPELL2 := 70211; -- Soul Strike (Heroic) +SET @SPELL3 := 69107; -- Killing Spree Invis Aura +SET @SPELL4 := 69106; -- Killing Spree Aura +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,2,5000,6000,5000,6000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soul Horror - Combat - Cast Soul Strike'), +(@ENTRY,0,1,0,0,0,100,4,5000,6000,5000,6000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soul Horror - Combat - Cast Soul Strike'), +(@ENTRY,0,4,0,4,0,100,6,0,0,0,0,39,35,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soul Horror - Aggro - Call for help'); + +-- Soulguard Animator SAI +SET @ENTRY := 36516; -- NPC entry +SET @SPELL1 := 68834; -- Soulguard Channel Beam02 +SET @SPELL2 := 69562; -- Raise Dead +SET @SPELL3 := 69131; -- Soul Sickness +SET @SPELL4 := 69128; -- Soul Siphon +SET @SPELL5 := 69068; -- Shadow Bolt (Normal) +SET @SPELL6 := 70208; -- Shadow Bolt (Heroic) +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,7,1000,1000,1000,1000,11,@SPELL1,0,0,0,0,0,9,36522,1,15,0,0,0,0, 'Soulguard Animator - OOC - Cast Soulguard Channel Beam02'), +(@ENTRY,0,1,0,0,1,100,6,20000,25000,20000,25000,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Combat - Cast Raise Dead'), +(@ENTRY,0,2,0,0,0,100,6,7000,9000,9000,11000,11,@SPELL3,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Soulguard Animator - Combat - Cast Soul Sickness'), +(@ENTRY,0,3,0,0,0,100,6,9000,11000,7000,9000,11,@SPELL4,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Soulguard Animator - Combat - Cast Soul Siphon'), +(@ENTRY,0,4,0,0,0,100,2,4000,5000,3500,4500,11,@SPELL5,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Animator - Combat - Cast Shadow Bolt "Normal"'), +(@ENTRY,0,5,0,0,0,100,4,4000,5000,3500,4500,11,@SPELL6,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Animator - Combat - Cast Shadow Bolt "Heroic"'), +(@ENTRY,0,6,7,4,0,100,6,0,0,0,0,39,35,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Aggro - Call for help'), +(@ENTRY,0,7,0,61,0,100,6,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Aggro - Set phase 1'), +(@ENTRY,0,8,9,38,0,100,7,0,2,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Data set 2 - Set data'), +(@ENTRY,0,9,0,61,0,100,6,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Data set 2 - Set phase 2'), +(@ENTRY,0,10,11,38,0,100,7,0,3,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Data set 3 - Set data'), +(@ENTRY,0,11,0,61,0,100,6,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Animator - Data set 3 - Set phase 1'); + +-- Soulguard Adept SAI +SET @ENTRY := 36620; -- NPC entry +SET @SPELL1 := 68834; -- Soulguard Channel Beam02 +SET @SPELL2 := 69562; -- Raise Dead +SET @SPELL3 := 69068; -- Shadow Bolt (Normal) +SET @SPELL4 := 70208; -- Shadow Bolt (Heroic) +SET @SPELL5 := 69066; -- Drain Life (Normal) +SET @SPELL6 := 70213; -- Drain Life (Heroic) +SET @SPELL7 := 69564; -- Shadow Mend (Normal) +SET @SPELL8 := 70205; -- Shadow Mend (Heroic) +SET @SPELL9 := 68797; -- Soulguard Channel +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,7,1000,1000,1000,1000,11,@SPELL1,0,0,0,0,0,9,36522,1,15,0,0,0,0, 'Soulguard Adept - OOC - Cast Soulguard Channel Beam02'), +(@ENTRY,0,1,0,0,4,100,6,20000,25000,20000,25000,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Raise Dead'), +(@ENTRY,0,2,0,0,0,100,2,7000,8000,3500,4500,11,@SPELL3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Shadow Bolt "Normal"'), +(@ENTRY,0,3,0,0,0,100,4,7000,8000,3500,4500,11,@SPELL4,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Shadow Bolt "Heroic"'), +(@ENTRY,0,4,0,0,0,100,2,6000,7000,8000,10000,11,@SPELL5,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Drain Life "Normal"'), +(@ENTRY,0,5,0,0,0,100,4,6000,7000,8000,10000,11,@SPELL6,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Drain Life "Heroic"'), +(@ENTRY,0,6,0,0,0,100,2,30000,35000,18000,22000,11,@SPELL7,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Shadow Mend "Normal"'), +(@ENTRY,0,7,0,0,0,100,4,30000,35000,18000,22000,11,@SPELL8,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Adept - Combat - Cast Shadow Mend "Heroic"'), +(@ENTRY,0,8,0,25,0,100,6,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - On Reset - Set phase 1'), +(@ENTRY,0,9,0,38,1,100,6,0,1,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - On dataset 0 1 - Set phase 2'), +(@ENTRY,0,10,0,1,2,100,7,0,0,0,0,11,@SPELL9,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - OOC - Cast Soulguard Channel'), +(@ENTRY,0,11,12,4,0,100,6,0,0,0,0,39,35,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Aggro - Call for help'), +(@ENTRY,0,12,0,61,0,100,6,0,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Aggro - Set phase 3'), +(@ENTRY,0,13,14,38,0,100,7,0,2,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Data set 2 - Set data'), +(@ENTRY,0,14,0,61,0,100,6,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Data set 2 - Set phase 4'), +(@ENTRY,0,15,16,38,0,100,7,0,3,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Data set 3 - Set data'), +(@ENTRY,0,16,0,61,0,100,6,0,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Adept - Data set 3 - Set phase 3'); + +-- Soulguard Bonecaster SAI +SET @ENTRY := 36564; -- NPC entry +SET @SPELL1 := 68834; -- Soulguard Channel Beam02 +SET @SPELL2 := 69562; -- Raise Dead +SET @SPELL3 := 69080; -- Bone Volley (Normal) +SET @SPELL4 := 70206; -- Bone Volley (Heroic) +SET @SPELL5 := 69069; -- Shield of Bones (Normal) +SET @SPELL6 := 70207; -- Shield of Bones (Heroic) +SET @SPELL7 := 68797; -- Soulguard Channel +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,7,1000,1000,1000,1000,11,@SPELL1,0,0,0,0,0,9,36522,1,15,0,0,0,0, 'Soulguard Bonecaster - OOC - Cast Soulguard Channel Beam02'), +(@ENTRY,0,1,0,0,4,100,6,20000,25000,20000,25000,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Combat - Cast Raise Dead'), +(@ENTRY,0,2,0,0,0,100,2,5000,7000,6000,8000,11,@SPELL3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Combat - Cast Bone Volley "Normal"'), +(@ENTRY,0,3,0,0,0,100,4,5000,7000,6000,8000,11,@SPELL4,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Combat - Cast Bone Volley "Heroic"'), +(@ENTRY,0,4,0,0,0,100,2,5000,7000,7000,9000,11,@SPELL5,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Combat - Cast Shield of Bones "Normal"'), +(@ENTRY,0,5,0,0,0,100,4,5000,7000,7000,9000,11,@SPELL6,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Combat - Cast Shield of Bones "Heroic"'), +(@ENTRY,0,6,0,25,0,100,6,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - On Reset - Set phase 1'), +(@ENTRY,0,7,0,38,1,100,6,0,1,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - On dataset 0 1 - Set phase 2'), +(@ENTRY,0,8,0,1,2,100,7,0,0,0,0,11,@SPELL7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - OOC - Cast Soulguard Channel'), +(@ENTRY,0,9,10,4,0,100,6,0,0,0,0,39,35,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Aggro - Call for help'), +(@ENTRY,0,10,0,61,0,100,6,0,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Aggro - Set phase 3'), +(@ENTRY,0,11,12,38,0,100,7,0,2,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Data set 2 - Set data'), +(@ENTRY,0,12,0,61,0,100,6,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Data set 2 - Set phase 4'), +(@ENTRY,0,13,14,38,0,100,7,0,3,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Data set 3 - Set data'), +(@ENTRY,0,14,0,61,0,100,6,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Soulguard Bonecaster - Data set 3 - Set phase 3'); + +-- Ghoul Minion SAI +SET @ENTRY := 36916; -- NPC entry +SET @SPELL1 := 69088; -- Soul Strike (Normal) +SET @SPELL2 := 70211; -- Soul Strike (Heroic) +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,54,0,100,6,0,0,0,0,45,0,2,0,0,0,0,23,0,0,0,0,0,0,0, 'Ghoul Minion - Just Summoned - Set Data Summoner'), +(@ENTRY,0,1,0,61,0,100,6,0,0,0,0,89,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ghoul Minion - Just Summoned - Set Random Movement'), +(@ENTRY,0,2,0,0,0,100,6,115000,115000,115000,115000,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ghoul Minion - combat - die after 2 min'), +(@ENTRY,0,3,0,1,0,100,6,15000,15000,15000,15000,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ghoul Minion - OOC - die after 15 sec'), +(@ENTRY,0,4,5,6,0,100,6,15000,15000,15000,15000,45,0,3,0,0,0,0,23,0,0,0,0,0,0,0, 'Ghoul Minion - on Death - Set data summoner'), +(@ENTRY,0,5,0,61,0,100,6,15000,15000,15000,15000,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ghoul Minion - on Death - despawn after 3 sec'); diff --git a/sql/old/3.3.5a/2012_05_05_01_world_creature_template.sql b/sql/old/3.3.5a/2012_05_05_01_world_creature_template.sql new file mode 100644 index 00000000000..2eeaf2f40d2 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_01_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Set proper faction for Ymirjar Skycaller (Heroic) +UPDATE `creature_template` SET `faction_A`=1885,`faction_H`=1885 WHERE `entry`=37643; diff --git a/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql b/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql new file mode 100644 index 00000000000..c0b2c6b147b --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql @@ -0,0 +1,10 @@ +-- Add some missing Blood of Heroes spawns +SET @GUID := 5276; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+5; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@GUID,176213,0,1,1,1529.10242,-1427.06946,65.49049,-3.001947,0,0,-0.9975634,0.06976615,7200,100,1), +(@GUID+1,176213,0,1,1,1705.87439,-4690.138,48.9742165,-3.08918333,0,0,-0.9996567,0.02620165,7200,100,1), +(@GUID+2,176213,0,1,1,1846.79382,-3825.265,135.5159,1.83259487,0,0,0.7933531,0.6087617,7200,100,1), +(@GUID+3,176213,0,1,1,1748.16333,-4453.13525,74.26272,-2.0594883,0,0,0,0,7200,100,1), +(@GUID+4,176213,0,1,1,2159.835,-2442.754,62.0804,-0.4886912,0,0,-0.2419214,0.9702958,7200,100,1), +(@GUID+5,176213,0,1,1,1342.557,-1382.568,46.89193,2.775069,0,0,0.9832544,0.182238,7200,100,1); diff --git a/sql/old/3.3.5a/2012_05_05_03_world_sai.sql b/sql/old/3.3.5a/2012_05_05_03_world_sai.sql new file mode 100644 index 00000000000..fce3b5bc957 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_03_world_sai.sql @@ -0,0 +1,17 @@ +-- Wrathbone Laborer SAI +SET @ENTRY := 36830; -- NPC entry +SET @SPELL1 := 70302; -- Blinding Dirt +SET @SPELL2 := 70278; -- Puncture Wound (Normal) +SET @SPELL3 := 70279; -- Puncture Wound (Heroic) +SET @SPELL4 := 69572; -- Shovelled! (Normal) +SET @SPELL5 := 70280; -- Shovelled! (Heroic) +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,6,7000,8000,10000,11000,11,@SPELL1,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Blinding Dirt'), +(@ENTRY,0,1,0,0,0,100,2,8000,9000,9000,10000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Puncture Wound (Normal)'), +(@ENTRY,0,2,0,0,0,100,4,8000,9000,9000,10000,11,@SPELL3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Puncture Wound (Heroic)'), +(@ENTRY,0,3,0,0,0,100,2,5000,6000,7000,8000,11,@SPELL4,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Shovelled! (Normal)'), +(@ENTRY,0,4,0,0,0,100,4,5000,6000,7000,8000,11,@SPELL5,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Shovelled! (Heroic)'), +(@ENTRY,0,5,0,1,0,100,6,1000,3000,3000,3000,5,38,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wrathbone Laborer - OOC - emote'); diff --git a/sql/old/3.3.5a/2012_05_05_04_world_creature_template.sql b/sql/old/3.3.5a/2012_05_05_04_world_creature_template.sql new file mode 100644 index 00000000000..7c4f13dd667 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_04_world_creature_template.sql @@ -0,0 +1,27 @@ +-- Fix InhabitType for Eye of the Lich King +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=36913; +-- Updates From CDawg +-- Wrathbone Laborer (heroic) - fix hostility and adds equipment +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256,`equipment_id`=104 WHERE `entry`=37638; +-- Wrathbone Siegesmith (Heroic) add equipment +UPDATE `creature_template` SET `equipment_id`=122 WHERE `entry`=37639; +-- Fallen Warrior add equipment +UPDATE `creature_template` SET `equipment_id`=2328 WHERE `entry`=37612; +-- Forgemaster Garfrost add equipment +UPDATE `creature_template` SET `equipment_id`=2325 WHERE `entry`=37613; +-- Deathwhisper Necrolyte add equipment +UPDATE `creature_template` SET `equipment_id`=2365 WHERE `entry`=37609; +-- Deathwhisper Shadowcaster - add equipment +UPDATE `creature_template` SET `equipment_id`=2365 WHERE `entry`=38025; +-- Alliance slaves add equipments +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37645; +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37646; +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37647; +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37648; +-- horde slaves add equipments +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37649; +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37650; +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37651; +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=37652; +-- Ymirjar Skycaller (heroic) - Fix unit flags and add equipment +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|32832,`equipment_id`=2438 WHERE `entry`=37643; diff --git a/sql/old/3.3.5a/2012_05_05_05_world_creature_template.sql b/sql/old/3.3.5a/2012_05_05_05_world_creature_template.sql new file mode 100644 index 00000000000..a2f2a217252 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_05_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Fix skillup on some target dummys +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|262144 WHERE `entry` IN (31144,2674,2673); diff --git a/sql/old/3.3.5a/2012_05_05_06_world_sai.sql b/sql/old/3.3.5a/2012_05_05_06_world_sai.sql new file mode 100644 index 00000000000..7b064af4a4e --- /dev/null +++ b/sql/old/3.3.5a/2012_05_05_06_world_sai.sql @@ -0,0 +1,13 @@ +-- Wrathbone Laborer SAI +SET @ENTRY := 36830; -- NPC entry +SET @SPELL1 := 70302; -- Blinding Dirt +SET @SPELL2 := 70278; -- Puncture Wound +SET @SPELL3 := 69572; -- Shovelled! +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,6,7000,8000,10000,11000,11,@SPELL1,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Blinding Dirt'), +(@ENTRY,0,1,0,0,0,100,6,8000,9000,9000,10000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Puncture Wound (Normal)'), +(@ENTRY,0,2,0,0,0,100,6,5000,6000,7000,8000,11,@SPELL3,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Shovelled! (Normal)'), +(@ENTRY,0,3,0,1,0,100,6,1000,3000,3000,3000,5,38,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wrathbone Laborer - OOC - emote'); diff --git a/sql/old/3.3.5a/2012_05_06_00_world_creature_template.sql b/sql/old/3.3.5a/2012_05_06_00_world_creature_template.sql new file mode 100644 index 00000000000..30dbf85c28d --- /dev/null +++ b/sql/old/3.3.5a/2012_05_06_00_world_creature_template.sql @@ -0,0 +1,5 @@ +-- Gold for Toc based on old.wowhead +UPDATE `creature_template` SET `mingold`=850000,`maxgold`=950000 WHERE `entry` IN(34797,35447,35448,35449); -- Icehowl +UPDATE `creature_template` SET `mingold`=550000,`maxgold`=650000 WHERE `entry` IN(34780,35216,35268,35269); -- Lord Jaraxxus +UPDATE `creature_template` SET `mingold`=650000,`maxgold`=700000 WHERE `entry` IN(34497,35350,35351,35352,34496,35347,35348,35359); -- Fjola Lightbane & Eydis Darkbane +UPDATE `creature_template` SET `mingold`=500000,`maxgold`=600000 WHERE `entry` IN(34564,34566,35615,35616); -- Anub'arak diff --git a/sql/old/3.3.5a/2012_05_06_01_world_creature_template.sql b/sql/old/3.3.5a/2012_05_06_01_world_creature_template.sql new file mode 100644 index 00000000000..fa0c9af5805 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_06_01_world_creature_template.sql @@ -0,0 +1,11 @@ +-- Based on old.wowhead.com +UPDATE `creature_template` SET `mingold`=1600000,`maxgold`=1800000 WHERE `entry` IN (33113,34003); -- Flame Levithian +UPDATE `creature_template` SET `mingold`=1100000,`maxgold`=1300000 WHERE `entry` IN (33118,33190); -- Ignis the Furnace Master +UPDATE `creature_template` SET `mingold`=280000,`maxgold`=360000 WHERE `entry` IN (33186,33724); -- Razorscale +UPDATE `creature_template` SET `mingold`=670000,`maxgold`=750000 WHERE `entry` IN (33293,33885); -- XT-002 Deconstructor +UPDATE `creature_template` SET `mingold`=1680000,`maxgold`=1900000 WHERE `entry` IN (32857,33694); -- Stormcaller Brundir +UPDATE `creature_template` SET `mingold`=1680000,`maxgold`=1900000 WHERE `entry` IN (32927,33692); -- Runemaster Molgeim +UPDATE `creature_template` SET `mingold`=1680000,`maxgold`=1900000 WHERE `entry` IN (32867,33693); -- Steelbreaker +UPDATE `creature_template` SET `mingold`=1220000,`maxgold`=1500000 WHERE `entry` IN (33515,34175); -- Auriaya +UPDATE `creature_template` SET `mingold`=1650000,`maxgold`=1950000 WHERE `entry` IN (33271,33449); -- General Vezax +UPDATE `creature_template` SET `mingold`=2020000,`maxgold`=2220000 WHERE `entry` IN (33288,33955); -- Yogg-Saron diff --git a/sql/old/3.3.5a/2012_05_07_00_world_waypoints.sql b/sql/old/3.3.5a/2012_05_07_00_world_waypoints.sql new file mode 100644 index 00000000000..f24b7c9c254 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_07_00_world_waypoints.sql @@ -0,0 +1,73 @@ +-- Wrathbone Siegesmith pathing +SET @NPC := 202159; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=646.5851,`position_y`=-191.1892,`position_z`=526.8476 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,646.5851,-191.1892,526.8476,0,0,0,100,0), +(@PATH,2,648.8837,-181.967,526.7226,0,0,0,100,0), +(@PATH,3,649.4167,-179.4531,526.7226,14000,0,0,100,0), +(@PATH,4,652.1736,-183.3594,526.7226,0,0,0,100,0), +(@PATH,5,648.5643,-188.309,526.8476,0,0,0,100,0), +(@PATH,6,642.5313,-193.4826,527.3874,0,0,0,100,0), +(@PATH,7,633.688,-200.741,528.941,12000,0,0,100,0), +(@PATH,8,641.9254,-196.5747,528.9726,0,0,0,100,0); + +-- Wrathbone Siegesmith pathing +SET @NPC := 201855; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=723.5469,`position_y`=-170.9497,`position_z`=527.5121 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,723.5469,-170.9497,527.5121,13000,0,0,100,0), +(@PATH,2,726.6484,-173.3438,527.1627,0,0,0,100,0), +(@PATH,3,726.6484,-174.3438,527.1627,0,0,0,100,0), +(@PATH,4,725.25,-175.2379,526.8134,0,0,0,100,0), +(@PATH,5,722.0521,-181.5122,526.8134,0,0,0,100,0), +(@PATH,6,721.2031,-187.8142,526.8134,0,0,0,100,0), +(@PATH,7,717.7917,-194.4358,526.8134,0,0,0,100,0), +(@PATH,8,719.3073,-202.2691,527.1509,0,0,0,100,0), +(@PATH,9,720.3403,-206.1198,527.7932,12000,0,0,100,0), +(@PATH,10,717.6111,-199.5035,526.9384,0,0,0,100,0), +(@PATH,11,717.566,-189.0642,526.8134,0,0,0,100,0), +(@PATH,12,718.5764,-182.3958,526.8134,0,0,0,100,0), +(@PATH,13,719.9531,-176.0729,526.8134,0,0,0,100,0); + +-- Forgemaster Garfrost pathing +SET @NPC := 201992; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=712.1371,`position_y`=-215.7014,`position_z`=527.066 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`auras`) VALUES (@NPC,@PATH,1,'68792'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,712.1371,-215.7014,527.066,0,0,0,100,0), +(@PATH,2,719.507,-227.8559,527.066,3000,0,0,100,0), +(@PATH,3,712.1371,-215.7014,527.066,0,0,0,100,0), +(@PATH,4,685.1805,-207.349,526.8424,0,0,0,100,0), +(@PATH,5,664.5191,-203.3472,526.816,0,0,0,100,0), +(@PATH,6,645.033,-208.5295,528.941,0,0,0,100,0), +(@PATH,7,653.0729,-194.3681,526.7226,0,0,0,100,0), +(@PATH,8,664.8646,-195.2135,526.7226,0,0,0,100,0), +(@PATH,9,686.0816,-213.8264,526.8424,0,0,0,100,0), +(@PATH,10,697.9757,-221.6215,526.8424,0,0,0,100,0), +(@PATH,11,708.0903,-211.908,527.066,0,0,0,100,0), +(@PATH,12,717.8924,-204.6979,527.191,0,0,0,100,0), +(@PATH,13,699.0504,-201.3438,526.8424,0,0,0,100,0), +(@PATH,14,672.066,-201.1493,526.8424,0,0,0,100,0), +(@PATH,15,655.9496,-203.4931,526.816,0,0,0,100,0), +(@PATH,16,672.066,-201.1493,526.8424,0,0,0,100,0), +(@PATH,17,699.0504,-201.3438,526.8424,0,0,0,100,0), +(@PATH,18,717.8924,-204.6979,527.191,0,0,0,100,0), +(@PATH,19,708.0903,-211.908,527.066,0,0,0,100,0), +(@PATH,20,697.9757,-221.6215,526.8424,0,0,0,100,0), +(@PATH,21,686.0816,-213.8264,526.8424,0,0,0,100,0), +(@PATH,22,664.8646,-195.2135,526.7226,0,0,0,100,0), +(@PATH,23,653.0729,-194.3681,526.7226,0,0,0,100,0), +(@PATH,24,645.033,-208.5295,528.941,0,0,0,100,0), +(@PATH,25,664.5191,-203.3472,526.816,0,0,0,100,0), +(@PATH,26,685.1805,-207.349,526.8424,0,0,0,100,0); diff --git a/sql/old/3.3.5a/2012_05_07_01_world_sai.sql b/sql/old/3.3.5a/2012_05_07_01_world_sai.sql new file mode 100644 index 00000000000..83676d31df9 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_07_01_world_sai.sql @@ -0,0 +1,51 @@ +-- Ymirjar Skycaller SAI addition +SET @ENTRY := 31260; -- NPC entry +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,2,0,25,0,100,6,0,0,0,0,11,46598,0,0,0,0,0,19,36891,20,0,0,0,0,0, 'Ymirjar Skycaller - Reset - Cast Ride Vehicle Hardcoded'); + +-- Wrathbone Laborer SAI +SET @ENTRY := -201800; -- NPC entry +SET @SPELL1 := 70302; -- Blinding Dirt +SET @SPELL2 := 70278; -- Puncture Wound +SET @SPELL3 := 69572; -- Shovelled! +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,6,7000,8000,10000,11000,11,@SPELL1,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Blinding Dirt'), +(@ENTRY,0,1,0,0,0,100,6,8000,9000,9000,10000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Puncture Wound (Normal)'), +(@ENTRY,0,2,0,0,0,100,6,5000,6000,7000,8000,11,@SPELL3,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Wrathbone Laborer - Combat - Cast Shovelled! (Normal)'); + +-- Wrathbone Laborer pathing +SET @NPC := 201800; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=584.4202,`position_y`=188.9149,`position_z`=509.6726 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,584.4202,188.9149,509.6726,0,0,0,100,0), +(@PATH,2,583.6736,193.9653,509.7404,3000,0,48,100,0), +(@PATH,3,583.6736,193.9653,509.7404,3000,0,48,100,0), +(@PATH,4,583.6736,193.9653,509.7404,3000,0,48,100,0), +(@PATH,5,583.6736,193.9653,509.7404,3000,0,48,100,0), +(@PATH,6,594.0781,190.2622,508.8613,0,0,0,100,0), +(@PATH,7,604.9809,191.5451,507.6583,0,0,0,100,0), +(@PATH,8,617.8438,191.3455,507.5206,0,0,0,100,0), +(@PATH,9,633.1597,186.8281,508.6275,3000,0,48,100,0), +(@PATH,10,633.1597,186.8281,508.6275,3000,0,48,100,0), +(@PATH,11,624.3472,190.9705,507.7706,0,0,0,100,0), +(@PATH,12,613.3229,189.9236,507.3956,0,0,0,100,0), +(@PATH,13,604.5156,189.651,507.3956,0,0,0,100,0), +(@PATH,14,593.9844,187.4479,508.9778,0,0,0,100,0), +(@PATH,15,584.4202,188.9149,509.6726,0,0,0,100,0); +DELETE FROM `waypoint_scripts` WHERE `id`=48; +INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`guid`) VALUES +(48,0,1,38,67); + +-- Add Overlord Drakuru riders to Stonespine Gargoyle +UPDATE creature_template SET InhabitType=4,`flags_extra`=`flags_extra`|128 WHERE entry=28717; +DELETE FROM `creature` WHERE `id`=28717 AND `map`=658; +DELETE FROM `vehicle_template_accessory` WHERE `entry`=36896; +INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES +(36896,28717,1,0, 'Overlord Drakuru on Stonespine Gargoyle',6,30000); diff --git a/sql/old/3.3.5a/2012_05_08_00_world_sai.sql b/sql/old/3.3.5a/2012_05_08_00_world_sai.sql new file mode 100644 index 00000000000..8a776b5f2d2 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_08_00_world_sai.sql @@ -0,0 +1,89 @@ +-- [Q] Arelion's Mistress +-- Viera Sunwhisper SAI +-- Twinkle SAI +SET @ENTRY_VIERA := 17226; +SET @ENTRY_TWINKLE := 17230; +SET @QUEST_PLEASURES := 9483; +SET @SPELL_RETRIBUTION := 30077; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_VIERA,@ENTRY_TWINKLE); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_VIERA,@ENTRY_TWINKLE,@ENTRY_VIERA*100,@ENTRY_VIERA*100+1); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY_VIERA,0,0,0,20,0,100,0,@QUEST_PLEASURES,0,0,0,80,@ENTRY_VIERA*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Quest Finish - Run Script'), +(@ENTRY_VIERA*100,9,0,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Viera Sunwhisper - On Script - Remove Quest Flag"), +(@ENTRY_VIERA*100,9,1,0,0,0,100,0,2000,2000,0,0,53,0,@ENTRY_VIERA,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Start WP 1'), +(@ENTRY_VIERA*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Say Line 0'), +(@ENTRY_VIERA*100,9,3,0,0,0,100,0,0,0,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Stand Up'), +(@ENTRY_VIERA*100,9,4,0,0,0,100,0,6500,6500,0,0,45,0,1,0,0,0,0,10,61963,@ENTRY_TWINKLE,0,0,0,0,0,'Viera Sunwhisper - On Script - Set Data 0 1 Twinkle'), +(@ENTRY_VIERA,0,1,2,40,0,100,0,10,@ENTRY_VIERA,0,0,66,0,0,0,0,0,0,11,@ENTRY_TWINKLE,15,0,0,0,0,0,'Viera Sunwhisper - On WP 10 - Face Twinkle'), +(@ENTRY_VIERA,0,2,0,61,0,100,0,0,0,0,0,54,1000000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On WP 10 - Pause WP'), + +(@ENTRY_TWINKLE,0,0,0,38,0,100,0,0,1,0,0,53,1,@ENTRY_TWINKLE,0,0,0,0,1,0,0,0,0,0,0,0,'Twinkle - On Data 0 1 Set - Start WP 1 (run)'), +(@ENTRY_TWINKLE,0,1,0,40,0,100,0,13,@ENTRY_TWINKLE,0,0,54,1000000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Twinkle - On WP 13 - Pause WP'), +(@ENTRY_TWINKLE,0,2,0,38,0,100,0,1,2,0,0,53,1,@ENTRY_TWINKLE*10,0,0,0,0,1,0,0,0,0,0,0,0,'Twinkle - On Data Set 1 2 - Start WP 2 (run)'), +(@ENTRY_TWINKLE,0,3,0,40,0,100,0,4,@ENTRY_TWINKLE*10,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On WP 4 (2) - Force Despawn'), + +(@ENTRY_VIERA,0,3,0,8,0,100,0,@SPELL_RETRIBUTION,0,0,0,80,@ENTRY_VIERA*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Spellhit - Run Second Script'), +(@ENTRY_VIERA*100+1,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Say Line 1'), +(@ENTRY_VIERA*100+1,9,1,0,0,0,100,0,0,0,0,0,33,@ENTRY_VIERA,0,0,0,0,0,7,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Quest Credit'), +(@ENTRY_VIERA*100+1,9,2,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Say Line 2'), +(@ENTRY_VIERA*100+1,9,3,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,9,@ENTRY_TWINKLE,0,25,0,0,0,0,'Twinkle - On Script - Say Line 0'), +(@ENTRY_VIERA*100+1,9,4,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Say Line 3'), +(@ENTRY_VIERA*100+1,9,5,0,0,0,100,0,0,0,0,0,45,1,2,0,0,0,0,10,61963,@ENTRY_TWINKLE,0,0,0,0,0,'Viera Sunwhisper - On Script - Set Data 1 2 Twinkle'), +(@ENTRY_VIERA*100+1,9,6,0,0,0,100,0,0,0,0,0,53,1,@ENTRY_VIERA*10,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Start WP 2 (run)'), +(@ENTRY_VIERA,0,4,0,40,0,100,0,4,@ENTRY_VIERA*10,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On WP 4 (2) - Force Despawn'); + +-- Waypoints for Viera Sunwhisper +DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY_VIERA,@ENTRY_VIERA*10); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY_VIERA,1,-653.739197,4145.138184,64.200729,'Viera Sunwhisper'), +(@ENTRY_VIERA,2,-658.875732,4147.715332,64.168304,'Viera Sunwhisper'), +(@ENTRY_VIERA,3,-681.465088,4147.636230,64.118073,'Viera Sunwhisper'), +(@ENTRY_VIERA,4,-686.400696,4161.865234,59.707859,'Viera Sunwhisper'), +(@ENTRY_VIERA,5,-695.956909,4179.237305,57.618931,'Viera Sunwhisper'), +(@ENTRY_VIERA,6,-699.832153,4189.959473,57.503750,'Viera Sunwhisper'), +(@ENTRY_VIERA,7,-708.518616,4184.436035,55.275894,'Viera Sunwhisper'), +(@ENTRY_VIERA,8,-716.137268,4178.130371,52.637508,'Viera Sunwhisper'), +(@ENTRY_VIERA,9,-719.865295,4174.992676,51.554867,'Viera Sunwhisper'), +(@ENTRY_VIERA,10,-720.839417,4162.232422,50.805923,'Viera Sunwhisper'), + +(@ENTRY_VIERA*10,1,-722.323486,4147.936523,50.337898,'Viera Sunwhisper'), +(@ENTRY_VIERA*10,2,-726.639343,4125.156250,48.479683,'Viera Sunwhisper'), +(@ENTRY_VIERA*10,3,-727.648315,4109.684082,47.528461,'Viera Sunwhisper'), +(@ENTRY_VIERA*10,4,-727.874329,4093.438721,46.446579,'Viera Sunwhisper'); + +-- Waypoints for Twinkle +DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY_TWINKLE,@ENTRY_TWINKLE*10); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY_TWINKLE,1,-605.445190,4165.205078,64.081802,'Twinkle'), +(@ENTRY_TWINKLE,2,-619.293335,4161.776855,63.217815,'Twinkle'), +(@ENTRY_TWINKLE,3,-629.536560,4153.708984,64.067123,'Twinkle'), +(@ENTRY_TWINKLE,4,-644.773438,4151.062988,64.174675,'Twinkle'), +(@ENTRY_TWINKLE,5,-658.875732,4147.715332,64.168304,'Twinkle'), +(@ENTRY_TWINKLE,6,-681.465088,4147.636230,64.118073,'Twinkle'), +(@ENTRY_TWINKLE,7,-686.400696,4161.865234,59.707859,'Twinkle'), +(@ENTRY_TWINKLE,8,-695.956909,4179.237305,57.618931,'Twinkle'), +(@ENTRY_TWINKLE,9,-699.832153,4189.959473,57.503750,'Twinkle'), +(@ENTRY_TWINKLE,10,-708.518616,4184.436035,55.275894,'Twinkle'), +(@ENTRY_TWINKLE,11,-716.137268,4178.130371,52.637508,'Twinkle'), +(@ENTRY_TWINKLE,12,-719.865295,4174.992676,51.554867,'Twinkle'), +(@ENTRY_TWINKLE,13,-720.636292,4166.637695,50.815567,'Twinkle'), + +(@ENTRY_TWINKLE*10,1,-722.323486,4147.936523,50.337898,'Twinkle'), +(@ENTRY_TWINKLE*10,2,-726.639343,4125.156250,48.479683,'Twinkle'), +(@ENTRY_TWINKLE*10,3,-727.648315,4109.684082,47.528461,'Twinkle'), +(@ENTRY_TWINKLE*10,4,-727.874329,4093.438721,46.446579,'Twinkle'); + +-- Spawn spell focus object on correct position +DELETE FROM `gameobject` WHERE `id`=300071 AND `guid`=303; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(303,300071,530,1,1,-720.803,4162.77,50.7916,4.61029,0,0,0.742267,-0.670104,300,0,1); + +-- Texts +DELETE FROM `creature_text` WHERE `entry` IN (@ENTRY_VIERA,@ENTRY_TWINKLE); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY_VIERA,0,0,"Ok, let's go. I know just the perfect spot!",12,0,100,0,0,0,'Viera Sunwhisper'), +(@ENTRY_VIERA,1,0,"I can't wait to try this wine!",12,0,100,0,0,0,'Viera Sunwhisper'), +(@ENTRY_VIERA,2,0,"What... is happening... to me? Get this cat away from me!",12,0,100,0,0,0,'Viera Sunwhisper'), +(@ENTRY_VIERA,3,0,"%s scurries away, attempting to flee from Twinkle",16,0,100,0,0,0,'Viera Sunwhisper'), + +(@ENTRY_TWINKLE,0,0,"%s looks at Viera Sunwhisper with very hungry eyes",16,0,100,0,0,0,'Twinkle'); diff --git a/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql b/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql new file mode 100644 index 00000000000..b83d02b4762 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql @@ -0,0 +1,5 @@ +-- Add Missing Ice Wall, Pit of Saron +SET @GUID := 305; +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@GUID,201885,658,3,1,932.2674,-80.6684,591.6761,2.286379,0,0,0,0,300,100,1); diff --git a/sql/old/3.3.5a/2012_05_08_01_world_misc.sql b/sql/old/3.3.5a/2012_05_08_01_world_misc.sql new file mode 100644 index 00000000000..8f19132fa27 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_08_01_world_misc.sql @@ -0,0 +1,9 @@ +-- Spell area spells for entering POS +DELETE FROM `spell_area` WHERE `spell` IN (70056,70057); +INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES +(70056,4904,0,0,0,0,690,2,1), -- Send Script Event (22717) +(70057,4904,0,0,0,0,1101,2,1); -- Send Script Event (22718) + +-- Fix flags and equipment for Ymirjar Deathbringer +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry` IN (36892,37641); +UPDATE `creature_template` SET `equipment_id`=2444 WHERE `entry`=37641; diff --git a/sql/old/3.3.5a/2012_05_09_00_world_spell_target_position.sql b/sql/old/3.3.5a/2012_05_09_00_world_spell_target_position.sql new file mode 100644 index 00000000000..a6e9d7289b7 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_09_00_world_spell_target_position.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_target_position` WHERE `id` IN (67834, 68081); +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(67834, 571, 3167.01, 5586.04, 880.067, 0), +(68081, 571, 5857.252, 516.8015, 599.82, 2.987); + +UPDATE `spell_target_position` SET `target_position_x`=6136.89,`target_position_y`=4785.55,`target_position_z`=100.673 WHERE `id`=67835; +UPDATE `spell_target_position` SET `target_position_x`=8301.39,`target_position_y`=1501.34,`target_position_z`=870.555 WHERE `id`=67836; diff --git a/sql/old/3.3.5a/2012_05_09_01_world_commands.sql b/sql/old/3.3.5a/2012_05_09_01_world_commands.sql new file mode 100644 index 00000000000..dcd4c9130eb --- /dev/null +++ b/sql/old/3.3.5a/2012_05_09_01_world_commands.sql @@ -0,0 +1,8 @@ +DELETE FROM `trinity_string` WHERE `entry` = 555; +INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES +(555,"SetData performed on [GUID: %u, entry: %u, name: %s] Field: %u, Data: %u, with %s"); + +DELETE FROM `command` WHERE `name` = "npc set data"; +INSERT INTO `command` (`name`,`security`,`help`) VALUES +("npc set data", 3, "Syntax: .npc set data $field $data +Sets data for the selected creature. Used for testing Scripting"); diff --git a/sql/old/3.3.5a/2012_05_09_02_world_sai.sql b/sql/old/3.3.5a/2012_05_09_02_world_sai.sql new file mode 100644 index 00000000000..01004b23505 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_09_02_world_sai.sql @@ -0,0 +1,116 @@ +-- Fixup for Quest Quest:The Path to the Citadel "Alliance and Horde" + +-- Alliance slave add missing equipments +UPDATE `creature_template` SET `equipment_id`=254 WHERE `entry`=36767; + +-- Horde Slave SAI +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (36770,36771,36772,36773); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (36770,36771,36772,36773); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (3677000); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(36770,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Reset - Emotestate'), +(36771,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Reset - Emotestate'), +(36772,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Reset - Emotestate'), +(36773,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Reset - Emotestate'), +(36770,0,1,0,8,0,100,7,71281,0,0,0,80,3677000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Spellhit - Run Script'), +(36771,0,1,0,8,0,100,7,71281,0,0,0,80,3677000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Spellhit - Run Script'), +(36772,0,1,0,8,0,100,7,71281,0,0,0,80,3677000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Spellhit - Run Script'), +(36773,0,1,0,8,0,100,7,71281,0,0,0,80,3677000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - On Spellhit - Run Script'), +-- Script +(3677000,9,0,0,0,0,100,0,500,500,500,500,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Horde Slave - Script - Turnto envoker'), +(3677000,9,1,0,0,0,100,0,500,500,500,500,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - Script - say text'), +(3677000,9,2,0,0,0,100,0,100,100,100,100,18,512,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - Script - set unitflag'), +(3677000,9,3,0,0,0,100,0,100,100,100,100,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - Script - set faction'), +(3677000,9,4,0,0,0,100,0,100,100,100,100,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - Script - set Emotestate'), +(3677000,9,5,0,0,0,100,0,100,100,100,100,33,36770,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Horde Slave - Script - give quest credit'), +(3677000,9,6,0,0,0,100,0,100,100,100,100,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - Script - set run on'), +(3677000,9,7,0,0,0,100,0,500,500,500,500,69,1,0,0,0,0,0,19,23837,70,0,0,0,0,0, 'Horde Slave - Script - move to closest trigger'), +(3677000,9,8,0,0,0,100,0,8000,8000,8000,8000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Horde Slave - Script - despawn'); + +-- Alliance Slave SAI +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (36764,36765,36766,36767); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (36764,36765,36766,36767); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (3676400); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(36764,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Reset - Emotestate'), +(36765,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Reset - Emotestate'), +(36766,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Reset - Emotestate'), +(36767,0,0,0,11,0,100,6,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Reset - Emotestate'), +(36764,0,1,0,8,0,100,7,71281,0,0,0,80,3676400,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Spellhit - Run Script'), +(36765,0,1,0,8,0,100,7,71281,0,0,0,80,3676400,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Spellhit - Run Script'), +(36766,0,1,0,8,0,100,7,71281,0,0,0,80,3676400,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Spellhit - Run Script'), +(36767,0,1,0,8,0,100,7,71281,0,0,0,80,3676400,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - On Spellhit - Run Script'), +-- Script +(3676400,9,0,0,0,0,100,0,500,500,500,500,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Alliance Slave - Script - Turnto envoker'), +(3676400,9,1,0,0,0,100,0,500,500,500,500,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - Script - say text'), +(3676400,9,2,0,0,0,100,0,100,100,100,100,18,512,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - Script - set unitflag'), +(3676400,9,3,0,0,0,100,0,100,100,100,100,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - Script - set faction'), +(3676400,9,4,0,0,0,100,0,100,100,100,100,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - Script - set Emotestate'), +(3676400,9,5,0,0,0,100,0,100,100,100,100,33,36764,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Alliance Slave - Script - give quest credit'), +(3676400,9,6,0,0,0,100,0,100,100,100,100,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - Script - set run on'), +(3676400,9,7,0,0,0,100,0,500,500,500,500,69,1,0,0,0,0,0,19,23837,70,0,0,0,0,0, 'Alliance Slave - Script - move to closest trigger'), +(3676400,9,8,0,0,0,100,0,8000,8000,8000,8000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Alliance Slave - Script - despawn'); + +-- Ball and chain SAI +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry` IN (201969); +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid` IN (201969); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(201969,1,0,0,64,0,100,6,0,0,0,0,85,71281,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Ball and chain - On Gossip Hello - Envoker cast on self'); + +-- Spell Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=71281; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,71281,0,31,3,36770,0,0,'','Spell 71281 targets entry 36770'), +(13,1,71281,1,31,3,36771,0,0,'','Spell 71281 targets entry 36771'), +(13,1,71281,2,31,3,36772,0,0,'','Spell 71281 targets entry 36772'), +(13,1,71281,3,31,3,36773,0,0,'','Spell 71281 targets entry 36773'), +(13,1,71281,4,31,3,36764,0,0,'','Spell 71281 targets entry 36764'), +(13,1,71281,5,31,3,36765,0,0,'','Spell 71281 targets entry 36765'), +(13,1,71281,6,31,3,36766,0,0,'','Spell 71281 targets entry 36766'), +(13,1,71281,7,31,3,36767,0,0,'','Spell 71281 targets entry 36767'); + +-- Creature text from sniff +DELETE FROM `creature_text` WHERE `entry` IN (36770,36771,36772,36773,36764,36765,36766,36767); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +-- Alliance Slaves +(36764,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Alliance Slave'), +(36764,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Alliance Slave'), +(36764,0,2, 'Have my babies.',12,0,100,0,0,0, 'Alliance Slave'), +(36764,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Alliance Slave'), +(36764,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Alliance Slave'), +(36765,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Alliance Slave'), +(36765,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Alliance Slave'), +(36765,0,2, 'Have my babies.',12,0,100,0,0,0, 'Alliance Slave'), +(36765,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Alliance Slave'), +(36765,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Alliance Slave'), +(36766,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Alliance Slave'), +(36766,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Alliance Slave'), +(36766,0,2, 'Have my babies.',12,0,100,0,0,0, 'Alliance Slave'), +(36766,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Alliance Slave'), +(36766,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Alliance Slave'), +(36767,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Alliance Slave'), +(36767,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Alliance Slave'), +(36767,0,2, 'Have my babies.',12,0,100,0,0,0, 'Alliance Slave'), +(36767,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Alliance Slave'), +(36767,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Alliance Slave'), +-- Horde Slaves +(36770,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Horde Slave'), +(36770,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Horde Slave'), +(36770,0,2, 'Have my babies.',12,0,100,0,0,0, 'Horde Slave'), +(36770,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Horde Slave'), +(36770,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Horde Slave'), +(36771,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Horde Slave'), +(36771,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Horde Slave'), +(36771,0,2, 'Have my babies.',12,0,100,0,0,0, 'Horde Slave'), +(36771,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Horde Slave'), +(36771,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Horde Slave'), +(36772,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Horde Slave'), +(36772,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Horde Slave'), +(36772,0,2, 'Have my babies.',12,0,100,0,0,0, 'Horde Slave'), +(36772,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Horde Slave'), +(36772,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Horde Slave'), +(36773,0,0, 'You''re a beautiful sight... you have no idea.',12,0,100,0,0,0, 'Horde Slave'), +(36773,0,1, '%s lets his mining pick drag on the ground as she approaches, clearly exhausted.',16,0,100,0,0,0, 'Horde Slave'), +(36773,0,2, 'Have my babies.',12,0,100,0,0,0, 'Horde Slave'), +(36773,0,3, 'If by life or death I can repay you, I will.',12,0,100,0,0,0, 'Horde Slave'), +(36773,0,4, 'I''m going to return to the front of the quarry. Kill a few extra for me.',12,0,100,0,0,0, 'Horde Slave'); diff --git a/sql/old/3.3.5a/2012_05_09_03_world_misc.sql b/sql/old/3.3.5a/2012_05_09_03_world_misc.sql new file mode 100644 index 00000000000..63e162fcfce --- /dev/null +++ b/sql/old/3.3.5a/2012_05_09_03_world_misc.sql @@ -0,0 +1,56 @@ +-- Update Scourgelord Tyrannus "Make him fly" +UPDATE `creature_template_addon` SET `bytes1`=50331648 WHERE `entry`=36794; + +-- Put Rimefang in the air and make him fly +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=36661; +UPDATE `creature_template_addon` SET `bytes1`=50331648 WHERE `entry`=36661; + +-- Deathwhisper Necrolyte SAI +SET @ENTRY := 36788; -- NPC entry +SET @SPELL1 := 69577; -- Shadow Bolt +SET @SPELL2 := 69578; -- Conversion Beam +SET @SPELL3 := 45104; -- Shadow Channelling +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,6,100,100,3000,3000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Deathwhisper Necrolyte - Combat - Cast Shadow Bolt'), +(@ENTRY,0,1,0,0,0,100,6,9000,9000,24000,24000,11,@SPELL2,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Deathwhisper Necrolyte - Combat - Cast Conversion Beam'); + +-- Deathwhisper Necrolyte pathing +SET @NPC := 202231; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=592.975,`position_y`=176.104,`position_z`=508.746 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,596.0208,175.5243,508.3654,0,0,0,100,0), +(@PATH,2,605.2656,157.7101,507.2126,0,0,0,100,0), +(@PATH,3,604.4063,146.283,507.3376,0,0,0,100,0), +(@PATH,4,592.2899,131.4271,507.8163,0,0,0,100,0), +(@PATH,5,577.4531,118.224,508.3163,0,0,0,100,0), +(@PATH,6,563.0695,103.7309,514.1504,0,0,0,100,0), +(@PATH,7,557.7743,89.41319,523.1727,0,0,0,100,0), +(@PATH,8,560.9583,77.65278,525.4227,0,0,0,100,0), +(@PATH,9,560.9583,77.65278,525.4227,0,0,0,100,0), +(@PATH,10,571.0139,69.43403,525.2753,0,0,0,100,0), +(@PATH,11,560.9583,77.65278,525.4227,0,0,0,100,0), +(@PATH,12,557.7743,89.41319,523.1727,0,0,0,100,0), +(@PATH,13,563.0695,103.7309,514.1504,0,0,0,100,0), +(@PATH,14,577.4531,118.224,508.3163,0,0,0,100,0), +(@PATH,15,592.2899,131.4271,507.8163,0,0,0,100,0), +(@PATH,16,604.4063,146.283,507.3376,0,0,0,100,0), +(@PATH,17,605.2656,157.7101,507.2126,0,0,0,100,0), +(@PATH,18,596.0208,175.5243,508.3654,0,0,0,100,0); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=202231; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(202231,202231,0,0,2), +(202231,202099,7,288,2), +(202231,202282,7,324,2), +(202231,202125,7,360,2), +(202231,202203,7,36,2), +(202231,201960,7,72,2); + +-- Remove a dupe spawn +DELETE FROM `creature` WHERE `guid`=201998; +DELETE FROM `creature_addon` WHERE `guid`=201998; diff --git a/sql/old/3.3.5a/2012_05_10_00_world_sai.sql b/sql/old/3.3.5a/2012_05_10_00_world_sai.sql new file mode 100644 index 00000000000..c6d6e914345 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_00_world_sai.sql @@ -0,0 +1,42 @@ +-- [Q] See You on the Other Side + +-- Gan'jo SAI +SET @ENTRY := 26924; +SET @QUEST := 12121; +SET @GOSSIP := 10220; +SET @SPELL_RESURRECT := 61613; +UPDATE `creature_template` SET `npcflag`=3,`AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,62,0,100,0,@GOSSIP,0,0,0,11,@SPELL_RESURRECT,1,0,0,0,0,7,0,0,0,0,0,0,0,"Gan'jo - On Gossip Select - Cast Ganjo Resurrection"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gan'jo - On Gossip Select - Close Gossip"); + +-- Essence of Warlord Jin'arrak SAI +SET @ENTRY := 26902; +SET @SPELL_DIE_EFFECT := 61611; +SET @SPELL_CAMERA_SHAKE := 47533; +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=128 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100) AND `source_type` IN (0,9); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Essence of Warlord Jin'arrak - On Just Summoned - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,85,@SPELL_CAMERA_SHAKE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Essence of Warlord Jin'arrak - On Script - Invoker Cast Camera Shake - Small"), +(@ENTRY*100,9,1,0,0,0,100,0,4000,4000,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Essence of Warlord Jin'arrak - On Script - Killed Monster Credit"), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Essence of Warlord Jin'arrak - On Script - Monster Whisper Line 0"), +(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,85,@SPELL_CAMERA_SHAKE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Essence of Warlord Jin'arrak - On Script - Invoker Cast Camera Shake - Small"), +(@ENTRY*100,9,4,0,0,0,100,0,3000,3000,0,0,85,@SPELL_DIE_EFFECT,0,0,0,0,0,7,0,0,0,0,0,0,0,"Essence of Warlord Jin'arrak - On Script - Invoker Cast On The Other Side"); + +-- Essence of Warlord Jin'arrak text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"How dare you summon me without an offering!",42,0,0,0,0,0,"Essence of Warlord Jin'arrak"); + +-- Ganjo's Resurrection removes On The Other Side +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=@SPELL_RESURRECT; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(@SPELL_RESURRECT,-@SPELL_DIE_EFFECT,1,"Ganjo's Resurrection removes On The Other Side"); + +-- Conditions for Gan'jo's gossip option +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTarget`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`comment`) VALUES +(15,@GOSSIP,0,0,0,1,@SPELL_DIE_EFFECT,0,"Ganjo's Gossip - requires aura See You On The Other Side"), +(15,@GOSSIP,0,0,1,9,@QUEST,0,"Ganjo's Gossip - requires quest See You On The Other Side to be rewarded"); diff --git a/sql/old/3.3.5a/2012_05_10_01_world_misc.sql b/sql/old/3.3.5a/2012_05_10_01_world_misc.sql new file mode 100644 index 00000000000..a7a30d518a2 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_01_world_misc.sql @@ -0,0 +1,37 @@ +-- [Q] Leave Nothing to Chance + +-- Lower Wintergarde Mine Shaft and Upper Wintergarde Mine Shaft +UPDATE `creature_template` SET `MovementType`=0,`flags_extra`=`flags_extra`|128 WHERE `entry`IN (27437,27436); +UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `id` IN (27437,27436); + +-- Wintergarde Mine Bomb SAI +SET @ENTRY := 27435; +SET @SPELL_EXPLOSION := 48742; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,1,0,100,1,14000,14000,0,0,11,@SPELL_EXPLOSION,2,0,0,0,0,1,0,0,0,0,0,0,0,"Wintergarde Mine Bomb - Out of Combat - Cast Wintergarde Mine Explosion"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wintergarde Mine Bomb - On Wintergarde Mine Explosion Cast - Forced Despawn"); + +-- Spawn missing spell focus object for upper mine +DELETE FROM `gameobject` WHERE `id`=188711 AND `guid`=370; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(370,188711,571,1,1,3898.18,-881.748,119.533,0.421023,0,0,0.20896,0.977924,300,0,1); + +-- Spawn missing Upper Wintergarde Mine Shaft +DELETE FROM `creature` WHERE `id`=27436 AND `guid`=42576; +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 +(42576,27436,571,1,1,0,0,3899.86,-883.613,119.536,0.0636665,300,0,0,42,0,0,0,0,0); + +-- Spellscriptname +DELETE FROM `spell_script_names` WHERE `spell_id`=@SPELL_EXPLOSION; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(@SPELL_EXPLOSION,'spell_q12277_wintergarde_mine_explosion'); + +-- The conditions will make it works exactly like it should. Thanks a lot Josh. +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_EXPLOSION; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@SPELL_EXPLOSION,0,31,3,27437,0,0,'',"Wintergarde Mine Explosion - Lower Wintergarde Mine Shaft"), -- Effect 0 - SPELL_EFFECT_DUMMY +(13,1,@SPELL_EXPLOSION,1,31,3,27436,0,0,'',"Wintergarde Mine Explosion - Upper Wintergarde Mine Shaft"), -- Effect 0 - SPELL_EFFECT_DUMMY +(13,2,@SPELL_EXPLOSION,0,31,4,0,0,0,'',"Wintergarde Mine Explosion - Targets Players"), -- Effect 1 - SPELL_EFFECT_KNOCK_BACK +(13,4,@SPELL_EXPLOSION,0,31,5,188712,0,0,'',"Wintergarde Mine Explosion - Wintergarde Mine Cave In (2)"); -- Effect 2 - SPELL_EFFECT_ACTIVATE_OBJECT diff --git a/sql/old/3.3.5a/2012_05_10_02_world_creature_template.sql b/sql/old/3.3.5a/2012_05_10_02_world_creature_template.sql new file mode 100644 index 00000000000..28893f24fdf --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_02_world_creature_template.sql @@ -0,0 +1,2 @@ +-- fix creauture_template loot id for infinite corruptor. could have sworn this was already in the db. +UPDATE `creature_template` SET `lootid` = 0 WHERE `entry` IN (32313,32273); diff --git a/sql/old/3.3.5a/2012_05_10_03_world_misc.sql b/sql/old/3.3.5a/2012_05_10_03_world_misc.sql new file mode 100644 index 00000000000..339f52ac0bb --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_03_world_misc.sql @@ -0,0 +1,129 @@ + -- Remove obsolete requirement 'cooking profession' from quest 'Beer Basted Boar Ribs' (thx tifkat) closes #5198 +UPDATE `quest_template` SET `RequiredSkillId`=0, `RequiredSkillPoints`=0 WHERE `Id`=384; + +-- Fix proc for Death's Verdict/Choice (author: kandera) closes #6041 +UPDATE `spell_proc_event` SET `procFlags` = 0, `procEx` = `procEx`|262144 WHERE `entry` in (67702, 67771); + +-- Disables quest "Desperate Research" for all factions author trista closes #5285 +DELETE FROM `disables` WHERE `sourceType` = 1 AND `entry` in (12782,12783,12811,12784,12752,12775,12777,12753,12808,12772); +INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES +(1,12782,0,0,0,'Disable quest from Scourge Invasion for Blood Elves'), +(1,12783,0,0,0,'Disable quest from Scourge Invasion for Orcs'), +(1,12811,0,0,0,'Disable quest from Scourge Invasion for Trolls'), +(1,12784,0,0,0,'Disable quest from Scourge Invasion for Tauren'), +(1,12752,0,0,0,'Disable quest from Scourge Invasion for undead'), +(1,12775,0,0,0,'Disable quest from Scourge Invasion for Human'), +(1,12777,0,0,0,'Disable quest from Scourge Invasion for Draenei'), +(1,12753,0,0,0,'Disable quest from Scourge Invasion for Dwarves'), +(1,12808,0,0,0,'Disable quest from Scourge Invasion for Gnomes'), +(1,12772,0,0,0,'Disable quest from Scourge Invasion for Night Elves'); +-- Disables scourge invasion connected quests listed below +DELETE FROM `disables` WHERE `sourceType` = 1 AND `entry` in (12788,12812,12785,12786,12787,12774,12776,12771,12809,12773); +INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES +(1,12788,0,0,0,'Disable quest from Scourge Invasion for Blood Elves'), +(1,12812,0,0,0,'Disable quest from Scourge Invasion for Orcs'), +(1,12785,0,0,0,'Disable quest from Scourge Invasion for Trolls'), +(1,12786,0,0,0,'Disable quest from Scourge Invasion for Tauren'), +(1,12787,0,0,0,'Disable quest from Scourge Invasion for undead'), +(1,12774,0,0,0,'Disable quest from Scourge Invasion for Human'), +(1,12776,0,0,0,'Disable quest from Scourge Invasion for Draenei'), +(1,12771,0,0,0,'Disable quest from Scourge Invasion for Dwarves'), +(1,12809,0,0,0,'Disable quest from Scourge Invasion for Gnomes'), +(1,12773,0,0,0,'Disable quest from Scourge Invasion for Night Elves'); + +-- Limit Bloodgem Shard use to Netherstorm Cristal Target author: nelegalno closes #4165 +DELETE FROM `conditions` WHERE (`SourceEntry`=34367 AND `SourceTypeOrReferenceId`=17 AND `ConditionTypeOrReference`=29); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,34367,0,29,19421,15,0,64,'','Limit Bloodgem Shard use to Netherstorm Cristal Target'); + +-- Path of xx and A Change of Heart (Ashen Band rings) author: studioworks closes #2544 +UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `id` IN +(24827,24834,24835,24823,24828,24829,25239,25240,25242,24826,24832,24833,24825,24830,24831,24819,24820,24821,24822,24836,24837,24838,24839,24840,24841,24842,24843,24844,24845,24846,24847,25246,25247,25248,25249); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry` IN +-- Paths +(24827,24834,24835,24823,24828,24829,25239,25240,25242,24826,24832,24833,24825,24830,24831, +-- A Change of Heart +24819,24820,24821,24822,24836,24837,24838,24839,24840,24841,24842,24843,24844,24845,24846,24847,25246,25247,25248,25249); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`Comment`) VALUES +-- Path of Courage +(19,0,24827,0,2,50375,1,0,'Path of Courage 1'), +(19,0,24834,0,2,50388,1,0,'Path of Courage 2'), +(19,0,24835,0,2,50403,1,0,'Path of Courage 3'), +-- Path of Destruction +(19,0,24823,0,2,50384,1,0,'Path of Destruction 1'), +(19,0,24828,0,2,50377,1,0,'Path of Destruction 2'), +(19,0,24829,0,2,50397,1,0,'Path of Destruction 3'), +-- Path of Might +(19,0,25239,0,2,52569,1,0,'Path of Might 1'), +(19,0,25240,0,2,52570,1,0,'Path of Might 2'), +(19,0,25242,0,2,52571,1,0,'Path of Might 3'), +-- Path of Vengeance +(19,0,24826,0,2,50376,1,0,'Path of Vengeance 1'), +(19,0,24832,0,2,50387,1,0,'Path of Vengeance 2'), +(19,0,24833,0,2,50401,1,0,'Path of Vengeance 3'), +-- Path of Wisdom +(19,0,24825,0,2,50378,1,0,'Path of Wisdom 1'), +(19,0,24830,0,2,50386,1,0,'Path of Wisdom 2'), +(19,0,24831,0,2,50399,1,0,'Path of Wisdom 3'), +-- A Change of Heart +(19,0,24819,0,2,50377,1,0,'A Change of Heart'), +(19,0,24820,0,2,50376,1,0,'A Change of Heart'), +(19,0,24821,0,2,50375,1,0,'A Change of Heart'), +(19,0,24822,0,2,50378,1,0,'A Change of Heart'), +(19,0,24836,0,2,50384,1,0,'A Change of Heart'), +(19,0,24837,0,2,50386,1,0,'A Change of Heart'), +(19,0,24838,0,2,50387,1,0,'A Change of Heart'), +(19,0,24839,0,2,50388,1,0,'A Change of Heart'), +(19,0,24840,0,2,50397,1,0,'A Change of Heart'), +(19,0,24841,0,2,50399,1,0,'A Change of Heart'), +(19,0,24842,0,2,50401,1,0,'A Change of Heart'), +(19,0,24843,0,2,50403,1,0,'A Change of Heart'), +(19,0,24844,0,2,50398,1,0,'A Change of Heart'), +(19,0,24845,0,2,50400,1,0,'A Change of Heart'), +(19,0,24846,0,2,50402,1,0,'A Change of Heart'), +(19,0,24847,0,2,50404,1,0,'A Change of Heart'), +(19,0,25246,0,2,52572,1,0,'A Change of Heart'), +(19,0,25247,0,2,52569,1,0,'A Change of Heart'), +(19,0,25248,0,2,52570,1,0,'A Change of Heart'), +(19,0,25249,0,2,52571,1,0,'A Change of Heart'); + +-- spawn farmer torp author: zxbiohazardzx closes #6256 +SET @guid := 42652; +DELETE FROM `creature` WHERE `guid`=@guid; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`) +VALUES +(@guid,25607,571,1,1,2886.325,6385.55,92.96985,1.4512,120); -- Farmer Torp + +-- Disgusting Oozeling aura author: gecko32 closes #6197 +UPDATE `creature_template_addon` SET `auras`='25163' WHERE `entry`=15429; +-- Mr. Chilly +-- Add aura chilly for Periodic slide +DELETE FROM `creature_template_addon` WHERE `entry`=29726; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(29726, 0, 0, 0, 0, 0, '61811'); + +-- Update to Change <name> to $n in page text author: gecko32 closes #5930 +UPDATE `page_text` SET `text`='This proof of deed is to verify that $n slew Margol the Rager, scourge of the searing gorge.$B$BThe Ironforge museum recognizes this achievement and thanks the bearer for their generous contribution.$B$B-Head Curator Thorius Stonetender' WHERE `entry`=1231; + +-- Update frost shock and you to only be for shamans. author: whit33r closes #4727 +UPDATE `quest_template` SET `RequiredClasses`=64 WHERE `id` = 7505; + +-- fixes ashen band of destruction proc author: kandera +DELETE FROM `spell_proc_event` WHERE `entry` = 72417; +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +(72417,0,0,0,0,0,327680,0,0,0,60); + +-- fixes quest credit from Fel reaver no thanks! author: tREAk & shlomi1515 closes #3715 +UPDATE `spell_dbc` SET `Effect1`=16,`EffectMiscValue1`=10855 WHERE `id`=38758; +DELETE FROM `creature_ai_scripts` WHERE creature_id=22293; + +-- fix areatrigger for wickerman camp author: boomper closes #3549 +DELETE FROM `areatrigger_involvedrelation` WHERE `id` =3991; +INSERT INTO `areatrigger_involvedrelation` (`id`, `quest`) +VALUES (3991,1658); + +-- yous have da darkrune should be daily author: kaelima closes #3457 +UPDATE `quest_template` SET `SpecialFlags` = `SpecialFlags` | 1 WHERE `id` = 11027; + +-- fix infinite corruptor loot id author: vincent-michael +UPDATE `creature_template` SET `lootid` = 32313 WHERE `entry` =32313; diff --git a/sql/old/3.3.5a/2012_05_10_04_world_ceature_sai.sql b/sql/old/3.3.5a/2012_05_10_04_world_ceature_sai.sql new file mode 100644 index 00000000000..5f01e951c4b --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_04_world_ceature_sai.sql @@ -0,0 +1,14 @@ +-- Spawn Disturbed Glacial Revenant +DELETE FROM `creature` WHERE `guid`=201998; +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 +(201998,36874,658,2,1,0,0,1053.894,-93.05556,632.8575,4.223697,86400,0,0,1,0,0,0,0,0); +DELETE FROM `creature_addon` WHERE `guid`=201998; +INSERT INTO `creature_addon` (`guid`,`bytes2`) VALUES +(201998,1); + +-- Disturbed Glacial Revenant SAI +SET @ENTRY := 36874; -- NPC entry +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,4,0,0,12000,15000,11,55216,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Disturbed Glacial Revenant - Combat - Cast Avalanche'); diff --git a/sql/old/3.3.5a/2012_05_10_05_world_waypoints.sql b/sql/old/3.3.5a/2012_05_10_05_world_waypoints.sql new file mode 100644 index 00000000000..1677d74c4a7 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_05_world_waypoints.sql @@ -0,0 +1,88 @@ +-- Deathwhisper Necrolyte pathing +SET @NPC := 202103; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,555.3976,303.5347,507.6232,0,0,0,100,0), +(@PATH,2,568.4896,297.9913,506.9572,0,0,0,100,0), +(@PATH,3,586.1476,292.5486,506.3322,0,0,0,100,0), +(@PATH,4,598.5833,292.6007,506.3322,0,0,0,100,0), +(@PATH,5,602.3438,300.2135,506.9457,0,0,0,100,0), +(@PATH,6,603.0573,307.5399,507.6957,0,0,0,100,0), +(@PATH,7,611.7239,316.1129,508.4457,0,0,0,100,0), +(@PATH,8,620.0677,312.684,508.1957,0,0,0,100,0), +(@PATH,9,622.184,305.0868,508.3207,0,0,0,100,0), +(@PATH,10,616.684,295.2083,507.8819,0,0,0,100,0), +(@PATH,11,613.9236,287.4288,507.0737,0,0,0,100,0), +(@PATH,12,618.5174,272.882,507.6097,0,0,0,100,0), +(@PATH,13,621.4445,263.4861,507.9438,0,0,0,100,0), +(@PATH,14,618.5174,272.882,507.6097,0,0,0,100,0), +(@PATH,15,613.9236,287.4288,507.0737,0,0,0,100,0), +(@PATH,16,616.684,295.2083,507.8819,0,0,0,100,0), +(@PATH,17,622.184,305.0868,508.3207,0,0,0,100,0), +(@PATH,18,620.0677,312.684,508.1,0,0,0,100,0), +(@PATH,19,611.7239,316.1129,508.4457,0,0,0,100,0), +(@PATH,20,603.0573,307.5399,507.6629,0,0,0,100,0), +(@PATH,21,602.3438,300.2135,506.8405,0,0,0,100,0), +(@PATH,22,598.5833,292.6007,506.3498,0,0,0,100,0), +(@PATH,23,586.1476,292.5486,506.3322,0,0,0,100,0), +(@PATH,24,568.4896,297.9913,506.9572,0,0,0,100,0); +DELETE FROM `creature_formations` WHERE `leaderGUID`=@NPC; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(@NPC,@NPC,0,0,2), +(@NPC,201819,7,270,2), +(@NPC,201934,7,306,2), +(@NPC,202121,7,342,2), +(@NPC,202196,7,18,2), +(@NPC,202098,7,54,2), +(@NPC,201954,7,90,2); + +-- Deathwhisper Necrolyte pathing +SET @NPC := 202273; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=611.9375,`position_y`=117.441,`position_z`=508.0308 WHERE `guid` IN (202273,202054,201845,201914,202145,202227,201988); +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,611.9375,117.441,508.0308,0,0,0,100,0), +(@PATH,2,620.9531,139.3004,506.531,0,0,0,100,0), +(@PATH,3,624.3854,153.9531,507.3376,0,0,0,100,0), +(@PATH,4,625.8316,167.6233,507.4478,0,0,0,100,0), +(@PATH,5,622.8368,183.6788,507.7706,0,0,0,100,0), +(@PATH,6,625.8316,167.6233,507.4478,0,0,0,100,0), +(@PATH,7,624.3854,153.9531,507.3376,0,0,0,100,0), +(@PATH,8,620.9531,139.3004,506.531,0,0,0,100,0), +(@PATH,9,611.9375,117.441,508.0308,0,0,0,100,0), +(@PATH,10,610.8828,99.47656,510.0737,0,0,0,100,0); +DELETE FROM `creature_formations` WHERE `leaderGUID`=@NPC; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(@NPC,@NPC,0,0,2), +(@NPC,202054,7,270,2), +(@NPC,201845,7,306,2), +(@NPC,201914,7,342,2), +(@NPC,202145,7,18,2), +(@NPC,202227,7,54,2), +(@NPC,201988,7,90,2); + +-- Fix previous creature removal +DELETE FROM `creature` WHERE `id`=42160; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`, `position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(42160,36881,658,3,1,0,0,592.975,176.104,510.1582,508.746,86400,0,0,1,0,0); +UPDATE `creature` SET `position_x`=611.9375,`position_y`=117.441,`position_z`=508.0308 WHERE `guid` IN (202273,202054,201845,201914,202145,202227,201988); +DELETE FROM `creature_formations` WHERE `leaderGUID`=202231; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(202231,202231,0,0,2), +(202231,202099,7,270,2), +(202231,202282,7,306,2), +(202231,202125,7,342,2), +(202231,202203,7,18,2), +(202231,201960,7,54,2), +(202231,42160,7,90,2); + +-- Update Scourgelord Tyrannus "Make him fly" +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=36794; diff --git a/sql/old/3.3.5a/2012_05_10_06_world_waypoints.sql b/sql/old/3.3.5a/2012_05_10_06_world_waypoints.sql new file mode 100644 index 00000000000..6fd04d0e4da --- /dev/null +++ b/sql/old/3.3.5a/2012_05_10_06_world_waypoints.sql @@ -0,0 +1,40 @@ +-- Deathwhisper Necrolyte pathing +SET @NPC := 202063; +SET @PATH := @NPC*10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=631.8229,`position_y`=229.7292,`position_z`=508.0604 WHERE `guid` IN (202028,202000,201957,201820,202122,202199); +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,631.8229,229.7292,508.0604,0,0,0,100,0), +(@PATH,2,643.8733,215.2674,508.2268,0,0,0,100,0), +(@PATH,3,659.0139,215.9635,507.8518,0,0,0,100,0), +(@PATH,4,674.184,213.5833,508.8467,0,0,0,100,0), +(@PATH,5,678.8004,201.066,508.4717,0,0,0,100,0), +(@PATH,6,662.4636,183.0694,507.9585,0,0,0,100,0), +(@PATH,7,650.8941,171.5642,507.7085,0,0,0,100,0), +(@PATH,8,637.7292,155.2569,507.9196,0,0,0,100,0), +(@PATH,9,644.6389,130.2639,510.4212,0,0,0,100,0), +(@PATH,10,654.9896,121.3038,511.9212,0,0,0,100,0), +(@PATH,11,677.7448,136.6528,512.7715,0,0,0,100,0), +(@PATH,12,678.2847,149.1233,507.8965,0,0,0,100,0), +(@PATH,13,677.7448,136.6528,512.7715,0,0,0,100,0), +(@PATH,14,654.9896,121.3038,511.9212,0,0,0,100,0), +(@PATH,15,644.6389,130.2639,510.4212,0,0,0,100,0), +(@PATH,16,637.7292,155.2569,507.9196,0,0,0,100,0), +(@PATH,17,650.8941,171.5642,507.7085,0,0,0,100,0), +(@PATH,18,662.4636,183.0694,507.9585,0,0,0,100,0), +(@PATH,19,678.8004,201.066,508.4717,0,0,0,100,0), +(@PATH,20,674.184,213.5833,508.8467,0,0,0,100,0), +(@PATH,21,659.0139,215.9635,507.8518,0,0,0,100,0), +(@PATH,22,643.8733,215.2674,508.2268,0,0,0,100,0); +DELETE FROM `creature_formations` WHERE `leaderGUID`=@NPC; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(@NPC,@NPC,0,0,2), +(@NPC,202028,7,270,2), +(@NPC,202000,7,306,2), +(@NPC,201957,7,342,2), +(@NPC,201820,7,18,2), +(@NPC,202122,7,54,2), +(@NPC,202199,7,90,2); diff --git a/sql/old/3.3.5a/2012_05_11_00_world_waypoints.sql b/sql/old/3.3.5a/2012_05_11_00_world_waypoints.sql new file mode 100644 index 00000000000..fa4e18f6468 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_11_00_world_waypoints.sql @@ -0,0 +1,31 @@ +-- Scourgelord Tyrannus pathing +SET @NPC := 201951; +SET @PATH := @NPC*10; +UPDATE `creature` SET `position_x`=873.783,`position_y`=136.9774,`position_z`=623.6115,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`) VALUES (@NPC,@PATH,50331648,1); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUE +(@PATH,1,873.783,136.9774,623.6115,0,0,0,100,0), +(@PATH,2,872.9045,139.2743,622.4446,0,0,0,100,0), +(@PATH,3,888.7917,171.3403,591.3615,0,0,0,100,0), +(@PATH,4,861.3073,209.8455,591.3615,0,0,0,100,0), +(@PATH,5,830.4913,254.5556,591.3615,0,0,0,100,0), +(@PATH,6,780.4844,277.6406,591.3615,0,0,0,100,0), +(@PATH,7,732.6771,272.4635,591.3615,0,0,0,100,0), +(@PATH,8,683.9028,265.276,591.3615,0,0,0,100,0), +(@PATH,9,612.3368,284.7934,553.4998,0,0,0,100,0), +(@PATH,10,554.816,303.1858,553.4998,0,0,0,100,0), +(@PATH,11,498.1024,309.0625,553.4998,0,0,0,100,0), +(@PATH,12,470.4167,230.0174,553.4998,0,0,0,100,0), +(@PATH,13,454.0087,175.2135,553.4998,0,0,0,100,0), +(@PATH,14,492.4288,127.1806,583.1108,0,0,0,100,0), +(@PATH,15,551.2604,121.6354,583.1108,0,0,0,100,0), +(@PATH,16,647.5573,126.3542,583.1108,0,0,0,100,0), +(@PATH,17,766.2222,130.9254,583.1108,0,0,0,100,0), +(@PATH,18,829.408,42.33854,583.1108,0,0,0,100,0), +(@PATH,19,746.7101,-53.03299,583.1108,0,0,0,100,0), +(@PATH,20,663.2379,-77.32291,583.1108,0,0,0,100,0), +(@PATH,21,618.6389,3.369792,583.1108,0,0,0,100,0), +(@PATH,22,641.8559,89.27604,583.1108,0,0,0,100,0), +(@PATH,23,794.1667,115.6858,583.1108,0,0,0,100,0); diff --git a/sql/old/3.3.5a/2012_05_11_01_world_gameobject_template.sql b/sql/old/3.3.5a/2012_05_11_01_world_gameobject_template.sql new file mode 100644 index 00000000000..630a166276b --- /dev/null +++ b/sql/old/3.3.5a/2012_05_11_01_world_gameobject_template.sql @@ -0,0 +1,4 @@ +-- Lock Ice Wall and make untargetable +UPDATE `gameobject_template` SET `flags`=18 WHERE `entry`=201885; +-- Saronite Rock Should be untargetable +UPDATE `gameobject_template` SET `flags`=18 WHERE `entry`=196485; diff --git a/sql/old/3.3.5a/2012_05_11_02_world_conditions.sql b/sql/old/3.3.5a/2012_05_11_02_world_conditions.sql new file mode 100644 index 00000000000..a10c27a0ef5 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_11_02_world_conditions.sql @@ -0,0 +1,23 @@ +-- Spell Conditions for spell Necromantic Power 69347 +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=69347; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,69347,0,31,3,37496,0,0,'','Spell 69347 targets entry 37496'), +(13,1,69347,1,31,3,37497,0,0,'','Spell 69347 targets entry 37497'), +(13,1,69347,2,31,3,37498,0,0,'','Spell 69347 targets entry 37498'), +(13,1,69347,3,31,3,37584,0,0,'','Spell 69347 targets entry 37584'), +(13,1,69347,4,31,3,37587,0,0,'','Spell 69347 targets entry 37587'), +(13,1,69347,5,31,3,37588,0,0,'','Spell 69347 targets entry 37588'); + +-- Spell Conditions for spell Shriek of the Highborne 70512 +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=70512; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,70512,3,31,3,37584,0,0,'','Spell 70512 targets entry 37584'), +(13,1,70512,4,31,3,37587,0,0,'','Spell 70512 targets entry 37587'), +(13,1,70512,5,31,3,37588,0,0,'','Spell 70512 targets entry 37588'); + +-- Spell Conditions for spell Empowered Blizzard 70130 +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=70130; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,70130,0,31,3,37496,0,0,'','Spell 70130 targets entry 37496'), +(13,1,70130,1,31,3,37497,0,0,'','Spell 70130 targets entry 37497'), +(13,1,70130,2,31,3,37498,0,0,'','Spell 70130 targets entry 37498'); diff --git a/sql/old/3.3.5a/2012_05_12_00_world_gameobject_template.sql b/sql/old/3.3.5a/2012_05_12_00_world_gameobject_template.sql new file mode 100644 index 00000000000..ffa932c8640 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_12_00_world_gameobject_template.sql @@ -0,0 +1,2 @@ +-- Lock Halls of Reflection Portcullis +UPDATE `gameobject_template` SET `flags`=18 WHERE `entry`=201848; diff --git a/sql/old/3.3.5a/2012_05_12_01_world_item_loot_template.sql b/sql/old/3.3.5a/2012_05_12_01_world_item_loot_template.sql new file mode 100644 index 00000000000..052b749c48c --- /dev/null +++ b/sql/old/3.3.5a/2012_05_12_01_world_item_loot_template.sql @@ -0,0 +1,92 @@ +DELETE FROM `item_loot_template` WHERE `entry` BETWEEN 51999 AND 52005; +INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Satchel of Helpfull Goods (level 0-25) +(51999,51964,0,1,1,1,1), -- Vigorous Belt +(51999,51968,0,1,1,1,1), -- Enumerated Wrap +(51999,51978,0,1,1,1,1), -- Earthbound Girdle +(51999,51994,25,1,1,1,1), -- Tumultuous Cloak +-- Satchel of Helpfull Goods (level 26-35) +(52000,51965,0,1,1,1,1), -- Vigorous Handguards +(52000,51973,0,1,1,1,1), -- Enumerated Handwraps +(52000,51980,0,1,1,1,1), -- Earthbound Handgrips +(52000,51996,25,1,1,1,1), -- Tumultuous Necklace +-- Satchel of Helpfull Goods (level 36-45) +(52001,51966,0,1,1,1,1), -- Vigorous Spaulders +(52001,51974,0,1,1,1,1), -- Enumerated Shoulderpads +(52001,51976,0,1,1,1,1), -- Earthbound Shoulderguards +(52001,51984,0,1,1,1,1), -- Stalwart Shoulderpads +(52001,51992,25,1,1,1,1), -- Tumultuous Ring +-- Satchel of Helpfull Goods (level 46-55) +(52002,51962,0,1,1,1,1), -- Vigorous Bracers +(52002,51963,0,1,1,1,1), -- Vigorous Stompers +(52002,51967,0,1,1,1,1), -- Enumerated Sandals +(52002,51972,0,1,1,1,1), -- Enumerated Bracers +(52002,51981,0,1,1,1,1), -- Earthbound Wristguards +(52002,51982,0,1,1,1,1), -- Earthbound Boots +(52002,51989,0,1,1,1,1), -- Stalwart Bands +(52002,51990,0,1,1,1,1), -- Stalwart Treads +-- Satchel of Helpfull Goods (level 56-60) +(52003,51959,0,1,1,1,1), -- Vigorous Belt +(52003,51971,0,1,1,1,1), -- Enumerated Belt +(52003,51977,0,1,1,1,1), -- Earthbound Girdle +(52003,51985,0,1,1,1,1), -- Stalwart Belt +(52003,51993,25,1,1,1,1), -- Turbulent Cloak +-- Satchel of Helpfull Goods (level 61-64) +(52004,51960,0,1,1,1,1), -- Vigorous Gloves +(52004,51970,0,1,1,1,1), -- Enumerated Gloves +(52004,51979,0,1,1,1,1), -- Earthbound Grips +(52004,51987,0,1,1,1,1), -- Stalwart Grips +(52004,51995,25,1,1,1,1), -- Turbulent Necklace +-- Satchel of Helpfull Goods (level 65-70) +(52005,51961,0,1,1,1,1), -- Vigorous Shoulderguards +(52005,51969,0,1,1,1,1), -- Enumerated Shoulders +(52005,51975,0,1,1,1,1), -- Earthbound Shoulders +(52005,51983,0,1,1,1,1), -- Stalwart Shoulderguards +(52005,51991,25,1,0,1,1); -- Turbulent Signet +-- ------------------------------------------------------------------- +-- Set some Parameters +-- ------------------------------------------------------------------- +SET @Cloth := 400; -- Class Bitmask: 16 (Priest) +128 (Mage) +256 (Warlock) +SET @Leather1 := 1100; -- Class Bitmask: 4 (Hunter) +8 (Rogue) +64 (Shaman) +1024 (Druid) +SET @Leather2 := 1032; -- Class Bitmask: 8 (Rogue) +1024 (Druid) +SET @Mail1 := 3; -- Class Bitmask: 1 (Warrior) +2 (Paladin) +SET @Mail2 := 68; -- Class Bitmask: 4 (Hunter) +8 (Shaman) +SET @Plate := 35; -- Class Bitmask: 1 (Warrior) +2 (Paladin) +32 (DeathKnight) +-- Add conditions to make sure everyone gets beneficial loot for their class +-- ------------------------------------------------------------------- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=5 AND `SourceGroup` BETWEEN 51999 AND 52005 ; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +-- Cloth Items +(5,51999,51968,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Wrap only for clothusers'), +(5,52000,51973,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Handwraps only for clothusers'), +(5,52001,51974,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Shoulderpads only for clothusers'), +(5,52002,51967,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Sandals only for clothusers'), +(5,52002,51972,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Bracers only for clothusers'), +(5,52003,51971,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Belt only for clothusers'), +(5,52004,51970,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Gloves only for clothusers'), +(5,52005,51969,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Shoulders only for clothusers'), +-- Leather Items +(5,51999,51964,0,0,15,0,@Leather1,0,0,0,0,'','SOHG: Vigorous Belt only for leatherusers'), +(5,52000,51965,0,0,15,0,@Leather1,0,0,0,0,'','SOHG: Vigorous Handguards only for leatherusers'), +(5,52001,51966,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Spaulders only for leatherusers'), +(5,52002,51962,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Bracers only for leatherusers'), +(5,52002,51963,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Stompers only for leatherusers'), +(5,52003,51959,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Belt only for leatherusers'), +(5,52004,51960,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Gloves only for leatherusers'), +(5,52005,51961,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Shoulderguards only for leatherusers'), +-- Mail Items +(5,51999,51978,0,0,15,0,@Mail1,0,0,0,0,'','SOHG: Earthbound Girdle only for mail users'), +(5,52000,51980,0,0,15,0,@Mail1,0,0,0,0,'','SOHG: Earthbound Handgrips only for mail users'), +(5,52001,51976,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Shoulderguards only for mail users'), +(5,52002,51982,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Boots only for mail users'), +(5,52002,51981,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Wristguards only for mail users'), +(5,52003,51977,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Girdle only for mail users'), +(5,52004,51979,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Grips only for mail users'), +(5,52005,51975,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Shoulders only for mail users'), +-- Plate Items +(5,52001,51984,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Shoulderpads only for plate users'), +(5,52002,51989,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Bands only for plate users'), +(5,52002,51990,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Treads only for plate users'), +(5,52003,51985,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Belt only for plate users'), +(5,52004,51987,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Grips only for plate users'), +(5,52005,51983,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Shoulderguards only for plate users'); diff --git a/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql new file mode 100644 index 00000000000..b1f445faa59 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql @@ -0,0 +1,37 @@ +-- Add Reference Loots +SET @RefNormal := 35091; +SET @RefHeroic := 35092; +DELETE FROM `reference_loot_template` WHERE `entry` IN (@RefNormal,@RefHeroic); +INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Normal Loot +(@RefNormal,49839,0,1,1,1,1), -- Mourning Malice +(@RefNormal,49840,0,1,1,1,1), -- Hate-Forged Cleaver +(@RefNormal,49841,0,1,1,1,1), -- Blackened Geist Ribs +(@RefNormal,49842,0,1,1,1,1), -- Tapestry of the Frozen Throne +(@RefNormal,49843,0,1,1,1,1), -- Crystalline Citadel Gauntlets +(@RefNormal,49844,0,1,1,1,1), -- Crypt Fiend Slayer +(@RefNormal,49845,0,1,1,1,1), -- Bone Golem Scapula +(@RefNormal,49846,0,1,1,1,1), -- Chilled Heart of the Glacier +(@RefNormal,49847,0,1,1,1,1), -- Legguards of Untimely Demise +(@RefNormal,49848,0,1,1,1,1), -- Grim Lasher Shoulderguards +(@RefNormal,49849,0,1,1,1,1), -- Tattered Glacial-Woven Hood +(@RefNormal,49851,0,1,1,1,1), -- Greathelm of the Silver Hand +-- Heroic Loot +(@RefHeroic,50303,0,1,1,1,1), -- Black Icicle +(@RefHeroic,50302,0,1,1,1,1), -- Liar's Tongue +(@RefHeroic,50311,0,1,1,1,1), -- Second Helm of the Executioner +(@RefHeroic,50312,0,1,1,1,1), -- Chestguard of Broken Branches +(@RefHeroic,50310,0,1,1,1,1), -- Fossilized Ammonite Choker +(@RefHeroic,50313,0,1,1,1,1), -- Oath of Empress Zoe +(@RefHeroic,50309,0,1,1,1,1), -- Shriveled Heart +(@RefHeroic,50314,0,1,1,1,1), -- Strip of Remorse +(@RefHeroic,50308,0,1,1,1,1), -- Blighted Leather Footpads +(@RefHeroic,50305,0,1,1,1,1), -- Grinning Skull Boots +(@RefHeroic,50306,0,1,1,1,1), -- The Lady's Promise +(@RefHeroic,50304,0,1,1,1,1); -- Hoarfrost Gauntlets +-- Assign to the chest +DELETE FROM `gameobject_loot_template` WHERE `entry` IN (27985,27993); +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(27985,1,100,1,0,-@RefNormal,2), -- Two from Normal Reference Loot +(27993,1,100,1,0,-@RefHeroic,2), -- Two from Heroic Reference Loot +(27993,43102,85,1,0,1,1); -- Frozen Orb diff --git a/sql/old/3.3.5a/2012_05_13_00_world_creature_text.sql b/sql/old/3.3.5a/2012_05_13_00_world_creature_text.sql new file mode 100644 index 00000000000..8d083156fb0 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_13_00_world_creature_text.sql @@ -0,0 +1,13 @@ +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry`=36494; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(36494,0,0, 'Tiny creatures under feet, you bring Garfrost something good to eat!',14,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,1,0, 'Axe too weak. Garfrost make better and CRUSH YOU.',14,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,2,0, 'Garfrost tired of puny mortals. Now your bones will freeze!',14,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,3,0, 'Garfrost hope giant underpants clean. Save boss great shame. For later.',14,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,4,0, 'Will save for snack. For later.',12,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,4,1, 'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!',12,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,5,0, '%s hurls a massive saronite boulder at you!',16,0,100,0,0,0, 'Forgemaster Garfrost'), +(36494,6,0, '%s casts |cFF00AACCDeep Freeze|r at $n.',41,0,100,0,0,0, 'Forgemaster Garfrost'); +-- Remove old script text +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658006 AND -1658001; diff --git a/sql/old/3.3.5a/2012_05_13_01_world_creature_text.sql b/sql/old/3.3.5a/2012_05_13_01_world_creature_text.sql new file mode 100644 index 00000000000..8e983fd9a73 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_13_01_world_creature_text.sql @@ -0,0 +1,14 @@ +-- NPC talk text insert for Sara +DELETE FROM `creature_text` WHERE `entry`=33134; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(33134,0,0, 'Help me! Please get them off me!',14,0,100,0,0,15771, 'Sara YELL_PREFIGHT'), +(33134,0,1, 'What do you want from me? Leave me alone!',14,0,100,0,0,15772, 'Sara YELL_PREFIGHT'), +(33134,1,0, 'Yes! YES! Show them no mercy! Give no pause to your attacks!',14,0,100,0,0,15773, 'Sara YELL_COMBAT_PHASE_1'), +(33134,1,1, 'Let hatred and rage guide your blows!',14,0,100,0,0,15774, 'Sara YELL_COMBAT_PHASE_1'), +(33134,1,2, 'The time to strike at the head of the beast will soon be upon us! Focus your anger and hatred on his minions!',14,0,100,457,0,15775, 'Sara YELL_COMBAT_PHASE_1'), +(33134,2,0, 'Suffocate upon your own hate!',14,0,100,0,0,15776, 'Sara YELL_COMBAT_PHASE_2'), +(33134,2,1, 'Tremble, mortals, before the coming of the end!',14,0,100,0,0,15777, 'Sara YELL_COMBAT_PHASE_2'), +(33134,3,0, 'Powerless to act...',14,0,100,0,0,15778, 'Sara YELL_SLAY'), +(33134,3,1, 'Could they have been saved?',14,0,100,0,0,15779, 'YELL SAY_SLAY'); +-- remove script text +DELETE FROM script_texts WHERE entry BETWEEN -1603319 AND -1603310; diff --git a/sql/old/3.3.5a/2012_05_16_00_world_scripts.sql b/sql/old/3.3.5a/2012_05_16_00_world_scripts.sql new file mode 100644 index 00000000000..9997c09bd8d --- /dev/null +++ b/sql/old/3.3.5a/2012_05_16_00_world_scripts.sql @@ -0,0 +1,2 @@ +-- Add script to Dragonspire Hall Runes "UBRS" +UPDATE `gameobject_template` SET `ScriptName`= 'go_dragonspire_hall_rune' WHERE `entry` BETWEEN 175194 AND 175200; diff --git a/sql/old/3.3.5a/2012_05_17_00_world_creature_text.sql b/sql/old/3.3.5a/2012_05_17_00_world_creature_text.sql new file mode 100644 index 00000000000..d7df0f94c0b --- /dev/null +++ b/sql/old/3.3.5a/2012_05_17_00_world_creature_text.sql @@ -0,0 +1,7 @@ +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry`=9816; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(9816,0,0, '%s begins to regain its strength!',16,0,100,0,0,0, 'Pyroguard Emberseer'), +(9816,1,0, '%s is nearly at full strength!',16,0,100,0,0,0, 'Pyroguard Emberseer'), +(9816,2,0, '%s regains its power and breaks free of its bonds!',16,0,100,0,0,0, 'Pyroguard Emberseer'), +(9816,3,0, 'Ha! Ha! Ha! Thank you for freeing me, fools. Now let me repay you by charring the flesh from your bones.',14,0,100,0,0,0, 'Pyroguard Emberseer'); diff --git a/sql/old/3.3.5a/2012_05_18_00_world_conditions.sql b/sql/old/3.3.5a/2012_05_18_00_world_conditions.sql new file mode 100644 index 00000000000..ad18a6c65ef --- /dev/null +++ b/sql/old/3.3.5a/2012_05_18_00_world_conditions.sql @@ -0,0 +1,3 @@ +DELETE FROM `conditions` WHERE `SourceEntry` = 52264; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,52264,0,0,29,0,28653,5,0,0,97,"","Creature conditions for spell 52264 (Deliver stolen horse)"); diff --git a/sql/old/3.3.5a/2012_05_18_01_world_misc.sql b/sql/old/3.3.5a/2012_05_18_01_world_misc.sql new file mode 100644 index 00000000000..bded6fae447 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_18_01_world_misc.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc_event` WHERE `entry` = 70656; + +UPDATE `quest_template` SET `NextQuestId` = 3761 WHERE `id` IN (936,3784,3762); + +DELETE FROM `spell_proc_event` WHERE `entry` = 63611; +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +(63611,0,0,0,0,0,51154,0,0,0,0); diff --git a/sql/old/3.3.5a/2012_05_18_01_world_spell_target_position.sql b/sql/old/3.3.5a/2012_05_18_01_world_spell_target_position.sql new file mode 100644 index 00000000000..72ebc409d9d --- /dev/null +++ b/sql/old/3.3.5a/2012_05_18_01_world_spell_target_position.sql @@ -0,0 +1,9 @@ +DELETE FROM `spell_target_position` WHERE `id` IN (30719,53140,53141,53360,54406,68328,71512); +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(30719,571,5807.75,588.347,661.505,1.663), +(53140,571,5807.75,588.347,661.505,1.663), +(53141,571,5807.75,588.347,661.505,1.663), +(53360,571,5807.75,588.347,661.505,1.663), +(54406,571,5807.75,588.347,661.505,1.663), +(68328,571,5807.75,588.347,661.505,1.663), +(71512,571,5807.75,588.347,661.505,1.663); diff --git a/sql/old/3.3.5a/2012_05_19_00_world_quest_template.sql b/sql/old/3.3.5a/2012_05_19_00_world_quest_template.sql new file mode 100644 index 00000000000..f18172ed836 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_19_00_world_quest_template.sql @@ -0,0 +1,2 @@ +-- Change Flags for the Body and Heart Quest +UPDATE `quest_template` SET `Flags`=`Flags`&~2, `SpecialFlags`=`SpecialFlags`|2 WHERE `id` IN (6001,6002); diff --git a/sql/old/3.3.5a/2012_05_19_01_world_smart_scripts.sql b/sql/old/3.3.5a/2012_05_19_01_world_smart_scripts.sql new file mode 100644 index 00000000000..06169d8610a --- /dev/null +++ b/sql/old/3.3.5a/2012_05_19_01_world_smart_scripts.sql @@ -0,0 +1,7 @@ +-- Fix Quest 9962,9967,9970,9972,9973 +UPDATE `smart_scripts` SET `target_type`=16 WHERE `entryorguid`=18398 AND `id`=1; -- Brokentoe +UPDATE `smart_scripts` SET `target_type`=16 WHERE `entryorguid`=18399 AND `id`=4; -- Murkblood Twin +UPDATE `smart_scripts` SET `target_type`=16 WHERE `entryorguid`=18400 AND `id`=5; -- Rokdar the Sundered Lord +UPDATE `smart_scripts` SET `target_type`=16 WHERE `entryorguid`=18401 AND `id`=3; -- Skra'gath +UPDATE `smart_scripts` SET `id`=5,`link`=6,`target_type`=16 WHERE `entryorguid`=18402 AND `action_type`=15; -- Warmaul Champion +UPDATE `smart_scripts` SET `id`=6 WHERE `entryorguid`=18402 AND `action_type`=45; -- Warmaul Champion diff --git a/sql/old/3.3.5a/2012_05_19_02_world_misc.sql b/sql/old/3.3.5a/2012_05_19_02_world_misc.sql new file mode 100644 index 00000000000..97a77ac0ab3 --- /dev/null +++ b/sql/old/3.3.5a/2012_05_19_02_world_misc.sql @@ -0,0 +1,6 @@ +-- 2012-05-19 12:48:24 SourceEntry 52264 in `condition` table, has incorrect SourceGroup 0 (spell effectMask) set , ignoring. +UPDATE `conditions` SET `SourceGroup`=1 WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=0 AND `SourceEntry`=52264 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=29 AND `ConditionTarget`=0 AND `ConditionValue1`=28653 AND `ConditionValue2`=5 AND `ConditionValue3`=0; + +-- 2012-05-19 12:48:18 Quest 384 has `ZoneOrSort` = -304 but `RequiredSkillId` does not have a corresponding value (185). +-- It is not clear if cooking was required on 3.3.5, so reverting it to its original state (however we are sure it is not required in Cata) +UPDATE `quest_template` SET `RequiredSkillId`=185, `RequiredSkillPoints`=1 WHERE `Id`=384; diff --git a/sql/updates/world/2012_05_19_03_world_version.sql b/sql/updates/world/2012_05_19_03_world_version.sql new file mode 100644 index 00000000000..53c6821be69 --- /dev/null +++ b/sql/updates/world/2012_05_19_03_world_version.sql @@ -0,0 +1 @@ +UPDATE `version` SET `db_version`='TDB 335.11.47' LIMIT 1; diff --git a/sql/updates/world/2012_05_19_04_creature_loot_template.sql b/sql/updates/world/2012_05_19_04_creature_loot_template.sql new file mode 100644 index 00000000000..ae996e01956 --- /dev/null +++ b/sql/updates/world/2012_05_19_04_creature_loot_template.sql @@ -0,0 +1 @@ +DELETE FROM `creature_loot_template` WHERE `entry`=31813 AND `item`=36912; -- Saronite Ore diff --git a/sql/updates/world/2012_05_19_05_gameobject_loot_template.sql b/sql/updates/world/2012_05_19_05_gameobject_loot_template.sql new file mode 100644 index 00000000000..f95cb45efe4 --- /dev/null +++ b/sql/updates/world/2012_05_19_05_gameobject_loot_template.sql @@ -0,0 +1,93 @@ +-- Set Variables +SET @Gunship10N := 28057; -- Data1 for 201872 & 202177 +SET @Gunship10H := 28045; -- Data1 for 201873 & 202178 +SET @Gunship25N := 28072; -- Data1 for 201874 & 202179 +SET @Gunship25H := 28090; -- Data1 for 201875 & 202180 +SET @emblem := 49426; -- Emblem of Frost +SET @SfShard := 50274; -- Shadowfrost Shard +SET @PriSar := 49908; -- Primordial Saronite +-- Dug up the old references i created for UP34: +SET @Ref10J := 34329; +SET @Ref25J := 34251; +SET @RefJ10H := 34263; +SET @RefJ25H := 34275; +-- Gunship_Armory10N_reference +DELETE FROM `reference_loot_template` WHERE `entry` IN (@Ref10J,@Ref25J,@RefJ10H,@RefJ25H); +INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(@Ref10J,50791,0,1,1,1,1), -- Saronite Gargoyle Cloak +(@Ref10J,50795,0,1,1,1,1), -- Cord of Dark Suffering +(@Ref10J,50794,0,1,1,1,1), -- Neverending Winter +(@Ref10J,50787,0,1,1,1,1), -- Frost Giant's Cleaver +(@Ref10J,50793,0,1,1,1,1), -- Midnight Sun +(@Ref10J,50788,0,1,1,1,1), -- Bone Drake's Enameled Boots +(@Ref10J,50792,0,1,1,1,1), -- Pauldrons of Lost Hope +(@Ref10J,50340,0,1,1,1,1), -- Muradin's Spyglass +(@Ref10J,50797,0,1,1,1,1), -- Ice-Reinforced Vrykul Helm +(@Ref10J,50790,0,1,1,1,1), -- Abomination's Bloody Ring +(@Ref10J,50789,0,1,1,1,1), -- Icecrown Rampart Bracers +(@Ref10J,50796,0,1,1,1,1), -- Bracers of Pale Illumination +-- Gunship_Armory25N_reference +(@Ref25J,50011,0,1,1,1,1), -- Gunship Captain's Mittens +(@Ref25J,50002,0,1,1,1,1), -- Polar Bear Claw Bracers +(@Ref25J,50006,0,1,1,1,1), -- Corp'rethar Ceremonial Crown +(@Ref25J,50010,0,1,1,1,1), -- Waistband of Righteous Fury +(@Ref25J,50003,0,1,1,1,1), -- Boneguard Commander's Pauldrons +(@Ref25J,50000,0,1,1,1,1), -- Scourge Hunter's Vambraces +(@Ref25J,50359,0,1,1,1,1), -- Althor's Abacus +(@Ref25J,50352,0,1,1,1,1), -- Corpse Tongue Coin +(@Ref25J,49999,0,1,1,1,1), -- Skeleton Lord's Circle +(@Ref25J,50009,0,1,1,1,1), -- Boots of Unnatural Growth +(@Ref25J,50008,0,1,1,1,1), -- Ring of Rapid Ascent +(@Ref25J,49998,0,1,1,1,1), -- Shadowvault Slayer's Cloak +(@Ref25J,50005,0,1,1,1,1), -- Amulet of the Silent Eulogy +(@Ref25J,50411,0,1,1,1,1), -- Scourgeborne Waraxe +(@Ref25J,50001,0,1,1,1,1), -- Ikfirus's Sack of Wonder +-- Gunship_Armory10H_reference +(@RefJ10H,51912,0,1,1,1,1), -- Saronite Gargoyle Cloak (heroic) +(@RefJ10H,51908,0,1,1,1,1), -- Cord of Dark Suffering (heroic) +(@RefJ10H,51909,0,1,1,1,1), -- Neverending Winter (heroic) +(@RefJ10H,51916,0,1,1,1,1), -- Frost Giant's Cleaver (heroic) +(@RefJ10H,51910,0,1,1,1,1), -- Midnight Sun (heroic) +(@RefJ10H,51915,0,1,1,1,1), -- Bone Drake's Enameled Boots (heroic) +(@RefJ10H,51911,0,1,1,1,1), -- Pauldrons of Lost Hope (heroic) +(@RefJ10H,50345,0,1,1,1,1), -- Muradin's Spyglass (heroic) +(@RefJ10H,51906,0,1,1,1,1), -- Ice-Reinforced Vrykul Helm (heroic) +(@RefJ10H,51913,0,1,1,1,1), -- Abomination's Bloody Ring (heroic) +(@RefJ10H,51914,0,1,1,1,1), -- Icecrown Rampart Bracers (heroic) +(@RefJ10H,51907,0,1,1,1,1), -- Bracers of Pale Illumination (heroic) +-- Gunship_Armory25H_reference +(@RefJ25H,50663,0,1,1,1,1), -- Gunship Captain's Mittens (heroic) +(@RefJ25H,50659,0,1,1,1,1), -- Polar Bear Claw Bracers (heroic) +(@RefJ25H,50661,0,1,1,1,1), -- Corp'rethar Ceremonial Crown (heroic) +(@RefJ25H,50667,0,1,1,1,1), -- Waistband of Righteous Fury (heroic) +(@RefJ25H,50660,0,1,1,1,1), -- Boneguard Commander's Pauldrons (heroic) +(@RefJ25H,50655,0,1,1,1,1), -- Scourge Hunter's Vambraces (heroic) +(@RefJ25H,50366,0,1,1,1,1), -- Althor's Abacus (heroic) +(@RefJ25H,50349,0,1,1,1,1), -- Corpse Tongue Coin (heroic) +(@RefJ25H,50657,0,1,1,1,1), -- Skeleton Lord's Circle (heroic) +(@RefJ25H,50665,0,1,1,1,1), -- Boots of Unnatural Growth (heroic) +(@RefJ25H,50664,0,1,1,1,1), -- Ring of Rapid Ascent (heroic) +(@RefJ25H,50653,0,1,1,1,1), -- Shadowvault Slayer's Cloak (heroic) +(@RefJ25H,50658,0,1,1,1,1), -- Amulet of the Silent Eulogy (heroic) +(@RefJ25H,50654,0,1,1,1,1), -- Scourgeborne Waraxe (heroic) +(@RefJ25H,50656,0,1,1,1,1); -- Ikfirus's Sack of Wonder (heroic) +-- Bind the refs to the objects +DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@Gunship10N,@Gunship10H,@Gunship25N,@Gunship25H); +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Gunship10N +(@Gunship10N,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 10N +(@Gunship10N,1,100,1,0,-@Ref10J,2), -- 2 from reference 10Normal +-- Gunship25N +(@Gunship25N,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 25N +(@Gunship25N,1,100,1,0,-@Ref25J,2), -- 3 from reference 25Normal +(@Gunship25N,@SfShard,-35,1,0,1,1), -- Shadowfrost Shard @ 38% chance +(@Gunship25N,@PriSar,38,1,0,1,1), -- Primordial Saronite @ 10% chance +-- Gunship10H +(@Gunship10H,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 10H +(@Gunship10H,1,100,1,0,-@RefJ10H,2), -- 2 from reference 10Heroic +(@Gunship10H,@PriSar,38,1,0,1,1), -- Primordial Saronite @ 38% chance +-- Gunship25H +(@Gunship25H,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 25H +(@Gunship25H,1,100,1,0,-@RefJ25H,2), -- 3 from reference 25Heroic +(@Gunship25H,@SfShard,-75,1,0,1,1), -- Shadowfrost Shard @ 75% chance +(@Gunship25H,@PriSar,50,1,0,1,1); -- Primordial Saronite @ 50% chance diff --git a/sql/updates/world/2012_05_19_06_gameobject_loot_template.sql b/sql/updates/world/2012_05_19_06_gameobject_loot_template.sql new file mode 100644 index 00000000000..9b2dcbb9363 --- /dev/null +++ b/sql/updates/world/2012_05_19_06_gameobject_loot_template.sql @@ -0,0 +1,13 @@ +DELETE FROM `reference_loot_template` WHERE `entry`=34172; +DELETE FROM `creature_loot_template` WHERE `entry`=38013; +DELETE FROM `gameobject_loot_template` WHERE `entry`=28683; +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(28683,35498,3,1,0,1,1), -- Formula: Enchant Weapon - Deathfrost +(28683,35557,28,1,0,1,2), -- Huge Snowball +(28683,35720,3,1,0,5,6), -- Lord of Frost's Private Label +(28683,35723,12,1,0,1,1), -- Shards of Ahune +(28683,54801,0,1,1,1,1), -- Icebound Cloak +(28683,54802,0,1,1,1,1), -- The Frost Lord's War Cloak +(28683,54803,0,1,1,1,1), -- The Frost Lord's Battle Shroud +(28683,54804,0,1,1,1,1), -- Shroud of Winter's Chill +(28683,54805,0,1,1,1,1); -- Cloak of the Frigid Winds diff --git a/sql/updates/world/2012_05_20_00_world_misc.sql b/sql/updates/world/2012_05_20_00_world_misc.sql new file mode 100644 index 00000000000..5b96f9881d6 --- /dev/null +++ b/sql/updates/world/2012_05_20_00_world_misc.sql @@ -0,0 +1,16 @@ +-- Update mod rep command name +UPDATE `command` SET + `name` = 'modify reputation', + `help` = 'Syntax: .modify reputation #repId (#repvalue | $rankname [#delta])\nSets the selected players reputation with faction #repId to #repvalue or to $reprank.\nIf the reputation rank name is provided, the resulting reputation will be the lowest reputation for that rank plus the delta amount, if specified.\nYou can use \'.pinfo rep\' to list all known reputation ids, or use \'.lookup faction $name\' to locate a specific faction id.' +WHERE `name` = 'modify rep'; + +-- Fix "2012-05-20 06:46:00 ERROR: SourceEntry 52264 in `condition` table, has incorrect SourceGroup 0 (spell effectMask) set , ignoring." +UPDATE `conditions` SET + `SourceGroup` = 1, + `SourceId` = 0 +WHERE + `SourceTypeOrReferenceId` = 13 AND + `SourceEntry` = 52264 AND + `ConditionTypeOrReference` = 29 AND + `ConditionValue1` = 28653 AND + `ConditionValue2` = 5; diff --git a/sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql b/sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql new file mode 100644 index 00000000000..7603f7dd938 --- /dev/null +++ b/sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_bonus_data` WHERE `entry`=633; +INSERT INTO `spell_bonus_data` (`entry`,`comments`) VALUES (633,'Paladin - Lay on Hands'); diff --git a/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql b/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql new file mode 100644 index 00000000000..ba2ea83f643 --- /dev/null +++ b/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql @@ -0,0 +1 @@ +UPDATE `spell_proc_event` SET `procFlags` = 332116 WHERE `entry` = 63611; diff --git a/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql b/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql new file mode 100644 index 00000000000..bcae5be9ae1 --- /dev/null +++ b/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql @@ -0,0 +1,2 @@ +-- As of patch 3.1.0, the drop rate of Formula: Enchant Boots - Surefooted has been increased to Guaranteed (100%). +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=100 WHERE `entry`=16472 and `item`=22545; diff --git a/sql/updates/world/2012_05_23_00_world_creature.sql b/sql/updates/world/2012_05_23_00_world_creature.sql new file mode 100644 index 00000000000..8a965b7fdfe --- /dev/null +++ b/sql/updates/world/2012_05_23_00_world_creature.sql @@ -0,0 +1,55 @@ +-- Chicken Spawns from sniff: +SET @Chicken := 28161; +SET @CGUID := 88570; +DELETE FROM `creature` WHERE `id`=@Chicken; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES +(@CGUID,@Chicken,571,1,1,5199.809,4704.83,-128.2989,1.70125,120,0,0), -- Chicken Escapee +(@CGUID+1,@Chicken,571,1,1,5201.715,4702.484,-127.8371,1.53589,120,0,0), -- Chicken Escapee +(@CGUID+2,@Chicken,571,1,1,5198.132,4702.78,-127.5534,1.797689,120,0,0), -- Chicken Escapee +(@CGUID+3,@Chicken,571,1,1,5198.32,4704.375,-127.9992,1.064651,120,0,0), -- Chicken Escapee +(@CGUID+4,@Chicken,571,1,1,5201.744,4704.674,-128.4752,4.555309,120,0,0), -- Chicken Escapee +(@CGUID+5,@Chicken,571,1,1,5251.442,4508.976,-85.30431,4.304774,120,0,0), -- Chicken Escapee +(@CGUID+6,@Chicken,571,1,1,5251.708,4511.778,-85.32935,1.64061,120,0,0), -- Chicken Escapee +(@CGUID+7,@Chicken,571,1,1,5251.118,4509.744,-85.32935,4.886922,120,0,0), -- Chicken Escapee +(@CGUID+8,@Chicken,571,1,1,5252.795,4509.772,-85.32524,0.7853982,120,0,0), -- Chicken Escapee +(@CGUID+9,@Chicken,571,1,1,5253.682,4511.424,-85.32755,2.356194,120,0,0), -- Chicken Escapee +(@CGUID+10,@Chicken,571,1,1,5254.174,4514.632,-84.96572,0.4096795,120,0,0), -- Chicken Escapee +(@CGUID+11,@Chicken,571,1,1,5252.096,4514.868,-85.32635,4.363323,120,0,0), -- Chicken Escapee +(@CGUID+12,@Chicken,571,1,1,5251.637,4513.41,-85.32935,3.490659,120,0,0), -- Chicken Escapee +(@CGUID+13,@Chicken,571,1,1,5253.287,4513.109,-85.32935,3.036873,120,0,0), -- Chicken Escapee +(@CGUID+14,@Chicken,571,1,1,5253.494,4514.764,-85.31329,3.717551,120,0,0), -- Chicken Escapee +(@CGUID+15,@Chicken,571,1,1,5251.158,4518.321,-85.3019,1.592369,120,0,0), -- Chicken Escapee +(@CGUID+16,@Chicken,571,1,1,5250.385,4516.643,-85.3257,5.044002,120,0,0), -- Chicken Escapee +(@CGUID+17,@Chicken,571,1,1,5251.159,4515.294,-85.32935,4.694936,120,0,0), -- Chicken Escapee +(@CGUID+18,@Chicken,571,1,1,5252.267,4516.414,-85.30904,0.5235988,120,0,0), -- Chicken Escapee +(@CGUID+19,@Chicken,571,1,1,5251.693,4517.859,-85.3243,4.590216,120,0,0), -- Chicken Escapee +(@CGUID+20,@Chicken,571,1,1,5262.68,4528.738,-84.4747,4.718389,120,0,0), -- Chicken Escapee +(@CGUID+21,@Chicken,571,1,1,5256.907,4480.617,-84.26879,4.927223,120,0,0), -- Chicken Escapee +(@CGUID+22,@Chicken,571,1,1,5298.603,4489.708,-93.65161,6.16371,120,0,0), -- Chicken Escapee +(@CGUID+23,@Chicken,571,1,1,5192.673,4513.661,-89.12463,1.299241,120,0,0), -- Chicken Escapee +(@CGUID+24,@Chicken,571,1,1,5228.781,4579.799,-96.98647,0.05766594,120,0,0), -- Chicken Escapee +(@CGUID+25,@Chicken,571,1,1,5230.247,4433.143,-96.82567,5.135688,120,0,0), -- Chicken Escapee +(@CGUID+26,@Chicken,571,1,1,5180.035,4541.38,-97.84879,0.2208638,120,0,0), -- Chicken Escapee +(@CGUID+27,@Chicken,571,1,1,5178.563,4538.964,-97.54511,0.9771074,120,0,0), -- Chicken Escapee +(@CGUID+28,@Chicken,571,1,1,5272.981,4417.033,-96.50356,0.9044432,120,0,0), -- Chicken Escapee +(@CGUID+29,@Chicken,571,1,1,5214.513,4416.202,-96.53072,2.862281,120,0,0), -- Chicken Escapee +(@CGUID+30,@Chicken,571,1,1,5160.117,4474.996,-96.96887,4.499754,120,0,0), -- Chicken Escapee +(@CGUID+31,@Chicken,571,1,1,5263.541,4409.121,-95.87889,1.570796,120,0,0), -- Chicken Escapee +(@CGUID+32,@Chicken,571,1,1,5234.166,4404.604,-95.12725,1.031549,120,0,0), -- Chicken Escapee +(@CGUID+33,@Chicken,571,1,1,5297.803,4493.681,-93.65161,5.525303,120,0,0), -- Chicken Escapee +(@CGUID+34,@Chicken,571,1,1,5260.112,4340.577,-97.61092,1.942801,120,0,0), -- Chicken Escapee +(@CGUID+35,@Chicken,571,1,1,5208.492,4379.111,-95.49483,0.6675518,120,0,0), -- Chicken Escapee +(@CGUID+36,@Chicken,571,1,1,5172.742,4368.674,-96.27965,0.8766832,120,0,0), -- Chicken Escapee +(@CGUID+37,@Chicken,571,1,1,5223.491,4467.19,-96.75621,4.723376,120,0,0), -- Chicken Escapee +(@CGUID+38,@Chicken,571,1,1,5220.966,4469.76,-96.75582,5.183968,120,0,0), -- Chicken Escapee +(@CGUID+39,@Chicken,571,1,1,5221.419,4473.14,-96.75536,4.98181,120,0,0), -- Chicken Escapee +(@CGUID+40,@Chicken,571,1,1,5221.419,4473.14,-96.75536,5.49084,120,0,0), -- Chicken Escapee +(@CGUID+41,@Chicken,571,1,1,5221.828,4470.711,-96.57594,5.315169,120,0,0), -- Chicken Escapee +(@CGUID+42,@Chicken,571,1,1,5151.083,4416.434,-96.38642,2.066685,120,0,0), -- Chicken Escapee +(@CGUID+43,@Chicken,571,1,1,5281.582,4425.185,-96.79945,4.45059,120,0,0), -- Chicken Escapee +(@CGUID+44,@Chicken,571,1,1,5257.173,4424.231,-95.62836,3.996804,120,0,0); -- Chicken Escapee + +-- Aura for Chicken Escapee (thx Discovered) +DELETE FROM `creature_template_addon` WHERE `entry`=28161; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(28161,0,0,0,0,'50734'); -- Chicken Escapee - Frenzyheart Chicken: Invisibility diff --git a/sql/updates/world/2012_05_23_01_world_sai.sql b/sql/updates/world/2012_05_23_01_world_sai.sql new file mode 100644 index 00000000000..af2fd5409d1 --- /dev/null +++ b/sql/updates/world/2012_05_23_01_world_sai.sql @@ -0,0 +1,14 @@ +-- Delete all spawnings of Chicken Escapee via quest_start_scripts +DELETE FROM `quest_start_scripts` WHERE `command`=10 AND `datalong`=28161; + +-- Elder Harkek SAI +SET @ENTRY := 28138; +SET @SPELL_SEE_INVIS_CHICKEN := 50735; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,19,0,100,0,12532,0,0,0,85,@SPELL_SEE_INVIS_CHICKEN,2,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Accept - Invoker Cast Frenzyheart Chicken: See Invisibility"), +(@ENTRY,0,1,0,19,0,100,0,12702,0,0,0,85,@SPELL_SEE_INVIS_CHICKEN,2,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Accept - Invoker Cast Frenzyheart Chicken: See Invisibility"), +(@ENTRY,0,2,0,20,0,100,0,12532,0,0,0,28,@SPELL_SEE_INVIS_CHICKEN,0,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Complete - Remove Aura Frenzyheart Chicken: See Invisibility"), +(@ENTRY,0,3,0,20,0,100,0,12702,0,0,0,28,@SPELL_SEE_INVIS_CHICKEN,0,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Complete - Remove Aura Frenzyheart Chicken: See Invisibility"); diff --git a/sql/updates/world/2012_05_23_02_world_sai.sql b/sql/updates/world/2012_05_23_02_world_sai.sql new file mode 100644 index 00000000000..588f25f1568 --- /dev/null +++ b/sql/updates/world/2012_05_23_02_world_sai.sql @@ -0,0 +1,21 @@ +-- Chicken Escapee SAI +SET @ENTRY := 28161; +SET @SPELL_NET_CHICKEN := 51959; +SET @SPELL_INVIS_CHICKEN := 50734; +SET @SPELL_SCARED_CHICKEN := 51846; +SET @SPELL_CREATE_QUESTITEM := 51037; +UPDATE `creature` SET `MovementType`=0,`spawndist`=0,`spawntimesecs`=5 WHERE `id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=1 WHERE `entry`=@ENTRY; +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,8,0,100,0,@SPELL_NET_CHICKEN,0,0,0,28,@SPELL_SCARED_CHICKEN,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Spellhit - Remove Aura Scared Chicken"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Spellhit - Forced Despawn"), +(@ENTRY,0,2,3,64,0,100,0,0,0,0,0,85,@SPELL_CREATE_QUESTITEM,2,0,0,0,0,7,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Invoker Cast Capture Chicken Escapee"), -- Triggered because of cast-time +(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Close Gossip"), +(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Set Npcflag None"), +(@ENTRY,0,5,6,61,0,100,0,0,0,0,0,28,@SPELL_SCARED_CHICKEN,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Remove Aura Scared Chicken"), +(@ENTRY,0,6,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Forced Despawn"), +(@ENTRY,0,7,8,25,0,100,0,0,0,0,0,11,@SPELL_INVIS_CHICKEN,1,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Reset - Cast Frenzyheart Chicken: Invisibility"), -- Just in case +(@ENTRY,0,8,0,61,0,100,0,0,0,0,0,11,@SPELL_SCARED_CHICKEN,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Reset - Cast Scared Chicken"); diff --git a/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql b/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql new file mode 100644 index 00000000000..22ecebcae31 --- /dev/null +++ b/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql @@ -0,0 +1,32 @@ +SET @entry := 35093; +SET @epic := 25009; +SET @gem := @entry+1; +-- Create references +DELETE FROM `reference_loot_template` WHERE `entry` IN(@entry,@epic,@gem); +INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES +(@entry,27452,0,1,1,1,1), -- Light Scribe Bands +(@entry,27453,0,1,1,1,1), -- Averinn's RIng of Slaying +(@entry,27454,0,1,1,1,1), -- Volcanic Pauldrons +(@entry,27455,0,1,1,1,1), -- Irondrake faceguard +(@entry,27456,0,1,1,1,1), -- Raiments of Nature's Breath +(@entry,27457,0,1,1,1,1), -- Life Bearer's Gauntlets +(@entry,27458,0,1,1,1,1), -- Oceansong Kilt +(@entry,27459,0,1,1,1,1), -- Vambraces of Daring +(@entry,27460,0,1,1,1,1), -- Reavers' Ring +(@entry,27461,0,1,1,1,1), -- Chestguard of the Prowler +-- Epics +(@epic,29238,0,1,1,1,1), -- Lion's Heart Girdle +(@epic,29264,0,1,1,1,1), -- Tree-Mender's Belt +(@epic,29346,0,1,1,1,1), -- Feltooth Eviscerator +(@epic,32077,0,1,1,1,1), -- Wrath Infused Gauntlets +-- Gems +(@gem,30592,0,1,1,1,1), -- Steady Chrysoprase +(@gem,30593,0,1,1,1,1), -- Potent Fire Opal +(@gem,30594,0,1,1,1,1); -- Regal Chrysoprase +-- Assign loot to the chest +SET @GOloot := 21764; -- lootid of Reinforced Fel Iron Chest Heroic +DELETE FROM `gameobject_loot_template` WHERE `entry`=@GOloot; +INSERT INTO `gameobject_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES +(@GOloot,1,100,1,0,-@entry, 2), -- one from gear +(@GOloot,2,30,1,0,-@gem,1), -- one gem (30%) +(@GOloot,3,100,1,0,-@epic,1); -- one from epics diff --git a/sql/updates/world/2012_05_23_04_world_gameobject.sql b/sql/updates/world/2012_05_23_04_world_gameobject.sql new file mode 100644 index 00000000000..afcb1e89317 --- /dev/null +++ b/sql/updates/world/2012_05_23_04_world_gameobject.sql @@ -0,0 +1,3 @@ +DELETE FROM `gameobject` WHERE `id`=188677; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(318,188677,571,1,1,2567.449,-388.7118,3.573463,-2.879789,0,0,0.639778,0.76856,1200,100,1); diff --git a/sql/updates/world/2012_05_23_05_world_creature.sql b/sql/updates/world/2012_05_23_05_world_creature.sql new file mode 100644 index 00000000000..bb162f927bd --- /dev/null +++ b/sql/updates/world/2012_05_23_05_world_creature.sql @@ -0,0 +1,12 @@ +-- Spawn from Sniff +DELETE FROM `creature` WHERE `id`=34526; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(42161,34526,1,1,1,0,0,-1050.052,-286.7274,159.1137,5.951573,120,0,0,1,0,0,0,0,0); +-- Template updates +UPDATE `creature_template` SET `faction_A`=104,`faction_H`=104,`baseattacktime`=2000,`npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|512 WHERE `entry`=34526; -- Aponi Brightmane +-- Model data +UPDATE `creature_model_info` SET `bounding_radius`=1.003375,`combat_reach`=4.3125,`gender`=1 WHERE `modelid`=29249; -- Aponi Brightmane +-- Addon data +DELETE FROM `creature_template_addon` WHERE `entry`=34526; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(34526,0,1,256,0,NULL); -- Aponi Brightmane diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp index 252bcbabca5..6e2326ca9d5 100755 --- a/src/server/game/AI/CoreAI/GuardAI.cpp +++ b/src/server/game/AI/CoreAI/GuardAI.cpp @@ -23,7 +23,7 @@ #include "World.h" #include "CreatureAIImpl.h" -int GuardAI::Permissible(const Creature* creature) +int GuardAI::Permissible(Creature const* creature) { if (creature->isGuard()) return PERMIT_BASE_SPECIAL; @@ -31,7 +31,7 @@ int GuardAI::Permissible(const Creature* creature) return PERMIT_BASE_NO; } -GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature), i_victimGuid(0), i_state(STATE_NORMAL), i_tracker(TIME_INTERVAL_LOOK) +GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature) { } @@ -40,108 +40,35 @@ bool GuardAI::CanSeeAlways(WorldObject const* obj) if (!obj->isType(TYPEMASK_UNIT)) return false; - std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) - { - if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) - if (unit == obj) - return true; - } + std::list<HostileReference*> threatList = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) + if ((*itr)->getUnitGuid() == obj->GetGUID()) + return true; return false; } -void GuardAI::MoveInLineOfSight(Unit* unit) -{ - // Ignore Z for flying creatures - if (!me->CanFly() && me->GetDistanceZ(unit) > CREATURE_Z_ATTACK_RANGE) - return; - - if (!me->getVictim() && me->IsValidAttackTarget(unit) && - (unit->IsHostileToPlayers() || me->IsHostileTo(unit)) && - unit->isInAccessiblePlaceFor(me)) - { - float attackRadius = me->GetAttackDistance(unit); - if (me->IsWithinDistInMap(unit, attackRadius)) - { - //Need add code to let guard support player - AttackStart(unit); - //u->RemoveAurasByType(SPELL_AURA_MOD_STEALTH); - } - } -} - void GuardAI::EnterEvadeMode() { if (!me->isAlive()) { - sLog->outStaticDebug("Creature stopped attacking because he is dead [guid=%u]", me->GetGUIDLow()); me->GetMotionMaster()->MoveIdle(); - - i_state = STATE_NORMAL; - - i_victimGuid = 0; me->CombatStop(true); me->DeleteThreatList(); return; } - Unit* victim = ObjectAccessor::GetUnit(*me, i_victimGuid); - - if (!victim) - { - sLog->outStaticDebug("Creature stopped attacking because victim does not exist [guid=%u]", me->GetGUIDLow()); - } - else if (!victim->isAlive()) - { - sLog->outStaticDebug("Creature stopped attacking because victim is dead [guid=%u]", me->GetGUIDLow()); - } - else if (victim->HasStealthAura()) - { - sLog->outStaticDebug("Creature stopped attacking because victim is using stealth [guid=%u]", me->GetGUIDLow()); - } - else if (victim->isInFlight()) - { - sLog->outStaticDebug("Creature stopped attacking because victim is flying away [guid=%u]", me->GetGUIDLow()); - } - else - { - sLog->outStaticDebug("Creature stopped attacking because victim outran him [guid=%u]", me->GetGUIDLow()); - } + sLog->outDebug(LOG_FILTER_UNITS, "Guard entry: %u enters evade mode.", me->GetEntry()); me->RemoveAllAuras(); me->DeleteThreatList(); - i_victimGuid = 0; me->CombatStop(true); - i_state = STATE_NORMAL; // Remove ChaseMovementGenerator from MotionMaster stack list, and add HomeMovementGenerator instead if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) me->GetMotionMaster()->MoveTargetedHome(); } -void GuardAI::UpdateAI(const uint32 /*diff*/) -{ - // update i_victimGuid if me->getVictim() !=0 and changed - if (!UpdateVictim()) - return; - - Unit* const victim = me->getVictim(); - if (!victim) - return; - - i_victimGuid = victim->GetGUID(); - - if (me->isAttackReady()) - { - if (me->IsWithinMeleeRange(victim)) - { - me->AttackerStateUpdate(victim); - me->resetAttackTimer(); - } - } -} - void GuardAI::JustDied(Unit* killer) { if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h index c80c5a6c343..c8dd9d54921 100755 --- a/src/server/game/AI/CoreAI/GuardAI.h +++ b/src/server/game/AI/CoreAI/GuardAI.h @@ -20,34 +20,19 @@ #define TRINITY_GUARDAI_H #include "ScriptedCreature.h" -#include "Timer.h" class Creature; class GuardAI : public ScriptedAI { - enum GuardState - { - STATE_NORMAL = 1, - STATE_LOOK_AT_VICTIM = 2 - }; - public: + explicit GuardAI(Creature* creature); - explicit GuardAI(Creature* c); - - void MoveInLineOfSight(Unit*); - void EnterEvadeMode(); - void JustDied(Unit*); + static int Permissible(Creature const* creature); bool CanSeeAlways(WorldObject const* obj); - void UpdateAI(const uint32); - static int Permissible(const Creature*); - - private: - uint64 i_victimGuid; - GuardState i_state; - TimeTracker i_tracker; + void EnterEvadeMode(); + void JustDied(Unit* killer); }; #endif diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 688d48b41ad..2243734f642 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -383,7 +383,7 @@ void npc_escortAI::FillPointMovementListForCreature() if (movePoints.empty()) return; - ScriptPointVector::const_iterator itrEnd = movePoints.end();; + ScriptPointVector::const_iterator itrEnd = movePoints.end(); for (ScriptPointVector::const_iterator itr = movePoints.begin(); itr != itrEnd; ++itr) { Escort_Waypoint point(itr->uiPointId, itr->fX, itr->fY, itr->fZ, itr->uiWaitTime); diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 2a412bffb22..08f1b18ffad 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -804,12 +804,12 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui return; SetRun(mRun); mFollowGuid = target->GetGUID(); - mFollowDist = dist ? dist : PET_FOLLOW_DIST; - mFollowAngle = angle ? angle : me->GetFollowAngle(); + mFollowDist = dist >= 0.0f ? dist : PET_FOLLOW_DIST; + mFollowAngle = angle >= 0.0f ? angle : me->GetFollowAngle(); mFollowArrivedTimer = 1000; mFollowCredit = credit; mFollowArrivedEntry = end; - me->GetMotionMaster()->MoveFollow(target, dist, angle); + me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle); mFollowCreditType = creditType; } diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 893c8f4580e..85b117ccd8c 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1925,7 +1925,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; } default: - sLog->outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType()); + sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); break; } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index b0f1fcb8ede..a7149f37480 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -324,7 +324,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType()); return false; } - if (e.action.type >= SMART_ACTION_END) + if (e.action.type <= 0 || e.action.type >= SMART_ACTION_END) { sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType()); return false; @@ -334,6 +334,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask); return false; } + if (e.event.event_flags > SMART_EVENT_FLAGS_ALL) + { + sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags); + return false; + } if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST) { e.event.type = SMART_EVENT_UPDATE_OOC;//force default OOC, can change when calling the script! diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 8d3686a265d..bde7768f036 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1175,7 +1175,8 @@ enum SmartEventFlags SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, //Event only occurs in debug build SMART_EVENT_FLAG_DONT_RESET = 0x100, //Event will not reset in SmartScript::OnReset() - SMART_EVENT_FLAG_DIFFICULTY_ALL = (SMART_EVENT_FLAG_DIFFICULTY_0|SMART_EVENT_FLAG_DIFFICULTY_1|SMART_EVENT_FLAG_DIFFICULTY_2|SMART_EVENT_FLAG_DIFFICULTY_3) + SMART_EVENT_FLAG_DIFFICULTY_ALL = (SMART_EVENT_FLAG_DIFFICULTY_0|SMART_EVENT_FLAG_DIFFICULTY_1|SMART_EVENT_FLAG_DIFFICULTY_2|SMART_EVENT_FLAG_DIFFICULTY_3), + SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE|SMART_EVENT_FLAG_DIFFICULTY_ALL|SMART_EVENT_FLAG_RESERVED_5|SMART_EVENT_FLAG_RESERVED_6|SMART_EVENT_FLAG_DEBUG_ONLY|SMART_EVENT_FLAG_DONT_RESET) }; enum SmartCastFlags diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 9963ade54f9..8076f800356 100755 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -91,10 +91,15 @@ AccountOpResult DeleteAccount(uint32 accountId) stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_TUTORIALS); stmt->setUInt32(0, accountId); CharacterDatabase.Execute(stmt); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ACCOUNT_DATA); stmt->setUInt32(0, accountId); CharacterDatabase.Execute(stmt); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_BAN); + stmt->setUInt32(0, accountId); + CharacterDatabase.Execute(stmt); + SQLTransaction trans = LoginDatabase.BeginTransaction(); stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT); @@ -109,6 +114,10 @@ AccountOpResult DeleteAccount(uint32 accountId) stmt->setUInt32(0, accountId); trans->Append(stmt); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_BANNED); + stmt->setUInt32(0, accountId); + trans->Append(stmt); + LoginDatabase.CommitTransaction(trans); return AOR_OK; diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 73e24e5a3c3..89151b6395c 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -267,7 +267,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result) if (Empty() || !captainPresentInTeam) { // Arena team is empty or captain is not in team, delete from db - sLog->outErrorDb("ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId); return false; } diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 44192a74123..9d5858e1ca4 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -550,7 +550,7 @@ inline void Battleground::_ProcessJoin(uint32 diff) if (dist >= maxDist) { - sLog->outError("BATTLEGROUND: Sending %s back to start location (possible exploit)", plr->GetName()); + sLog->outError("BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", plr->GetName(), GetMapId()); plr->TeleportTo(GetMapId(), x, y, z, o); } } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 52d2cdefd65..d28f5ddfe6a 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -290,7 +290,7 @@ int32 BattlegroundAB::_GetNodeNameId(uint8 node) case BG_AB_NODE_LUMBER_MILL:return LANG_BG_AB_NODE_LUMBER_MILL; case BG_AB_NODE_GOLD_MINE: return LANG_BG_AB_NODE_GOLD_MINE; default: - ASSERT(0); + ASSERT(false); } return 0; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 45335ae7b8b..ccc9493e234 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -931,7 +931,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period) float o = 1; // creates the Gameobject - if (!t->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT), goEntry, mapid, x, y, z, o, 100, 0)) + if (!t->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT), goEntry, mapid, x, y, z, o, 255, 0)) { delete t; return NULL; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 977897b8d48..133a0aec560 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -720,8 +720,13 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) DelCreature(BG_SA_MAXNPC + i); GraveyardStatus[i] = Source->GetTeamId(); - WorldSafeLocsEntry const* sg = NULL; - sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); + WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); + if (!sg) + { + sLog->outError("BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]); + return; + } + AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], (GraveyardStatus[i] == TEAM_ALLIANCE? ALLIANCE : HORDE)); uint32 npc = 0; uint32 flag = 0; @@ -781,7 +786,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) SendWarningToAll(LANG_BG_SA_H_GY_SOUTH); break; default: - ASSERT(0); + ASSERT(false); break; }; } diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index cef68891890..62bc0ab3205 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -95,9 +95,9 @@ CalendarEventIdList const& CalendarMgr::GetPlayerEvents(uint64 guid) CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId) { - CalendarInviteMap::iterator it = _invites.find(inviteId); - if (it != _invites.end()) - return &(it->second); + CalendarInviteMap::iterator itr = _invites.find(inviteId); + if (itr != _invites.end()) + return &(itr->second); sLog->outError("CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId); return NULL; @@ -105,9 +105,9 @@ CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId) CalendarEvent* CalendarMgr::GetEvent(uint64 eventId) { - CalendarEventMap::iterator it = _events.find(eventId); - if (it != _events.end()) - return &(it->second); + CalendarEventMap::iterator itr = _events.find(eventId); + if (itr != _events.end()) + return &(itr->second); sLog->outError("CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId); return NULL; @@ -316,11 +316,6 @@ void CalendarMgr::AddAction(CalendarAction const& action) if (!calendarEvent) return; - CalendarInviteIdList const& inviteIds = calendarEvent->GetInviteIdList(); - for (CalendarInviteIdList::const_iterator it = inviteIds.begin(); it != inviteIds.end(); ++it) - if (uint64 invitee = RemoveInvite(*it)) - SendCalendarEventRemovedAlert(invitee, *calendarEvent); - RemoveEvent(eventId); break; } @@ -464,8 +459,6 @@ bool CalendarMgr::RemoveEvent(uint64 eventId) return false; } - _events.erase(itr); - bool val = true; CalendarInviteIdList const& invites = itr->second.GetInviteIdList(); @@ -474,8 +467,13 @@ bool CalendarMgr::RemoveEvent(uint64 eventId) CalendarInvite* invite = GetInvite(*itrInvites); if (!invite || !RemovePlayerEvent(invite->GetInvitee(), eventId)) val = false; + + if (uint64 invitee = RemoveInvite(*itrInvites)) + SendCalendarEventRemovedAlert(invitee, itr->second); } + _events.erase(itr); + return val; } diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index e604eaf9024..9737d4584ea 100755 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -535,6 +535,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat setCurrentVictim(NULL); setDirty(true); } + iOwner->SendRemoveFromThreatListOpcode(hostilRef); iThreatContainer.remove(hostilRef); iThreatOfflineContainer.addReference(hostilRef); } diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 96f454fd3e2..4176d9f605b 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -190,7 +190,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) } case CONDITION_OBJECT_ENTRY: { - if (object->GetTypeId() == ConditionValue1) + if (uint32(object->GetTypeId()) == ConditionValue1) condMeets = (!ConditionValue2) || (object->GetEntry() == ConditionValue2); break; } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index fde85feb8d9..6506a113ae1 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -468,9 +468,9 @@ void Creature::Update(uint32 diff) switch (m_deathState) { - case JUST_ALIVED: - // Must not be called, see Creature::setDeathState JUST_ALIVED -> ALIVE promoting. - sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_ALIVED (4)", GetGUIDLow(), GetEntry()); + case JUST_RESPAWNED: + // Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting. + sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUIDLow(), GetEntry()); break; case JUST_DIED: // Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting. @@ -1128,7 +1128,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) stmt->setUInt8(index++, uint8(GetDefaultMovementType())); stmt->setUInt32(index++, npcflag); stmt->setUInt32(index++, unit_flags); - stmt->setUInt32(index, dynamicflags); + stmt->setUInt32(index++, dynamicflags); trans->Append(stmt); WorldDatabase.CommitTransaction(trans); @@ -1555,7 +1555,7 @@ void Creature::setDeathState(DeathState s) Unit::setDeathState(CORPSE); } - else if (s == JUST_ALIVED) + else if (s == JUST_RESPAWNED) { //if (isPet()) // setActive(true); @@ -1611,7 +1611,7 @@ void Creature::Respawn(bool force) CreatureTemplate const* cinfo = GetCreatureTemplate(); SelectLevel(cinfo); - setDeathState(JUST_ALIVED); + setDeathState(JUST_RESPAWNED); uint32 displayID = GetNativeDisplayId(); CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); @@ -1668,8 +1668,8 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo) if (!spellInfo) return false; - // Spells that don't have effectMechanics. - if (!spellInfo->HasAnyEffectMechanic() && GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1))) + // Creature is immune to main mechanic of the spell + if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1))) return true; // This check must be done instead of 'if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))' for not break diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index f58dd6b2e4d..10136c5fbd7 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -222,9 +222,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa // GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3 SetGoType(GameobjectTypes(goinfo->type)); SetGoState(go_state); - - SetGoArtKit(0); // unknown what this is - SetByteValue(GAMEOBJECT_BYTES_1, 2, artKit); + SetGoArtKit(artKit); switch (goinfo->type) { @@ -1912,6 +1910,7 @@ void GameObject::SetLootState(LootState state, Unit* unit) { m_lootState = state; AI()->OnStateChanged(state, unit); + sScriptMgr->OnGameObjectLootStateChanged(this, state, unit); if (m_model) { // startOpen determines whether we are going to add or remove the LoS on activation @@ -1931,6 +1930,7 @@ void GameObject::SetLootState(LootState state, Unit* unit) void GameObject::SetGoState(GOState state) { SetByteValue(GAMEOBJECT_BYTES_1, 0, state); + sScriptMgr->OnGameObjectStateChanged(this, state); if (m_model) { if (!IsInWorld()) diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 586f09bd79c..f3a736daceb 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -940,14 +940,14 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) { case 510: // mage Water Elemental { - SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f)); + SetBonusDamage(int32(m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FROST) * 0.33f)); break; } case 1964: //force of nature { if (!pInfo) SetCreateHealth(30 + 30*petlevel); - float bonusDmg = m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_NATURE) * 0.15f; + float bonusDmg = m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_NATURE) * 0.15f; SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 2.5f - (petlevel / 2) + bonusDmg)); SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 2.5f + (petlevel / 2) + bonusDmg)); break; @@ -967,7 +967,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) SetCreateHealth(40*petlevel); SetCreateMana(28 + 10*petlevel); } - SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE) * 0.5f)); + SetBonusDamage(int32(m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE) * 0.5f)); SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel)); SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel)); break; @@ -979,7 +979,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) SetCreateMana(28 + 10*petlevel); SetCreateHealth(28 + 30*petlevel); } - int32 bonus_dmg = (int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_SHADOW)* 0.3f)); + int32 bonus_dmg = (int32(m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SHADOW)* 0.3f)); SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel) + bonus_dmg)); SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel) + bonus_dmg)); @@ -1020,7 +1020,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) } case 31216: // Mirror Image { - SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f)); + SetBonusDamage(int32(m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FROST) * 0.33f)); SetDisplayId(m_owner->GetDisplayId()); if (!pInfo) { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7c70fe9358e..41c95ac3d04 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -10157,7 +10157,8 @@ uint32 Player::GetItemCount(uint32 item, bool inBankAlso, Item* skipItem) const if (inBankAlso) { - for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i) + // checking every item from 39 to 74 (including bank bags) + for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i) if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem && pItem->GetEntry() == item) count += pItem->GetCount(); @@ -10197,7 +10198,7 @@ uint32 Player::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipIte if (Bag* pBag = GetBagByPos(i)) count += pBag->GetItemCountWithLimitCategory(limitCategory, skipItem); - for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i) + for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i) if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem) if (ItemTemplate const* pProto = pItem->GetTemplate()) @@ -10223,7 +10224,7 @@ Item* Player::GetItemByGuid(uint64 guid) const if (pItem->GetGUID() == guid) return pItem; - for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i) + for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i) if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetGUID() == guid) return pItem; @@ -12019,7 +12020,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje Map const* map = lootedObject->GetMap(); if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true)) if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId)) - if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty()) + if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty())) lootedObjectInDungeon = true; if (!lootedObjectInDungeon) @@ -12180,11 +12181,6 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update pItem->SetItemRandomProperties(randomPropertyId); pItem = StoreItem(dest, pItem, update); - const ItemTemplate* proto = pItem->GetTemplate(); - for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) - if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger - CastSpell(this, proto->Spells[i].SpellId, true, pItem); - if (allowedLooters.size() > 1 && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound()) { pItem->SetSoulboundTradeable(allowedLooters); @@ -12290,6 +12286,14 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool AddEnchantmentDurations(pItem); AddItemDurations(pItem); + + const ItemTemplate* proto = pItem->GetTemplate(); + for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) + if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger + if (bag == INVENTORY_SLOT_BAG_0 || (bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END)) + if (!HasAura(proto->Spells[i].SpellId)) + CastSpell(this, proto->Spells[i].SpellId, true, pItem); + return pItem; } else @@ -12326,6 +12330,13 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool pItem2->SetState(ITEM_CHANGED, this); + const ItemTemplate* proto = pItem2->GetTemplate(); + for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) + if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger + if (bag == INVENTORY_SLOT_BAG_0 || (bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END)) + if (!HasAura(proto->Spells[i].SpellId)) + CastSpell(this, proto->Spells[i].SpellId, true, pItem2); + return pItem2; } } @@ -17606,6 +17617,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) uint32 zoneId = GetZoneId(); std::map<uint64, Bag*> bagMap; // fast guid lookup for bags + std::map<uint64, Item*> invalidBagMap; // fast guid lookup for bags std::list<Item*> problematicItems; SQLTransaction trans = CharacterDatabase.BeginTransaction(); @@ -17650,9 +17662,15 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) // Remember bags that may contain items in them if (err == EQUIP_ERR_OK) + { if (IsBagPos(item->GetPos())) if (Bag* pBag = item->ToBag()) bagMap[item->GetGUIDLow()] = pBag; + } + else + if (IsBagPos(item->GetPos())) + if (item->IsBag()) + invalidBagMap[item->GetGUIDLow()] = item; } else { @@ -17666,6 +17684,21 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) if (err == EQUIP_ERR_OK) item = StoreItem(dest, item, true); } + else if (invalidBagMap.find(bagGuid) != invalidBagMap.end()) + { + std::map<uint64, Item*>::iterator itr = invalidBagMap.find(bagGuid); + if (std::find(problematicItems.begin(),problematicItems.end(),itr->second) != problematicItems.end()) + err = EQUIP_ERR_INT_BAG_ERROR; + } + else + { + sLog->outError("Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?", + GetGUIDLow(), GetName(), item->GetGUIDLow(), item->GetEntry(), bagGuid, slot); + item->DeleteFromInventoryDB(trans); + delete item; + continue; + } + } // Item's state may have changed after storing @@ -17789,7 +17822,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr->GetActiveEventList(); for (GameEventMgr::ActiveEvents::const_iterator itr = activeEventsList.begin(); itr != activeEventsList.end(); ++itr) { - if (events[*itr].holiday_id == proto->HolidayId) + if (uint32(events[*itr].holiday_id) == proto->HolidayId) { remove = false; break; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 81a505b7acc..9578605ac6f 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -52,7 +52,7 @@ void MapManager::LoadTransports() uint32 period = fields[3].GetUInt32(); uint32 scriptId = sObjectMgr->GetScriptId(fields[4].GetCString()); - const GameObjectTemplate* goinfo = sObjectMgr->GetGameObjectTemplate(entry); + GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry); if (!goinfo) { @@ -86,7 +86,7 @@ void MapManager::LoadTransports() float o = 1.0f; // creates the Gameobject - if (!t->Create(lowguid, entry, mapid, x, y, z, o, 100, 0)) + if (!t->Create(lowguid, entry, mapid, x, y, z, o, 255, 0)) { delete t; continue; @@ -217,8 +217,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa SetFloatValue(OBJECT_FIELD_SCALE_X, goinfo->size); SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction); - //SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags); - SetUInt32Value(GAMEOBJECT_FLAGS, MAKE_PAIR32(0x28, 0x64)); + SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags); SetUInt32Value(GAMEOBJECT_LEVEL, m_period); SetEntry(goinfo->entry); diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 2da1c1b88cb..5cec0cf4375 100755 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -142,13 +142,13 @@ void Player::ApplySpellPowerBonus(int32 amount, bool apply) void Player::UpdateSpellDamageAndHealingBonus() { - // Magic damage modifiers implemented in Unit::SpellDamageBonus + // Magic damage modifiers implemented in Unit::SpellDamageBonusDone // This information for client side use only // Get healing bonus for all schools - SetStatInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, SpellBaseHealingBonus(SPELL_SCHOOL_MASK_ALL)); + SetStatInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, SpellBaseHealingBonusDone(SPELL_SCHOOL_MASK_ALL)); // Get damage bonus for all schools for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) - SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, SpellBaseDamageBonus(SpellSchoolMask(1 << i))); + SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, SpellBaseDamageBonusDone(SpellSchoolMask(1 << i))); } bool Player::UpdateAllStats() diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index fb91c3fc9f1..71977bf469c 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -953,7 +953,9 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit* victim, uint32 spellID, uint32 damage) { SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID); SpellNonMeleeDamage damageInfo(this, victim, spellInfo->Id, spellInfo->SchoolMask); - damage = SpellDamageBonus(victim, spellInfo, damage, SPELL_DIRECT_DAMAGE); + damage = SpellDamageBonusDone(victim, spellInfo, damage, SPELL_DIRECT_DAMAGE); + damage = victim->SpellDamageBonusTaken(this, spellInfo, damage, SPELL_DIRECT_DAMAGE); + CalculateSpellDamageTaken(&damageInfo, damage, spellInfo); DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb); SendSpellNonMeleeDamageLog(&damageInfo); @@ -1148,7 +1150,8 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam damage += CalculateDamage(damageInfo->attackType, false, true); // Add melee damage bonus - MeleeDamageBonus(damageInfo->target, &damage, damageInfo->attackType); + damage = MeleeDamageBonusDone(damageInfo->target, damage, damageInfo->attackType); + damage = damageInfo->target->MeleeDamageBonusTaken(this, damage, damageInfo->attackType); // Calculate armor reduction if (IsDamageReducedByArmor((SpellSchoolMask)(damageInfo->damageSchoolMask))) @@ -1400,7 +1403,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) uint32 damage = (*dmgShieldItr)->GetAmount(); if (Unit* caster = (*dmgShieldItr)->GetCaster()) - damage = caster->SpellDamageBonus(this, i_spellProto, damage, SPELL_DIRECT_DAMAGE); + { + damage = caster->SpellDamageBonusDone(this, i_spellProto, damage, SPELL_DIRECT_DAMAGE); + damage = this->SpellDamageBonusTaken(caster, i_spellProto, damage, SPELL_DIRECT_DAMAGE); + } // No Unit::CalcAbsorbResist here - opcode doesn't send that data - this damage is probably not affected by that victim->DealDamageMods(this, damage, NULL); @@ -3652,7 +3658,10 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId // final heal int32 healAmount = aurEff->GetAmount(); if (Unit* caster = aura->GetCaster()) - healAmount = caster->SpellHealingBonus(this, aura->GetSpellInfo(), healAmount, HEAL, dispelInfo.GetRemovedCharges()); + { + healAmount = caster->SpellHealingBonusDone(this, aura->GetSpellInfo(), healAmount, HEAL, dispelInfo.GetRemovedCharges()); + healAmount = this->SpellHealingBonusTaken(caster, aura->GetSpellInfo(), healAmount, HEAL, dispelInfo.GetRemovedCharges()); + } CastCustomSpell(this, 33778, &healAmount, NULL, NULL, true, NULL, NULL, aura->GetCasterGUID()); // mana @@ -5861,7 +5870,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (AuraEffect* aurEff = victim->GetAuraEffect(64413, 0, GetGUID())) { // The shield can grow to a maximum size of 20, 000 damage absorbtion - aurEff->SetAmount(std::max<int32>(aurEff->GetAmount() + basepoints0, 20000)); + aurEff->SetAmount(std::min<int32>(aurEff->GetAmount() + basepoints0, 20000)); // Refresh and return to prevent replacing the aura aurEff->GetBase()->RefreshDuration(); @@ -6724,8 +6733,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; triggered_spell_id = 25742; float ap = GetTotalAttackPowerValue(BASE_ATTACK); - int32 holy = SpellBaseDamageBonus(SPELL_SCHOOL_MASK_HOLY) + - SpellBaseDamageBonusForVictim(SPELL_SCHOOL_MASK_HOLY, victim); + int32 holy = SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY) + + victim->SpellBaseDamageBonusTaken(SPELL_SCHOOL_MASK_HOLY); basepoints0 = (int32)GetAttackTime(BASE_ATTACK) * int32(ap * 0.022f + 0.044f * holy) / 1000; break; } @@ -7357,30 +7366,16 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (procSpell->SpellIconID != 2019) return false; - AuraEffect* aurEffA = NULL; - AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE); - for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i) + if (Creature* totem = GetMap()->GetCreature(m_SummonSlot[1])) // Fire totem summon slot { - SpellInfo const* spell = (*i)->GetSpellInfo(); - if (spell->SpellFamilyName == uint32(SPELLFAMILY_SHAMAN) && spell->SpellFamilyFlags.HasFlag(0, 0x02000000, 0)) + if (SpellInfo const* totemSpell = sSpellMgr->GetSpellInfo(totem->m_spells[0])) { - if ((*i)->GetCasterGUID() != GetGUID()) - continue; - if (spell->Id == 63283) - continue; - aurEffA = (*i); - break; + int32 bp0 = CalculatePctN(totemSpell->Effects[EFFECT_0].CalcValue(), triggerAmount); + int32 bp1 = CalculatePctN(totemSpell->Effects[EFFECT_1].CalcValue(), triggerAmount); + CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true); + return true; } } - if (aurEffA) - { - int32 bp0 = 0, bp1 = 0; - bp0 = CalculatePctN(triggerAmount, aurEffA->GetAmount()); - if (AuraEffect* aurEffB = aurEffA->GetBase()->GetEffect(EFFECT_1)) - bp1 = CalculatePctN(triggerAmount, aurEffB->GetAmount()); - CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true, NULL, triggeredByAura); - return true; - } return false; } break; @@ -7435,8 +7430,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere float fire_onhit = float(CalculatePctF(dummySpell->Effects[EFFECT_0]. CalcValue(), 1.0f)); - float add_spellpower = (float)(SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE) - + SpellBaseDamageBonusForVictim(SPELL_SCHOOL_MASK_FIRE, victim)); + float add_spellpower = (float)(SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE) + + victim->SpellBaseDamageBonusTaken(SPELL_SCHOOL_MASK_FIRE)); // 1.3speed = 5%, 2.6speed = 10%, 4.0 speed = 15%, so, 1.0speed = 3.84% ApplyPctF(add_spellpower, 3.84f); @@ -7777,17 +7772,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } } } - // Item - Death Knight T10 Melee 4P Bonus - if (dummySpell->Id == 70656) - { - Player* player = ToPlayer(); - if (!player) - return false; - - for (uint32 i = 0; i < MAX_RUNES; ++i) - if (player->GetRuneCooldown(i) == 0) - return false; - } break; } case SPELLFAMILY_POTION: @@ -8055,7 +8039,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp *handled = true; if (victim && victim->HasAura(53601)) { - int32 bp0 = CalculatePctN(int32(damage / 12), dummySpell->Effects[EFFECT_2]. CalcValue()); + int32 bp0 = CalculatePctN(int32(damage / 12), dummySpell->Effects[EFFECT_2].CalcValue()); // Item - Paladin T9 Holy 4P Bonus if (AuraEffect const* aurEff = GetAuraEffect(67191, 0)) AddPctN(bp0, aurEff->GetAmount()); @@ -8715,6 +8699,16 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg trigger_spell_id = 50475; basepoints0 = CalculatePctN(int32(damage), triggerAmount); } + // Item - Death Knight T10 Melee 4P Bonus + else if (auraSpellInfo->Id == 70656) + { + if (GetTypeId() != TYPEID_PLAYER || getClass() != CLASS_DEATH_KNIGHT) + return false; + + for (uint8 i = 0; i < MAX_RUNES; ++i) + if (ToPlayer()->GetRuneCooldown(i) == 0) + return false; + } break; } case SPELLFAMILY_ROGUE: @@ -9007,7 +9001,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg { if (AuraEffect* aurEff = owner->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 3220, 0)) { - basepoints0 = int32((aurEff->GetAmount() * owner->SpellBaseDamageBonus(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC)) + 100.0f) / 100.0f); // TODO: Is it right? + basepoints0 = int32((aurEff->GetAmount() * owner->SpellBaseDamageBonusDone(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC)) + 100.0f) / 100.0f); // TODO: Is it right? CastCustomSpell(this, trigger_spell_id, &basepoints0, &basepoints0, NULL, true, castItem, triggeredByAura); return true; } @@ -10197,7 +10191,7 @@ Unit* Unit::GetFirstControlled() const // Sequence: charmed, pet, other guardians Unit* unit = GetCharm(); if (!unit) - if (uint64 guid = GetUInt64Value(UNIT_FIELD_SUMMON)) + if (uint64 guid = GetMinionGUID()) unit = ObjectAccessor::GetUnit(*this, guid); return unit; @@ -10374,7 +10368,7 @@ void Unit::EnergizeBySpell(Unit* victim, uint32 spellID, uint32 damage, Powers p victim->getHostileRefManager().threatAssist(this, float(damage) * 0.5f, spellInfo); } -uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack) +uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack) { if (!spellProto || !victim || damagetype == DIRECT_DAMAGE) return pdamage; @@ -10387,33 +10381,35 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 // For totems get damage bonus from owner if (GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem()) if (Unit* owner = GetOwner()) - return owner->SpellDamageBonus(victim, spellProto, pdamage, damagetype); + return owner->SpellDamageBonusDone(victim, spellProto, pdamage, damagetype); - // Taken/Done total percent damage auras + // Done total percent damage auras float DoneTotalMod = 1.0f; float ApCoeffMod = 1.0f; int32 DoneTotal = 0; - int32 TakenTotal = 0; - // ..done // Pet damage? if (GetTypeId() == TYPEID_UNIT && !ToCreature()->isPet()) DoneTotalMod *= ToCreature()->GetSpellDamageMod(ToCreature()->GetCreatureTemplate()->rank); - AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); - for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i) + // Some spells don't benefit from pct done mods + if (!(spellProto->AttributesEx6 & SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS) && !spellProto->IsRankOf(sSpellMgr->GetSpellInfo(12162))) { - if (spellProto->EquippedItemClass == -1 && (*i)->GetSpellInfo()->EquippedItemClass != -1) //prevent apply mods from weapon specific case to non weapon specific spells (Example: thunder clap and two-handed weapon specialization) - continue; - - if ((*i)->GetMiscValue() & spellProto->GetSchoolMask()) + AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); + for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i) { - if ((*i)->GetSpellInfo()->EquippedItemClass == -1) - AddPctN(DoneTotalMod, (*i)->GetAmount()); - else if (!((*i)->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0)) - AddPctN(DoneTotalMod, (*i)->GetAmount()); - else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo())) - AddPctN(DoneTotalMod, (*i)->GetAmount()); + if (spellProto->EquippedItemClass == -1 && (*i)->GetSpellInfo()->EquippedItemClass != -1) //prevent apply mods from weapon specific case to non weapon specific spells (Example: thunder clap and two-handed weapon specialization) + continue; + + if ((*i)->GetMiscValue() & spellProto->GetSchoolMask()) + { + if ((*i)->GetSpellInfo()->EquippedItemClass == -1) + AddPctN(DoneTotalMod, (*i)->GetAmount()); + else if (!((*i)->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0)) + AddPctN(DoneTotalMod, (*i)->GetAmount()); + else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo())) + AddPctN(DoneTotalMod, (*i)->GetAmount()); + } } } @@ -10593,7 +10589,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 break; } } - break; + break; case SPELLFAMILY_PRIEST: // Mind Flay if (spellProto->SpellFamilyFlags[0] & 0x800000) @@ -10626,7 +10622,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT)) AddPctN(DoneTotalMod, aurEff->GetAmount()); } - break; + break; case SPELLFAMILY_PALADIN: // Judgement of Vengeance/Judgement of Corruption if ((spellProto->SpellFamilyFlags[1] & 0x400000) && spellProto->SpellIconID == 2292) @@ -10644,7 +10640,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 if (stacks) AddPctU(DoneTotalMod, 10 * stacks); } - break; + break; case SPELLFAMILY_DRUID: // Thorns if (spellProto->SpellFamilyFlags[0] & 0x100) @@ -10653,7 +10649,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 if (AuraEffect* aurEff = GetAuraEffectOfRankedSpell(16836, 0)) AddPctN(DoneTotalMod, aurEff->GetAmount()); } - break; + break; case SPELLFAMILY_WARLOCK: // Fire and Brimstone if (spellProto->SpellFamilyFlags[1] & 0x00020040) @@ -10675,14 +10671,14 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 if (spellProto->SpellFamilyFlags[1] & 0x00400000 && isPet()) if (uint8 count = victim->GetDoTsByCaster(GetOwnerGUID())) AddPctN(DoneTotalMod, 15 * count); - break; + break; case SPELLFAMILY_HUNTER: // Steady Shot if (spellProto->SpellFamilyFlags[1] & 0x1) if (AuraEffect* aurEff = GetAuraEffect(56826, 0)) // Glyph of Steady Shot if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_HUNTER, 0x00004000, 0, 0, GetGUID())) AddPctN(DoneTotalMod, aurEff->GetAmount()); - break; + break; case SPELLFAMILY_DEATHKNIGHT: // Improved Icy Touch if (spellProto->SpellFamilyFlags[0] & 0x2) @@ -10723,53 +10719,11 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 } } } - break; - } - - // ..taken - float TakenTotalMod = 1.0f; - - // from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN - // multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085) - TakenTotalMod *= victim->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto->GetSchoolMask()); - - // .. taken pct: dummy auras - AuraEffectList const& mDummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY); - for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) - { - switch ((*i)->GetSpellInfo()->SpellIconID) - { - // Cheat Death - case 2109: - if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) - { - if (victim->GetTypeId() != TYPEID_PLAYER) - continue; - float mod = victim->ToPlayer()->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE) * (-8.0f); - AddPctF(TakenTotalMod, std::max(mod, float((*i)->GetAmount()))); - } - break; - } - } - - // From caster spells - AuraEffectList const& mOwnerTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER); - for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i) - if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectedOnSpell(spellProto)) - AddPctN(TakenTotalMod, (*i)->GetAmount()); - - // Mod damage from spell mechanic - if (uint32 mechanicMask = spellProto->GetAllEffectsMechanicMask()) - { - AuraEffectList const& mDamageDoneMechanic = victim->GetAuraEffectsByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT); - for (AuraEffectList::const_iterator i = mDamageDoneMechanic.begin(); i != mDamageDoneMechanic.end(); ++i) - if (mechanicMask & uint32(1<<((*i)->GetMiscValue()))) - AddPctN(TakenTotalMod, (*i)->GetAmount()); + break; } - // Taken/Done fixed damage bonus auras - int32 DoneAdvertisedBenefit = SpellBaseDamageBonus(spellProto->GetSchoolMask()); - int32 TakenAdvertisedBenefit = SpellBaseDamageBonusForVictim(spellProto->GetSchoolMask(), victim); + // Done fixed damage bonus auras + int32 DoneAdvertisedBenefit = SpellBaseDamageBonusDone(spellProto->GetSchoolMask()); // Pets just add their bonus damage to their spell damage // note that their spell damage is just gain of their own auras if (HasUnitTypeMask(UNIT_MASK_GUARDIAN)) @@ -10786,7 +10740,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 if (bonus->ap_dot_bonus > 0) { WeaponAttackType attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK; - float APbonus = (float) victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS); + float APbonus = float(victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS)); APbonus += GetTotalAttackPowerValue(attType); DoneTotal += int32(bonus->ap_dot_bonus * stack * ApCoeffMod * APbonus); } @@ -10797,74 +10751,20 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 if (bonus->ap_bonus > 0) { WeaponAttackType attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK; - float APbonus = (float) victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS); + float APbonus = float(victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS)); APbonus += GetTotalAttackPowerValue(attType); DoneTotal += int32(bonus->ap_bonus * stack * ApCoeffMod * APbonus); } } } // Default calculation - if (DoneAdvertisedBenefit || TakenAdvertisedBenefit) + if (DoneAdvertisedBenefit) { if (!bonus || coeff < 0) - { - // Damage Done from spell damage bonus - int32 CastingTime = spellProto->IsChanneled() ? spellProto->GetDuration() : spellProto->CalcCastTime(); - // Damage over Time spells bonus calculation - float DotFactor = 1.0f; - if (damagetype == DOT) - { - int32 DotDuration = spellProto->GetDuration(); - // 200% limit - if (DotDuration > 0) - { - if (DotDuration > 30000) - DotDuration = 30000; - if (!spellProto->IsChanneled()) - DotFactor = DotDuration / 15000.0f; - uint8 x = 0; - for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j) - { - if (spellProto->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && ( - spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DAMAGE || - spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_LEECH)) - { - x = j; - break; - } - } - int32 DotTicks = 6; - if (spellProto->Effects[x].Amplitude != 0) - DotTicks = DotDuration / spellProto->Effects[x].Amplitude; - if (DotTicks) - { - DoneAdvertisedBenefit /= DotTicks; - TakenAdvertisedBenefit /= DotTicks; - } - } - } - // Distribute Damage over multiple effects, reduce by AoE - CastingTime = GetCastingTimeForBonus(spellProto, damagetype, CastingTime); - - // 50% for damage and healing spells for leech spells from damage bonus and 0% from healing - for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j) - { - if (spellProto->Effects[j].Effect == SPELL_EFFECT_HEALTH_LEECH || - (spellProto->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_LEECH)) - { - CastingTime /= 2; - break; - } - } - if (spellProto->SchoolMask != SPELL_SCHOOL_MASK_NORMAL) - coeff = (CastingTime / 3500.0f) * DotFactor; - else - coeff = DotFactor; - } + coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack); float factorMod = CalculateLevelPenalty(spellProto) * stack; - // level penalty still applied on Taken bonus - is it blizzlike? - TakenTotal+= int32(TakenAdvertisedBenefit * factorMod); + if (Player* modOwner = GetSpellModOwner()) { coeff *= 100.0f; @@ -10881,27 +10781,94 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 DoneTotalMod = 1.0f; } - // Some spells don't benefit from pct done mods - // maybe should be implemented like SPELL_ATTR3_NO_DONE_BONUS, - // but then it may break spell power coeffs work on spell 31117 - if (spellProto->AttributesEx6 & SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS) - DoneTotalMod = 1.0f; - float tmpDamage = (int32(pdamage) + DoneTotal) * DoneTotalMod; // apply spellmod to Done damage (flat and pct) if (Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, tmpDamage); - tmpDamage = (tmpDamage + TakenTotal) * TakenTotalMod; + return uint32(std::max(tmpDamage, 0.0f)); +} + +uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack) +{ + if (!spellProto || damagetype == DIRECT_DAMAGE) + return pdamage; + + int32 TakenTotal = 0; + float TakenTotalMod = 1.0f; + + // from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN + // multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085) + TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto->GetSchoolMask()); + + //.. taken pct: dummy auras + AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY); + for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) + { + switch ((*i)->GetSpellInfo()->SpellIconID) + { + // Cheat Death + case 2109: + if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) + { + if (GetTypeId() != TYPEID_PLAYER) + continue; + float mod = ToPlayer()->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE) * (-8.0f); + AddPctF(TakenTotalMod, std::max(mod, float((*i)->GetAmount()))); + } + break; + } + } + + // From caster spells + AuraEffectList const& mOwnerTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER); + for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i) + if ((*i)->GetCasterGUID() == caster->GetGUID() && (*i)->IsAffectedOnSpell(spellProto)) + AddPctN(TakenTotalMod, (*i)->GetAmount()); + + // Mod damage from spell mechanic + if (uint32 mechanicMask = spellProto->GetAllEffectsMechanicMask()) + { + AuraEffectList const& mDamageDoneMechanic = GetAuraEffectsByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT); + for (AuraEffectList::const_iterator i = mDamageDoneMechanic.begin(); i != mDamageDoneMechanic.end(); ++i) + if (mechanicMask & uint32(1<<((*i)->GetMiscValue()))) + AddPctN(TakenTotalMod, (*i)->GetAmount()); + } + + int32 TakenAdvertisedBenefit = SpellBaseDamageBonusTaken(spellProto->GetSchoolMask()); + + // Check for table values + float coeff = 0; + SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id); + if (bonus) + coeff = (damagetype == DOT) ? bonus->dot_damage : bonus->direct_damage; + + // Default calculation + if (TakenAdvertisedBenefit) + { + if (!bonus || coeff < 0) + coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack); + + float factorMod = CalculateLevelPenalty(spellProto) * stack; + // level penalty still applied on Taken bonus - is it blizzlike? + if (Player* modOwner = GetSpellModOwner()) + { + coeff *= 100.0f; + modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_BONUS_MULTIPLIER, coeff); + coeff /= 100.0f; + } + TakenTotal+= int32(TakenAdvertisedBenefit * coeff * factorMod); + } + + float tmpDamage = (float(pdamage) + TakenTotal) * TakenTotalMod; return uint32(std::max(tmpDamage, 0.0f)); } -int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask) +int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) { int32 DoneAdvertisedBenefit = 0; - // ..done AuraEffectList const& mDamageDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE); for (AuraEffectList::const_iterator i = mDamageDone.begin(); i != mDamageDone.end(); ++i) if (((*i)->GetMiscValue() & schoolMask) != 0 && @@ -10934,27 +10901,19 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask) DoneAdvertisedBenefit += int32(CalculatePctN(GetTotalAttackPowerValue(BASE_ATTACK), (*i)->GetAmount())); } - return DoneAdvertisedBenefit > 0 ? DoneAdvertisedBenefit : 0; + return DoneAdvertisedBenefit; } -int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* victim) +int32 Unit::SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask) { - uint32 creatureTypeMask = victim->GetCreatureTypeMask(); - int32 TakenAdvertisedBenefit = 0; - // ..done (for creature type by mask) in taken - AuraEffectList const& mDamageDoneCreature = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE); - for (AuraEffectList::const_iterator i = mDamageDoneCreature.begin(); i != mDamageDoneCreature.end(); ++i) - if (creatureTypeMask & uint32((*i)->GetMiscValue())) - TakenAdvertisedBenefit += (*i)->GetAmount(); - // ..taken - AuraEffectList const& mDamageTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN); + AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN); for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i) if (((*i)->GetMiscValue() & schoolMask) != 0) TakenAdvertisedBenefit += (*i)->GetAmount(); - return TakenAdvertisedBenefit > 0 ? TakenAdvertisedBenefit : 0; + return TakenAdvertisedBenefit; } bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const @@ -11218,23 +11177,19 @@ uint32 Unit::SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damag return damage; } -uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack) +uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack) { // For totems get healing bonus from owner (statue isn't totem in fact) - if (GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem()) + if (GetTypeId() == TYPEID_UNIT && isTotem()) if (Unit* owner = GetOwner()) - return owner->SpellHealingBonus(victim, spellProto, healamount, damagetype, stack); + return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, stack); - // no bonus for heal potions/bandages + // No bonus healing for potion spells if (spellProto->SpellFamilyName == SPELLFAMILY_POTION) return healamount; - // Healing Done - // Taken/Done total percent damage auras - float DoneTotalMod = 1.0f; - float TakenTotalMod = 1.0f; - int32 DoneTotal = 0; - int32 TakenTotal = 0; + float DoneTotalMod = 1.0f; + int32 DoneTotal = 0; // Healing done percent AuraEffectList const& mHealingDonePct = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT); @@ -11297,28 +11252,11 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 } } - // Taken/Done fixed damage bonus auras - int32 DoneAdvertisedBenefit = SpellBaseHealingBonus(spellProto->GetSchoolMask()); - int32 TakenAdvertisedBenefit = SpellBaseHealingBonusForVictim(spellProto->GetSchoolMask(), victim); - - bool scripted = false; - - for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) - { - switch (spellProto->Effects[i].ApplyAuraName) - { - // These auras do not use healing coeff - case SPELL_AURA_PERIODIC_LEECH: - case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: - scripted = true; - break; - } - if (spellProto->Effects[i].Effect == SPELL_EFFECT_HEALTH_LEECH) - scripted = true; - } + // Done fixed damage bonus auras + int32 DoneAdvertisedBenefit = SpellBaseHealingBonusDone(spellProto->GetSchoolMask()); // Check for table values - SpellBonusEntry const* bonus = !scripted ? sSpellMgr->GetSpellBonusData(spellProto->Id) : NULL; + SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id); float coeff = 0; float factorMod = 1.0f; if (bonus) @@ -11328,159 +11266,184 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 coeff = bonus->dot_damage; if (bonus->ap_dot_bonus > 0) DoneTotal += int32(bonus->ap_dot_bonus * stack * GetTotalAttackPowerValue( - (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK)); + (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK)); } else { coeff = bonus->direct_damage; if (bonus->ap_bonus > 0) DoneTotal += int32(bonus->ap_bonus * stack * GetTotalAttackPowerValue( - (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK)); + (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK)); } } - else // scripted bonus + else { - // Gift of the Naaru - if (spellProto->SpellFamilyFlags[2] & 0x80000000 && spellProto->SpellIconID == 329) - { - scripted = true; - int32 apBonus = int32(std::max(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAttackPowerValue(RANGED_ATTACK))); - if (apBonus > DoneAdvertisedBenefit) - DoneTotal += int32(apBonus * 0.22f); // 22% of AP per tick - else - DoneTotal += int32(DoneAdvertisedBenefit * 0.377f); // 37.7% of BH per tick - } - // Earthliving - 0.45% of normal hot coeff - else if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000) - factorMod *= 0.45f; - // Already set to scripted? so not uses healing bonus coefficient - // No heal coeff for SPELL_DAMAGE_CLASS_NONE class spells by default - else if (scripted || spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE) - { - scripted = true; - coeff = 0.0f; - } + // No bonus healing for SPELL_DAMAGE_CLASS_NONE class spells by default + if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE) + return healamount; } // Default calculation - if (DoneAdvertisedBenefit || TakenAdvertisedBenefit) + if (DoneAdvertisedBenefit) { - if ((!bonus && !scripted) || coeff < 0) - { - // Damage Done from spell damage bonus - int32 CastingTime = !spellProto->IsChanneled() ? spellProto->CalcCastTime() : spellProto->GetDuration(); - // Damage over Time spells bonus calculation - float DotFactor = 1.0f; - if (damagetype == DOT) - { - int32 DotDuration = spellProto->GetDuration(); - // 200% limit - if (DotDuration > 0) - { - if (DotDuration > 30000) DotDuration = 30000; - if (!spellProto->IsChanneled()) DotFactor = DotDuration / 15000.0f; - uint32 x = 0; - for (uint8 j = 0; j < MAX_SPELL_EFFECTS; j++) - { - if (spellProto->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && ( - spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DAMAGE || - spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_LEECH)) - { - x = j; - break; - } - } - int32 DotTicks = 6; - if (spellProto->Effects[x].Amplitude != 0) - DotTicks = DotDuration / spellProto->Effects[x].Amplitude; - if (DotTicks) - { - DoneAdvertisedBenefit = DoneAdvertisedBenefit * int32(stack) / DotTicks; - TakenAdvertisedBenefit = TakenAdvertisedBenefit * int32(stack) / DotTicks; - } - } - } - // Distribute Damage over multiple effects, reduce by AoE - CastingTime = GetCastingTimeForBonus(spellProto, damagetype, CastingTime); - // 50% for damage and healing spells for leech spells from damage bonus and 0% from healing - for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j) - { - if (spellProto->Effects[j].Effect == SPELL_EFFECT_HEALTH_LEECH || - (spellProto->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_LEECH)) - { - CastingTime /= 2; - break; - } - } - // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells) - coeff = (CastingTime / 3500.0f) * DotFactor * 1.88f; - } + if (!bonus || coeff < 0) + coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack) * 1.88f; // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells) factorMod *= CalculateLevelPenalty(spellProto) * stack; - // level penalty still applied on Taken bonus - is it blizzlike? - TakenTotal += int32(TakenAdvertisedBenefit * factorMod); + if (Player* modOwner = GetSpellModOwner()) { coeff *= 100.0f; modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_BONUS_MULTIPLIER, coeff); coeff /= 100.0f; } + + // Earthliving - 0.45% of normal hot coeff + if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000) + factorMod *= 0.45f; + DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod); } + // Gift of the Naaru + if (spellProto->SpellFamilyFlags[2] & 0x80000000 && spellProto->SpellIconID == 329) + { + int32 apBonus = int32(std::max(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAttackPowerValue(RANGED_ATTACK))); + if (apBonus > DoneAdvertisedBenefit) + DoneTotal += int32(apBonus * 0.22f); // 22% of AP per tick + else + DoneTotal += int32(DoneAdvertisedBenefit * 0.377f); // 37.7% of BH per tick + } + + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + switch (spellProto->Effects[i].ApplyAuraName) + { + // Bonus healing does not apply to these spells + case SPELL_AURA_PERIODIC_LEECH: + case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: + DoneTotal = 0; + break; + } + if (spellProto->Effects[i].Effect == SPELL_EFFECT_HEALTH_LEECH) + DoneTotal = 0; + } + // use float as more appropriate for negative values and percent applying - float heal = (int32(healamount) + DoneTotal) * DoneTotalMod; + float heal = float(int32(healamount) + DoneTotal) * DoneTotalMod; // apply spellmod to Done amount if (Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, heal); - // Nourish cast - if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000) - { - // Rejuvenation, Regrowth, Lifebloom, or Wild Growth - if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0)) - // increase healing by 20% - TakenTotalMod *= 1.2f; - } - - // Taken mods + return uint32(std::max(heal, 0.0f)); +} - // Tenacity increase healing % taken - if (AuraEffect const* Tenacity = victim->GetAuraEffect(58549, 0)) - AddPctN(TakenTotalMod, Tenacity->GetAmount()); +uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack) +{ + float TakenTotalMod = 1.0f; // Healing taken percent - float minval = (float)victim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); + float minval = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT)); if (minval) AddPctF(TakenTotalMod, minval); - float maxval = (float)victim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT); + float maxval = float(GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT)); if (maxval) AddPctF(TakenTotalMod, maxval); + // Tenacity increase healing % taken + if (AuraEffect const* Tenacity = GetAuraEffect(58549, 0)) + AddPctN(TakenTotalMod, Tenacity->GetAmount()); + + // Healing Done + int32 TakenTotal = 0; + + // Taken fixed damage bonus auras + int32 TakenAdvertisedBenefit = SpellBaseHealingBonusTaken(spellProto->GetSchoolMask()); + + // Nourish cast + if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000) + { + // Rejuvenation, Regrowth, Lifebloom, or Wild Growth + if (GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0)) + // increase healing by 20% + TakenTotalMod *= 1.2f; + } + if (damagetype == DOT) { // Healing over time taken percent - float minval_hot = (float)victim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT); + float minval_hot = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT)); if (minval_hot) AddPctF(TakenTotalMod, minval_hot); - float maxval_hot = (float)victim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT); + float maxval_hot = float(GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT)); if (maxval_hot) AddPctF(TakenTotalMod, maxval_hot); } - AuraEffectList const& mHealingGet= victim->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_RECEIVED); + // Check for table values + SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id); + float coeff = 0; + float factorMod = 1.0f; + if (bonus) + coeff = (damagetype == DOT) ? bonus->dot_damage : bonus->direct_damage; + else + { + // No bonus healing for SPELL_DAMAGE_CLASS_NONE class spells by default + if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE) + { + healamount = uint32(std::max((float(healamount) * TakenTotalMod), 0.0f)); + return healamount; + } + } + + // Default calculation + if (TakenAdvertisedBenefit) + { + if (!bonus || coeff < 0) + coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack) * 1.88f; // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells) + + factorMod *= CalculateLevelPenalty(spellProto) * int32(stack); + if (Player* modOwner = GetSpellModOwner()) + { + coeff *= 100.0f; + modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_BONUS_MULTIPLIER, coeff); + coeff /= 100.0f; + } + + // Earthliving - 0.45% of normal hot coeff + if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000) + factorMod *= 0.45f; + + TakenTotal += int32(TakenAdvertisedBenefit * coeff * factorMod); + } + + AuraEffectList const& mHealingGet= GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_RECEIVED); for (AuraEffectList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i) - if (GetGUID() == (*i)->GetCasterGUID() && (*i)->IsAffectedOnSpell(spellProto)) + if (caster->GetGUID() == (*i)->GetCasterGUID() && (*i)->IsAffectedOnSpell(spellProto)) AddPctN(TakenTotalMod, (*i)->GetAmount()); - heal = (int32(heal) + TakenTotal) * TakenTotalMod; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + switch (spellProto->Effects[i].ApplyAuraName) + { + // Bonus healing does not apply to these spells + case SPELL_AURA_PERIODIC_LEECH: + case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: + TakenTotal = 0; + break; + } + if (spellProto->Effects[i].Effect == SPELL_EFFECT_HEALTH_LEECH) + TakenTotal = 0; + } + + float heal = float(int32(healamount) + TakenTotal) * TakenTotalMod; return uint32(std::max(heal, 0.0f)); } -int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask) +int32 Unit::SpellBaseHealingBonusDone(SpellSchoolMask schoolMask) { int32 AdvertisedBenefit = 0; @@ -11513,13 +11476,15 @@ int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask) return AdvertisedBenefit; } -int32 Unit::SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit* victim) +int32 Unit::SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask) { int32 AdvertisedBenefit = 0; - AuraEffectList const& mDamageTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING); + + AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING); for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i) if (((*i)->GetMiscValue() & schoolMask) != 0) AdvertisedBenefit += (*i)->GetAmount(); + return AdvertisedBenefit; } @@ -11546,7 +11511,7 @@ bool Unit::IsImmunedToDamage(SpellInfo const* spellInfo) return false; uint32 shoolMask = spellInfo->GetSchoolMask(); - if (spellInfo->Id != 42292 && spellInfo->Id !=59752) + if (spellInfo->Id != 42292 && spellInfo->Id != 59752) { // If m_immuneToSchool type contain this school type, IMMUNE damage. SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL]; @@ -11587,7 +11552,7 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) } // Spells that don't have effectMechanics. - if (!spellInfo->HasAnyEffectMechanic() && spellInfo->Mechanic) + if (spellInfo->Mechanic) { SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC]; for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr) @@ -11600,16 +11565,17 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) { // State/effect immunities applied by aura expect full spell immunity // Ignore effects with mechanic, they are supposed to be checked separately - if (spellInfo->Effects[i].Mechanic || !IsImmunedToSpellEffect(spellInfo, i)) + if (!IsImmunedToSpellEffect(spellInfo, i)) { immuneToAllEffects = false; break; } } + if (immuneToAllEffects) //Return immune only if the target is immune to all spell effects. return true; - if (spellInfo->Id != 42292 && spellInfo->Id !=59752) + if (spellInfo->Id != 42292 && spellInfo->Id != 59752) { SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL]; for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr) @@ -11627,8 +11593,9 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const { - if (!spellInfo) + if (!spellInfo || !spellInfo->Effects[index].IsEffect()) return false; + // If m_immuneToEffect type contain this effect type, IMMUNE effect. uint32 effect = spellInfo->Effects[index].Effect; SpellImmuneList const& effectList = m_spellImmune[IMMUNITY_EFFECT]; @@ -11662,21 +11629,17 @@ bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) cons return false; } -void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attType, SpellInfo const* spellProto) +uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType attType, SpellInfo const* spellProto) { - if (!victim) - return; - - if (*pdamage == 0) - return; + if (!victim || pdamage == 0) + return 0; uint32 creatureTypeMask = victim->GetCreatureTypeMask(); - // Taken/Done fixed damage bonus auras + // Done fixed damage bonus auras int32 DoneFlatBenefit = 0; - int32 TakenFlatBenefit = 0; - // ..done (for creature type by mask) in taken + // ..done AuraEffectList const& mDamageDoneCreature = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE); for (AuraEffectList::const_iterator i = mDamageDoneCreature.begin(); i != mDamageDoneCreature.end(); ++i) if (creatureTypeMask & uint32((*i)->GetMiscValue())) @@ -11722,38 +11685,27 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT DoneFlatBenefit += int32(APbonus/14.0f * GetAPMultiplier(attType, normalized)); } - // ..taken - AuraEffectList const& mDamageTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN); - for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i) - if ((*i)->GetMiscValue() & GetMeleeDamageSchoolMask()) - TakenFlatBenefit += (*i)->GetAmount(); - - if (attType != RANGED_ATTACK) - TakenFlatBenefit += victim->GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN); - else - TakenFlatBenefit += victim->GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN); - - // Done/Taken total percent damage auras + // Done total percent damage auras float DoneTotalMod = 1.0f; - float TakenTotalMod = 1.0f; - // ..done - AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); - for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i) - { - if (spellProto) + // Some spells don't benefit from pct done mods + if (spellProto) + if (!(spellProto->AttributesEx6 & SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS) && !spellProto->IsRankOf(sSpellMgr->GetSpellInfo(12162))) { - if ((*i)->GetMiscValue() & spellProto->GetSchoolMask() && !(spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_NORMAL)) + AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); + for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i) { - if ((*i)->GetSpellInfo()->EquippedItemClass == -1) - AddPctN(DoneTotalMod, (*i)->GetAmount()); - else if (!((*i)->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0)) - AddPctN(DoneTotalMod, (*i)->GetAmount()); - else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo())) - AddPctN(DoneTotalMod, (*i)->GetAmount()); + if ((*i)->GetMiscValue() & spellProto->GetSchoolMask() && !(spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_NORMAL)) + { + if ((*i)->GetSpellInfo()->EquippedItemClass == -1) + AddPctN(DoneTotalMod, (*i)->GetAmount()); + else if (!((*i)->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0)) + AddPctN(DoneTotalMod, (*i)->GetAmount()); + else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo())) + AddPctN(DoneTotalMod, (*i)->GetAmount()); + } } } - } AuraEffectList const& mDamageDoneVersus = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS); for (AuraEffectList::const_iterator i = mDamageDoneVersus.begin(); i != mDamageDoneVersus.end(); ++i) @@ -11841,18 +11793,50 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT break; } + float tmpDamage = float(int32(pdamage) + DoneFlatBenefit) * DoneTotalMod; + + // apply spellmod to Done damage + if (spellProto) + if (Player* modOwner = GetSpellModOwner()) + modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DAMAGE, tmpDamage); + + // bonus result can be negative + return uint32(std::max(tmpDamage, 0.0f)); +} + +uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const* spellProto) +{ + if (pdamage == 0) + return 0; + + int32 TakenFlatBenefit = 0; + // ..taken - TakenTotalMod *= victim->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetMeleeDamageSchoolMask()); + AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN); + for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i) + if ((*i)->GetMiscValue() & GetMeleeDamageSchoolMask()) + TakenFlatBenefit += (*i)->GetAmount(); - // From caster spells - AuraEffectList const& mOwnerTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER); - for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i) - if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectedOnSpell(spellProto)) - AddPctN(TakenTotalMod, (*i)->GetAmount()); + if (attType != RANGED_ATTACK) + TakenFlatBenefit += GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN); + else + TakenFlatBenefit += GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN); + + // Taken total percent damage auras + float TakenTotalMod = 1.0f; + + // ..taken + TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetMeleeDamageSchoolMask()); // .. taken pct (special attacks) if (spellProto) { + // From caster spells + AuraEffectList const& mOwnerTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER); + for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i) + if ((*i)->GetCasterGUID() == attacker->GetGUID() && (*i)->IsAffectedOnSpell(spellProto)) + AddPctN(TakenTotalMod, (*i)->GetAmount()); + // Mod damage from spell mechanic uint32 mechanicMask = spellProto->GetAllEffectsMechanicMask(); @@ -11862,7 +11846,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT if (mechanicMask) { - AuraEffectList const& mDamageDoneMechanic = victim->GetAuraEffectsByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT); + AuraEffectList const& mDamageDoneMechanic = GetAuraEffectsByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT); for (AuraEffectList::const_iterator i = mDamageDoneMechanic.begin(); i != mDamageDoneMechanic.end(); ++i) if (mechanicMask & uint32(1<<((*i)->GetMiscValue()))) AddPctN(TakenTotalMod, (*i)->GetAmount()); @@ -11870,7 +11854,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT } // .. taken pct: dummy auras - AuraEffectList const& mDummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY); + AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY); for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) { switch ((*i)->GetSpellInfo()->SpellIconID) @@ -11879,9 +11863,9 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT case 2109: if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) { - if (victim->GetTypeId() != TYPEID_PLAYER) + if (GetTypeId() != TYPEID_PLAYER) continue; - float mod = victim->ToPlayer()->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE) * (-8.0f); + float mod = ToPlayer()->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE) * (-8.0f); AddPctF(TakenTotalMod, std::max(mod, float((*i)->GetAmount()))); } break; @@ -11889,38 +11873,31 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT } // .. taken pct: class scripts - /*AuraEffectList const& mclassScritAuras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); - for (AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i) - { - switch ((*i)->GetMiscValue()) - { - } - }*/ + //*AuraEffectList const& mclassScritAuras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); + //for (AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i) + //{ + // switch ((*i)->GetMiscValue()) + // { + // } + //}*/ if (attType != RANGED_ATTACK) { - AuraEffectList const& mModMeleeDamageTakenPercent = victim->GetAuraEffectsByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT); + AuraEffectList const& mModMeleeDamageTakenPercent = GetAuraEffectsByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT); for (AuraEffectList::const_iterator i = mModMeleeDamageTakenPercent.begin(); i != mModMeleeDamageTakenPercent.end(); ++i) AddPctN(TakenTotalMod, (*i)->GetAmount()); } else { - AuraEffectList const& mModRangedDamageTakenPercent = victim->GetAuraEffectsByType(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT); + AuraEffectList const& mModRangedDamageTakenPercent = GetAuraEffectsByType(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT); for (AuraEffectList::const_iterator i = mModRangedDamageTakenPercent.begin(); i != mModRangedDamageTakenPercent.end(); ++i) AddPctN(TakenTotalMod, (*i)->GetAmount()); } - float tmpDamage = float(int32(*pdamage) + DoneFlatBenefit) * DoneTotalMod; - - // apply spellmod to Done damage - if (spellProto) - if (Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DAMAGE, tmpDamage); - - tmpDamage = (tmpDamage + TakenFlatBenefit) * TakenTotalMod; + float tmpDamage = (float(pdamage) + TakenFlatBenefit) * TakenTotalMod; // bonus result can be negative - *pdamage = uint32(std::max(tmpDamage, 0.0f)); + return uint32(std::max(tmpDamage, 0.0f)); } void Unit::ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply) @@ -12260,7 +12237,7 @@ bool Unit::IsValidAttackTarget(Unit const* target) const } // function based on function Unit::CanAttack from 13850 client -bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) const +bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, WorldObject const* obj) const { ASSERT(target); @@ -12278,8 +12255,8 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co if (IsOnVehicle(target) || m_vehicle->GetBase()->IsOnVehicle(target)) return false; - // can't attack invisible (ignore stealth for aoe spells) - if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea())) + // can't attack invisible (ignore stealth for aoe spells) also if the area being looked at is from a spell use the dynamic object created instead of the casting unit. + if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && (obj ? !obj->canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()) : !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))) return false; // can't attack dead @@ -12840,11 +12817,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced) void Unit::setDeathState(DeathState s) { - // death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that - // it can be used to check creation of death items (such as soul shards). - m_deathState = s; - - if (s != ALIVE && s != JUST_ALIVED) + if (s != ALIVE && s != JUST_RESPAWNED) { CombatStop(); DeleteThreatList(); @@ -12887,8 +12860,10 @@ void Unit::setDeathState(DeathState s) if (ZoneScript* zoneScript = GetZoneScript() ? GetZoneScript() : (ZoneScript*)GetInstanceScript()) zoneScript->OnUnitDeath(this); } - else if (s == JUST_ALIVED) - RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground) + else if (s == JUST_RESPAWNED) + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground) + + m_deathState = s; } /*######################################## @@ -14501,7 +14476,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount(), spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); SpellNonMeleeDamage damageInfo(this, target, spellInfo->Id, spellInfo->SchoolMask); - uint32 newDamage = SpellDamageBonus(target, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE); + uint32 newDamage = SpellDamageBonusDone(target, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE); + newDamage = target->SpellDamageBonusTaken(this, spellInfo, newDamage, SPELL_DIRECT_DAMAGE); CalculateSpellDamageTaken(&damageInfo, newDamage, spellInfo); DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb); SendSpellNonMeleeDamageLog(&damageInfo); @@ -15028,7 +15004,7 @@ void Unit::ApplyCastTimePercentMod(float val, bool apply) ApplyPercentModFloatValue(UNIT_MOD_CAST_SPEED, -val, apply); } -uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) +uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) const { // Not apply this to creature casted spells with casttime == 0 if (CastingTime == 0 && GetTypeId() == TYPEID_UNIT && !ToCreature()->isPet()) @@ -15101,20 +15077,21 @@ uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectTyp if (AreaEffect) CastingTime /= 2; - // -5% of total per any additional effect - for (uint8 i = 0; i < effects; ++i) + // 50% for damage and healing spells for leech spells from damage bonus and 0% from healing + for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j) { - if (CastingTime > 175) - { - CastingTime -= 175; - } - else + if (spellProto->Effects[j].Effect == SPELL_EFFECT_HEALTH_LEECH || + (spellProto->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && spellProto->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_LEECH)) { - CastingTime = 0; + CastingTime /= 2; break; } } + // -5% of total per any additional effect + for (uint8 i = 0; i < effects; ++i) + CastingTime *= 0.95f; + return CastingTime; } @@ -15145,6 +15122,29 @@ void Unit::UpdateAuraForGroup(uint8 slot) } } +float Unit::CalculateDefaultCoefficient(SpellInfo const *spellInfo, DamageEffectType damagetype) const +{ + // Damage over Time spells bonus calculation + float DotFactor = 1.0f; + if (damagetype == DOT) + { + + int32 DotDuration = spellInfo->GetDuration(); + if (!spellInfo->IsChanneled() && DotDuration > 0) + DotFactor = DotDuration / 15000.0f; + + if (uint32 DotTicks = spellInfo->GetMaxTicks()) + DotFactor /= DotTicks; + } + + int32 CastingTime = spellInfo->IsChanneled() ? spellInfo->GetDuration() : spellInfo->CalcCastTime(); + // Distribute Damage over multiple effects, reduce by AoE + CastingTime = GetCastingTimeForBonus(spellInfo, damagetype, CastingTime); + + // As wowwiki says: C = (Cast Time / 3.5) + return (CastingTime / 3500.0f) * DotFactor; +} + float Unit::GetAPMultiplier(WeaponAttackType attType, bool normalized) { if (!normalized || GetTypeId() != TYPEID_PLAYER) @@ -17018,7 +17018,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) } if (IsInMap(caster)) - caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, true, NULL, NULL, origCasterGUID); + caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, false, NULL, NULL, origCasterGUID); else // This can happen during Player::_LoadAuras { int32 bp0 = seatId; @@ -17028,7 +17028,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) else { if (IsInMap(caster)) - caster->CastSpell(target, spellEntry, true, NULL, NULL, origCasterGUID); + caster->CastSpell(target, spellEntry, false, NULL, NULL, origCasterGUID); else Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, NULL, NULL, origCasterGUID); } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 5a6276d3b0c..f246f595dec 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -465,7 +465,7 @@ enum DeathState JUST_DIED = 1, CORPSE = 2, DEAD = 3, - JUST_ALIVED = 4, + JUST_RESPAWNED = 4, }; enum UnitState @@ -1573,7 +1573,7 @@ class Unit : public WorldObject bool isTargetableForAttack(bool checkFakeDeath = true) const; bool IsValidAttackTarget(Unit const* target) const; - bool _IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) const; + bool _IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, WorldObject const* obj = NULL) const; bool IsValidAssistTarget(Unit const* target) const; bool _IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) const; @@ -2034,12 +2034,20 @@ class Unit : public WorldObject void UnsummonAllTotems(); Unit* GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo); Unit* GetMeleeHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo = NULL); - int32 SpellBaseDamageBonus(SpellSchoolMask schoolMask); - int32 SpellBaseHealingBonus(SpellSchoolMask schoolMask); - int32 SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* victim); - int32 SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit* victim); - uint32 SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 damage, DamageEffectType damagetype, uint32 stack = 1); - uint32 SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); + + int32 SpellBaseDamageBonusDone(SpellSchoolMask schoolMask); + int32 SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask); + uint32 SpellDamageBonusDone(Unit* victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellDamageBonusTaken(Unit* caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); + int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask); + int32 SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask); + uint32 SpellHealingBonusDone(Unit* victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellHealingBonusTaken(Unit* caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); + + uint32 MeleeDamageBonusDone(Unit *pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const *spellProto = NULL); + uint32 MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage,WeaponAttackType attType, SpellInfo const *spellProto = NULL); + + bool isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK); bool isBlockCritical(); bool isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const; @@ -2051,8 +2059,8 @@ class Unit : public WorldObject void SetContestedPvP(Player* attackedPlayer = NULL); - void MeleeDamageBonus(Unit* victim, uint32 *damage, WeaponAttackType attType, SpellInfo const* spellProto = NULL); - uint32 GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime); + uint32 GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) const; + float CalculateDefaultCoefficient(SpellInfo const *spellInfo, DamageEffectType damagetype) const; uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex = 0) const; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 9dea557f650..1e36b4c732b 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -6247,74 +6247,54 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh) switch (guidhigh) { case HIGHGUID_ITEM: - if (_hiItemGuid >= 0xFFFFFFFE) - { - sLog->outError("Item guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiItemGuid < 0xFFFFFFFE && "Item guid overflow!"); return _hiItemGuid++; + } case HIGHGUID_UNIT: - if (_hiCreatureGuid >= 0x00FFFFFE) - { - sLog->outError("Creature guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiCreatureGuid < 0x00FFFFFE && "Creature guid overflow!"); return _hiCreatureGuid++; + } case HIGHGUID_PET: - if (_hiPetGuid >= 0x00FFFFFE) - { - sLog->outError("Pet guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiPetGuid < 0x00FFFFFE && "Pet guid overflow!"); return _hiPetGuid++; + } case HIGHGUID_VEHICLE: - if (_hiVehicleGuid >= 0x00FFFFFF) - { - sLog->outError("Vehicle guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiVehicleGuid < 0x00FFFFFF && "Vehicle guid overflow!"); return _hiVehicleGuid++; + } case HIGHGUID_PLAYER: - if (_hiCharGuid >= 0xFFFFFFFE) - { - sLog->outError("Players guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiCharGuid < 0xFFFFFFFE && "Player guid overflow!"); return _hiCharGuid++; + } case HIGHGUID_GAMEOBJECT: - if (_hiGoGuid >= 0x00FFFFFE) - { - sLog->outError("Gameobject guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiGoGuid < 0x00FFFFFE && "Gameobject guid overflow!"); return _hiGoGuid++; + } case HIGHGUID_CORPSE: - if (_hiCorpseGuid >= 0xFFFFFFFE) - { - sLog->outError("Corpse guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiCorpseGuid < 0xFFFFFFFE && "Corpse guid overflow!"); return _hiCorpseGuid++; + } case HIGHGUID_DYNAMICOBJECT: - if (_hiDoGuid >= 0xFFFFFFFE) - { - sLog->outError("DynamicObject guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiDoGuid < 0xFFFFFFFE && "DynamicObject guid overflow!"); return _hiDoGuid++; + } case HIGHGUID_MO_TRANSPORT: - if (_hiMoTransGuid >= 0xFFFFFFFE) - { - sLog->outError("MO Transport guid overflow!! Can't continue, shutting down server. "); - World::StopNow(ERROR_EXIT_CODE); - } + { + ASSERT(_hiMoTransGuid < 0xFFFFFFFE && "MO Transport guid overflow!"); return _hiMoTransGuid++; + } default: - ASSERT(0); + ASSERT(false && "ObjectMgr::GenerateLowGuid - Unknown HIGHGUID type"); + return 0; } - - ASSERT(0); - return 0; } void ObjectMgr::LoadGameObjectLocales() diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index e81822e72be..7bb4492f99c 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -943,7 +943,7 @@ namespace Trinity if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem()) return false; - if (i_funit->_IsValidAttackTarget(u, _spellInfo) && i_obj->IsWithinDistInMap(u, i_range)) + if (i_funit->_IsValidAttackTarget(u, _spellInfo,i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : NULL) && i_obj->IsWithinDistInMap(u, i_range)) return true; return false; @@ -972,7 +972,7 @@ namespace Trinity return; // too far - if (!u->IsWithinDistInMap(i_enemy, i_range)) + if (!u->IsWithinDistInMap(i_funit, i_range)) return; // only if see assisted creature's enemy diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index d1277d154cc..298c742fc3a 100755 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -20,7 +20,7 @@ ----- Opcodes Not Used yet ----- SMSG_CALENDAR_CLEAR_PENDING_ACTION SendCalendarClearPendingAction() -SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save) <--- Structure unknown, using LOCKOUT_ADDED +SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save) ----- Opcodes without Sniffs ----- SMSG_CALENDAR_FILTER_GUILD [ for (... uint32(count) { packguid(???), uint8(???) } ] @@ -74,7 +74,11 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) else { sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Invite found with id [" UI64FMTD "]", *it); - data << uint64(0) << uint64(0) << uint8(0) << uint8(0); + data << uint64(0); + data << uint64(0); + data << uint8(0); + data << uint8(0); + data << uint8(0); data.appendPackGUID(0); } } @@ -96,8 +100,12 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) else { sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Event found with id [" UI64FMTD "]", *it); - data << uint64(0) << uint8(0) << uint32(0) - << uint32(0) << uint32(0) << uint32(0); + data << uint64(0); + data << uint8(0); + data << uint32(0); + data << uint32(0); + data << uint32(0); + data << uint32(0); data.appendPackGUID(0); } } @@ -835,26 +843,6 @@ void WorldSession::SendCalendarClearPendingAction() SendPacket(&data); } -void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save) -{ - if (!save) - return; - - uint64 guid = _player->GetGUID(); - sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD - "] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty()); - - time_t cur_time = time_t(time(NULL)); - - WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8); - data << secsToTimeBitFields(cur_time); - data << uint32(save->GetMapId()); - data << uint32(save->GetDifficulty()); - data << uint32(save->GetResetTime() - cur_time); - data << uint64(save->GetInstanceId()); - SendPacket(&data); -} - void WorldSession::SendCalendarCommandResult(CalendarError err, char const* param /*= NULL*/) { uint64 guid = _player->GetGUID(); @@ -898,3 +886,23 @@ void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add) data << uint64(save->GetInstanceId()); SendPacket(&data); } + +void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save) +{ + if (!save) + return; + + uint64 guid = _player->GetGUID(); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD + "] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty()); + + time_t cur_time = time_t(time(NULL)); + + WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8); + data << secsToTimeBitFields(cur_time); + data << uint32(save->GetMapId()); + data << uint32(save->GetDifficulty()); + data << uint32(0); // Amount of seconds that has changed to the reset time + data << uint32(save->GetResetTime() - cur_time); + SendPacket(&data); +} diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 35872f8c63f..a280bc30b7c 100755 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -51,6 +51,7 @@ #include "GameObjectAI.h" #include "Group.h" #include "AccountMgr.h" +#include "Spell.h" void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) { @@ -1714,3 +1715,47 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket) _player->SetPendingBind(0, 0); } + +void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket) +{ + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY"); + + uint64 guid; + uint32 spellId; + float elevation, speed; + float curX, curY, curZ; + float targetX, targetY, targetZ; + uint8 moveStop; + + recvPacket >> guid >> spellId >> elevation >> speed; + recvPacket >> curX >> curY >> curZ; + recvPacket >> targetX >> targetY >> targetZ; + recvPacket >> moveStop; + + Unit* caster = ObjectAccessor::GetUnit(*_player, guid); + Spell* spell = caster ? caster->GetCurrentSpell(CURRENT_GENERIC_SPELL) : NULL; + if (!spell || spell->m_spellInfo->Id != spellId || !spell->m_targets.HasDst() || !spell->m_targets.HasSrc()) + { + recvPacket.rfinish(); + return; + } + + Position pos = *spell->m_targets.GetSrcPos(); + pos.Relocate(curX, curY, curZ); + spell->m_targets.ModSrc(pos); + + pos = *spell->m_targets.GetDstPos(); + pos.Relocate(targetX, targetY, targetZ); + spell->m_targets.ModDst(pos); + + spell->m_targets.SetElevation(elevation); + spell->m_targets.SetSpeed(speed); + + if (moveStop) + { + uint32 opcode; + recvPacket >> opcode; + recvPacket.SetOpcode(opcode); + HandleMovementOpcodes(recvPacket); + } +} diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index b3d663e1850..c271a43462a 100755 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -64,10 +64,9 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->m_InstanceValid = true; Map* oldMap = GetPlayer()->GetMap(); - ASSERT(oldMap); if (GetPlayer()->IsInWorld()) { - sLog->outCrash("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId()); + sLog->outError("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId()); oldMap->RemovePlayerFromMap(GetPlayer(), false); } @@ -200,8 +199,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) sLog->outStaticDebug("Guid " UI64FMTD, guid); sLog->outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS); - Unit* mover = _player->m_mover; - Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL; + Player* plMover = _player->m_mover->ToPlayer(); if (!plMover || !plMover->IsBeingTeleportedNear()) return; @@ -240,33 +238,33 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) GetPlayer()->ProcessDelayedOperations(); } -void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) +void WorldSession::HandleMovementOpcodes(WorldPacket & recvData) { - uint16 opcode = recv_data.GetOpcode(); + uint16 opcode = recvData.GetOpcode(); Unit* mover = _player->m_mover; - ASSERT(mover != NULL); // there must always be a mover + ASSERT(mover != NULL); // there must always be a mover - Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL; + Player* plrMover = mover->ToPlayer(); // ignore, waiting processing in WorldSession::HandleMoveWorldportAckOpcode and WorldSession::HandleMoveTeleportAck - if (plMover && plMover->IsBeingTeleported()) + if (plrMover && plrMover->IsBeingTeleported()) { - recv_data.rfinish(); // prevent warnings spam + recvData.rfinish(); // prevent warnings spam return; } /* extract packet */ uint64 guid; - recv_data.readPackGUID(guid); + recvData.readPackGUID(guid); MovementInfo movementInfo; movementInfo.guid = guid; - ReadMovementInfo(recv_data, &movementInfo); + ReadMovementInfo(recvData, &movementInfo); - recv_data.rfinish(); // prevent warnings spam + recvData.rfinish(); // prevent warnings spam // prevent tampered movement data if (guid != mover->GetGUID()) @@ -274,7 +272,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) if (!movementInfo.pos.IsPositionValid()) { - recv_data.rfinish(); // prevent warnings spam + recvData.rfinish(); // prevent warnings spam return; } @@ -285,27 +283,27 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) // (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped) if (movementInfo.t_pos.GetPositionX() > 50 || movementInfo.t_pos.GetPositionY() > 50 || movementInfo.t_pos.GetPositionZ() > 50) { - recv_data.rfinish(); // prevent warnings spam + recvData.rfinish(); // prevent warnings spam return; } if (!Trinity::IsValidMapCoord(movementInfo.pos.GetPositionX() + movementInfo.t_pos.GetPositionX(), movementInfo.pos.GetPositionY() + movementInfo.t_pos.GetPositionY(), movementInfo.pos.GetPositionZ() + movementInfo.t_pos.GetPositionZ(), movementInfo.pos.GetOrientation() + movementInfo.t_pos.GetOrientation())) { - recv_data.rfinish(); // prevent warnings spam + recvData.rfinish(); // prevent warnings spam return; } // if we boarded a transport, add us to it - if (plMover && !plMover->GetTransport()) + if (plrMover && !plrMover->GetTransport()) { // elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just dismount if the guid can be found in the transport list for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter) { if ((*iter)->GetGUID() == movementInfo.t_guid) { - plMover->m_transport = (*iter); - (*iter)->AddPassenger(plMover); + plrMover->m_transport = (*iter); + (*iter)->AddPassenger(plrMover); break; } } @@ -318,29 +316,29 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT; } } - else if (plMover && plMover->GetTransport()) // if we were on a transport, leave + else if (plrMover && plrMover->GetTransport()) // if we were on a transport, leave { - plMover->m_transport->RemovePassenger(plMover); - plMover->m_transport = NULL; + plrMover->m_transport->RemovePassenger(plrMover); + plrMover->m_transport = NULL; movementInfo.t_pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f); movementInfo.t_time = 0; movementInfo.t_seat = -1; } // fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map). - if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight()) - plMover->HandleFall(movementInfo); + if (opcode == MSG_MOVE_FALL_LAND && plrMover && !plrMover->isInFlight()) + plrMover->HandleFall(movementInfo); - if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater()) + if (plrMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plrMover->IsInWater()) { // now client not include swimming flag in case jumping under water - plMover->SetInWater(!plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY(), movementInfo.pos.GetPositionZ())); + plrMover->SetInWater(!plrMover->IsInWater() || plrMover->GetBaseMap()->IsUnderWater(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY(), movementInfo.pos.GetPositionZ())); } /*----------------------*/ /* process position-change */ - WorldPacket data(opcode, recv_data.size()); + WorldPacket data(opcode, recvData.size()); movementInfo.time = getMSTime(); movementInfo.guid = mover->GetGUID(); WriteMovementInfo(&data, &movementInfo); @@ -357,27 +355,25 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) mover->UpdatePosition(movementInfo.pos); - if (plMover) // nothing is charmed, or player charmed + if (plrMover) // nothing is charmed, or player charmed { - plMover->UpdateFallInformationIfNeed(movementInfo, opcode); + plrMover->UpdateFallInformationIfNeed(movementInfo, opcode); if (movementInfo.pos.GetPositionZ() < -500.0f) { - if (!(plMover->InBattleground() - && plMover->GetBattleground() - && plMover->GetBattleground()->HandlePlayerUnderMap(_player))) + if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player))) { // NOTE: this is actually called many times while falling // even after the player has been teleported away // TODO: discard movement packets after the player is rooted - if (plMover->isAlive()) + if (plrMover->isAlive()) { - plMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth()); + plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth()); // player can be alive if GM/etc // change the death state to CORPSE to prevent the death timer from // starting in the next player update - if (!plMover->isAlive()) - plMover->KillPlayer(); + if (!plrMover->isAlive()) + plrMover->KillPlayer(); } } } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index a1b3d913c99..162dd12d121 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2470,7 +2470,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true)) if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId)) if (LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin()))) - if (uint32(dungeon->map) == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM) + if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM)) player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true); } diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 4b07d19bd7a..aec72835d86 100755 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -522,8 +522,9 @@ enum TrinityStrings LANG_YOURS_EXPLORE_SET_ALL = 553, LANG_YOURS_EXPLORE_SET_NOTHING = 554, + LANG_NPC_SETDATA = 555, + //! Old ones now free: - // LANG_HOVER_ENABLED = 555, // LANG_HOVER_DISABLED = 556, LANG_YOURS_LEVEL_UP = 557, diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index 311b69c06b7..a8bdb698432 100755 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -25,7 +25,6 @@ void HomeMovementGenerator<Creature>::Initialize(Creature & owner) { - owner.AddUnitState(UNIT_STATE_EVADE); _setTargetLocation(owner); } diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 81fe1606ede..25730f92161 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -107,7 +107,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature) i_currentNode = (i_currentNode+1) % i_path->size(); } - const WaypointData *node = i_path->at(i_currentNode); + WaypointData const* node = i_path->at(i_currentNode); m_isArrivalDone = false; @@ -116,7 +116,8 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature) Movement::MoveSplineInit init(creature); init.MoveTo(node->x, node->y, node->z); - if (node->orientation != 100 && node->delay != 0) + //! Accepts angles such as 0.00001 and -0.00001, 0 must be ignored, default value in waypoint table + if (node->orientation && node->delay) init.SetFacing(node->orientation); init.SetWalk(!node->run); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 01d56cf8060..23d18e12097 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -937,6 +937,22 @@ void ScriptMgr::OnGameObjectDamaged(GameObject* go, Player* player) tmpscript->OnDamaged(go, player); } +void ScriptMgr::OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit) +{ + ASSERT(go); + + GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript); + tmpscript->OnLootStateChanged(go, state, unit); +} + +void ScriptMgr::OnGameObjectStateChanged(GameObject* go, uint32 state) +{ + ASSERT(go); + + GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript); + tmpscript->OnGameObjectStateChanged(go, state); +} + void ScriptMgr::OnGameObjectUpdate(GameObject* go, uint32 diff) { ASSERT(go); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 6fe058d336a..b3d445af0c6 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -473,6 +473,12 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject> // Called when the game object is damaged (destructible buildings only). virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { } + // Called when the game object loot state is changed. + virtual void OnLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } + + // Called when the game object state is changed. + virtual void OnGameObjectStateChanged(GameObject* /*go*/, uint32 /*state*/) { } + // Called when a GameObjectAI object is needed for the gameobject. virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return NULL; } }; @@ -914,6 +920,8 @@ class ScriptMgr uint32 GetDialogStatus(Player* player, GameObject* go); void OnGameObjectDestroyed(GameObject* go, Player* player); void OnGameObjectDamaged(GameObject* go, Player* player); + void OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit); + void OnGameObjectStateChanged(GameObject* go, uint32 state); void OnGameObjectUpdate(GameObject* go, uint32 diff); GameObjectAI* GetGameObjectAI(GameObject* go); diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index aa6013fae3d..bd9c75c251d 100755 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -270,8 +270,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x0F1*/ { "MSG_MOVE_KNOCK_BACK", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x0F2*/ { "SMSG_MOVE_FEATHER_FALL", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x0F3*/ { "SMSG_MOVE_NORMAL_FALL", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x0F4*/ { "SMSG_MOVE_SET_HOVER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, - /*0x0F5*/ { "SMSG_MOVE_UNSET_HOVER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x0F4*/ { "SMSG_MOVE_SET_HOVER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, + /*0x0F5*/ { "SMSG_MOVE_UNSET_HOVER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x0F6*/ { "CMSG_MOVE_HOVER_ACK", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMoveHoverAck }, /*0x0F7*/ { "MSG_MOVE_HOVER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x0F8*/ { "CMSG_TRIGGER_CINEMATIC_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, @@ -970,7 +970,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x3AD*/ { "MSG_MOVE_UPDATE_CAN_FLY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x3AE*/ { "MSG_RAID_READY_CHECK_CONFIRM", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x3AF*/ { "CMSG_VOICE_SESSION_ENABLE", STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleVoiceSessionEnableOpcode }, - /*0x3B0*/ { "SMSG_VOICE_SESSION_ENABLE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x3B0*/ { "SMSG_VOICE_SESSION_ENABLE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x3B1*/ { "SMSG_VOICE_PARENTAL_CONTROLS", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x3B2*/ { "CMSG_GM_WHISPER", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x3B3*/ { "SMSG_GM_MESSAGECHAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, @@ -1023,7 +1023,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x3E2*/ { "SMSG_COMSAT_CONNECT_FAIL", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x3E3*/ { "SMSG_VOICE_CHAT_STATUS", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x3E4*/ { "CMSG_REPORT_PVP_AFK", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleReportPvPAFK }, - /*0x3E5*/ { "SMSG_REPORT_PVP_AFK_RESULT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x3E5*/ { "SMSG_REPORT_PVP_AFK_RESULT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x3E6*/ { "CMSG_GUILD_BANKER_ACTIVATE", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGuildBankerActivate }, /*0x3E7*/ { "CMSG_GUILD_BANK_QUERY_TAB", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGuildBankQueryTab }, /*0x3E8*/ { "SMSG_GUILD_BANK_LIST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, @@ -1148,7 +1148,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x45F*/ { "CMSG_CALENDAR_EVENT_INVITE_NOTES", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x460*/ { "SMSG_CALENDAR_EVENT_INVITE_NOTES", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x461*/ { "SMSG_CALENDAR_EVENT_INVITE_NOTES_ALERT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleUpdateMissileTrajectory }, /*0x463*/ { "SMSG_UPDATE_ACCOUNT_DATA_COMPLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x464*/ { "SMSG_TRIGGER_MOVIE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x465*/ { "CMSG_COMPLETE_MOVIE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 0fce0a372ff..6d8a9e3ff38 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -395,7 +395,7 @@ class WorldSession public: // opcodes handlers void Handle_NULL(WorldPacket& recvPacket); // not used - void Handle_EarlyProccess(WorldPacket& recvPacket);// just mark packets processed in WorldSocket::OnRead + void Handle_EarlyProccess(WorldPacket& recvPacket); // just mark packets processed in WorldSocket::OnRead void Handle_ServerSide(WorldPacket& recvPacket); // sever side only, can't be accepted from client void Handle_Deprecated(WorldPacket& recvPacket); // never used anymore by client @@ -785,6 +785,7 @@ class WorldSession void HandleResetInstancesOpcode(WorldPacket& recv_data); void HandleHearthAndResurrect(WorldPacket& recv_data); void HandleInstanceLockResponse(WorldPacket& recvPacket); + void HandleUpdateMissileTrajectory(WorldPacket& recvPacket); // Looking for Dungeon/Raid void HandleLfgSetCommentOpcode(WorldPacket& recv_data); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 31a8e57825c..d28ba9e1e19 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -490,7 +490,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) if (GetSpellInfo()->SpellFamilyFlags[1] & 0x1 && GetSpellInfo()->SpellFamilyFlags[2] & 0x8) { // +80.68% from sp bonus - DoneActualBenefit += caster->SpellBaseDamageBonus(m_spellInfo->GetSchoolMask()) * 0.8068f; + DoneActualBenefit += caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask()) * 0.8068f; // Glyph of Ice Barrier: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :) // Glyph of Ice Barrier is only applied at the spell damage bonus because it was already applied to the base value in CalculateSpellDamage DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellInfo(), m_effIndex, DoneActualBenefit); @@ -499,13 +499,13 @@ int32 AuraEffect::CalculateAmount(Unit* caster) else if (GetSpellInfo()->SpellFamilyFlags[0] & 0x8 && GetSpellInfo()->SpellFamilyFlags[2] & 0x8) { // +80.68% from sp bonus - DoneActualBenefit += caster->SpellBaseDamageBonus(m_spellInfo->GetSchoolMask()) * 0.8068f; + DoneActualBenefit += caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask()) * 0.8068f; } // Frost Ward else if (GetSpellInfo()->SpellFamilyFlags[0] & 0x100 && GetSpellInfo()->SpellFamilyFlags[2] & 0x8) { // +80.68% from sp bonus - DoneActualBenefit += caster->SpellBaseDamageBonus(m_spellInfo->GetSchoolMask()) * 0.8068f; + DoneActualBenefit += caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask()) * 0.8068f; } break; case SPELLFAMILY_WARLOCK: @@ -513,7 +513,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) if (m_spellInfo->SpellFamilyFlags[2] & 0x40) { // +80.68% from sp bonus - DoneActualBenefit += caster->SpellBaseDamageBonus(m_spellInfo->GetSchoolMask()) * 0.8068f; + DoneActualBenefit += caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask()) * 0.8068f; } break; case SPELLFAMILY_PRIEST: @@ -527,7 +527,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) if (AuraEffect const* pAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 2899, 1)) bonus += CalculatePctN(1.0f, pAurEff->GetAmount()); - DoneActualBenefit += caster->SpellBaseHealingBonus(m_spellInfo->GetSchoolMask()) * bonus; + DoneActualBenefit += caster->SpellBaseHealingBonusDone(m_spellInfo->GetSchoolMask()) * bonus; // Improved PW: Shield: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :) // Improved PW: Shield is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellInfo(), m_effIndex, DoneActualBenefit); @@ -555,7 +555,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) //+75.00% from sp bonus float bonus = 0.75f; - DoneActualBenefit += caster->SpellBaseHealingBonus(m_spellInfo->GetSchoolMask()) * bonus; + DoneActualBenefit += caster->SpellBaseHealingBonusDone(m_spellInfo->GetSchoolMask()) * bonus; // Divine Guardian is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellInfo(), m_effIndex, DoneActualBenefit); DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellInfo()); @@ -584,7 +584,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_MAGE && GetSpellInfo()->SpellFamilyFlags[0] & 0x8000 && m_spellInfo->SpellFamilyFlags[2] & 0x8) { // +80.53% from +spd bonus - DoneActualBenefit += caster->SpellBaseDamageBonus(m_spellInfo->GetSchoolMask()) * 0.8053f;; + DoneActualBenefit += caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask()) * 0.8053f; } break; case SPELL_AURA_DUMMY: @@ -592,7 +592,10 @@ int32 AuraEffect::CalculateAmount(Unit* caster) break; // Earth Shield if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellFamilyFlags[1] & 0x400) - amount = caster->SpellHealingBonus(GetBase()->GetUnitOwner(), GetSpellInfo(), amount, SPELL_DIRECT_DAMAGE); + { + amount = caster->SpellHealingBonusDone(GetBase()->GetUnitOwner(), GetSpellInfo(), amount, SPELL_DIRECT_DAMAGE); + amount = GetBase()->GetUnitOwner()->SpellHealingBonusTaken(caster, GetSpellInfo(), amount, SPELL_DIRECT_DAMAGE); + } break; case SPELL_AURA_PERIODIC_DAMAGE: if (!caster) @@ -933,6 +936,7 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply) handleMask |= AURA_EFFECT_HANDLE_CHANGE_AMOUNT; if (onStackOrReapply) handleMask |= AURA_EFFECT_HANDLE_REAPPLY; + if (!handleMask) return; @@ -4962,7 +4966,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool int32 stack = GetBase()->GetStackAmount(); int32 heal = m_amount; if (caster) - heal = caster->SpellHealingBonus(target, GetSpellInfo(), heal, HEAL, stack); + { + heal = caster->SpellHealingBonusDone(target, GetSpellInfo(), heal, HEAL, stack); + heal = target->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, HEAL, stack); + } target->CastCustomSpell(target, 33778, &heal, &stack, NULL, true, NULL, this, GetCasterGUID()); // restore mana @@ -5265,66 +5272,63 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const* aurApp, uint8 mod if (!(mode & AURA_EFFECT_HANDLE_REAL)) return; - if (!apply) - { - Unit* caster = GetCaster(); + if (apply || aurApp->GetRemoveMode() != AURA_REMOVE_BY_DEATH) + return; - if (!caster || caster->GetTypeId() != TYPEID_PLAYER) - return; + Unit* caster = GetCaster(); - Player* plCaster = caster->ToPlayer(); - Unit* target = aurApp->GetTarget(); + if (!caster || caster->GetTypeId() != TYPEID_PLAYER) + return; - if (target->getDeathState() != JUST_DIED) - return; + Player* plCaster = caster->ToPlayer(); + Unit* target = aurApp->GetTarget(); - // Item amount - if (GetAmount() <= 0) - return; + // Item amount + if (GetAmount() <= 0) + return; - if (GetSpellInfo()->Effects[m_effIndex].ItemType == 0) + if (GetSpellInfo()->Effects[m_effIndex].ItemType == 0) + return; + + // Soul Shard + if (GetSpellInfo()->Effects[m_effIndex].ItemType == 6265) + { + // Soul Shard only from units that grant XP or honor + if (!plCaster->isHonorOrXPTarget(target) || + (target->GetTypeId() == TYPEID_UNIT && !target->ToCreature()->isTappedBy(plCaster))) return; - // Soul Shard - if (GetSpellInfo()->Effects[m_effIndex].ItemType == 6265) + // If this is Drain Soul, check for Glyph of Drain Soul + if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellInfo()->SpellFamilyFlags[0] & 0x00004000)) { - // Soul Shard only from units that grant XP or honor - if (!plCaster->isHonorOrXPTarget(target) || - (target->GetTypeId() == TYPEID_UNIT && !target->ToCreature()->isTappedBy(plCaster))) - return; - - // If this is Drain Soul, check for Glyph of Drain Soul - if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellInfo()->SpellFamilyFlags[0] & 0x00004000)) - { - // Glyph of Drain Soul - chance to create an additional Soul Shard - if (AuraEffect* aur = caster->GetAuraEffect(58070, 0)) - if (roll_chance_i(aur->GetMiscValue())) - caster->CastSpell(caster, 58068, true, 0, aur); // We _could_ simply do ++count here, but Blizz does it this way :) - } + // Glyph of Drain Soul - chance to create an additional Soul Shard + if (AuraEffect* aur = caster->GetAuraEffect(58070, 0)) + if (roll_chance_i(aur->GetMiscValue())) + caster->CastSpell(caster, 58068, true, 0, aur); // We _could_ simply do ++count here, but Blizz does it this way :) } + } - //Adding items - uint32 noSpaceForCount = 0; - uint32 count = m_amount; - - ItemPosCountVec dest; - InventoryResult msg = plCaster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, GetSpellInfo()->Effects[m_effIndex].ItemType, count, &noSpaceForCount); - if (msg != EQUIP_ERR_OK) - { - count-=noSpaceForCount; - plCaster->SendEquipError(msg, NULL, NULL, GetSpellInfo()->Effects[m_effIndex].ItemType); - if (count == 0) - return; - } + //Adding items + uint32 noSpaceForCount = 0; + uint32 count = m_amount; - Item* newitem = plCaster->StoreNewItem(dest, GetSpellInfo()->Effects[m_effIndex].ItemType, true); - if (!newitem) - { - plCaster->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); + ItemPosCountVec dest; + InventoryResult msg = plCaster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, GetSpellInfo()->Effects[m_effIndex].ItemType, count, &noSpaceForCount); + if (msg != EQUIP_ERR_OK) + { + count-=noSpaceForCount; + plCaster->SendEquipError(msg, NULL, NULL, GetSpellInfo()->Effects[m_effIndex].ItemType); + if (count == 0) return; - } - plCaster->SendNewItem(newitem, count, true, true); } + + Item* newitem = plCaster->StoreNewItem(dest, GetSpellInfo()->Effects[m_effIndex].ItemType, true); + if (!newitem) + { + plCaster->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); + return; + } + plCaster->SendNewItem(newitem, count, true, true); } void AuraEffect::HandleBindSight(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -6190,7 +6194,8 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const if (GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE) { - damage = caster->SpellDamageBonus(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); + damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); + damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); // Calculate armor mitigation if (Unit::IsDamageReducedByArmor(GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), GetEffIndex())) @@ -6300,7 +6305,9 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c CleanDamage cleanDamage = CleanDamage(0, 0, BASE_ATTACK, MELEE_HIT_NORMAL); uint32 damage = std::max(GetAmount(), 0); - damage = caster->SpellDamageBonus(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); + + damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); + damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); bool crit = IsPeriodicTickCrit(target, caster); if (crit) @@ -6338,12 +6345,12 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c if (caster->isAlive()) caster->ProcDamageAndSpell(target, procAttacker, procVictim, procEx, damage, BASE_ATTACK, GetSpellInfo()); int32 new_damage = caster->DealDamage(target, damage, &cleanDamage, DOT, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), false); - if (caster->isAlive()) { float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster); - uint32 heal = uint32(caster->SpellHealingBonus(caster, GetSpellInfo(), uint32(new_damage * gainMultiplier), DOT, GetBase()->GetStackAmount())); + uint32 heal = uint32(caster->SpellHealingBonusDone(caster, GetSpellInfo(), uint32(new_damage * gainMultiplier), DOT, GetBase()->GetStackAmount())); + heal = uint32(caster->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT, GetBase()->GetStackAmount())); int32 gain = caster->HealBySpell(caster, GetSpellInfo(), heal); caster->getHostileRefManager().threatAssist(caster, gain * 0.5f, GetSpellInfo()); @@ -6447,7 +6454,8 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const damage += addition; } - damage = caster->SpellHealingBonus(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); + damage = caster->SpellHealingBonusDone(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); + damage = target->SpellHealingBonusTaken(caster, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()); } bool crit = IsPeriodicTickCrit(target, caster); @@ -6737,7 +6745,8 @@ void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEv Unit* target = aurApp->GetTarget(); Unit* triggerTarget = eventInfo.GetProcTarget(); SpellNonMeleeDamage damageInfo(target, triggerTarget, GetId(), GetSpellInfo()->SchoolMask); - uint32 damage = target->SpellDamageBonus(triggerTarget, GetSpellInfo(), GetAmount(), SPELL_DIRECT_DAMAGE); + uint32 damage = target->SpellDamageBonusDone(triggerTarget, GetSpellInfo(), GetAmount(), SPELL_DIRECT_DAMAGE); + damage = triggerTarget->SpellDamageBonusTaken(target, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE); target->CalculateSpellDamageTaken(&damageInfo, damage, GetSpellInfo()); target->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb); target->SendSpellNonMeleeDamageLog(&damageInfo); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 0bf91b1b6c5..4dda1c731a7 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1212,8 +1212,11 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b // Improved Devouring Plague if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3790, 1)) { - int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * caster->SpellDamageBonus(target, GetSpellInfo(), GetEffect(0)->GetAmount(), DOT) / 100; + uint32 damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), GetEffect(0)->GetAmount(), DOT); + damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, DOT); + int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * int32(damage) / 100; int32 heal = int32(CalculatePctN(basepoints0, 15)); + caster->CastCustomSpell(target, 63675, &basepoints0, NULL, NULL, true, NULL, GetEffect(0)); caster->CastCustomSpell(caster, 75999, &heal, NULL, NULL, true, NULL, GetEffect(0)); } @@ -1224,7 +1227,10 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b // Empowered Renew if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3021, 1)) { - int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * caster->SpellHealingBonus(target, GetSpellInfo(), GetEffect(0)->GetAmount(), HEAL) / 100; + uint32 damage = caster->SpellHealingBonusDone(target, GetSpellInfo(), GetEffect(0)->GetAmount(), HEAL); + damage = target->SpellHealingBonusTaken(caster, GetSpellInfo(), damage, HEAL); + + int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * int32(damage) / 100; caster->CastCustomSpell(target, 63544, &basepoints0, NULL, NULL, true, NULL, GetEffect(0)); } } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 28b089f91cd..de432229e2c 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2475,15 +2475,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim, procEx); } - caster->DealSpellDamage(&damageInfo, true); - // Haunt if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags[1] & 0x40000 && m_spellAura && m_spellAura->GetEffect(1)) { AuraEffect* aurEff = m_spellAura->GetEffect(1); aurEff->SetAmount(CalculatePctU(aurEff->GetAmount(), damageInfo.damage)); } + m_damage = damageInfo.damage; + + caster->DealSpellDamage(&damageInfo, true); } // Passive spell hits/misses or active spells only misses (only triggers) else @@ -2504,7 +2505,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) } } - if (missInfo != SPELL_MISS_EVADE && m_caster && !m_caster->IsFriendlyTo(unit) && !m_spellInfo->IsPositive()) + if (missInfo != SPELL_MISS_EVADE && m_caster && !m_caster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))) { m_caster->CombatStart(unit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_NO_INITIAL_AGGRO)); @@ -3427,6 +3428,20 @@ void Spell::_handle_immediate_phase() // process items for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit) DoAllEffectOnTarget(&(*ihit)); + + if (!m_originalCaster) + return; + // Handle procs on cast + // TODO: finish new proc system:P + if (m_UniqueTargetInfo.empty() && m_targets.HasDst()) + { + uint32 procAttacker = m_procAttacker; + if (!procAttacker) + procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS; + + // Proc the spells that have DEST target + m_originalCaster->ProcDamageAndSpell(NULL, procAttacker, 0, m_procEx | PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell); + } } void Spell::_handle_finish_phase() @@ -4972,35 +4987,12 @@ SpellCastResult Spell::CheckCast(bool strict) { case SPELL_EFFECT_DUMMY: { - if (m_spellInfo->Id == 51582) // Rocket Boots Engaged - { - if (m_caster->IsInWater()) - return SPELL_FAILED_ONLY_ABOVEWATER; - } - else if (m_spellInfo->SpellIconID == 156) // Holy Shock - { - // spell different for friends and enemies - // hurt version required facing - if (m_targets.GetUnitTarget() && !m_caster->IsFriendlyTo(m_targets.GetUnitTarget()) && !m_caster->HasInArc(static_cast<float>(M_PI), m_targets.GetUnitTarget())) - return SPELL_FAILED_UNIT_NOT_INFRONT; - } - else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] == 0x2000) // Death Coil (DeathKnight) - { - Unit* target = m_targets.GetUnitTarget(); - if (!target || (target->IsFriendlyTo(m_caster) && target->GetCreatureType() != CREATURE_TYPE_UNDEAD)) - return SPELL_FAILED_BAD_TARGETS; - } - else if (m_spellInfo->Id == 19938) // Awaken Peon + if (m_spellInfo->Id == 19938) // Awaken Peon { Unit* unit = m_targets.GetUnitTarget(); if (!unit || !unit->HasAura(17743)) return SPELL_FAILED_BAD_TARGETS; } - else if (m_spellInfo->Id == 52264) // Deliver Stolen Horse - { - if (!m_caster->FindNearestCreature(28653, 5)) - return SPELL_FAILED_OUT_OF_RANGE; - } else if (m_spellInfo->Id == 31789) // Righteous Defense { if (m_caster->GetTypeId() != TYPEID_PLAYER) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d3566c24a48..07bea5f980c 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -467,7 +467,8 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) if (aura) { uint32 pdamage = uint32(std::max(aura->GetAmount(), 0)); - pdamage = m_caster->SpellDamageBonus(unitTarget, aura->GetSpellInfo(), pdamage, DOT, aura->GetBase()->GetStackAmount()); + pdamage = m_caster->SpellDamageBonusDone(unitTarget, aura->GetSpellInfo(), pdamage, DOT, aura->GetBase()->GetStackAmount()); + pdamage = unitTarget->SpellDamageBonusTaken(m_caster, aura->GetSpellInfo(), pdamage, DOT, aura->GetBase()->GetStackAmount()); uint32 pct_dir = m_caster->CalculateSpellDamage(unitTarget, m_spellInfo, (effIndex + 1)); uint8 baseTotalTicks = uint8(m_caster->CalcSpellDuration(aura->GetSpellInfo()) / aura->GetSpellInfo()->Effects[EFFECT_0].Amplitude); damage += int32(CalculatePctU(pdamage * baseTotalTicks, pct_dir)); @@ -505,7 +506,8 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) // Shadow Word: Death - deals damage equal to damage done to caster if (m_spellInfo->SpellFamilyFlags[1] & 0x2) { - int32 back_damage = m_caster->SpellDamageBonus(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE); + int32 back_damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE); + back_damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, (uint32)back_damage, SPELL_DIRECT_DAMAGE); // Pain and Suffering reduces damage if (AuraEffect* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 2874, 0)) AddPctN(back_damage, -aurEff->GetAmount()); @@ -712,7 +714,10 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) } if (m_originalCaster && damage > 0 && apply_direct_bonus) - damage = m_originalCaster->SpellDamageBonus(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE); + { + damage = m_originalCaster->SpellDamageBonusDone(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE); + damage = unitTarget->SpellDamageBonusTaken(m_originalCaster, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE); + } m_damage += damage; } @@ -1391,7 +1396,8 @@ void Spell::EffectPowerDrain(SpellEffIndex effIndex) return; // add spell damage bonus - damage = m_caster->SpellDamageBonus(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE); + damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE); + damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE); // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) int32 power = damage; @@ -1554,7 +1560,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/) int32 tickheal = targetAura->GetAmount(); if (Unit* auraCaster = targetAura->GetCaster()) - tickheal = auraCaster->SpellHealingBonus(unitTarget, targetAura->GetSpellInfo(), tickheal, DOT); + tickheal = auraCaster->SpellHealingBonusDone(unitTarget, targetAura->GetSpellInfo(), tickheal, DOT); //int32 tickheal = targetAura->GetSpellInfo()->EffectBasePoints[idx] + 1; //It is said that talent bonus should not be included @@ -1575,11 +1581,12 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/) //addhealth += tickheal * tickcount; //addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth, HEAL, unitTarget); } - // Glyph of Nourish + // Nourish else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x2000000) { - addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL); + addhealth = caster->SpellHealingBonusDone(unitTarget, m_spellInfo, addhealth, HEAL); + // Glyph of Nourish if (AuraEffect const* aurEff = m_caster->GetAuraEffect(62971, 0)) { Unit::AuraEffectList const& Periodic = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_HEAL); @@ -1592,9 +1599,11 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/) } // Death Pact - return pct of max health to caster else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000) - addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, int32(caster->CountPctFromMaxHealth(damage)), HEAL); + addhealth = caster->SpellHealingBonusDone(unitTarget, m_spellInfo, int32(caster->CountPctFromMaxHealth(damage)), HEAL); else - addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL); + addhealth = caster->SpellHealingBonusDone(unitTarget, m_spellInfo, addhealth, HEAL); + + addhealth = unitTarget->SpellHealingBonusTaken(caster, m_spellInfo, addhealth, HEAL); // Remove Grievious bite if fully healed if (unitTarget->HasAura(48920) && (unitTarget->GetHealth() + addhealth >= unitTarget->GetMaxHealth())) @@ -1620,7 +1629,10 @@ void Spell::EffectHealPct(SpellEffIndex /*effIndex*/) if (m_spellInfo->Id == 59754 && unitTarget == m_caster) return; - m_healing += m_originalCaster->SpellHealingBonus(unitTarget, m_spellInfo, unitTarget->CountPctFromMaxHealth(damage), HEAL); + uint32 heal = m_originalCaster->SpellHealingBonusDone(unitTarget, m_spellInfo, unitTarget->CountPctFromMaxHealth(damage), HEAL); + heal = unitTarget->SpellHealingBonusTaken(m_originalCaster, m_spellInfo, heal, HEAL); + + m_healing += heal; } void Spell::EffectHealMechanical(SpellEffIndex /*effIndex*/) @@ -1635,7 +1647,9 @@ void Spell::EffectHealMechanical(SpellEffIndex /*effIndex*/) if (!m_originalCaster) return; - m_healing += m_originalCaster->SpellHealingBonus(unitTarget, m_spellInfo, uint32(damage), HEAL); + uint32 heal = m_originalCaster->SpellHealingBonusDone(unitTarget, m_spellInfo, uint32(damage), HEAL); + + m_healing += unitTarget->SpellHealingBonusTaken(m_originalCaster, m_spellInfo, heal, HEAL); } void Spell::EffectHealthLeech(SpellEffIndex effIndex) @@ -1646,7 +1660,8 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex) if (!unitTarget || !unitTarget->isAlive() || damage < 0) return; - damage = m_caster->SpellDamageBonus(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE); + damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE); + damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE); sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "HealthLeech :%i", damage); @@ -1658,7 +1673,9 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex) if (m_caster->isAlive()) { - healthGain = m_caster->SpellHealingBonus(m_caster, m_spellInfo, healthGain, HEAL); + healthGain = m_caster->SpellHealingBonusDone(m_caster, m_spellInfo, healthGain, HEAL); + healthGain = m_caster->SpellHealingBonusTaken(m_caster, m_spellInfo, healthGain, HEAL); + m_caster->HealBySpell(m_caster, m_spellInfo, uint32(healthGain)); } } @@ -3352,7 +3369,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex) if (m_spellInfo->Id == 20467) { spell_bonus += int32(0.08f * m_caster->GetTotalAttackPowerValue(BASE_ATTACK)); - spell_bonus += int32(0.13f * m_caster->SpellBaseDamageBonus(m_spellInfo->GetSchoolMask())); + spell_bonus += int32(0.13f * m_caster->SpellBaseDamageBonusDone(m_spellInfo->GetSchoolMask())); } break; } @@ -3521,8 +3538,9 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex) uint32 eff_damage(std::max(weaponDamage, 0)); // Add melee damage bonuses (also check for negative) - m_caster->MeleeDamageBonus(unitTarget, &eff_damage, m_attackType, m_spellInfo); - m_damage += eff_damage; + uint32 damage = m_caster->MeleeDamageBonusDone(unitTarget, eff_damage, m_attackType, m_spellInfo); + + m_damage += unitTarget->MeleeDamageBonusTaken(m_caster, damage, m_attackType, m_spellInfo); } void Spell::EffectThreat(SpellEffIndex /*effIndex*/) @@ -3565,7 +3583,10 @@ void Spell::EffectHealMaxHealth(SpellEffIndex /*effIndex*/) addhealth = unitTarget->GetMaxHealth() - unitTarget->GetHealth(); if (m_originalCaster) - m_healing += m_originalCaster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL); + { + uint32 heal = m_originalCaster->SpellHealingBonusDone(unitTarget, m_spellInfo, addhealth, HEAL); + m_healing += unitTarget->SpellHealingBonusTaken(m_originalCaster, m_spellInfo, heal, HEAL); + } } void Spell::EffectInterruptCast(SpellEffIndex effIndex) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 07ab71207f1..a931f759163 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -351,7 +351,7 @@ bool SpellEffectInfo::IsEffect() const bool SpellEffectInfo::IsEffect(SpellEffects effectName) const { - return Effect == effectName; + return Effect == uint32(effectName); } bool SpellEffectInfo::IsAura() const @@ -1972,6 +1972,33 @@ uint32 SpellInfo::CalcCastTime(Unit* caster, Spell* spell) const return (castTime > 0) ? uint32(castTime) : 0; } +uint32 SpellInfo::GetMaxTicks() const +{ + int32 DotDuration = GetDuration(); + if (DotDuration == 0) + return 1; + + // 200% limit + if (DotDuration > 30000) + DotDuration = 30000; + + for (uint8 x = 0; x < MAX_SPELL_EFFECTS; x++) + { + if (Effects[x].Effect == SPELL_EFFECT_APPLY_AURA) + switch (Effects[x].ApplyAuraName) + { + case SPELL_AURA_PERIODIC_DAMAGE: + case SPELL_AURA_PERIODIC_HEAL: + case SPELL_AURA_PERIODIC_LEECH: + if (Effects[x].Amplitude != 0) + return DotDuration / Effects[x].Amplitude; + break; + } + } + + return 6; +} + uint32 SpellInfo::GetRecoveryTime() const { return RecoveryTime > CategoryRecoveryTime ? RecoveryTime : CategoryRecoveryTime; diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index b82f7dbd61d..54430cd7116 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -440,6 +440,8 @@ public: int32 GetDuration() const; int32 GetMaxDuration() const; + uint32 GetMaxTicks() const; + uint32 CalcCastTime(Unit* caster = NULL, Spell* spell = NULL) const; uint32 GetRecoveryTime() const; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index a9959c60201..832f7958fc8 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "Transport.h" #include "CreatureGroups.h" #include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand +#include "CreatureAI.h" class npc_commandscript : public CommandScript { @@ -73,6 +74,7 @@ public: { "phase", SEC_GAMEMASTER, false, &HandleNpcSetPhaseCommand, "", NULL }, { "spawndist", SEC_GAMEMASTER, false, &HandleNpcSetSpawnDistCommand, "", NULL }, { "spawntime", SEC_GAMEMASTER, false, &HandleNpcSetSpawnTimeCommand, "", NULL }, + { "data", SEC_ADMINISTRATOR, false, &HandleNpcSetDataCommand, "", NULL }, //{ TODO: fix or remove these commands { "name", SEC_GAMEMASTER, false, &HandleNpcSetNameCommand, "", NULL }, { "subname", SEC_GAMEMASTER, false, &HandleNpcSetSubNameCommand, "", NULL }, @@ -524,6 +526,39 @@ public: return true; } + //set data of creature for testing scripting + static bool HandleNpcSetDataCommand(ChatHandler* handler, const char* args) + { + if (!*args) + return false; + + char* arg1 = strtok((char*)args, " "); + char* arg2 = strtok((char*)NULL, ""); + + if (!arg1 || !arg2) + return false; + + uint32 data_1 = (uint32)atoi(arg1); + uint32 data_2 = (uint32)atoi(arg2); + + if (!data_1 || !data_2) + return false; + + Creature* creature = handler->getSelectedCreature(); + + if (!creature) + { + handler->SendSysMessage(LANG_SELECT_CREATURE); + handler->SetSentErrorMessage(true); + return false; + } + + creature->AI()->SetData(data_1, data_2); + std::string AIorScript = creature->GetAIName() != "" ? "AI type: " + creature->GetAIName() : (creature->GetScriptName() != "" ? "Script Name: " + creature->GetScriptName() : "No AI or Script Name Set"); + handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID(), creature->GetEntry(), creature->GetName(), data_1, data_2, AIorScript.c_str()); + return true; + } + //npc follow handling static bool HandleNpcFollowCommand(ChatHandler* handler, const char* /*args*/) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h index e51c6b9130d..beef71ea857 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h @@ -57,11 +57,39 @@ enum AdditionalData { SPELL_SUMMON_ROOKERY_WHELP = 15745, MAX_ENCOUNTER = 14, + MAX_DRAGONSPIRE_HALL_RUNES = 7, }; enum GameObjects { - GO_WHELP_SPAWNER = 175622, //trap spawned by go id 175124 + GO_WHELP_SPAWNER = 175622, // trap spawned by go id 175124 + + // Doors + GO_EMBERSEER_IN = 175244, // First door to Pyroguard Emberseer + GO_DOORS = 175705, // Second door to Pyroguard Emberseer + GO_EMBERSEER_OUT = 175153, // Door after Pyroguard Emberseer event + GO_GYTH_ENTRY_DOOR = 164726, + GO_GYTH_COMBAT_DOOR = 175185, + GO_GYTH_EXIT_DOOR = 175186, + GO_DRAKKISATH_DOOR_1 = 175946, + GO_DRAKKISATH_DOOR_2 = 175947, + + // Runes + GO_ROOM_1_RUNE = 175197, + GO_ROOM_2_RUNE = 175199, + GO_ROOM_3_RUNE = 175195, + GO_ROOM_4_RUNE = 175200, + GO_ROOM_5_RUNE = 175198, + GO_ROOM_6_RUNE = 175196, + GO_ROOM_7_RUNE = 175194, + + GO_EMBERSEER_RUNE_1 = 175266, + GO_EMBERSEER_RUNE_2 = 175267, + GO_EMBERSEER_RUNE_3 = 175268, + GO_EMBERSEER_RUNE_4 = 175269, + GO_EMBERSEER_RUNE_5 = 175270, + GO_EMBERSEER_RUNE_6 = 175271, + GO_EMBERSEER_RUNE_7 = 175272, }; #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index ff97984fa09..b5b1b34a593 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -247,7 +247,30 @@ public: }; +uint8 ActivatedRunes = 0; + +class go_dragonspire_hall_rune : public GameObjectScript +{ +public: + go_dragonspire_hall_rune() : GameObjectScript("go_dragonspire_hall_rune") { } + + void OnGameObjectStateChanged(GameObject* go, uint32 state) + { + if (state == GO_STATE_READY) + { + if (++ActivatedRunes == MAX_DRAGONSPIRE_HALL_RUNES) + { + if (GameObject* door1 = GetClosestGameObjectWithEntry(go, GO_EMBERSEER_IN, 150.0f)) + door1->SetGoState(GO_STATE_ACTIVE); + if (GameObject* door2 = GetClosestGameObjectWithEntry(go, GO_DOORS, 150.0f)) + door2->SetGoState(GO_STATE_ACTIVE); + } + } + } +}; + void AddSC_instance_blackrock_spire() { new instance_blackrock_spire(); + new go_dragonspire_hall_rune; } diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp index d5896812007..a9b627ded34 100644 --- a/src/server/scripts/EasternKingdoms/undercity.cpp +++ b/src/server/scripts/EasternKingdoms/undercity.cpp @@ -184,7 +184,7 @@ public: { if (Unit* victim = me->getVictim()) { - DoCast(me->getVictim(), SPELL_BLACK_ARROW); + DoCast(victim, SPELL_BLACK_ARROW); BlackArrowTimer = 15000 + rand()%5000; } } else BlackArrowTimer -= diff; @@ -193,7 +193,7 @@ public: { if (Unit* victim = me->getVictim()) { - DoCast(me->getVictim(), SPELL_SHOT); + DoCast(victim, SPELL_SHOT); ShotTimer = 8000 + rand()%2000; } } else ShotTimer -= diff; @@ -202,7 +202,7 @@ public: { if (Unit* victim = me->getVictim()) { - DoCast(me->getVictim(), SPELL_MULTI_SHOT); + DoCast(victim, SPELL_MULTI_SHOT); MultiShotTimer = 10000 + rand()%3000; } } else MultiShotTimer -= diff; diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp index cec5e42aee5..e28665c038e 100644 --- a/src/server/scripts/Kalimdor/ashenvale.cpp +++ b/src/server/scripts/Kalimdor/ashenvale.cpp @@ -28,7 +28,8 @@ npc_torek npc_ruul_snowhoof EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*#### @@ -78,32 +79,31 @@ class npc_torek : public CreatureScript void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 1: - Talk(SAY_MOVE, player->GetGUID()); - break; - case 8: - Talk(SAY_PREPARE, player->GetGUID()); - break; - case 19: - //TODO: verify location and creatures amount. - me->SummonCreature(ENTRY_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(ENTRY_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(ENTRY_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - break; - case 20: - DoScriptText(SAY_WIN, me, player); - Completed = true; - player->GroupEventHappens(QUEST_TOREK_ASSULT, me); - break; - case 21: - Talk(SAY_END, player->GetGUID()); - break; + switch (waypointId) + { + case 1: + Talk(SAY_MOVE, player->GetGUID()); + break; + case 8: + Talk(SAY_PREPARE, player->GetGUID()); + break; + case 19: + //TODO: verify location and creatures amount. + me->SummonCreature(ENTRY_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(ENTRY_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(ENTRY_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 20: + DoScriptText(SAY_WIN, me, player); + Completed = true; + player->GroupEventHappens(QUEST_TOREK_ASSULT, me); + break; + case 21: + Talk(SAY_END, player->GetGUID()); + break; + } } } @@ -169,8 +169,26 @@ class npc_torek : public CreatureScript # npc_ruul_snowhoof ####*/ -#define QUEST_FREEDOM_TO_RUUL 6482 -#define GO_CAGE 178147 +enum RuulSnowhoof +{ + NPC_THISTLEFUR_URSA = 3921, + NPC_THISTLEFUR_TOTEMIC = 3922, + NPC_THISTLEFUR_PATHFINDER = 3926, + + QUEST_FREEDOM_TO_RUUL = 6482, + + GO_CAGE = 178147 +}; + +Position const RuulSnowhoofSummonsCoord[6] = +{ + {3449.218018f, -587.825073f, 174.978867f, 4.714445f}, + {3446.384521f, -587.830872f, 175.186279f, 4.714445f}, + {3444.218994f, -587.835327f, 175.380600f, 4.714445f}, + {3508.344482f, -492.024261f, 186.929031f, 4.145029f}, + {3506.265625f, -490.531006f, 186.740128f, 4.239277f}, + {3503.682373f, -489.393799f, 186.629684f, 4.349232f} +}; class npc_ruul_snowhoof : public CreatureScript { @@ -195,14 +213,14 @@ class npc_ruul_snowhoof : public CreatureScript Cage->SetGoState(GO_STATE_ACTIVE); break; case 13: - me->SummonCreature(3922, 3449.218018f, -587.825073f, 174.978867f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); - me->SummonCreature(3921, 3446.384521f, -587.830872f, 175.186279f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); - me->SummonCreature(3926, 3444.218994f, -587.835327f, 175.380600f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_THISTLEFUR_TOTEMIC, RuulSnowhoofSummonsCoord[0], TEMPSUMMON_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_THISTLEFUR_URSA, RuulSnowhoofSummonsCoord[1], TEMPSUMMON_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_THISTLEFUR_PATHFINDER, RuulSnowhoofSummonsCoord[2], TEMPSUMMON_DEAD_DESPAWN, 60000); break; case 19: - me->SummonCreature(3922, 3508.344482f, -492.024261f, 186.929031f, 4.145029f, TEMPSUMMON_DEAD_DESPAWN, 60000); - me->SummonCreature(3921, 3506.265625f, -490.531006f, 186.740128f, 4.239277f, TEMPSUMMON_DEAD_DESPAWN, 60000); - me->SummonCreature(3926, 3503.682373f, -489.393799f, 186.629684f, 4.349232f, TEMPSUMMON_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_THISTLEFUR_TOTEMIC, RuulSnowhoofSummonsCoord[3], TEMPSUMMON_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_THISTLEFUR_URSA, RuulSnowhoofSummonsCoord[4], TEMPSUMMON_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_THISTLEFUR_PATHFINDER, RuulSnowhoofSummonsCoord[5], TEMPSUMMON_DEAD_DESPAWN, 60000); break; case 21: player->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, me); @@ -214,8 +232,7 @@ class npc_ruul_snowhoof : public CreatureScript void Reset() { - GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20); - if (Cage) + if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20)) Cage->SetGoState(GO_STATE_READY); } @@ -249,7 +266,7 @@ class npc_ruul_snowhoof : public CreatureScript } }; -enum eEnums +enum Muglash { SAY_MUG_START1 = -1800054, SAY_MUG_START2 = -1800055, @@ -278,21 +295,21 @@ enum eEnums NPC_MUGLASH = 12717 }; -static float m_afFirstNagaCoord[3][3]= +Position const FirstNagaCoord[3] = { - {3603.504150f, 1122.631104f, 1.635f}, // rider - {3589.293945f, 1148.664063f, 5.565f}, // sorceress - {3609.925537f, 1168.759521f, -1.168f} // razortail + {3603.504150f, 1122.631104f, 1.635f, 0.0f}, // rider + {3589.293945f, 1148.664063f, 5.565f, 0.0f}, // sorceress + {3609.925537f, 1168.759521f, -1.168f, 0.0f} // razortail }; -static float m_afSecondNagaCoord[3][3]= +Position const SecondNagaCoord[3] = { - {3609.925537f, 1168.759521f, -1.168f}, // witch - {3645.652100f, 1139.425415f, 1.322f}, // priest - {3583.602051f, 1128.405762f, 2.347f} // myrmidon + {3609.925537f, 1168.759521f, -1.168f, 0.0f}, // witch + {3645.652100f, 1139.425415f, 1.322f, 0.0f}, // priest + {3583.602051f, 1128.405762f, 2.347f, 0.0f} // myrmidon }; -static float m_fVorshaCoord[]={3633.056885f, 1172.924072f, -5.388f}; +Position const VorshaCoord = {3633.056885f, 1172.924072f, -5.388f, 0.0f}; class npc_muglash : public CreatureScript { @@ -303,9 +320,9 @@ class npc_muglash : public CreatureScript { npc_muglashAI(Creature* creature) : npc_escortAI(creature) { } - uint32 m_uiWaveId; - uint32 m_uiEventTimer; - bool m_bIsBrazierExtinguished; + uint8 WaveId; + uint32 EventTimer; + bool IsBrazierExtinguished; void JustSummoned(Creature* summoned) { @@ -314,34 +331,33 @@ class npc_muglash : public CreatureScript void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 0: - if (player) + switch (waypointId) + { + case 0: DoScriptText(SAY_MUG_START2, me, player); - break; - case 24: - if (player) + break; + case 24: DoScriptText(SAY_MUG_BRAZIER, me, player); - if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) - { - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - SetEscortPaused(true); - } - break; - case 25: - DoScriptText(SAY_MUG_GRATITUDE, me); - player->GroupEventHappens(QUEST_VORSHA, me); - break; - case 26: - DoScriptText(SAY_MUG_PATROL, me); - break; - case 27: - DoScriptText(SAY_MUG_RETURN, me); - break; + if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) + { + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + SetEscortPaused(true); + } + break; + case 25: + DoScriptText(SAY_MUG_GRATITUDE, me); + player->GroupEventHappens(QUEST_VORSHA, me); + break; + case 26: + DoScriptText(SAY_MUG_PATROL, me); + break; + case 27: + DoScriptText(SAY_MUG_RETURN, me); + break; + } } } @@ -358,9 +374,9 @@ class npc_muglash : public CreatureScript void Reset() { - m_uiEventTimer = 10000; - m_uiWaveId = 0; - m_bIsBrazierExtinguished = false; + EventTimer = 10000; + WaveId = 0; + IsBrazierExtinguished = false; } void JustDied(Unit* /*killer*/) @@ -372,20 +388,20 @@ class npc_muglash : public CreatureScript void DoWaveSummon() { - switch (m_uiWaveId) + switch (WaveId) { case 1: - me->SummonCreature(NPC_WRATH_RIDER, m_afFirstNagaCoord[0][0], m_afFirstNagaCoord[0][1], m_afFirstNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - me->SummonCreature(NPC_WRATH_SORCERESS, m_afFirstNagaCoord[1][0], m_afFirstNagaCoord[1][1], m_afFirstNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - me->SummonCreature(NPC_WRATH_RAZORTAIL, m_afFirstNagaCoord[2][0], m_afFirstNagaCoord[2][1], m_afFirstNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_WRATH_RIDER, FirstNagaCoord[0], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_WRATH_SORCERESS, FirstNagaCoord[1], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_WRATH_RAZORTAIL, FirstNagaCoord[2], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; case 2: - me->SummonCreature(NPC_WRATH_PRIESTESS, m_afSecondNagaCoord[0][0], m_afSecondNagaCoord[0][1], m_afSecondNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - me->SummonCreature(NPC_WRATH_MYRMIDON, m_afSecondNagaCoord[1][0], m_afSecondNagaCoord[1][1], m_afSecondNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - me->SummonCreature(NPC_WRATH_SEAWITCH, m_afSecondNagaCoord[2][0], m_afSecondNagaCoord[2][1], m_afSecondNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_WRATH_PRIESTESS, SecondNagaCoord[0], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_WRATH_MYRMIDON, SecondNagaCoord[1], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_WRATH_SEAWITCH, SecondNagaCoord[2], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; case 3: - me->SummonCreature(NPC_VORSHA, m_fVorshaCoord[0], m_fVorshaCoord[1], m_fVorshaCoord[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + me->SummonCreature(NPC_VORSHA, VorshaCoord, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break; case 4: SetEscortPaused(false); @@ -400,16 +416,16 @@ class npc_muglash : public CreatureScript if (!me->getVictim()) { - if (HasEscortState(STATE_ESCORT_PAUSED) && m_bIsBrazierExtinguished) + if (HasEscortState(STATE_ESCORT_PAUSED) && IsBrazierExtinguished) { - if (m_uiEventTimer < uiDiff) + if (EventTimer < uiDiff) { - ++m_uiWaveId; + ++WaveId; DoWaveSummon(); - m_uiEventTimer = 10000; + EventTimer = 10000; } else - m_uiEventTimer -= uiDiff; + EventTimer -= uiDiff; } return; } @@ -451,7 +467,7 @@ class go_naga_brazier : public GameObjectScript { DoScriptText(SAY_MUG_BRAZIER_WAIT, creature); - pEscortAI->m_bIsBrazierExtinguished = true; + pEscortAI->IsBrazierExtinguished = true; return false; } } diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp index 2e7b0a684c1..eae5baa8db2 100644 --- a/src/server/scripts/Kalimdor/azshara.cpp +++ b/src/server/scripts/Kalimdor/azshara.cpp @@ -30,9 +30,9 @@ mob_rizzle_sprysprocket mob_depth_charge EndContentData */ -#include "ScriptPCH.h" -#include "World.h" -#include "WorldPacket.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## mobs_spitelashes @@ -179,9 +179,12 @@ public: # mob_rizzle_sprysprocket ####*/ -enum eRizzleSprysprocketData +enum RizzleSprysprocketData { + QUEST_CHASING_THE_MOONSTONE = 10994, + MOB_DEPTH_CHARGE = 23025, + SPELL_RIZZLE_BLACKJACK = 39865, SPELL_RIZZLE_ESCAPE = 39871, SPELL_RIZZLE_FROST_GRENADE = 40525, @@ -199,67 +202,66 @@ enum eRizzleSprysprocketData #define GOSSIP_GET_MOONSTONE "Hand over the Southfury moonstone and I'll let you go." -float WPs[58][4] = +Position const WPs[58] = { -//pos_x pos_y pos_z orien -{3691.97f, -3962.41f, 35.9118f, 3.67f}, -{3675.02f, -3960.49f, 35.9118f, 3.67f}, -{3653.19f, -3958.33f, 33.9118f, 3.59f}, -{3621.12f, -3958.51f, 29.9118f, 3.48f}, -{3604.86f, -3963, 29.9118f, 3.48f}, -{3569.94f, -3970.25f, 29.9118f, 3.44f}, -{3541.03f, -3975.64f, 29.9118f, 3.41f}, -{3510.84f, -3978.71f, 29.9118f, 3.41f}, -{3472.7f, -3997.07f, 29.9118f, 3.35f}, -{3439.15f, -4014.55f, 29.9118f, 3.29f}, -{3412.8f, -4025.87f, 29.9118f, 3.25f}, -{3384.95f, -4038.04f, 29.9118f, 3.24f}, -{3346.77f, -4052.93f, 29.9118f, 3.22f}, -{3299.56f, -4071.59f, 29.9118f, 3.20f}, -{3261.22f, -4080.38f, 30.9118f, 3.19f}, -{3220.68f, -4083.09f, 31.9118f, 3.18f}, -{3187.11f, -4070.45f, 33.9118f, 3.16f}, -{3162.78f, -4062.75f, 33.9118f, 3.15f}, -{3136.09f, -4050.32f, 33.9118f, 3.07f}, -{3119.47f, -4044.51f, 36.0363f, 3.07f}, -{3098.95f, -4019.8f, 33.9118f, 3.07f}, -{3073.07f, -4011.42f, 33.9118f, 3.07f}, -{3051.71f, -3993.37f, 33.9118f, 3.02f}, -{3027.52f, -3978.6f, 33.9118f, 3.00f}, -{3003.78f, -3960.14f, 33.9118f, 2.98f}, -{2977.99f, -3941.98f, 31.9118f, 2.96f}, -{2964.57f, -3932.07f, 30.9118f, 2.96f}, -{2947.9f, -3921.31f, 29.9118f, 2.96f}, -{2924.91f, -3910.8f, 29.9118f, 2.94f}, -{2903.04f, -3896.42f, 29.9118f, 2.93f}, -{2884.75f, -3874.03f, 29.9118f, 2.90f}, -{2868.19f, -3851.48f, 29.9118f, 2.82f}, -{2854.62f, -3819.72f, 29.9118f, 2.80f}, -{2825.53f, -3790.4f, 29.9118f, 2.744f}, -{2804.31f, -3773.05f, 29.9118f, 2.71f}, -{2769.78f, -3763.57f, 29.9118f, 2.70f}, -{2727.23f, -3745.92f, 30.9118f, 2.69f}, -{2680.12f, -3737.49f, 30.9118f, 2.67f}, -{2647.62f, -3739.94f, 30.9118f, 2.66f}, -{2616.6f, -3745.75f, 30.9118f, 2.64f}, -{2589.38f, -3731.97f, 30.9118f, 2.61f}, -{2562.94f, -3722.35f, 31.9118f, 2.56f}, -{2521.05f, -3716.6f, 31.9118f, 2.55f}, -{2485.26f, -3706.67f, 31.9118f, 2.51f}, -{2458.93f, -3696.67f, 31.9118f, 2.51f}, -{2432, -3692.03f, 31.9118f, 2.46f}, -{2399.59f, -3681.97f, 31.9118f, 2.45f}, -{2357.75f, -3666.6f, 31.9118f, 2.44f}, -{2311.99f, -3656.88f, 31.9118f, 2.94f}, -{2263.41f, -3649.55f, 31.9118f, 3.02f}, -{2209.05f, -3641.76f, 31.9118f, 2.99f}, -{2164.83f, -3637.64f, 31.9118f, 3.15f}, -{2122.42f, -3639, 31.9118f, 3.21f}, -{2075.73f, -3643.59f, 31.9118f, 3.22f}, -{2033.59f, -3649.52f, 31.9118f, 3.42f}, -{1985.22f, -3662.99f, 31.9118f, 3.42f}, -{1927.09f, -3679.56f, 33.9118f, 3.42f}, -{1873.57f, -3695.32f, 33.9118f, 3.44f} + {3691.97f, -3962.41f, 35.9118f, 3.67f}, + {3675.02f, -3960.49f, 35.9118f, 3.67f}, + {3653.19f, -3958.33f, 33.9118f, 3.59f}, + {3621.12f, -3958.51f, 29.9118f, 3.48f}, + {3604.86f, -3963, 29.9118f, 3.48f}, + {3569.94f, -3970.25f, 29.9118f, 3.44f}, + {3541.03f, -3975.64f, 29.9118f, 3.41f}, + {3510.84f, -3978.71f, 29.9118f, 3.41f}, + {3472.7f, -3997.07f, 29.9118f, 3.35f}, + {3439.15f, -4014.55f, 29.9118f, 3.29f}, + {3412.8f, -4025.87f, 29.9118f, 3.25f}, + {3384.95f, -4038.04f, 29.9118f, 3.24f}, + {3346.77f, -4052.93f, 29.9118f, 3.22f}, + {3299.56f, -4071.59f, 29.9118f, 3.20f}, + {3261.22f, -4080.38f, 30.9118f, 3.19f}, + {3220.68f, -4083.09f, 31.9118f, 3.18f}, + {3187.11f, -4070.45f, 33.9118f, 3.16f}, + {3162.78f, -4062.75f, 33.9118f, 3.15f}, + {3136.09f, -4050.32f, 33.9118f, 3.07f}, + {3119.47f, -4044.51f, 36.0363f, 3.07f}, + {3098.95f, -4019.8f, 33.9118f, 3.07f}, + {3073.07f, -4011.42f, 33.9118f, 3.07f}, + {3051.71f, -3993.37f, 33.9118f, 3.02f}, + {3027.52f, -3978.6f, 33.9118f, 3.00f}, + {3003.78f, -3960.14f, 33.9118f, 2.98f}, + {2977.99f, -3941.98f, 31.9118f, 2.96f}, + {2964.57f, -3932.07f, 30.9118f, 2.96f}, + {2947.9f, -3921.31f, 29.9118f, 2.96f}, + {2924.91f, -3910.8f, 29.9118f, 2.94f}, + {2903.04f, -3896.42f, 29.9118f, 2.93f}, + {2884.75f, -3874.03f, 29.9118f, 2.90f}, + {2868.19f, -3851.48f, 29.9118f, 2.82f}, + {2854.62f, -3819.72f, 29.9118f, 2.80f}, + {2825.53f, -3790.4f, 29.9118f, 2.744f}, + {2804.31f, -3773.05f, 29.9118f, 2.71f}, + {2769.78f, -3763.57f, 29.9118f, 2.70f}, + {2727.23f, -3745.92f, 30.9118f, 2.69f}, + {2680.12f, -3737.49f, 30.9118f, 2.67f}, + {2647.62f, -3739.94f, 30.9118f, 2.66f}, + {2616.6f, -3745.75f, 30.9118f, 2.64f}, + {2589.38f, -3731.97f, 30.9118f, 2.61f}, + {2562.94f, -3722.35f, 31.9118f, 2.56f}, + {2521.05f, -3716.6f, 31.9118f, 2.55f}, + {2485.26f, -3706.67f, 31.9118f, 2.51f}, + {2458.93f, -3696.67f, 31.9118f, 2.51f}, + {2432, -3692.03f, 31.9118f, 2.46f}, + {2399.59f, -3681.97f, 31.9118f, 2.45f}, + {2357.75f, -3666.6f, 31.9118f, 2.44f}, + {2311.99f, -3656.88f, 31.9118f, 2.94f}, + {2263.41f, -3649.55f, 31.9118f, 3.02f}, + {2209.05f, -3641.76f, 31.9118f, 2.99f}, + {2164.83f, -3637.64f, 31.9118f, 3.15f}, + {2122.42f, -3639, 31.9118f, 3.21f}, + {2075.73f, -3643.59f, 31.9118f, 3.22f}, + {2033.59f, -3649.52f, 31.9118f, 3.42f}, + {1985.22f, -3662.99f, 31.9118f, 3.42f}, + {1927.09f, -3679.56f, 33.9118f, 3.42f}, + {1873.57f, -3695.32f, 33.9118f, 3.44f} }; class mob_rizzle_sprysprocket : public CreatureScript @@ -270,19 +272,19 @@ public: bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) { player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1 && player->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE) + if (action == GOSSIP_ACTION_INFO_DEF + 1 && player->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) == QUEST_STATUS_INCOMPLETE) { player->CLOSE_GOSSIP_MENU(); creature->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true); - CAST_AI(mob_rizzle_sprysprocket::mob_rizzle_sprysprocketAI, creature->AI())->Must_Die_Timer = 3000; - CAST_AI(mob_rizzle_sprysprocket::mob_rizzle_sprysprocketAI, creature->AI())->Must_Die = true; + CAST_AI(mob_rizzle_sprysprocket::mob_rizzle_sprysprocketAI, creature->AI())->MustDieTimer = 3000; + CAST_AI(mob_rizzle_sprysprocket::mob_rizzle_sprysprocketAI, creature->AI())->MustDie = true; } return true; } bool OnGossipHello(Player* player, Creature* creature) { - if (player->GetQuestStatus(10994) != QUEST_STATUS_INCOMPLETE) + if (player->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) != QUEST_STATUS_INCOMPLETE) return true; player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GET_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(10811, creature->GetGUID()); @@ -298,32 +300,32 @@ public: { mob_rizzle_sprysprocketAI(Creature* creature) : ScriptedAI(creature) {} - uint32 spellEscape_Timer; - uint32 Teleport_Timer; - uint32 Check_Timer; - uint32 Grenade_Timer; - uint32 Must_Die_Timer; + uint32 SpellEscapeTimer; + uint32 TeleportTimer; + uint32 CheckTimer; + uint32 GrenadeTimer; + uint32 MustDieTimer; uint32 CurrWP; uint64 PlayerGUID; - bool Must_Die; + bool MustDie; bool Escape; bool ContinueWP; bool Reached; void Reset() { - spellEscape_Timer = 1300; - Teleport_Timer = 3500; - Check_Timer = 10000; - Grenade_Timer = 30000; - Must_Die_Timer = 3000; + SpellEscapeTimer = 1300; + TeleportTimer = 3500; + CheckTimer = 10000; + GrenadeTimer = 30000; + MustDieTimer = 3000; CurrWP = 0; PlayerGUID = 0; - Must_Die = false; + MustDie = false; Escape = false; ContinueWP = false; Reached = false; @@ -331,13 +333,13 @@ public: void UpdateAI(const uint32 diff) { - if (Must_Die) + if (MustDie) { - if (Must_Die_Timer <= diff) + if (MustDieTimer <= diff) { me->DespawnOrUnsummon(); return; - } else Must_Die_Timer -= diff; + } else MustDieTimer -= diff; } if (!Escape) @@ -345,17 +347,16 @@ public: if (!PlayerGUID) return; - if (spellEscape_Timer <= diff) + if (SpellEscapeTimer <= diff) { DoCast(me, SPELL_RIZZLE_ESCAPE, false); - spellEscape_Timer = 10000; - } else spellEscape_Timer -= diff; + SpellEscapeTimer = 10000; + } else SpellEscapeTimer -= diff; - if (Teleport_Timer <= diff) + if (TeleportTimer <= diff) { //temp solution - unit can't be teleported by core using spelleffect 5, only players - Map* map = me->GetMap(); - if (map) + if (me->GetMap()) { me->SetPosition(3706.39f, -3969.15f, 35.9118f, 0); me->AI_SendMoveToPacket(3706.39f, -3969.15f, 35.9118f, 0, 0, 0); @@ -367,20 +368,20 @@ public: me->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING); me->SetSpeed(MOVE_RUN, 0.85f, true); me->GetMotionMaster()->MovementExpired(); - me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP][0], WPs[CurrWP][1], WPs[CurrWP][2]); + me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP]); Escape = true; - } else Teleport_Timer -= diff; + } else TeleportTimer -= diff; return; } if (ContinueWP) { - me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP][0], WPs[CurrWP][1], WPs[CurrWP][2]); + me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP]); ContinueWP = false; } - if (Grenade_Timer <= diff) + if (GrenadeTimer <= diff) { Player* player = Unit::GetPlayer(*me, PlayerGUID); if (player) @@ -388,10 +389,10 @@ public: DoScriptText(SAY_RIZZLE_GRENADE, me, player); DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true); } - Grenade_Timer = 30000; - } else Grenade_Timer -= diff; + GrenadeTimer = 30000; + } else GrenadeTimer -= diff; - if (Check_Timer <= diff) + if (CheckTimer <= diff) { Player* player = Unit::GetPlayer(*me, PlayerGUID); if (!player) @@ -410,8 +411,8 @@ public: Reached = true; } - Check_Timer = 1000; - } else Check_Timer -= diff; + CheckTimer = 1000; + } else CheckTimer -= diff; } @@ -427,7 +428,7 @@ public: if (!who || PlayerGUID) return; - if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE) + if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) == QUEST_STATUS_INCOMPLETE) { PlayerGUID = who->GetGUID(); DoScriptText(SAY_RIZZLE_START, me); @@ -472,25 +473,25 @@ public: { mob_depth_chargeAI(Creature* creature) : ScriptedAI(creature) {} - bool we_must_die; - uint32 must_die_timer; + bool WeMustDie; + uint32 WeMustDieTimer; void Reset() { me->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - we_must_die = false; - must_die_timer = 1000; + WeMustDie = false; + WeMustDieTimer = 1000; } void UpdateAI(const uint32 diff) { - if (we_must_die) + if (WeMustDie) { - if (must_die_timer <= diff) - { + if (WeMustDieTimer <= diff) me->DespawnOrUnsummon(); - } else must_die_timer -= diff; + else + WeMustDieTimer -= diff; } return; } @@ -503,18 +504,14 @@ public: if (who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 5)) { DoCast(who, SPELL_DEPTH_CHARGE_TRAP); - we_must_die = true; + WeMustDie = true; return; } } - void AttackStart(Unit* /*who*/) - { - } + void AttackStart(Unit* /*who*/) {} - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} }; }; diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index dfb1f3b0bdf..608117ca9af 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -33,15 +33,19 @@ go_ravager_cage npc_death_ravager EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" -#include <cmath> +#include "ScriptedGossip.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" /*###### ## npc_draenei_survivor ######*/ -enum eEnums +enum draeneiSurvivor { SAY_HEAL1 = -1000176, SAY_HEAL2 = -1000177, @@ -175,7 +179,7 @@ public: ## npc_engineer_spark_overgrind ######*/ -enum eOvergrind +enum Overgrind { SAY_TEXT = -1000184, SAY_EMOTE = -1000185, @@ -235,15 +239,15 @@ public: uint32 NormFaction; uint32 NpcFlags; - uint32 Dynamite_Timer; - uint32 Emote_Timer; + uint32 DynamiteTimer; + uint32 EmoteTimer; bool IsTreeEvent; void Reset() { - Dynamite_Timer = 8000; - Emote_Timer = urand(120000, 150000); + DynamiteTimer = 8000; + EmoteTimer = urand(120000, 150000); me->setFaction(NormFaction); me->SetUInt32Value(UNIT_NPC_FLAGS, NpcFlags); @@ -260,12 +264,12 @@ public: { if (!me->isInCombat() && !IsTreeEvent) { - if (Emote_Timer <= diff) + if (EmoteTimer <= diff) { DoScriptText(SAY_TEXT, me); DoScriptText(SAY_EMOTE, me); - Emote_Timer = urand(120000, 150000); - } else Emote_Timer -= diff; + EmoteTimer = urand(120000, 150000); + } else EmoteTimer -= diff; } else if (IsTreeEvent) return; @@ -273,11 +277,11 @@ public: if (!UpdateVictim()) return; - if (Dynamite_Timer <= diff) + if (DynamiteTimer <= diff) { DoCast(me->getVictim(), SPELL_DYNAMITE); - Dynamite_Timer = 8000; - } else Dynamite_Timer -= diff; + DynamiteTimer = 8000; + } else DynamiteTimer -= diff; DoMeleeAttackIfReady(); } @@ -307,7 +311,7 @@ public: { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); me->SetHealth(me->CountPctFromMaxHealth(15)); - switch (rand()%2) + switch (urand(0, 1)) { case 0: me->SetStandState(UNIT_STAND_STATE_SIT); @@ -321,14 +325,9 @@ public: void EnterCombat(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) - { - } - - void UpdateAI(const uint32 /*diff*/) - { - } + void MoveInLineOfSight(Unit* /*who*/) {} + void UpdateAI(const uint32 /*diff*/) {} }; }; @@ -337,7 +336,7 @@ public: ## npc_magwin ######*/ -enum eMagwin +enum Magwin { SAY_START = -1000111, SAY_AGGRO = -1000112, @@ -376,26 +375,25 @@ public: void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 0: - DoScriptText(SAY_START, me, player); - break; - case 17: - DoScriptText(SAY_PROGRESS, me, player); - break; - case 28: - DoScriptText(SAY_END1, me, player); - break; - case 29: - DoScriptText(EMOTE_HUG, me, player); - DoScriptText(SAY_END2, me, player); - player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP, me); - break; + switch (waypointId) + { + case 0: + DoScriptText(SAY_START, me, player); + break; + case 17: + DoScriptText(SAY_PROGRESS, me, player); + break; + case 28: + DoScriptText(SAY_END1, me, player); + break; + case 29: + DoScriptText(EMOTE_HUG, me, player); + DoScriptText(SAY_END2, me, player); + player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP, me); + break; + } } } @@ -404,7 +402,7 @@ public: DoScriptText(SAY_AGGRO, me, who); } - void Reset() { } + void Reset() {} }; }; @@ -413,7 +411,7 @@ public: ## npc_geezle ######*/ -enum eGeezle +enum Geezle { QUEST_TREES_COMPANY = 9531, @@ -433,7 +431,7 @@ enum eGeezle GO_NAGA_FLAG = 181694 }; -static float SparkPos[3] = {-5029.91f, -11291.79f, 8.096f}; +Position const SparkPos = {-5029.91f, -11291.79f, 8.096f, 0.0f}; class npc_geezle : public CreatureScript { @@ -451,7 +449,7 @@ public: uint64 SparkGUID; - uint32 Step; + uint8 Step; uint32 SayTimer; bool EventStarted; @@ -469,8 +467,7 @@ public: { Step = 0; EventStarted = true; - Creature* Spark = me->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000); - if (Spark) + if (Creature* Spark = me->SummonCreature(MOB_SPARK, SparkPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000)) { SparkGUID = Spark->GetGUID(); Spark->setActive(true); @@ -479,47 +476,47 @@ public: SayTimer = 8000; } - uint32 NextStep(uint32 Step) + uint32 NextStep(uint8 Step) { Creature* Spark = Unit::GetCreature(*me, SparkGUID); switch (Step) { - case 0: - if (Spark) - Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f); - me->GetMotionMaster()->MovePoint(0, -5092.26f, -11252, 0.71f); - return 9000; // NPCs are walking up to fire - case 1: - DespawnNagaFlag(true); - DoScriptText(EMOTE_SPARK, Spark); - return 1000; - case 2: - DoScriptText(GEEZLE_SAY_1, me, Spark); - if (Spark) - { - Spark->SetInFront(me); - me->SetInFront(Spark); - } - return 5000; - case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000; - case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000; - case 5: DoScriptText(GEEZLE_SAY_4, me, Spark); return 8000; - case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000; - case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000; - case 8: DoScriptText(GEEZLE_SAY_7, me, Spark); return 2000; - case 9: - me->GetMotionMaster()->MoveTargetedHome(); - if (Spark) - Spark->GetMotionMaster()->MovePoint(0, SparkPos[0], SparkPos[1], SparkPos[2]); - CompleteQuest(); - return 9000; - case 10: - if (Spark) - Spark->DisappearAndDie(); - DespawnNagaFlag(false); - me->DisappearAndDie(); - default: return 99999999; + case 0: + if (Spark) + Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f); + me->GetMotionMaster()->MovePoint(0, -5092.26f, -11252, 0.71f); + return 9000; // NPCs are walking up to fire + case 1: + DespawnNagaFlag(true); + DoScriptText(EMOTE_SPARK, Spark); + return 1000; + case 2: + DoScriptText(GEEZLE_SAY_1, me, Spark); + if (Spark) + { + Spark->SetInFront(me); + me->SetInFront(Spark); + } + return 5000; + case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000; + case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000; + case 5: DoScriptText(GEEZLE_SAY_4, me, Spark); return 8000; + case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000; + case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000; + case 8: DoScriptText(GEEZLE_SAY_7, me, Spark); return 2000; + case 9: + me->GetMotionMaster()->MoveTargetedHome(); + if (Spark) + Spark->GetMotionMaster()->MovePoint(0, SparkPos); + CompleteQuest(); + return 9000; + case 10: + if (Spark) + Spark->DisappearAndDie(); + DespawnNagaFlag(false); + me->DisappearAndDie(); + default: return 99999999; } } @@ -533,13 +530,8 @@ public: me->VisitNearbyWorldObject(radius, searcher); for (std::list<Player*>::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if ((*itr)->GetQuestStatus(QUEST_TREES_COMPANY) == QUEST_STATUS_INCOMPLETE - &&(*itr)->HasAura(SPELL_TREE_DISGUISE)) - { + if ((*itr)->GetQuestStatus(QUEST_TREES_COMPANY) == QUEST_STATUS_INCOMPLETE && (*itr)->HasAura(SPELL_TREE_DISGUISE)) (*itr)->KilledMonsterCredit(MOB_SPARK, 0); - } - } } void DespawnNagaFlag(bool despawn) @@ -552,13 +544,13 @@ public: for (std::list<GameObject*>::const_iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr) { if (despawn) - { (*itr)->SetLootState(GO_JUST_DEACTIVATED); - } else (*itr)->Respawn(); } - } else sLog->outError("SD2 ERROR: FlagList is empty!"); + } + else + sLog->outError("SD2 ERROR: FlagList is empty!"); } void UpdateAI(const uint32 diff) @@ -566,16 +558,16 @@ public: if (SayTimer <= diff) { if (EventStarted) - { SayTimer = NextStep(Step++); - } - } else SayTimer -= diff; + } + else + SayTimer -= diff; } }; }; -enum eRavegerCage +enum RavegerCage { NPC_DEATH_RAVAGER = 17556, diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp index 6c692a6738b..3883b740d02 100644 --- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp @@ -28,14 +28,16 @@ mob_webbed_creature npc_captured_sunhawk_agent EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## mob_webbed_creature ######*/ //possible creatures to be spawned -const uint32 possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17680, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; +uint32 const possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17680, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; class mob_webbed_creature : public CreatureScript { @@ -51,13 +53,9 @@ public: { mob_webbed_creatureAI(Creature* creature) : ScriptedAI(creature) {} - void Reset() - { - } + void Reset() {} - void EnterCombat(Unit* /*who*/) - { - } + void EnterCombat(Unit* /*who*/) {} void JustDied(Unit* killer) { @@ -153,7 +151,7 @@ public: ## Quest 9667: Saving Princess Stillpine ######*/ -enum eStillpine +enum Stillpine { QUEST_SAVING_PRINCESS_STILLPINE = 9667, NPC_PRINCESS_STILLPINE = 17682, diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp index c344de8cb51..ec098951c03 100644 --- a/src/server/scripts/Kalimdor/boss_azuregos.cpp +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -23,17 +23,24 @@ SDComment: Teleport not included, spell reflect not effecting dots (Core problem SDCategory: Azshara EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" -#define SAY_TELEPORT -1000100 +enum Say +{ + SAY_TELEPORT = -1000100 +}; -#define SPELL_MARKOFFROST 23182 -#define SPELL_MANASTORM 21097 -#define SPELL_CHILL 21098 -#define SPELL_FROSTBREATH 21099 -#define SPELL_REFLECT 22067 -#define SPELL_CLEAVE 8255 //Perhaps not right ID -#define SPELL_ENRAGE 23537 +enum Spells +{ + SPELL_MARKOFFROST = 23182, + SPELL_MANASTORM = 21097, + SPELL_CHILL = 21098, + SPELL_FROSTBREATH = 21099, + SPELL_REFLECT = 22067, + SPELL_CLEAVE = 8255, //Perhaps not right ID + SPELL_ENRAGE = 23537 +}; class boss_azuregos : public CreatureScript { @@ -49,26 +56,26 @@ public: { boss_azuregosAI(Creature* creature) : ScriptedAI(creature) {} - uint32 MarkOfFrost_Timer; - uint32 ManaStorm_Timer; - uint32 Chill_Timer; - uint32 Breath_Timer; - uint32 Teleport_Timer; - uint32 Reflect_Timer; - uint32 Cleave_Timer; - uint32 Enrage_Timer; + uint32 MarkOfFrostTimer; + uint32 ManaStormTimer; + uint32 ChillTimer; + uint32 BreathTimer; + uint32 TeleportTimer; + uint32 ReflectTimer; + uint32 CleaveTimer; + uint32 EnrageTimer; bool Enraged; void Reset() { - MarkOfFrost_Timer = 35000; - ManaStorm_Timer = urand(5000, 17000); - Chill_Timer = urand(10000, 30000); - Breath_Timer = urand(2000, 8000); - Teleport_Timer = 30000; - Reflect_Timer = urand(15000, 30000); - Cleave_Timer = 7000; - Enrage_Timer = 0; + MarkOfFrostTimer = 35000; + ManaStormTimer = urand(5000, 17000); + ChillTimer = urand(10000, 30000); + BreathTimer = urand(2000, 8000); + TeleportTimer = 30000; + ReflectTimer = urand(15000, 30000); + CleaveTimer = 7000; + EnrageTimer = 0; Enraged = false; } @@ -80,12 +87,12 @@ public: if (!UpdateVictim()) return; - if (Teleport_Timer <= diff) + if (TeleportTimer <= diff) { DoScriptText(SAY_TELEPORT, me); - std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList(); - std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); - for (i = m_threatlist.begin(); i!= m_threatlist.end(); ++i) + std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList(); + std::list<HostileReference*>::const_iterator i = threatlist.begin(); + for (i = threatlist.begin(); i!= threatlist.end(); ++i) { Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid()); if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) @@ -95,53 +102,53 @@ public: } DoResetThreat(); - Teleport_Timer = 30000; - } else Teleport_Timer -= diff; + TeleportTimer = 30000; + } else TeleportTimer -= diff; - // //MarkOfFrost_Timer - // if (MarkOfFrost_Timer <= diff) + // //MarkOfFrostTimer + // if (MarkOfFrostTimer <= diff) // { // DoCast(me->getVictim(), SPELL_MARKOFFROST); - // MarkOfFrost_Timer = 25000; - // } else MarkOfFrost_Timer -= diff; + // MarkOfFrostTimer = 25000; + // } else MarkOfFrostTimer -= diff; - //Chill_Timer - if (Chill_Timer <= diff) + //ChillTimer + if (ChillTimer <= diff) { DoCast(me->getVictim(), SPELL_CHILL); - Chill_Timer = urand(13000, 25000); - } else Chill_Timer -= diff; + ChillTimer = urand(13000, 25000); + } else ChillTimer -= diff; - //Breath_Timer - if (Breath_Timer <= diff) + //BreathTimer + if (BreathTimer <= diff) { DoCast(me->getVictim(), SPELL_FROSTBREATH); - Breath_Timer = urand(10000, 15000); - } else Breath_Timer -= diff; + BreathTimer = urand(10000, 15000); + } else BreathTimer -= diff; - //ManaStorm_Timer - if (ManaStorm_Timer <= diff) + //ManaStormTimer + if (ManaStormTimer <= diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) DoCast(target, SPELL_MANASTORM); - ManaStorm_Timer = urand(7500, 12500); - } else ManaStorm_Timer -= diff; + ManaStormTimer = urand(7500, 12500); + } else ManaStormTimer -= diff; - //Reflect_Timer - if (Reflect_Timer <= diff) + //ReflectTimer + if (ReflectTimer <= diff) { DoCast(me, SPELL_REFLECT); - Reflect_Timer = urand(20000, 35000); - } else Reflect_Timer -= diff; + ReflectTimer = urand(20000, 35000); + } else ReflectTimer -= diff; - //Cleave_Timer - if (Cleave_Timer <= diff) + //CleaveTimer + if (CleaveTimer <= diff) { DoCast(me->getVictim(), SPELL_CLEAVE); - Cleave_Timer = 7000; - } else Cleave_Timer -= diff; + CleaveTimer = 7000; + } else CleaveTimer -= diff; - //Enrage_Timer + //EnrageTimer if (HealthBelowPct(26) && !Enraged) { DoCast(me, SPELL_ENRAGE); diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp index 1de04db61c4..0e02a77169e 100644 --- a/src/server/scripts/Kalimdor/darkshore.cpp +++ b/src/server/scripts/Kalimdor/darkshore.cpp @@ -29,7 +29,9 @@ npc_prospector_remtravel npc_threshwackonator EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" @@ -37,7 +39,7 @@ EndContentData */ # npc_kerlonian ####*/ -enum eKerlonian +enum Kerlonian { SAY_KER_START = -1000434, @@ -94,11 +96,11 @@ public: { npc_kerlonianAI(Creature* creature) : FollowerAI(creature) { } - uint32 m_uiFallAsleepTimer; + uint32 FallAsleepTimer; void Reset() { - m_uiFallAsleepTimer = urand(10000, 45000); + FallAsleepTimer = urand(10000, 45000); } void MoveInLineOfSight(Unit* who) @@ -150,7 +152,7 @@ public: SetFollowPaused(false); } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 Diff) { if (!UpdateVictim()) { @@ -159,13 +161,13 @@ public: if (!HasFollowState(STATE_FOLLOW_PAUSED)) { - if (m_uiFallAsleepTimer <= uiDiff) + if (FallAsleepTimer <= Diff) { SetSleeping(); - m_uiFallAsleepTimer = urand(25000, 90000); + FallAsleepTimer = urand(25000, 90000); } else - m_uiFallAsleepTimer -= uiDiff; + FallAsleepTimer -= Diff; } return; @@ -181,7 +183,7 @@ public: # npc_prospector_remtravel ####*/ -enum eRemtravel +enum Remtravel { SAY_REM_START = -1000327, SAY_REM_AGGRO = -1000328, @@ -233,63 +235,62 @@ public: void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 0: - DoScriptText(SAY_REM_START, me, player); - break; - case 5: - DoScriptText(SAY_REM_RAMP1_1, me, player); - break; - case 6: - DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 9: - DoScriptText(SAY_REM_RAMP1_2, me, player); - break; - case 14: - //depend quest rewarded? - DoScriptText(SAY_REM_BOOK, me, player); - break; - case 15: - DoScriptText(SAY_REM_TENT1_1, me, player); - break; - case 16: - DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 17: - DoScriptText(SAY_REM_TENT1_2, me, player); - break; - case 26: - DoScriptText(SAY_REM_MOSS, me, player); - break; - case 27: - DoScriptText(EMOTE_REM_MOSS, me, player); - break; - case 28: - DoScriptText(SAY_REM_MOSS_PROGRESS, me, player); - break; - case 29: - DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 31: - DoScriptText(SAY_REM_PROGRESS, me, player); - break; - case 41: - DoScriptText(SAY_REM_REMEMBER, me, player); - break; - case 42: - DoScriptText(EMOTE_REM_END, me, player); - player->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me); - break; + switch (waypointId) + { + case 0: + DoScriptText(SAY_REM_START, me, player); + break; + case 5: + DoScriptText(SAY_REM_RAMP1_1, me, player); + break; + case 6: + DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 9: + DoScriptText(SAY_REM_RAMP1_2, me, player); + break; + case 14: + //depend quest rewarded? + DoScriptText(SAY_REM_BOOK, me, player); + break; + case 15: + DoScriptText(SAY_REM_TENT1_1, me, player); + break; + case 16: + DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 17: + DoScriptText(SAY_REM_TENT1_2, me, player); + break; + case 26: + DoScriptText(SAY_REM_MOSS, me, player); + break; + case 27: + DoScriptText(EMOTE_REM_MOSS, me, player); + break; + case 28: + DoScriptText(SAY_REM_MOSS_PROGRESS, me, player); + break; + case 29: + DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 31: + DoScriptText(SAY_REM_PROGRESS, me, player); + break; + case 41: + DoScriptText(SAY_REM_REMEMBER, me, player); + break; + case 42: + DoScriptText(EMOTE_REM_END, me, player); + player->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me); + break; + } } } @@ -297,7 +298,7 @@ public: void EnterCombat(Unit* who) { - if (rand()%2) + if (urand(0, 1)) DoScriptText(SAY_REM_AGGRO, me, who); } @@ -314,7 +315,7 @@ public: # npc_threshwackonator ####*/ -enum eThreshwackonator +enum Threshwackonator { EMOTE_START = -1000325, //signed for 4966 SAY_AT_CLOSE = -1000326, //signed for 4966 diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index f295d7626ac..e196c71f681 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -30,10 +30,12 @@ npc_dalinda_malem go_demon_portal EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" -enum eDyingKodo +enum DyingKodo { // signed for 9999 SAY_SMEED_HOME_1 = -1000348, @@ -114,11 +116,11 @@ public: { npc_aged_dying_ancient_kodoAI(Creature* creature) : ScriptedAI(creature) { Reset(); } - uint32 m_uiDespawnTimer; + uint32 DespawnTimer; void Reset() { - m_uiDespawnTimer = 0; + DespawnTimer = 0; } void MoveInLineOfSight(Unit* who) @@ -143,14 +145,14 @@ public: if (pSpell->Id == SPELL_KODO_KOMBO_GOSSIP) { me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_uiDespawnTimer = 60000; + DespawnTimer = 60000; } } void UpdateAI(const uint32 diff) { //timer should always be == 0 unless we already updated entry of creature. Then not expect this updated to ever be in combat. - if (m_uiDespawnTimer && m_uiDespawnTimer <= diff) + if (DespawnTimer && DespawnTimer <= diff) { if (!me->getVictim() && me->isAlive()) { @@ -159,7 +161,7 @@ public: me->Respawn(); return; } - } else m_uiDespawnTimer -= diff; + } else DespawnTimer -= diff; if (!UpdateVictim()) return; @@ -175,7 +177,7 @@ public: ## Hand of Iruxos ######*/ -enum +enum Iruxos { QUEST_HAND_IRUXOS = 5381, NPC_DEMON_SPIRIT = 11876, @@ -199,7 +201,10 @@ class go_iruxos : public GameObjectScript ## npc_dalinda_malem. Quest 1440 ######*/ -#define QUEST_RETURN_TO_VAHLARRIEL 1440 +enum Dalinda +{ + QUEST_RETURN_TO_VAHLARRIEL = 1440 +}; class npc_dalinda : public CreatureScript { @@ -255,9 +260,9 @@ public: return; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 Diff) { - npc_escortAI::UpdateAI(uiDiff); + npc_escortAI::UpdateAI(Diff); if (!UpdateVictim()) return; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp index fe5bedf4c98..ec06a542b6f 100644 --- a/src/server/scripts/Kalimdor/durotar.cpp +++ b/src/server/scripts/Kalimdor/durotar.cpp @@ -15,8 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "Vehicle.h" +#include "SpellScript.h" /*###### ##Quest 5441: Lazy Peons @@ -50,15 +52,15 @@ public: { npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature) {} - uint64 uiPlayerGUID; + uint64 PlayerGUID; - uint32 m_uiRebuffTimer; + uint32 RebuffTimer; bool work; void Reset() { - uiPlayerGUID = 0; - m_uiRebuffTimer = 0; + PlayerGUID = 0; + RebuffTimer = 0; work = false; } @@ -81,17 +83,17 @@ public: } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 Diff) { if (work == true) me->HandleEmoteCommand(EMOTE_ONESHOT_WORK_CHOPWOOD); - if (m_uiRebuffTimer <= uiDiff) + if (RebuffTimer <= Diff) { DoCast(me, SPELL_BUFF_SLEEP); - m_uiRebuffTimer = 300000; //Rebuff agian in 5 minutes + RebuffTimer = 300000; //Rebuff agian in 5 minutes } else - m_uiRebuffTimer -= uiDiff; + RebuffTimer -= Diff; if (!UpdateVictim()) return; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index e4ed3793385..45e1c1808c1 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -32,8 +32,11 @@ npc_private_hendel npc_cassa_crimsonwing - handled by npc_taxi EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" /*###### ## mobs_risen_husk_spirit @@ -132,7 +135,7 @@ class mobs_risen_husk_spirit : public CreatureScript ## npc_deserter_agitator ######*/ -enum eDeserter +enum Deserter { QUEST_TRAITORS_AMONG_US = 11126, NPC_THERAMORE_DESERTER = 23602, @@ -203,12 +206,12 @@ public: me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void MovementInform(uint32 uiType, uint32 uiId) + void MovementInform(uint32 Type, uint32 Id) { - if (uiType != POINT_MOTION_TYPE) + if (Type != POINT_MOTION_TYPE) return; - if (uiId == 1) + if (Id == 1) me->DisappearAndDie(); } }; @@ -218,7 +221,7 @@ public: ## npc_deserter_agitator ######*/ -enum eTheramoreGuard +enum TheramoreGuard { SAY_QUEST1 = -1000641, SAY_QUEST2 = -1000642, @@ -266,7 +269,7 @@ public: DoScriptText(SAY_QUEST1, creature); creature->CastSpell(creature, SPELL_DOCTORED_LEAFLET, false); creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - CAST_AI(npc_theramore_guard::npc_theramore_guardAI, creature->AI())->uiYellTimer = 4000; + CAST_AI(npc_theramore_guard::npc_theramore_guardAI, creature->AI())->YellTimer = 4000; CAST_AI(npc_theramore_guard::npc_theramore_guardAI, creature->AI())->bYellTimer = true; } @@ -282,40 +285,40 @@ public: { npc_theramore_guardAI(Creature* creature) : ScriptedAI(creature) { } - uint32 uiYellTimer; - uint32 uiStep; + uint32 YellTimer; + uint32 Step; bool bYellTimer; void Reset() { bYellTimer = false; - uiStep = 0; + Step = 0; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 Diff) { if (!me->HasAura(SPELL_PROPAGANDIZED)) me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - if (bYellTimer && uiYellTimer <= uiDiff) + if (bYellTimer && YellTimer <= Diff) { - switch (uiStep) + switch (Step) { case 0: DoScriptText(RAND(SAY_QUEST2, SAY_QUEST3, SAY_QUEST4, SAY_QUEST5, SAY_QUEST6), me); - uiYellTimer = 3000; - ++uiStep; + YellTimer = 3000; + ++Step; break; case 1: DoScriptText(RAND(SAY_QUEST7, SAY_QUEST8, SAY_QUEST9), me); me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); - uiStep = 0; + Step = 0; bYellTimer = false; break; } } else - uiYellTimer -= uiDiff; + YellTimer -= Diff; } }; }; @@ -324,7 +327,7 @@ public: ## npc_lady_jaina_proudmoore ######*/ -enum eLadyJaina +enum LadyJaina { QUEST_JAINAS_AUTOGRAPH = 558, SPELL_JAINAS_AUTOGRAPH = 23122 @@ -367,7 +370,7 @@ public: ## npc_nat_pagle ######*/ -enum eNatPagle +enum NatPagle { QUEST_NATS_MEASURING_TAPE = 8227 }; @@ -408,7 +411,7 @@ public: ## npc_private_hendel ######*/ -enum eHendel +enum Hendel { // looks like all this text ids are wrong. SAY_PROGRESS_1_TER = -1000411, // signed for 3568 @@ -464,11 +467,11 @@ public: AttackStart(pAttacker); } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32 &Damage) { - if (uiDamage > me->GetHealth() || me->HealthBelowPctDamaged(20, uiDamage)) + if (Damage > me->GetHealth() || me->HealthBelowPctDamaged(20, Damage)) { - uiDamage = 0; + Damage = 0; if (Player* player = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself()) player->GroupEventHappens(QUEST_MISSING_DIPLO_PT16, me); @@ -485,9 +488,9 @@ public: ## npc_zelfrax ######*/ -const Position MovePosition = {-2967.030f, -3872.1799f, 35.620f, 0.0f}; +Position const MovePosition = {-2967.030f, -3872.1799f, 35.620f, 0.0f}; -enum eZelfrax +enum Zelfrax { SAY_ZELFRAX = -1000472, SAY_ZELFRAX_2 = -1000473 @@ -525,9 +528,9 @@ public: } } - void MovementInform(uint32 uiType, uint32 /*uiId*/) + void MovementInform(uint32 Type, uint32 /*Id*/) { - if (uiType != POINT_MOTION_TYPE) + if (Type != POINT_MOTION_TYPE) return; me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); @@ -547,7 +550,7 @@ public: DoScriptText(SAY_ZELFRAX_2, me); } - void UpdateAI(uint32 const /*uiDiff*/) + void UpdateAI(uint32 const /*Diff*/) { if (!UpdateVictim()) return; @@ -562,7 +565,7 @@ public: ## npc_stinky ######*/ -enum eStinky +enum Stinky { QUEST_STINKYS_ESCAPE_H = 1270, QUEST_STINKYS_ESCAPE_A = 1222, diff --git a/src/server/scripts/Kalimdor/felwood.cpp b/src/server/scripts/Kalimdor/felwood.cpp index e1f59ec26be..9243ea0017e 100644 --- a/src/server/scripts/Kalimdor/felwood.cpp +++ b/src/server/scripts/Kalimdor/felwood.cpp @@ -27,7 +27,9 @@ EndScriptData */ npcs_riverbreeze_and_silversky EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npcs_riverbreeze_and_silversky @@ -35,6 +37,17 @@ EndContentData */ #define GOSSIP_ITEM_BEACON "Please make me a Cenarion Beacon" +enum RiverbreezeAndSilversky +{ + SPELL_CENARION_BEACON = 15120, + + NPC_ARATHANDRIS_SILVERSKY = 9528, + NPC_MAYBESS_RIVERBREEZE = 9529, + + QUEST_CLEASING_FELWOOD_A = 4101, + QUEST_CLEASING_FELWOOD_H = 4102 +}; + class npcs_riverbreeze_and_silversky : public CreatureScript { public: @@ -46,7 +59,7 @@ public: if (action == GOSSIP_ACTION_INFO_DEF+1) { player->CLOSE_GOSSIP_MENU(); - creature->CastSpell(player, 15120, false); + creature->CastSpell(player, SPELL_CENARION_BEACON, false); } return true; } @@ -58,9 +71,9 @@ public: uint32 creatureId = creature->GetEntry(); - if (creatureId == 9528) + if (creatureId == NPC_ARATHANDRIS_SILVERSKY) { - if (player->GetQuestRewardStatus(4101)) + if (player->GetQuestRewardStatus(QUEST_CLEASING_FELWOOD_A)) { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(2848, creature->GetGUID()); @@ -70,9 +83,9 @@ public: player->SEND_GOSSIP_MENU(2844, creature->GetGUID()); } - if (creatureId == 9529) + if (creatureId == NPC_MAYBESS_RIVERBREEZE) { - if (player->GetQuestRewardStatus(4102)) + if (player->GetQuestRewardStatus(QUEST_CLEASING_FELWOOD_H)) { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(2849, creature->GetGUID()); diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index 480b94d6767..4fcd20951c9 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -23,8 +23,10 @@ SDComment: Quest support: 3520, 2767, Special vendor Gregan Brewspewer SDCategory: Feralas EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" /*###### ## npc_gregan_brewspewer @@ -68,7 +70,7 @@ public: ## npc_oox22fe ######*/ -enum eOOX +enum OOX { //signed for 7806 SAY_OOX_START = -1000287, diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index 08f5b2aa592..9df208d2578 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -31,14 +31,16 @@ npc_clintar_spirit npc_clintar_dreamwalker EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" /*###### ## npc_bunthen_plainswind ######*/ -enum eBunthen +enum Bunthen { QUEST_SEA_LION_HORDE = 30, QUEST_SEA_LION_ALLY = 272, @@ -218,70 +220,68 @@ public: ## npc_clintar_spirit ######*/ -float Clintar_spirit_WP[41][5] = +float const Clintar_spirit_WP[41][5] = { - //pos_x pos_y pos_z orien waitTime -{7465.28f, -3115.46f, 439.327f, 0.83f, 4000}, -{7476.49f, -3101, 443.457f, 0.89f, 0}, -{7486.57f, -3085.59f, 439.478f, 1.07f, 0}, -{7472.19f, -3085.06f, 443.142f, 3.07f, 0}, -{7456.92f, -3085.91f, 438.862f, 3.24f, 0}, -{7446.68f, -3083.43f, 438.245f, 2.40f, 0}, -{7446.17f, -3080.21f, 439.826f, 1.10f, 6000}, -{7452.41f, -3085.8f, 438.984f, 5.78f, 0}, -{7469.11f, -3084.94f, 443.048f, 6.25f, 0}, -{7483.79f, -3085.44f, 439.607f, 6.25f, 0}, -{7491.14f, -3090.96f, 439.983f, 5.44f, 0}, -{7497.62f, -3098.22f, 436.854f, 5.44f, 0}, -{7498.72f, -3113.41f, 434.596f, 4.84f, 0}, -{7500.06f, -3122.51f, 434.749f, 5.17f, 0}, -{7504.96f, -3131.53f, 434.475f, 4.74f, 0}, -{7504.31f, -3133.53f, 435.693f, 3.84f, 6000}, -{7504.55f, -3133.27f, 435.476f, 0.68f, 15000}, -{7501.99f, -3126.01f, 434.93f, 1.83f, 0}, -{7490.76f, -3114.97f, 434.431f, 2.51f, 0}, -{7479.64f, -3105.51f, 431.123f, 1.83f, 0}, -{7474.63f, -3086.59f, 428.994f, 1.83f, 2000}, -{7472.96f, -3074.18f, 427.566f, 1.57f, 0}, -{7472.25f, -3063, 428.268f, 1.55f, 0}, -{7473.46f, -3054.22f, 427.588f, 0.36f, 0}, -{7475.08f, -3053.6f, 428.653f, 0.36f, 6000}, -{7474.66f, -3053.56f, 428.433f, 3.19f, 4000}, -{7471.81f, -3058.84f, 427.073f, 4.29f, 0}, -{7472.16f, -3064.91f, 427.772f, 4.95f, 0}, -{7471.56f, -3085.36f, 428.924f, 4.72f, 0}, -{7473.56f, -3093.48f, 429.294f, 5.04f, 0}, -{7478.94f, -3104.29f, 430.638f, 5.23f, 0}, -{7484.46f, -3109.61f, 432.769f, 5.79f, 0}, -{7490.23f, -3111.08f, 434.431f, 0.02f, 0}, -{7496.29f, -3108, 434.783f, 1.15f, 0}, -{7497.46f, -3100.66f, 436.191f, 1.50f, 0}, -{7495.64f, -3093.39f, 438.349f, 2.10f, 0}, -{7492.44f, -3086.01f, 440.267f, 1.38f, 0}, -{7498.26f, -3076.44f, 440.808f, 0.71f, 0}, -{7506.4f, -3067.35f, 443.64f, 0.77f, 0}, -{7518.37f, -3057.42f, 445.584f, 0.74f, 0}, -{7517.51f, -3056.3f, 444.568f, 2.49f, 4500} + //pos_x pos_y pos_z orien waitTime + {7465.28f, -3115.46f, 439.327f, 0.83f, 4000}, + {7476.49f, -3101, 443.457f, 0.89f, 0}, + {7486.57f, -3085.59f, 439.478f, 1.07f, 0}, + {7472.19f, -3085.06f, 443.142f, 3.07f, 0}, + {7456.92f, -3085.91f, 438.862f, 3.24f, 0}, + {7446.68f, -3083.43f, 438.245f, 2.40f, 0}, + {7446.17f, -3080.21f, 439.826f, 1.10f, 6000}, + {7452.41f, -3085.8f, 438.984f, 5.78f, 0}, + {7469.11f, -3084.94f, 443.048f, 6.25f, 0}, + {7483.79f, -3085.44f, 439.607f, 6.25f, 0}, + {7491.14f, -3090.96f, 439.983f, 5.44f, 0}, + {7497.62f, -3098.22f, 436.854f, 5.44f, 0}, + {7498.72f, -3113.41f, 434.596f, 4.84f, 0}, + {7500.06f, -3122.51f, 434.749f, 5.17f, 0}, + {7504.96f, -3131.53f, 434.475f, 4.74f, 0}, + {7504.31f, -3133.53f, 435.693f, 3.84f, 6000}, + {7504.55f, -3133.27f, 435.476f, 0.68f, 15000}, + {7501.99f, -3126.01f, 434.93f, 1.83f, 0}, + {7490.76f, -3114.97f, 434.431f, 2.51f, 0}, + {7479.64f, -3105.51f, 431.123f, 1.83f, 0}, + {7474.63f, -3086.59f, 428.994f, 1.83f, 2000}, + {7472.96f, -3074.18f, 427.566f, 1.57f, 0}, + {7472.25f, -3063, 428.268f, 1.55f, 0}, + {7473.46f, -3054.22f, 427.588f, 0.36f, 0}, + {7475.08f, -3053.6f, 428.653f, 0.36f, 6000}, + {7474.66f, -3053.56f, 428.433f, 3.19f, 4000}, + {7471.81f, -3058.84f, 427.073f, 4.29f, 0}, + {7472.16f, -3064.91f, 427.772f, 4.95f, 0}, + {7471.56f, -3085.36f, 428.924f, 4.72f, 0}, + {7473.56f, -3093.48f, 429.294f, 5.04f, 0}, + {7478.94f, -3104.29f, 430.638f, 5.23f, 0}, + {7484.46f, -3109.61f, 432.769f, 5.79f, 0}, + {7490.23f, -3111.08f, 434.431f, 0.02f, 0}, + {7496.29f, -3108, 434.783f, 1.15f, 0}, + {7497.46f, -3100.66f, 436.191f, 1.50f, 0}, + {7495.64f, -3093.39f, 438.349f, 2.10f, 0}, + {7492.44f, -3086.01f, 440.267f, 1.38f, 0}, + {7498.26f, -3076.44f, 440.808f, 0.71f, 0}, + {7506.4f, -3067.35f, 443.64f, 0.77f, 0}, + {7518.37f, -3057.42f, 445.584f, 0.74f, 0}, + {7517.51f, -3056.3f, 444.568f, 2.49f, 4500} }; -#define ASPECT_RAVEN 22915 - -#define ASPECT_RAVEN_SUMMON_X 7472.96f -#define ASPECT_RAVEN_SUMMON_Y -3074.18f -#define ASPECT_RAVEN_SUMMON_Z 427.566f -#define CLINTAR_SPIRIT_SUMMON_X 7459.2275f -#define CLINTAR_SPIRIT_SUMMON_Y -3122.5632f -#define CLINTAR_SPIRIT_SUMMON_Z 438.9842f -#define CLINTAR_SPIRIT_SUMMON_O 0.8594f - -//from -1000292 to -1000287 are signed for 7806. but all this texts ids wrong. -#define CLINTAR_SPIRIT_SAY_START -1000286 -#define CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1 -1000287 -#define CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2 -1000288 -#define CLINTAR_SPIRIT_SAY_GET_ONE -1000289 -#define CLINTAR_SPIRIT_SAY_GET_TWO -1000290 -#define CLINTAR_SPIRIT_SAY_GET_THREE -1000291 -#define CLINTAR_SPIRIT_SAY_GET_FINAL -1000292 +Position const AspectRavenSummon = {7472.96f, -3074.18f, 427.566f, 0.0f}; +Position const ClintarSpiritSummon = {7459.2275f, -3122.5632f, 438.9842f, 0.8594f}; + +enum ClintarSpirit +{ + ASPECT_RAVEN = 22915, + + //from -1000292 to -1000287 are signed for 7806. but all this texts ids wrong. + CLINTAR_SPIRIT_SAY_START = -1000286, + CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1 = -1000287, + CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2 = -1000288, + CLINTAR_SPIRIT_SAY_GET_ONE = -1000289, + CLINTAR_SPIRIT_SAY_GET_TWO = -1000290, + CLINTAR_SPIRIT_SAY_GET_THREE = -1000291, + CLINTAR_SPIRIT_SAY_GET_FINAL = -1000292 +}; class npc_clintar_spirit : public CreatureScript { @@ -298,14 +298,14 @@ public: public: npc_clintar_spiritAI(Creature* creature) : npc_escortAI(creature) {} - uint32 Step; + uint8 Step; uint32 CurrWP; - uint32 Event_Timer; - uint32 checkPlayer_Timer; + uint32 EventTimer; + uint32 checkPlayerTimer; uint64 PlayerGUID; - bool Event_onWait; + bool EventOnWait; void Reset() { @@ -313,10 +313,10 @@ public: { Step = 0; CurrWP = 0; - Event_Timer = 0; + EventTimer = 0; PlayerGUID = 0; - checkPlayer_Timer = 1000; - Event_onWait = false; + checkPlayerTimer = 1000; + EventOnWait = false; } } @@ -347,8 +347,7 @@ public: void EnterCombat(Unit* who) { - uint32 rnd = rand()%2; - switch (rnd) + switch (urand(0, 1)) { case 0: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1, me, who); break; case 1: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2, me, who); break; @@ -357,9 +356,7 @@ public: void StartEvent(Player* player) { - if (!player) - return; - if (player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE) + if (player && player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE) { for (uint8 i = 0; i < 41; ++i) { @@ -381,18 +378,18 @@ public: return; } - if (!me->isInCombat() && !Event_onWait) + if (!me->isInCombat() && !EventOnWait) { - if (checkPlayer_Timer <= diff) + if (checkPlayerTimer <= diff) { Player* player = Unit::GetPlayer(*me, PlayerGUID); if (player && player->isInCombat() && player->getAttackerForHelper()) AttackStart(player->getAttackerForHelper()); - checkPlayer_Timer = 1000; - } else checkPlayer_Timer -= diff; + checkPlayerTimer = 1000; + } else checkPlayerTimer -= diff; } - if (Event_onWait && Event_Timer <= diff) + if (EventOnWait && EventTimer <= diff) { Player* player = Unit::GetPlayer(*me, PlayerGUID); @@ -409,11 +406,11 @@ public: { case 0: me->Say(CLINTAR_SPIRIT_SAY_START, 0, PlayerGUID); - Event_Timer = 8000; + EventTimer = 8000; Step = 1; break; case 1: - Event_onWait = false; + EventOnWait = false; break; } break; @@ -422,13 +419,13 @@ public: { case 0: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 133); - Event_Timer = 5000; + EventTimer = 5000; Step = 1; break; case 1: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); DoScriptText(CLINTAR_SPIRIT_SAY_GET_ONE, me, player); - Event_onWait = false; + EventOnWait = false; break; } break; @@ -437,12 +434,12 @@ public: { case 0: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 133); - Event_Timer = 5000; + EventTimer = 5000; Step = 1; break; case 1: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - Event_onWait = false; + EventOnWait = false; break; } break; @@ -451,11 +448,11 @@ public: { case 0: DoScriptText(CLINTAR_SPIRIT_SAY_GET_TWO, me, player); - Event_Timer = 15000; + EventTimer = 15000; Step = 1; break; case 1: - Event_onWait = false; + EventOnWait = false; break; } break; @@ -463,19 +460,16 @@ public: switch (Step) { case 0: - { - Creature* mob = me->SummonCreature(ASPECT_RAVEN, ASPECT_RAVEN_SUMMON_X, ASPECT_RAVEN_SUMMON_Y, ASPECT_RAVEN_SUMMON_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000); - if (mob) + if (Creature* mob = me->SummonCreature(ASPECT_RAVEN, AspectRavenSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000)) { mob->AddThreat(me, 10000.0f); mob->AI()->AttackStart(me); } - Event_Timer = 2000; + EventTimer = 2000; Step = 1; break; - } case 1: - Event_onWait = false; + EventOnWait = false; break; } break; @@ -484,12 +478,12 @@ public: { case 0: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 133); - Event_Timer = 5000; + EventTimer = 5000; Step = 1; break; case 1: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - Event_onWait = false; + EventOnWait = false; break; } break; @@ -498,11 +492,11 @@ public: { case 0: DoScriptText(CLINTAR_SPIRIT_SAY_GET_THREE, me, player); - Event_Timer = 4000; + EventTimer = 4000; Step = 1; break; case 1: - Event_onWait = false; + EventOnWait = false; break; } break; @@ -513,12 +507,12 @@ public: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 2); DoScriptText(CLINTAR_SPIRIT_SAY_GET_FINAL, me, player); player->CompleteQuest(10965); - Event_Timer = 1500; + EventTimer = 1500; Step = 1; break; case 1: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - Event_Timer = 3000; + EventTimer = 3000; Step = 2; break; case 2: @@ -530,19 +524,19 @@ public: } break; default: - Event_onWait = false; + EventOnWait = false; break; } - } else if (Event_onWait) Event_Timer -= diff; + } else if (EventOnWait) EventTimer -= diff; } void WaypointReached(uint32 waypointId) { CurrWP = waypointId; - Event_Timer = 0; + EventTimer = 0; Step = 0; - Event_onWait = true; + EventOnWait = true; } }; @@ -552,7 +546,10 @@ public: # npc_clintar_dreamwalker ####*/ -#define CLINTAR_SPIRIT 22916 +enum Clintar +{ + CLINTAR_SPIRIT = 22916 +}; class npc_clintar_dreamwalker : public CreatureScript { @@ -562,11 +559,8 @@ public: bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == 10965) - { - Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, CLINTAR_SPIRIT_SUMMON_X, CLINTAR_SPIRIT_SUMMON_Y, CLINTAR_SPIRIT_SUMMON_Z, CLINTAR_SPIRIT_SUMMON_O, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000); - if (clintar_spirit) + if (Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, ClintarSpiritSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000)) CAST_AI(npc_clintar_spirit::npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player); - } return true; } diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp index bd4cf55b7b2..5b35688c2b8 100644 --- a/src/server/scripts/Kalimdor/mulgore.cpp +++ b/src/server/scripts/Kalimdor/mulgore.cpp @@ -29,8 +29,9 @@ npc_kyle_frenzied npc_plains_vision EndContentData */ -#include "ScriptPCH.h" -#include "ScriptedEscortAI.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### # npc_skorn_whitecloud @@ -71,7 +72,7 @@ public: # npc_kyle_frenzied ######*/ -enum eKyleFrenzied +enum KyleFrenzied { //emote signed for 7780 but propably thats wrong id. EMOTE_SEE_LUNCH = -1000340, @@ -98,30 +99,30 @@ public: { npc_kyle_frenziedAI(Creature* creature) : ScriptedAI(creature) {} - bool bEvent; - bool m_bIsMovingToLunch; - uint64 uiPlayerGUID; - uint32 uiEventTimer; - uint8 uiEventPhase; + bool EventActive; + bool IsMovingToLunch; + uint64 PlayerGUID; + uint32 EventTimer; + uint8 EventPhase; void Reset() { - bEvent = false; - m_bIsMovingToLunch = false; - uiPlayerGUID = 0; - uiEventTimer = 5000; - uiEventPhase = 0; + EventActive = false; + IsMovingToLunch = false; + PlayerGUID = 0; + EventTimer = 5000; + EventPhase = 0; if (me->GetEntry() == NPC_KYLE_FRIENDLY) me->UpdateEntry(NPC_KYLE_FRENZIED); } - void SpellHit(Unit* pCaster, SpellInfo const* pSpell) + void SpellHit(Unit* Caster, SpellInfo const* Spell) { - if (!me->getVictim() && !bEvent && pSpell->Id == SPELL_LUNCH) + if (!me->getVictim() && !EventActive && Spell->Id == SPELL_LUNCH) { - if (pCaster->GetTypeId() == TYPEID_PLAYER) - uiPlayerGUID = pCaster->GetGUID(); + if (Caster->GetTypeId() == TYPEID_PLAYER) + PlayerGUID = Caster->GetGUID(); if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) { @@ -130,41 +131,41 @@ public: me->StopMoving(); } - bEvent = true; + EventActive = true; DoScriptText(EMOTE_SEE_LUNCH, me); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_CREATURE_SPECIAL); } } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 Type, uint32 PointId) { - if (uiType != POINT_MOTION_TYPE || !bEvent) + if (Type != POINT_MOTION_TYPE || !EventActive) return; - if (uiPointId == POINT_ID) - m_bIsMovingToLunch = false; + if (PointId == POINT_ID) + IsMovingToLunch = false; } void UpdateAI(const uint32 diff) { - if (bEvent) + if (EventActive) { - if (m_bIsMovingToLunch) + if (IsMovingToLunch) return; - if (uiEventTimer <= diff) + if (EventTimer <= diff) { - uiEventTimer = 5000; - ++uiEventPhase; + EventTimer = 5000; + ++EventPhase; - switch (uiEventPhase) + switch (EventPhase) { case 1: - if (Unit* unit = Unit::GetUnit(*me, uiPlayerGUID)) + if (Unit* unit = Unit::GetUnit(*me, PlayerGUID)) { if (GameObject* go = unit->GetGameObject(SPELL_LUNCH)) { - m_bIsMovingToLunch = true; + IsMovingToLunch = true; me->GetMotionMaster()->MovePoint(POINT_ID, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ()); } } @@ -174,13 +175,13 @@ public: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING); break; case 3: - if (Player* unit = Unit::GetPlayer(*me, uiPlayerGUID)) + if (Player* unit = Unit::GetPlayer(*me, PlayerGUID)) unit->TalkedToCreature(me->GetEntry(), me->GetGUID()); me->UpdateEntry(NPC_KYLE_FRIENDLY); break; case 4: - uiEventTimer = 30000; + EventTimer = 30000; DoScriptText(EMOTE_DANCE, me); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCESPECIAL); break; @@ -192,7 +193,7 @@ public: } } else - uiEventTimer -= diff; + EventTimer -= diff; } } }; @@ -203,58 +204,58 @@ public: # npc_plains_vision ######*/ -float wp_plain_vision[50][3] = +Position const wpPlainVision[50] = { - {-2226.32f, -408.095f, -9.36235f}, - {-2203.04f, -437.212f, -5.72498f}, - {-2163.91f, -457.851f, -7.09049f}, - {-2123.87f, -448.137f, -9.29591f}, - {-2104.66f, -427.166f, -6.49513f}, - {-2101.48f, -422.826f, -5.3567f}, - {-2097.56f, -417.083f, -7.16716f}, - {-2084.87f, -398.626f, -9.88973f}, - {-2072.71f, -382.324f, -10.2488f}, - {-2054.05f, -356.728f, -6.22468f}, - {-2051.8f, -353.645f, -5.35791f}, - {-2049.08f, -349.912f, -6.15723f}, - {-2030.6f, -310.724f, -9.59302f}, - {-2002.15f, -249.308f, -10.8124f}, - {-1972.85f, -195.811f, -10.6316f}, - {-1940.93f, -147.652f, -11.7055f}, - {-1888.06f, -81.943f, -11.4404f}, - {-1837.05f, -34.0109f, -12.258f}, - {-1796.12f, -14.6462f, -10.3581f}, - {-1732.61f, -4.27746f, -10.0213f}, - {-1688.94f, -0.829945f, -11.7103f}, - {-1681.32f, 13.0313f, -9.48056f}, - {-1677.04f, 36.8349f, -7.10318f}, - {-1675.2f, 68.559f, -8.95384f}, - {-1676.57f, 89.023f, -9.65104f}, - {-1678.16f, 110.939f, -10.1782f}, - {-1677.86f, 128.681f, -5.73869f}, - {-1675.27f, 144.324f, -3.47916f}, - {-1671.7f, 163.169f, -1.23098f}, - {-1666.61f, 181.584f, 5.26145f}, - {-1661.51f, 196.154f, 8.95252f}, - {-1655.47f, 210.811f, 8.38727f}, - {-1647.07f, 226.947f, 5.27755f}, - {-1621.65f, 232.91f, 2.69579f}, - {-1600.23f, 237.641f, 2.98539f}, - {-1576.07f, 242.546f, 4.66541f}, - {-1554.57f, 248.494f, 6.60377f}, - {-1547.53f, 259.302f, 10.6741f}, - {-1541.7f, 269.847f, 16.4418f}, - {-1539.83f, 278.989f, 21.0597f}, - {-1540.16f, 290.219f, 27.8247f}, - {-1538.99f, 298.983f, 34.0032f}, - {-1540.38f, 307.337f, 41.3557f}, - {-1536.61f, 314.884f, 48.0179f}, - {-1532.42f, 323.277f, 55.6667f}, - {-1528.77f, 329.774f, 61.1525f}, - {-1525.65f, 333.18f, 63.2161f}, - {-1517.01f, 350.713f, 62.4286f}, - {-1511.39f, 362.537f, 62.4539f}, - {-1508.68f, 366.822f, 62.733f} + {-2226.32f, -408.095f, -9.36235f, 0.0f}, + {-2203.04f, -437.212f, -5.72498f, 0.0f}, + {-2163.91f, -457.851f, -7.09049f, 0.0f}, + {-2123.87f, -448.137f, -9.29591f, 0.0f}, + {-2104.66f, -427.166f, -6.49513f, 0.0f}, + {-2101.48f, -422.826f, -5.3567f, 0.0f}, + {-2097.56f, -417.083f, -7.16716f, 0.0f}, + {-2084.87f, -398.626f, -9.88973f, 0.0f}, + {-2072.71f, -382.324f, -10.2488f, 0.0f}, + {-2054.05f, -356.728f, -6.22468f, 0.0f}, + {-2051.8f, -353.645f, -5.35791f, 0.0f}, + {-2049.08f, -349.912f, -6.15723f, 0.0f}, + {-2030.6f, -310.724f, -9.59302f, 0.0f}, + {-2002.15f, -249.308f, -10.8124f, 0.0f}, + {-1972.85f, -195.811f, -10.6316f, 0.0f}, + {-1940.93f, -147.652f, -11.7055f, 0.0f}, + {-1888.06f, -81.943f, -11.4404f, 0.0f}, + {-1837.05f, -34.0109f, -12.258f, 0.0f}, + {-1796.12f, -14.6462f, -10.3581f, 0.0f}, + {-1732.61f, -4.27746f, -10.0213f, 0.0f}, + {-1688.94f, -0.829945f, -11.7103f, 0.0f}, + {-1681.32f, 13.0313f, -9.48056f, 0.0f}, + {-1677.04f, 36.8349f, -7.10318f, 0.0f}, + {-1675.2f, 68.559f, -8.95384f, 0.0f}, + {-1676.57f, 89.023f, -9.65104f, 0.0f}, + {-1678.16f, 110.939f, -10.1782f, 0.0f}, + {-1677.86f, 128.681f, -5.73869f, 0.0f}, + {-1675.27f, 144.324f, -3.47916f, 0.0f}, + {-1671.7f, 163.169f, -1.23098f, 0.0f}, + {-1666.61f, 181.584f, 5.26145f, 0.0f}, + {-1661.51f, 196.154f, 8.95252f, 0.0f}, + {-1655.47f, 210.811f, 8.38727f, 0.0f}, + {-1647.07f, 226.947f, 5.27755f, 0.0f}, + {-1621.65f, 232.91f, 2.69579f, 0.0f}, + {-1600.23f, 237.641f, 2.98539f, 0.0f}, + {-1576.07f, 242.546f, 4.66541f, 0.0f}, + {-1554.57f, 248.494f, 6.60377f, 0.0f}, + {-1547.53f, 259.302f, 10.6741f, 0.0f}, + {-1541.7f, 269.847f, 16.4418f, 0.0f}, + {-1539.83f, 278.989f, 21.0597f, 0.0f}, + {-1540.16f, 290.219f, 27.8247f, 0.0f}, + {-1538.99f, 298.983f, 34.0032f, 0.0f}, + {-1540.38f, 307.337f, 41.3557f, 0.0f}, + {-1536.61f, 314.884f, 48.0179f, 0.0f}, + {-1532.42f, 323.277f, 55.6667f, 0.0f}, + {-1528.77f, 329.774f, 61.1525f, 0.0f}, + {-1525.65f, 333.18f, 63.2161f, 0.0f}, + {-1517.01f, 350.713f, 62.4286f, 0.0f}, + {-1511.39f, 362.537f, 62.4539f, 0.0f}, + {-1508.68f, 366.822f, 62.733f, 0.0f} }; class npc_plains_vision : public CreatureScript @@ -305,7 +306,7 @@ public: { if (newWaypoint) { - me->GetMotionMaster()->MovePoint(WayPointId, wp_plain_vision[WayPointId][0], wp_plain_vision[WayPointId][1], wp_plain_vision[WayPointId][2]); + me->GetMotionMaster()->MovePoint(WayPointId, wpPlainVision[WayPointId]); newWaypoint = false; } } diff --git a/src/server/scripts/Kalimdor/orgrimmar.cpp b/src/server/scripts/Kalimdor/orgrimmar.cpp index 2ff2d28768a..fca8d0f5fc5 100644 --- a/src/server/scripts/Kalimdor/orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/orgrimmar.cpp @@ -28,13 +28,15 @@ npc_shenthul npc_thrall_warchief EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_shenthul ######*/ -enum eShenthul +enum Shenthul { QUEST_SHATTERED_SALUTE = 2460 }; @@ -65,16 +67,16 @@ public: bool CanTalk; bool CanEmote; - uint32 Salute_Timer; - uint32 Reset_Timer; + uint32 SaluteTimer; + uint32 ResetTimer; uint64 PlayerGUID; void Reset() { CanTalk = false; CanEmote = false; - Salute_Timer = 6000; - Reset_Timer = 0; + SaluteTimer = 6000; + ResetTimer = 0; PlayerGUID = 0; } @@ -84,7 +86,7 @@ public: { if (CanEmote) { - if (Reset_Timer <= diff) + if (ResetTimer <= diff) { if (Player* player = Unit::GetPlayer(*me, PlayerGUID)) { @@ -92,17 +94,17 @@ public: player->FailQuest(QUEST_SHATTERED_SALUTE); } Reset(); - } else Reset_Timer -= diff; + } else ResetTimer -= diff; } if (CanTalk && !CanEmote) { - if (Salute_Timer <= diff) + if (SaluteTimer <= diff) { me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); CanEmote = true; - Reset_Timer = 60000; - } else Salute_Timer -= diff; + ResetTimer = 60000; + } else SaluteTimer -= diff; } if (!UpdateVictim()) @@ -130,10 +132,13 @@ public: ## npc_thrall_warchief ######*/ -#define QUEST_6566 6566 +enum ThrallWarchief +{ + QUEST_6566 = 6566, -#define SPELL_CHAIN_LIGHTNING 16033 -#define SPELL_SHOCK 16034 + SPELL_CHAIN_LIGHTNING = 16033, + SPELL_SHOCK = 16034 +}; #define GOSSIP_HTW "Please share your wisdom with me, Warchief." #define GOSSIP_STW1 "What discoveries?" @@ -207,13 +212,13 @@ public: { npc_thrall_warchiefAI(Creature* creature) : ScriptedAI(creature) {} - uint32 ChainLightning_Timer; - uint32 Shock_Timer; + uint32 ChainLightningTimer; + uint32 ShockTimer; void Reset() { - ChainLightning_Timer = 2000; - Shock_Timer = 8000; + ChainLightningTimer = 2000; + ShockTimer = 8000; } void EnterCombat(Unit* /*who*/) {} @@ -223,17 +228,17 @@ public: if (!UpdateVictim()) return; - if (ChainLightning_Timer <= diff) + if (ChainLightningTimer <= diff) { DoCast(me->getVictim(), SPELL_CHAIN_LIGHTNING); - ChainLightning_Timer = 9000; - } else ChainLightning_Timer -= diff; + ChainLightningTimer = 9000; + } else ChainLightningTimer -= diff; - if (Shock_Timer <= diff) + if (ShockTimer <= diff) { DoCast(me->getVictim(), SPELL_SHOCK); - Shock_Timer = 15000; - } else Shock_Timer -= diff; + ShockTimer = 15000; + } else ShockTimer -= diff; DoMeleeAttackIfReady(); } diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp index 2d91f32fe9d..639de3dc3b2 100644 --- a/src/server/scripts/Kalimdor/silithus.cpp +++ b/src/server/scripts/Kalimdor/silithus.cpp @@ -29,7 +29,9 @@ npcs_rutgar_and_frankal quest_a_pawn_on_the_eternal_pawn EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "Group.h" /*### @@ -125,9 +127,11 @@ public: #define GOSSIP_ITEM14 "I should ask the monkey about this" #define GOSSIP_ITEM15 "Then what..." -//trigger creatures to kill -#define TRIGGER_RUTGAR 15222 -#define TRIGGER_FRANKAL 15221 +enum RutgarAndFrankal //trigger creatures to kill +{ + TRIGGER_FRANKAL = 15221, + TRIGGER_RUTGAR = 15222 +}; class npcs_rutgar_and_frankal : public CreatureScript { @@ -223,7 +227,7 @@ public: /*#### # quest_a_pawn_on_the_eternal_board (Defines) ####*/ -enum eEternalBoard +enum EternalBoard { QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519, @@ -290,7 +294,6 @@ TO DO: get correct spell IDs and timings for spells cast upon dragon transformat TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation, but for some unknown reason it doesnt work. EndContentData */ -#define QUEST_A_PAWN_ON_THE_ETERNAL_BOARD 8519 #define EVENT_AREA_RADIUS 65 //65yds #define EVENT_COOLDOWN 500000 //in ms. appear after event completed or failed (should be = Adds despawn time) @@ -373,13 +376,8 @@ static QuestCinematic EventAnim[]= {0, 0, 0} }; -struct Location -{ - float x, y, z, o; -}; - //Cordinates for Spawns -static Location SpawnLocation[]= +Position const SpawnLocation[] = { {-8085.0f, 1528.0f, 2.61f, 3.141592f}, //Kaldorei Infantry {-8080.0f, 1526.0f, 2.61f, 3.141592f}, //Kaldorei Infantry @@ -460,7 +458,7 @@ struct WaveData int32 WaveTextId; }; -static WaveData WavesInfo[] = +static WaveData WavesInfo[5] = { {30, 0, 15423, 0, 0, 24000, 0}, // Kaldorei Soldier { 3, 35, 15424, 0, 0, 24000, 0}, // Anubisath Conqueror @@ -475,7 +473,7 @@ struct SpawnSpells uint32 Timer1, Timer2, SpellId; }; -static SpawnSpells SpawnCast[]=// +static SpawnSpells SpawnCast[4] = { {100000, 2000, 33652}, // Stop Time {38500, 300000, 28528}, // Poison Cloud @@ -977,13 +975,9 @@ public: for (uint8 i = locIndex; i <= count; ++i) { - float x = SpawnLocation[i].x; - float y = SpawnLocation[i].y; - float z = SpawnLocation[i].z; - float o = SpawnLocation[i].o; uint32 desptimer = WavesInfo[WaveCount].DespTimer; - if (Creature* spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, desptimer)) + if (Creature* spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, SpawnLocation[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, desptimer)) { if (spawn->GetEntry() == 15423) spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15427+rand()%4); diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp index 635bb50509e..d38395c7b37 100644 --- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp @@ -28,7 +28,9 @@ npc_braug_dimspirit npc_kaya_flathoof EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### @@ -90,7 +92,7 @@ public: ## npc_kaya_flathoof ######*/ -enum eKaya +enum Kaya { FACTION_ESCORTEE_H = 775, diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp index da0e0e738cf..9b742b495bb 100644 --- a/src/server/scripts/Kalimdor/tanaris.cpp +++ b/src/server/scripts/Kalimdor/tanaris.cpp @@ -33,7 +33,9 @@ npc_OOX17 npc_tooga EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" @@ -41,10 +43,13 @@ EndContentData */ ## mob_aquementas ######*/ -#define AGGRO_YELL_AQUE -1000350 +enum Aquementas +{ + AGGRO_YELL_AQUE = -1000350, -#define SPELL_AQUA_JET 13586 -#define SPELL_FROST_SHOCK 15089 + SPELL_AQUA_JET = 13586, + SPELL_FROST_SHOCK = 15089 +}; class mob_aquementas : public CreatureScript { @@ -60,22 +65,22 @@ public: { mob_aquementasAI(Creature* creature) : ScriptedAI(creature) {} - uint32 SendItem_Timer; - uint32 SwitchFaction_Timer; + uint32 SendItemTimer; + uint32 SwitchFactionTimer; bool isFriendly; - uint32 FrostShock_Timer; - uint32 AquaJet_Timer; + uint32 FrostShockTimer; + uint32 AquaJetTimer; void Reset() { - SendItem_Timer = 0; - SwitchFaction_Timer = 10000; + SendItemTimer = 0; + SwitchFactionTimer = 10000; me->setFaction(35); isFriendly = true; - AquaJet_Timer = 5000; - FrostShock_Timer = 1000; + AquaJetTimer = 5000; + FrostShockTimer = 1000; } void SendItem(Unit* receiver) @@ -101,11 +106,11 @@ public: { if (isFriendly) { - if (SwitchFaction_Timer <= diff) + if (SwitchFactionTimer <= diff) { me->setFaction(91); isFriendly = false; - } else SwitchFaction_Timer -= diff; + } else SwitchFactionTimer -= diff; } if (!UpdateVictim()) @@ -113,25 +118,25 @@ public: if (!isFriendly) { - if (SendItem_Timer <= diff) + if (SendItemTimer <= diff) { if (me->getVictim()->GetTypeId() == TYPEID_PLAYER) SendItem(me->getVictim()); - SendItem_Timer = 5000; - } else SendItem_Timer -= diff; + SendItemTimer = 5000; + } else SendItemTimer -= diff; } - if (FrostShock_Timer <= diff) + if (FrostShockTimer <= diff) { DoCast(me->getVictim(), SPELL_FROST_SHOCK); - FrostShock_Timer = 15000; - } else FrostShock_Timer -= diff; + FrostShockTimer = 15000; + } else FrostShockTimer -= diff; - if (AquaJet_Timer <= diff) + if (AquaJetTimer <= diff) { DoCast(me, SPELL_AQUA_JET); - AquaJet_Timer = 15000; - } else AquaJet_Timer -= diff; + AquaJetTimer = 15000; + } else AquaJetTimer -= diff; DoMeleeAttackIfReady(); } @@ -143,20 +148,23 @@ public: ## npc_custodian_of_time ######*/ -#define WHISPER_CUSTODIAN_1 -1000217 -#define WHISPER_CUSTODIAN_2 -1000218 -#define WHISPER_CUSTODIAN_3 -1000219 -#define WHISPER_CUSTODIAN_4 -1000220 -#define WHISPER_CUSTODIAN_5 -1000221 -#define WHISPER_CUSTODIAN_6 -1000222 -#define WHISPER_CUSTODIAN_7 -1000223 -#define WHISPER_CUSTODIAN_8 -1000224 -#define WHISPER_CUSTODIAN_9 -1000225 -#define WHISPER_CUSTODIAN_10 -1000226 -#define WHISPER_CUSTODIAN_11 -1000227 -#define WHISPER_CUSTODIAN_12 -1000228 -#define WHISPER_CUSTODIAN_13 -1000229 -#define WHISPER_CUSTODIAN_14 -1000230 +enum CustodianOfTime +{ + WHISPER_CUSTODIAN_1 = -1000217, + WHISPER_CUSTODIAN_2 = -1000218, + WHISPER_CUSTODIAN_3 = -1000219, + WHISPER_CUSTODIAN_4 = -1000220, + WHISPER_CUSTODIAN_5 = -1000221, + WHISPER_CUSTODIAN_6 = -1000222, + WHISPER_CUSTODIAN_7 = -1000223, + WHISPER_CUSTODIAN_8 = -1000224, + WHISPER_CUSTODIAN_9 = -1000225, + WHISPER_CUSTODIAN_10 = -1000226, + WHISPER_CUSTODIAN_11 = -1000227, + WHISPER_CUSTODIAN_12 = -1000228, + WHISPER_CUSTODIAN_13 = -1000229, + WHISPER_CUSTODIAN_14 = -1000230 +}; class npc_custodian_of_time : public CreatureScript { @@ -174,69 +182,68 @@ public: void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 0: - DoScriptText(WHISPER_CUSTODIAN_1, me, player); - break; - case 1: - DoScriptText(WHISPER_CUSTODIAN_2, me, player); - break; - case 2: - DoScriptText(WHISPER_CUSTODIAN_3, me, player); - break; - case 3: - DoScriptText(WHISPER_CUSTODIAN_4, me, player); - break; - case 5: - DoScriptText(WHISPER_CUSTODIAN_5, me, player); - break; - case 6: - DoScriptText(WHISPER_CUSTODIAN_6, me, player); - break; - case 7: - DoScriptText(WHISPER_CUSTODIAN_7, me, player); - break; - case 8: - DoScriptText(WHISPER_CUSTODIAN_8, me, player); - break; - case 9: - DoScriptText(WHISPER_CUSTODIAN_9, me, player); - break; - case 10: - DoScriptText(WHISPER_CUSTODIAN_4, me, player); - break; - case 13: - DoScriptText(WHISPER_CUSTODIAN_10, me, player); - break; - case 14: - DoScriptText(WHISPER_CUSTODIAN_4, me, player); - break; - case 16: - DoScriptText(WHISPER_CUSTODIAN_11, me, player); - break; - case 17: - DoScriptText(WHISPER_CUSTODIAN_12, me, player); - break; - case 18: - DoScriptText(WHISPER_CUSTODIAN_4, me, player); - break; - case 22: - DoScriptText(WHISPER_CUSTODIAN_13, me, player); - break; - case 23: - DoScriptText(WHISPER_CUSTODIAN_4, me, player); - break; - case 24: - DoScriptText(WHISPER_CUSTODIAN_14, me, player); - DoCast(player, 34883); - // below here is temporary workaround, to be removed when spell works properly - player->AreaExploredOrEventHappens(10277); - break; + switch (waypointId) + { + case 0: + DoScriptText(WHISPER_CUSTODIAN_1, me, player); + break; + case 1: + DoScriptText(WHISPER_CUSTODIAN_2, me, player); + break; + case 2: + DoScriptText(WHISPER_CUSTODIAN_3, me, player); + break; + case 3: + DoScriptText(WHISPER_CUSTODIAN_4, me, player); + break; + case 5: + DoScriptText(WHISPER_CUSTODIAN_5, me, player); + break; + case 6: + DoScriptText(WHISPER_CUSTODIAN_6, me, player); + break; + case 7: + DoScriptText(WHISPER_CUSTODIAN_7, me, player); + break; + case 8: + DoScriptText(WHISPER_CUSTODIAN_8, me, player); + break; + case 9: + DoScriptText(WHISPER_CUSTODIAN_9, me, player); + break; + case 10: + DoScriptText(WHISPER_CUSTODIAN_4, me, player); + break; + case 13: + DoScriptText(WHISPER_CUSTODIAN_10, me, player); + break; + case 14: + DoScriptText(WHISPER_CUSTODIAN_4, me, player); + break; + case 16: + DoScriptText(WHISPER_CUSTODIAN_11, me, player); + break; + case 17: + DoScriptText(WHISPER_CUSTODIAN_12, me, player); + break; + case 18: + DoScriptText(WHISPER_CUSTODIAN_4, me, player); + break; + case 22: + DoScriptText(WHISPER_CUSTODIAN_13, me, player); + break; + case 23: + DoScriptText(WHISPER_CUSTODIAN_4, me, player); + break; + case 24: + DoScriptText(WHISPER_CUSTODIAN_14, me, player); + DoCast(player, 34883); + // below here is temporary workaround, to be removed when spell works properly + player->AreaExploredOrEventHappens(10277); + break; + } } } @@ -259,7 +266,7 @@ public: } void EnterCombat(Unit* /*who*/) {} - void Reset() { } + void Reset() {} void UpdateAI(const uint32 diff) { @@ -416,7 +423,7 @@ public: ## npc_OOX17 ######*/ -enum e00X17 +enum Npc00X17 { //texts are signed for 7806 SAY_OOX_START = -1000287, @@ -464,30 +471,29 @@ public: void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 23: - me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(SPAWN_FIRST, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - DoScriptText(SAY_OOX_AMBUSH, me); - break; - case 56: - me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(SPAWN_SECOND_2, -7518.07f, -4792.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - DoScriptText(SAY_OOX_AMBUSH, me); - if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30)) - DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff); - break; - case 86: - DoScriptText(SAY_OOX_END, me); - player->GroupEventHappens(Q_OOX17, me); - break; + switch (waypointId) + { + case 23: + me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(SPAWN_FIRST, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + DoScriptText(SAY_OOX_AMBUSH, me); + break; + case 56: + me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(SPAWN_SECOND_2, -7518.07f, -4792.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + DoScriptText(SAY_OOX_AMBUSH, me); + if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30)) + DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff); + break; + case 86: + DoScriptText(SAY_OOX_END, me); + player->GroupEventHappens(Q_OOX17, me); + break; + } } } @@ -509,7 +515,7 @@ public: # npc_tooga ####*/ -enum eTooga +enum Tooga { SAY_TOOG_THIRST = -1000391, SAY_TOOG_WORRIED = -1000392, @@ -527,7 +533,7 @@ enum eTooga FACTION_TOOG_ESCORTEE = 113 }; -const float m_afToWaterLoc[] = {-7032.664551f, -4906.199219f, -1.606446f}; +Position const ToWaterLoc = {-7032.664551f, -4906.199219f, -1.606446f, 0.0f}; class npc_tooga : public CreatureScript { @@ -554,17 +560,17 @@ public: { npc_toogaAI(Creature* creature) : FollowerAI(creature) { } - uint32 m_uiCheckSpeechTimer; - uint32 m_uiPostEventTimer; - uint32 m_uiPhasePostEvent; + uint32 CheckSpeechTimer; + uint32 PostEventTimer; + uint32 PhasePostEvent; uint64 TortaGUID; void Reset() { - m_uiCheckSpeechTimer = 2500; - m_uiPostEventTimer = 1000; - m_uiPhasePostEvent = 0; + CheckSpeechTimer = 2500; + PostEventTimer = 1000; + PhasePostEvent = 0; TortaGUID = 0; } @@ -577,11 +583,9 @@ public: { if (me->IsWithinDistInMap(who, INTERACTION_DISTANCE)) { - if (Player* player = GetLeaderForFollower()) - { - if (player->GetQuestStatus(QUEST_TOOGA) == QUEST_STATUS_INCOMPLETE) - player->GroupEventHappens(QUEST_TOOGA, me); - } + Player* player = GetLeaderForFollower(); + if (player && player->GetQuestStatus(QUEST_TOOGA) == QUEST_STATUS_INCOMPLETE) + player->GroupEventHappens(QUEST_TOOGA, me); TortaGUID = who->GetGUID(); SetFollowComplete(true); @@ -589,27 +593,27 @@ public: } } - void MovementInform(uint32 uiMotionType, uint32 uiPointId) + void MovementInform(uint32 MotionType, uint32 PointId) { - FollowerAI::MovementInform(uiMotionType, uiPointId); + FollowerAI::MovementInform(MotionType, PointId); - if (uiMotionType != POINT_MOTION_TYPE) + if (MotionType != POINT_MOTION_TYPE) return; - if (uiPointId == POINT_ID_TO_WATER) + if (PointId == POINT_ID_TO_WATER) SetFollowComplete(); } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 Diff) { if (!UpdateVictim()) { //we are doing the post-event, or... if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { - if (m_uiPostEventTimer <= uiDiff) + if (PostEventTimer <= Diff) { - m_uiPostEventTimer = 5000; + PostEventTimer = 5000; Unit* pTorta = Unit::GetUnit(*me, TortaGUID); if (!pTorta || !pTorta->isAlive()) @@ -619,7 +623,7 @@ public: return; } - switch (m_uiPhasePostEvent) + switch (PhasePostEvent) { case 1: DoScriptText(SAY_TOOG_POST_1, me); @@ -638,27 +642,27 @@ public: break; case 6: DoScriptText(SAY_TORT_POST_6, pTorta); - me->GetMotionMaster()->MovePoint(POINT_ID_TO_WATER, m_afToWaterLoc[0], m_afToWaterLoc[1], m_afToWaterLoc[2]); + me->GetMotionMaster()->MovePoint(POINT_ID_TO_WATER, ToWaterLoc); break; } - ++m_uiPhasePostEvent; + ++PhasePostEvent; } else - m_uiPostEventTimer -= uiDiff; + PostEventTimer -= Diff; } //...we are doing regular speech check else if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - if (m_uiCheckSpeechTimer <= uiDiff) + if (CheckSpeechTimer <= Diff) { - m_uiCheckSpeechTimer = 5000; + CheckSpeechTimer = 5000; if (urand(0, 9) > 8) DoScriptText(RAND(SAY_TOOG_THIRST, SAY_TOOG_WORRIED), me); } else - m_uiCheckSpeechTimer -= uiDiff; + CheckSpeechTimer -= Diff; } return; diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp index d7cac99c374..7f2b2fc7f05 100644 --- a/src/server/scripts/Kalimdor/teldrassil.cpp +++ b/src/server/scripts/Kalimdor/teldrassil.cpp @@ -27,14 +27,15 @@ EndScriptData */ npc_mist EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedFollowerAI.h" /*#### # npc_mist ####*/ -enum eMist +enum Mist { SAY_AT_HOME = -1000323, EMOTE_AT_HOME = -1000324, @@ -51,10 +52,8 @@ public: bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == QUEST_MIST) - { if (npc_mistAI* pMistAI = CAST_AI(npc_mist::npc_mistAI, creature->AI())) pMistAI->StartFollow(player, FACTION_DARNASSUS, quest); - } return true; } @@ -88,18 +87,16 @@ public: { DoScriptText(EMOTE_AT_HOME, me); - if (Player* player = GetLeaderForFollower()) - { - if (player->GetQuestStatus(QUEST_MIST) == QUEST_STATUS_INCOMPLETE) - player->GroupEventHappens(QUEST_MIST, me); - } + Player* player = GetLeaderForFollower(); + if (player && player->GetQuestStatus(QUEST_MIST) == QUEST_STATUS_INCOMPLETE) + player->GroupEventHappens(QUEST_MIST, me); //The follow is over (and for later development, run off to the woods before really end) SetFollowComplete(); } //call not needed here, no known abilities - /*void UpdateFollowerAI(const uint32 uiDiff) + /*void UpdateFollowerAI(const uint32 Diff) { if (!UpdateVictim()) return; diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp index c56991e2553..f4983558b67 100644 --- a/src/server/scripts/Kalimdor/the_barrens.cpp +++ b/src/server/scripts/Kalimdor/the_barrens.cpp @@ -32,7 +32,9 @@ npc_twiggy_flathead npc_wizzlecrank_shredder EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### @@ -41,7 +43,7 @@ EndContentData */ #define GOSSIP_CORPSE "Examine corpse in detail..." -enum eQuests +enum BeatenCorpse { QUEST_LOST_IN_BATTLE = 4921 }; @@ -77,7 +79,7 @@ public: # npc_gilthares ######*/ -enum eGilthares +enum Gilthares { SAY_GIL_START = -1000370, SAY_GIL_AT_LAST = -1000371, @@ -214,7 +216,7 @@ public: ## npc_taskmaster_fizzule ######*/ -enum eEnums +enum TaskmasterFizzule { FACTION_FRIENDLY_F = 35, SPELL_FLARE = 10113, @@ -240,13 +242,13 @@ public: uint32 factionNorm; bool IsFriend; - uint32 Reset_Timer; + uint32 ResetTimer; uint8 FlareCount; void Reset() { IsFriend = false; - Reset_Timer = 120000; + ResetTimer = 120000; FlareCount = 0; me->setFaction(factionNorm); } @@ -281,11 +283,11 @@ public: { if (IsFriend) { - if (Reset_Timer <= diff) + if (ResetTimer <= diff) { EnterEvadeMode(); return; - } else Reset_Timer -= diff; + } else ResetTimer -= diff; } if (!UpdateVictim()) @@ -315,7 +317,7 @@ public: ## npc_twiggy_flathead #####*/ -enum eTwiggyFlathead +enum TwiggyFlathead { NPC_BIG_WILL = 6238, NPC_AFFRAY_CHALLENGER = 6240, @@ -327,7 +329,7 @@ enum eTwiggyFlathead SAY_TWIGGY_FLATHEAD_OVER = -1000127, }; -float AffrayChallengerLoc[6][4]= +Position const AffrayChallengerLoc[6] = { {-1683.0f, -4326.0f, 2.79f, 0.0f}, {-1682.0f, -4329.0f, 2.79f, 0.0f}, @@ -354,10 +356,10 @@ public: bool EventInProgress; bool EventGrate; bool EventBigWill; - bool Challenger_down[6]; - uint32 Wave; - uint32 Wave_Timer; - uint32 Challenger_checker; + bool ChallengerDown[6]; + uint8 Wave; + uint32 WaveTimer; + uint32 ChallengerChecker; uint64 PlayerGUID; uint64 AffrayChallenger[6]; uint64 BigWill; @@ -367,15 +369,15 @@ public: EventInProgress = false; EventGrate = false; EventBigWill = false; - Wave_Timer = 600000; - Challenger_checker = 0; + WaveTimer = 600000; + ChallengerChecker = 0; Wave = 0; PlayerGUID = 0; for (uint8 i = 0; i < 6; ++i) { AffrayChallenger[i] = 0; - Challenger_down[i] = false; + ChallengerDown[i] = false; } BigWill = 0; } @@ -408,42 +410,26 @@ public: return; if (!pWarrior->isAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) { - EventInProgress = false; DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, me); pWarrior->FailQuest(1719); - for (uint8 i = 0; i < 6; ++i) + for (uint8 i = 0; i < 6; ++i) // unsummon challengers { if (AffrayChallenger[i]) { Creature* creature = Unit::GetCreature((*me), AffrayChallenger[i]); - if (creature) { - if (creature->isAlive()) - { - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - creature->setDeathState(JUST_DIED); - } - } + if (creature && creature->isAlive()) + creature->DisappearAndDie(); } - AffrayChallenger[i] = 0; - Challenger_down[i] = false; } - if (BigWill) + if (BigWill) // unsummon bigWill { Creature* creature = Unit::GetCreature((*me), BigWill); - if (creature) - { - if (creature->isAlive()) - { - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - creature->setDeathState(JUST_DIED); - } - } + if (creature && creature->isAlive()) + creature->DisappearAndDie(); } - BigWill = 0; + Reset(); } if (!EventGrate && EventInProgress) @@ -453,11 +439,11 @@ public: if (x >= -1684 && x <= -1674 && y >= -4334 && y <= -4324) { pWarrior->AreaExploredOrEventHappens(1719); - DoScriptText(SAY_TWIGGY_FLATHEAD_BEGIN, me); + DoScriptText(SAY_TWIGGY_FLATHEAD_BEGIN, me, pWarrior); for (uint8 i = 0; i < 6; ++i) { - Creature* creature = me->SummonCreature(NPC_AFFRAY_CHALLENGER, AffrayChallengerLoc[i][0], AffrayChallengerLoc[i][1], AffrayChallengerLoc[i][2], AffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + Creature* creature = me->SummonCreature(NPC_AFFRAY_CHALLENGER, AffrayChallengerLoc[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); if (!creature) continue; creature->setFaction(35); @@ -466,31 +452,31 @@ public: creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); AffrayChallenger[i] = creature->GetGUID(); } - Wave_Timer = 5000; - Challenger_checker = 1000; + WaveTimer = 5000; + ChallengerChecker = 1000; EventGrate = true; } } else if (EventInProgress) { - if (Challenger_checker <= diff) + if (ChallengerChecker <= diff) { for (uint8 i = 0; i < 6; ++i) { if (AffrayChallenger[i]) { Creature* creature = Unit::GetCreature((*me), AffrayChallenger[i]); - if ((!creature || (!creature->isAlive())) && !Challenger_down[i]) + if ((!creature || (!creature->isAlive())) && !ChallengerDown[i]) { DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, me); - Challenger_down[i] = true; + ChallengerDown[i] = true; } } } - Challenger_checker = 1000; - } else Challenger_checker -= diff; + ChallengerChecker = 1000; + } else ChallengerChecker -= diff; - if (Wave_Timer <= diff) + if (WaveTimer <= diff) { if (Wave < 6 && AffrayChallenger[Wave] && !EventBigWill) { @@ -504,7 +490,7 @@ public: creature->setFaction(14); creature->AI()->AttackStart(pWarrior); ++Wave; - Wave_Timer = 20000; + WaveTimer = 20000; } } else if (Wave >= 6 && !EventBigWill) { @@ -516,7 +502,7 @@ public: creature->GetMotionMaster()->MovePoint(2, -1682, -4329, 2.79f); creature->HandleEmoteCommand(EMOTE_STATE_READY_UNARMED); EventBigWill = true; - Wave_Timer = 1000; + WaveTimer = 1000; } } else if (Wave >= 6 && EventBigWill && BigWill) @@ -525,14 +511,10 @@ public: if (!creature || !creature->isAlive()) { DoScriptText(SAY_TWIGGY_FLATHEAD_OVER, me); - EventInProgress = false; - EventBigWill = false; - EventGrate = false; - PlayerGUID = 0; - Wave = 0; + Reset(); } } - } else Wave_Timer -= diff; + } else WaveTimer -= diff; } } } @@ -544,7 +526,7 @@ public: ## npc_wizzlecrank_shredder #####*/ -enum eEnums_Wizzlecrank +enum Wizzlecrank { SAY_START = -1000298, SAY_STARTUP1 = -1000299, @@ -570,14 +552,14 @@ public: { npc_wizzlecrank_shredderAI(Creature* creature) : npc_escortAI(creature) { - m_bIsPostEvent = false; - m_uiPostEventTimer = 1000; - m_uiPostEventCount = 0; + IsPostEvent = false; + PostEventTimer = 1000; + PostEventCount = 0; } - bool m_bIsPostEvent; - uint32 m_uiPostEventTimer; - uint32 m_uiPostEventCount; + bool IsPostEvent; + uint32 PostEventTimer; + uint32 PostEventCount; void Reset() { @@ -586,9 +568,9 @@ public: if (me->getStandState() == UNIT_STAND_STATE_DEAD) me->SetStandState(UNIT_STAND_STATE_STAND); - m_bIsPostEvent = false; - m_uiPostEventTimer = 1000; - m_uiPostEventCount = 0; + IsPostEvent = false; + PostEventTimer = 1000; + PostEventCount = 0; } } @@ -610,19 +592,19 @@ public: } break; case 24: - m_bIsPostEvent = true; + IsPostEvent = true; break; } } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 PointId) { Player* player = GetPlayerForEscort(); if (!player) return; - switch (uiPointId) + switch (PointId) { case 9: DoScriptText(SAY_STARTUP2, me, player); @@ -643,15 +625,15 @@ public: summoned->AI()->AttackStart(me); } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 Diff) { if (!UpdateVictim()) { - if (m_bIsPostEvent) + if (IsPostEvent) { - if (m_uiPostEventTimer <= uiDiff) + if (PostEventTimer <= Diff) { - switch (m_uiPostEventCount) + switch (PostEventCount) { case 0: DoScriptText(SAY_PROGRESS_2, me); @@ -671,11 +653,11 @@ public: break; } - ++m_uiPostEventCount; - m_uiPostEventTimer = 5000; + ++PostEventCount; + PostEventTimer = 5000; } else - m_uiPostEventTimer -= uiDiff; + PostEventTimer -= Diff; } return; diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp index 5b77b8dc2c0..b9ae356ddf1 100644 --- a/src/server/scripts/Kalimdor/thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/thousand_needles.cpp @@ -32,14 +32,16 @@ npc_enraged_panther go_panther_cage EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*##### # npc_kanati ######*/ -enum eKanati +enum Kanati { SAY_KAN_START = -1000410, @@ -47,7 +49,7 @@ enum eKanati NPC_GALAK_ASS = 10720 }; -const float m_afGalakLoc[]= {-4867.387695f, -1357.353760f, -48.226f }; +Position const GalakLoc = {-4867.387695f, -1357.353760f, -48.226f, 0.0f}; class npc_kanati : public CreatureScript { @@ -57,10 +59,9 @@ public: bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) { if (quest->GetQuestId() == QUEST_PROTECT_KANATI) - { if (npc_kanatiAI* pEscortAI = CAST_AI(npc_kanati::npc_kanatiAI, creature->AI())) pEscortAI->Start(false, false, player->GetGUID(), quest, true); - } + return true; } @@ -73,7 +74,7 @@ public: { npc_kanatiAI(Creature* creature) : npc_escortAI(creature) { } - void Reset() { } + void Reset() {} void WaypointReached(uint32 waypointId) { @@ -93,9 +94,7 @@ public: void DoSpawnGalak() { for (int i = 0; i < 3; ++i) - me->SummonCreature(NPC_GALAK_ASS, - m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f, - TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + me->SummonCreature(NPC_GALAK_ASS, GalakLoc, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } void JustSummoned(Creature* summoned) @@ -110,7 +109,7 @@ public: # npc_lakota_windsong ######*/ -enum eLakota +enum Lakota { SAY_LAKO_START = -1000365, SAY_LAKO_LOOK_OUT = -1000366, @@ -127,14 +126,14 @@ enum eLakota ID_AMBUSH_3 = 4 }; -float m_afBanditLoc[6][6]= +Position const BanditLoc[6] = { - {-4905.479492f, -2062.732666f, 84.352f}, - {-4915.201172f, -2073.528320f, 84.733f}, - {-4878.883301f, -1986.947876f, 91.966f}, - {-4877.503906f, -1966.113403f, 91.859f}, - {-4767.985352f, -1873.169189f, 90.192f}, - {-4788.861328f, -1888.007813f, 89.888f} + {-4905.479492f, -2062.732666f, 84.352f, 0.0f}, + {-4915.201172f, -2073.528320f, 84.733f, 0.0f}, + {-4878.883301f, -1986.947876f, 91.966f, 0.0f}, + {-4877.503906f, -1966.113403f, 91.859f, 0.0f}, + {-4767.985352f, -1873.169189f, 90.192f, 0.0f}, + {-4788.861328f, -1888.007813f, 89.888f, 0.0f} }; class npc_lakota_windsong : public CreatureScript @@ -164,7 +163,7 @@ public: { npc_lakota_windsongAI(Creature* creature) : npc_escortAI(creature) { } - void Reset() { } + void Reset() {} void WaypointReached(uint32 waypointId) { @@ -189,12 +188,10 @@ public: } } - void DoSpawnBandits(int uiAmbushId) + void DoSpawnBandits(int AmbushId) { for (int i = 0; i < 2; ++i) - me->SummonCreature(NPC_GRIM_BANDIT, - m_afBanditLoc[i+uiAmbushId][0], m_afBanditLoc[i+uiAmbushId][1], m_afBanditLoc[i+uiAmbushId][2], 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_GRIM_BANDIT, BanditLoc[i+AmbushId], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } }; @@ -204,7 +201,7 @@ public: # npc_paoka_swiftmountain ######*/ -enum ePacka +enum Packa { SAY_START = -1000362, SAY_WYVERN = -1000363, @@ -215,11 +212,11 @@ enum ePacka FACTION_ESCORTEE = 232 //guessed }; -float m_afWyvernLoc[3][3]= +Position const WyvernLoc[3] = { - {-4990.606f, -906.057f, -5.343f}, - {-4970.241f, -927.378f, -4.951f}, - {-4985.364f, -952.528f, -5.199f} + {-4990.606f, -906.057f, -5.343f, 0.0f}, + {-4970.241f, -927.378f, -4.951f, 0.0f}, + {-4985.364f, -952.528f, -5.199f, 0.0f} }; class npc_paoka_swiftmountain : public CreatureScript @@ -249,7 +246,7 @@ public: { npc_paoka_swiftmountainAI(Creature* creature) : npc_escortAI(creature) { } - void Reset() { } + void Reset() {} void WaypointReached(uint32 waypointId) { @@ -272,9 +269,7 @@ public: void DoSpawnWyvern() { for (int i = 0; i < 3; ++i) - me->SummonCreature(NPC_WYVERN, - m_afWyvernLoc[i][0], m_afWyvernLoc[i][1], m_afWyvernLoc[i][2], 0.0f, - TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + me->SummonCreature(NPC_WYVERN, WyvernLoc[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } }; }; @@ -285,7 +280,7 @@ public: #define GOSSIP_P "Please tell me the Phrase.." -enum ePlucky +enum Plucky { FACTION_FRIENDLY = 35, QUEST_SCOOP = 1950, @@ -328,17 +323,17 @@ public: struct npc_pluckyAI : public ScriptedAI { - npc_pluckyAI(Creature* creature) : ScriptedAI(creature) { m_uiNormFaction = creature->getFaction(); } + npc_pluckyAI(Creature* creature) : ScriptedAI(creature) { NormFaction = creature->getFaction(); } - uint32 m_uiNormFaction; - uint32 m_uiResetTimer; + uint32 NormFaction; + uint32 ResetTimer; void Reset() { - m_uiResetTimer = 120000; + ResetTimer = 120000; - if (me->getFaction() != m_uiNormFaction) - me->setFaction(m_uiNormFaction); + if (me->getFaction() != NormFaction) + me->setFaction(NormFaction); if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -346,11 +341,11 @@ public: DoCast(me, SPELL_PLUCKY_CHICKEN, false); } - void ReceiveEmote(Player* player, uint32 uiTextEmote) + void ReceiveEmote(Player* player, uint32 TextEmote) { if (player->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) { - if (uiTextEmote == TEXT_EMOTE_BECKON) + if (TextEmote == TEXT_EMOTE_BECKON) { me->setFaction(FACTION_FRIENDLY); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -358,7 +353,7 @@ public: } } - if (uiTextEmote == TEXT_EMOTE_CHICKEN) + if (TextEmote == TEXT_EMOTE_CHICKEN) { if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) return; @@ -372,11 +367,11 @@ public: } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 Diff) { if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) { - if (m_uiResetTimer <= uiDiff) + if (ResetTimer <= Diff) { if (!me->getVictim()) EnterEvadeMode(); @@ -386,7 +381,7 @@ public: return; } else - m_uiResetTimer -= uiDiff; + ResetTimer -= Diff; } if (!UpdateVictim()) @@ -398,7 +393,7 @@ public: }; -enum ePantherCage +enum PantherCage { ENRAGED_PANTHER = 10992 }; diff --git a/src/server/scripts/Kalimdor/thunder_bluff.cpp b/src/server/scripts/Kalimdor/thunder_bluff.cpp index 5aa55ddea66..b8b05b9692f 100644 --- a/src/server/scripts/Kalimdor/thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/thunder_bluff.cpp @@ -23,17 +23,22 @@ SDComment: Quest support: 925 SDCategory: Thunder Bluff EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*##### # npc_cairne_bloodhoof ######*/ -#define SPELL_BERSERKER_CHARGE 16636 -#define SPELL_CLEAVE 16044 -#define SPELL_MORTAL_STRIKE 16856 -#define SPELL_THUNDERCLAP 23931 -#define SPELL_UPPERCUT 22916 +enum CairneBloodhoof +{ + SPELL_BERSERKER_CHARGE = 16636, + SPELL_CLEAVE = 16044, + SPELL_MORTAL_STRIKE = 16856, + SPELL_THUNDERCLAP = 23931, + SPELL_UPPERCUT = 22916 +}; #define GOSSIP_HCB "I know this is rather silly but a young ward who is a bit shy would like your hoofprint." //TODO: verify abilities/timers @@ -75,19 +80,19 @@ public: { npc_cairne_bloodhoofAI(Creature* creature) : ScriptedAI(creature) {} - uint32 BerserkerCharge_Timer; - uint32 Cleave_Timer; - uint32 MortalStrike_Timer; - uint32 Thunderclap_Timer; - uint32 Uppercut_Timer; + uint32 BerserkerChargeTimer; + uint32 CleaveTimer; + uint32 MortalStrikeTimer; + uint32 ThunderclapTimer; + uint32 UppercutTimer; void Reset() { - BerserkerCharge_Timer = 30000; - Cleave_Timer = 5000; - MortalStrike_Timer = 10000; - Thunderclap_Timer = 15000; - Uppercut_Timer = 10000; + BerserkerChargeTimer = 30000; + CleaveTimer = 5000; + MortalStrikeTimer = 10000; + ThunderclapTimer = 15000; + UppercutTimer = 10000; } void EnterCombat(Unit* /*who*/) {} @@ -97,37 +102,37 @@ public: if (!UpdateVictim()) return; - if (BerserkerCharge_Timer <= diff) + if (BerserkerChargeTimer <= diff) { Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); if (target) DoCast(target, SPELL_BERSERKER_CHARGE); - BerserkerCharge_Timer = 25000; - } else BerserkerCharge_Timer -= diff; + BerserkerChargeTimer = 25000; + } else BerserkerChargeTimer -= diff; - if (Uppercut_Timer <= diff) + if (UppercutTimer <= diff) { DoCast(me->getVictim(), SPELL_UPPERCUT); - Uppercut_Timer = 20000; - } else Uppercut_Timer -= diff; + UppercutTimer = 20000; + } else UppercutTimer -= diff; - if (Thunderclap_Timer <= diff) + if (ThunderclapTimer <= diff) { DoCast(me->getVictim(), SPELL_THUNDERCLAP); - Thunderclap_Timer = 15000; - } else Thunderclap_Timer -= diff; + ThunderclapTimer = 15000; + } else ThunderclapTimer -= diff; - if (MortalStrike_Timer <= diff) + if (MortalStrikeTimer <= diff) { DoCast(me->getVictim(), SPELL_MORTAL_STRIKE); - MortalStrike_Timer = 15000; - } else MortalStrike_Timer -= diff; + MortalStrikeTimer = 15000; + } else MortalStrikeTimer -= diff; - if (Cleave_Timer <= diff) + if (CleaveTimer <= diff) { DoCast(me->getVictim(), SPELL_CLEAVE); - Cleave_Timer = 7000; - } else Cleave_Timer -= diff; + CleaveTimer = 7000; + } else CleaveTimer -= diff; DoMeleeAttackIfReady(); } diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp index 232dba404e0..786d2fc0cd3 100644 --- a/src/server/scripts/Kalimdor/ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp @@ -28,11 +28,12 @@ npc_a-me npc_ringo EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" -enum eAMeData +enum AmeData { SAY_READY = -1000517, SAY_AGGRO1 = -1000518, @@ -76,41 +77,40 @@ public: { npc_ameAI(Creature* creature) : npc_escortAI(creature) {} - uint32 DEMORALIZINGSHOUT_Timer; + uint32 DemoralizingShoutTimer; void WaypointReached(uint32 waypointId) { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 19: - me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - DoScriptText(SAY_AGGRO1, me, player); - break; - case 28: - DoScriptText(SAY_SEARCH, me, player); - break; - case 38: - me->SummonCreature(ENTRY_TARLORD, -6370.75f, -1382.84f, -270.51f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - DoScriptText(SAY_AGGRO2, me, player); - break; - case 49: - me->SummonCreature(ENTRY_TARLORD1, -6324.44f, -1181.05f, -270.17f, 4.34f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - DoScriptText(SAY_AGGRO3, me, player); - break; - case 55: - DoScriptText(SAY_FINISH, me, player); - player->GroupEventHappens(QUEST_CHASING_AME, me); - break; + switch (waypointId) + { + case 19: + me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + DoScriptText(SAY_AGGRO1, me, player); + break; + case 28: + DoScriptText(SAY_SEARCH, me, player); + break; + case 38: + me->SummonCreature(ENTRY_TARLORD, -6370.75f, -1382.84f, -270.51f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + DoScriptText(SAY_AGGRO2, me, player); + break; + case 49: + me->SummonCreature(ENTRY_TARLORD1, -6324.44f, -1181.05f, -270.17f, 4.34f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + DoScriptText(SAY_AGGRO3, me, player); + break; + case 55: + DoScriptText(SAY_FINISH, me, player); + player->GroupEventHappens(QUEST_CHASING_AME, me); + break; + } } } void Reset() { - DEMORALIZINGSHOUT_Timer = 5000; + DemoralizingShoutTimer = 5000; } void JustSummoned(Creature* summoned) @@ -130,11 +130,11 @@ public: if (!UpdateVictim()) return; - if (DEMORALIZINGSHOUT_Timer <= diff) + if (DemoralizingShoutTimer <= diff) { DoCast(me->getVictim(), SPELL_DEMORALIZINGSHOUT); - DEMORALIZINGSHOUT_Timer = 70000; - } else DEMORALIZINGSHOUT_Timer -= diff; + DemoralizingShoutTimer = 70000; + } else DemoralizingShoutTimer -= diff; } }; }; @@ -143,7 +143,7 @@ public: # npc_ringo ####*/ -enum eRingo +enum Ringo { SAY_RIN_START_1 = -1000416, SAY_RIN_START_2 = -1000417, @@ -201,17 +201,17 @@ public: { npc_ringoAI(Creature* creature) : FollowerAI(creature) { } - uint32 m_uiFaintTimer; - uint32 m_uiEndEventProgress; - uint32 m_uiEndEventTimer; + uint32 FaintTimer; + uint32 EndEventProgress; + uint32 EndEventTimer; uint64 SpraggleGUID; void Reset() { - m_uiFaintTimer = urand(30000, 60000); - m_uiEndEventProgress = 0; - m_uiEndEventTimer = 1000; + FaintTimer = urand(30000, 60000); + EndEventProgress = 0; + EndEventTimer = 1000; SpraggleGUID = 0; } @@ -266,13 +266,13 @@ public: SetFollowPaused(false); } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 Diff) { if (!UpdateVictim()) { if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { - if (m_uiEndEventTimer <= uiDiff) + if (EndEventTimer <= Diff) { Unit* pSpraggle = Unit::GetUnit(*me, SpraggleGUID); if (!pSpraggle || !pSpraggle->isAlive()) @@ -281,64 +281,61 @@ public: return; } - switch (m_uiEndEventProgress) + switch (EndEventProgress) { case 1: DoScriptText(SAY_RIN_END_1, me); - m_uiEndEventTimer = 3000; + EndEventTimer = 3000; break; case 2: DoScriptText(SAY_SPR_END_2, pSpraggle); - m_uiEndEventTimer = 5000; + EndEventTimer = 5000; break; case 3: DoScriptText(SAY_RIN_END_3, me); - m_uiEndEventTimer = 1000; + EndEventTimer = 1000; break; case 4: DoScriptText(EMOTE_RIN_END_4, me); SetFaint(); - m_uiEndEventTimer = 9000; + EndEventTimer = 9000; break; case 5: DoScriptText(EMOTE_RIN_END_5, me); ClearFaint(); - m_uiEndEventTimer = 1000; + EndEventTimer = 1000; break; case 6: DoScriptText(SAY_RIN_END_6, me); - m_uiEndEventTimer = 3000; + EndEventTimer = 3000; break; case 7: DoScriptText(SAY_SPR_END_7, pSpraggle); - m_uiEndEventTimer = 10000; + EndEventTimer = 10000; break; case 8: DoScriptText(EMOTE_RIN_END_8, me); - m_uiEndEventTimer = 5000; + EndEventTimer = 5000; break; case 9: SetFollowComplete(); break; } - ++m_uiEndEventProgress; + ++EndEventProgress; } else - m_uiEndEventTimer -= uiDiff; + EndEventTimer -= Diff; } - else if (HasFollowState(STATE_FOLLOW_INPROGRESS)) + else if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !HasFollowState(STATE_FOLLOW_PAUSED)) { - if (!HasFollowState(STATE_FOLLOW_PAUSED)) + if (FaintTimer <= Diff) { - if (m_uiFaintTimer <= uiDiff) - { - SetFaint(); - m_uiFaintTimer = urand(60000, 120000); - } - else - m_uiFaintTimer -= uiDiff; + SetFaint(); + FaintTimer = urand(60000, 120000); } + else + FaintTimer -= Diff; } return; diff --git a/src/server/scripts/Kalimdor/winterspring.cpp b/src/server/scripts/Kalimdor/winterspring.cpp index ab5e4c4023a..a02156ee110 100644 --- a/src/server/scripts/Kalimdor/winterspring.cpp +++ b/src/server/scripts/Kalimdor/winterspring.cpp @@ -29,7 +29,9 @@ npc_rivern_frostwind npc_witch_doctor_mauari EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_lorax diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index 3158d58716f..1469e26fd20 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -18,53 +18,6 @@ #include "ScriptPCH.h" #include "forge_of_souls.h" -enum Spells -{ - //Spiteful Apparition - SPELL_SPITE = 68895, - H_SPELL_SPITE = 70212, - - //Spectral Warden - SPELL_VEIL_OF_SHADOWS = 69633, - SPELL_WAIL_OF_SOULS = 69148, - H_SPELL_WAIL_OF_SOULS = 70210, - - //Soulguard Watchman - SPELL_SHROUD_OF_RUNES = 69056, - SPELL_UNHOLY_RAGE = 69053, - - //Soulguard Reaper - SPELL_FROST_NOVA = 69060, - H_SPELL_FROST_NOVA = 70209, - SPELL_SHADOW_LANCE = 69058, - - //Soulguard Bonecaster - SPELL_BONE_VOLLEY = 69080, - H_SPELL_BONE_VOLLEY = 70206, - SPELL_RAISE_DEAD = 69562, - SPELL_SHIELD_OF_BONES = 69069, - H_SPELL_SHIELD_OF_BONES = 70207, - - //Soulguard Animator - // Raise dead 69562 - SPELL_SHADOW_BOLT = 69068, - H_SPELL_SHADOW_BOLT = 70208, - SPELL_SOUL_SICKNESS = 69131, - SPELL_SOUL_SIPHON = 69128, - - //Soulguard Adept - //Raise dead 69562 - //Shadow Bolt 69068/70208 - SPELL_DRAIN_LIFE = 69066, - H_SPELL_DRAIN_LIFE = 70213, - SPELL_SHADOW_MEND = 69564, - H_SPELL_SHADOW_MEND = 70205, - - //Soul Horror - SPELL_SOUL_STRIKE = 69088, - H_SPELL_SOUL_STRIKE = 70211, -}; - enum Events { EVENT_NONE, @@ -78,38 +31,6 @@ enum Events EVENT_INTRO_6, EVENT_INTRO_7, EVENT_INTRO_8, - - //Spiteful Apparition - EVENT_SPITE, - - //Spectral Warden - EVENT_VEIL_OF_SHADOWS, - EVENT_WAIL_OF_SOULS, - - //Soulguard Watchman - EVENT_SHROUD_OF_RUNES, - EVENT_UNHOLY_RAGE, - - //Soulguard Reaper - EVENT_FROST_NOVA, - EVENT_SHADOW_LANCE, - - //Soulguard Bonecaster - EVENT_BONE_VOLLEY, - EVENT_RAISE_DEAD, - EVENT_SHIELD_OF_BONES, - - //Soulguard Animator - EVENT_SHADOW_BOLT, - EVENT_SOUL_SICKNESS, - EVENT_SOUL_SIPHON, - - //Soulguard Adept - EVENT_DRAIN_LIFE, - EVENT_SHADOW_MEND, - - //Soul Horror - EVENT_SOUL_STRIKE, }; /****************************************SYLVANAS************************************/ @@ -410,508 +331,8 @@ public: } }; -class mob_spiteful_apparition : public CreatureScript -{ -public: - mob_spiteful_apparition() : CreatureScript("mob_spiteful_apparition") { } - - struct mob_spiteful_apparitionAI: public ScriptedAI - { - mob_spiteful_apparitionAI(Creature* creature) : ScriptedAI(creature) - { - } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_SPITE, 8000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SPITE: - DoCastVictim(SPELL_SPITE); - events.RescheduleEvent(EVENT_SPITE, 8000); - return; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_spiteful_apparitionAI(creature); - } -}; - -class mob_spectral_warden : public CreatureScript -{ -public: - mob_spectral_warden() : CreatureScript("mob_spectral_warden") { } - - struct mob_spectral_wardenAI: public ScriptedAI - { - mob_spectral_wardenAI(Creature* creature) : ScriptedAI(creature) - { - } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_VEIL_OF_SHADOWS, 5000); - events.ScheduleEvent(EVENT_WAIL_OF_SOULS, 10000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_VEIL_OF_SHADOWS: - DoCastVictim(SPELL_VEIL_OF_SHADOWS); - events.RescheduleEvent(EVENT_VEIL_OF_SHADOWS, 10000); - return; - case EVENT_WAIL_OF_SOULS: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_WAIL_OF_SOULS); - events.RescheduleEvent(EVENT_WAIL_OF_SOULS, 5000); - return; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_spectral_wardenAI(creature); - } -}; - -class mob_soulguard_watchman : public CreatureScript -{ -public: - mob_soulguard_watchman() : CreatureScript("mob_soulguard_watchman") { } - - struct mob_soulguard_watchmanAI: public ScriptedAI - { - mob_soulguard_watchmanAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_SHROUD_OF_RUNES, 1000); - events.ScheduleEvent(EVENT_UNHOLY_RAGE, 1000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SHROUD_OF_RUNES: - DoCast(me, SPELL_SHROUD_OF_RUNES); - events.RescheduleEvent(EVENT_SHROUD_OF_RUNES, 5000); - return; - case EVENT_UNHOLY_RAGE: - DoCast(me, SPELL_UNHOLY_RAGE); - events.RescheduleEvent(EVENT_UNHOLY_RAGE, 99999); - return; - } - } - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_soulguard_watchmanAI(creature); - } -}; - -class mob_soulguard_reaper : public CreatureScript -{ -public: - mob_soulguard_reaper() : CreatureScript("mob_soulguard_reaper") { } - - struct mob_soulguard_reaperAI: public ScriptedAI - { - mob_soulguard_reaperAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_FROST_NOVA, 8000); - events.ScheduleEvent(EVENT_SHADOW_LANCE, 5000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_FROST_NOVA: - DoCast(me, SPELL_FROST_NOVA); - events.RescheduleEvent(EVENT_FROST_NOVA, 9600); - return; - case EVENT_SHADOW_LANCE: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SHADOW_LANCE); - events.RescheduleEvent(EVENT_SHADOW_LANCE, 8000); - return; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_soulguard_reaperAI(creature); - } -}; - -class mob_soulguard_bonecaster : public CreatureScript -{ -public: - mob_soulguard_bonecaster() : CreatureScript("mob_soulguard_bonecaster") { } - - struct mob_soulguard_bonecasterAI: public ScriptedAI - { - mob_soulguard_bonecasterAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_BONE_VOLLEY, 6000); - events.ScheduleEvent(EVENT_RAISE_DEAD, 25000); - events.ScheduleEvent(EVENT_SHIELD_OF_BONES, 6000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_BONE_VOLLEY: - DoCastAOE(SPELL_BONE_VOLLEY); - events.RescheduleEvent(EVENT_BONE_VOLLEY, 7000); - return; - case EVENT_RAISE_DEAD: - DoCast(me, SPELL_RAISE_DEAD); - events.RescheduleEvent(EVENT_RAISE_DEAD, 25000); - return; - case EVENT_SHIELD_OF_BONES: - DoCast(me, SPELL_SHIELD_OF_BONES); - events.RescheduleEvent(EVENT_SHIELD_OF_BONES, 8000); - return; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_soulguard_bonecasterAI(creature); - } -}; - -class mob_soulguard_animator : public CreatureScript -{ -public: - mob_soulguard_animator() : CreatureScript("mob_soulguard_animator") { } - - struct mob_soulguard_animatorAI : public ScriptedAI - { - mob_soulguard_animatorAI(Creature* creature) : ScriptedAI(creature) - { - } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_RAISE_DEAD, 25000); - events.ScheduleEvent(EVENT_SHADOW_BOLT, 5000); - events.ScheduleEvent(EVENT_SOUL_SICKNESS, 8000); - events.ScheduleEvent(EVENT_SOUL_SIPHON, 10000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_RAISE_DEAD: - DoCast(me, SPELL_RAISE_DEAD); - events.RescheduleEvent(EVENT_RAISE_DEAD, 25000); - return; - case EVENT_SHADOW_BOLT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SHADOW_BOLT); - events.RescheduleEvent(EVENT_SHADOW_BOLT, 5000); - return; - case EVENT_SOUL_SICKNESS: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SOUL_SICKNESS); - events.RescheduleEvent(EVENT_SOUL_SICKNESS, 10000); - return; - case EVENT_SOUL_SIPHON: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SOUL_SIPHON); - events.RescheduleEvent(EVENT_SOUL_SIPHON, 8000); - return; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_soulguard_animatorAI(creature); - } -}; - -class mob_soulguard_adept : public CreatureScript -{ -public: - mob_soulguard_adept() : CreatureScript("mob_soulguard_adept") { } - - struct mob_soulguard_adeptAI: public ScriptedAI - { - mob_soulguard_adeptAI(Creature* creature) : ScriptedAI(creature) - { - } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_RAISE_DEAD, 25000); - events.ScheduleEvent(EVENT_SHADOW_BOLT, 8000); - events.ScheduleEvent(EVENT_DRAIN_LIFE, 7000); - events.ScheduleEvent(EVENT_SHADOW_MEND, 35000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_RAISE_DEAD: - DoCast(me, SPELL_RAISE_DEAD); - events.RescheduleEvent(EVENT_RAISE_DEAD, 25000); - return; - case EVENT_SHADOW_BOLT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SHADOW_BOLT); - events.RescheduleEvent(EVENT_SHADOW_BOLT, 4000); - return; - case EVENT_DRAIN_LIFE: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_DRAIN_LIFE); - events.RescheduleEvent(EVENT_DRAIN_LIFE, 9000); - return; - case EVENT_SHADOW_MEND: - DoCast(me, SPELL_SHADOW_MEND); - events.RescheduleEvent(EVENT_SHADOW_MEND, 20000); - return; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_soulguard_adeptAI(creature); - } -}; - -class mob_soul_horror : public CreatureScript -{ -public: - mob_soul_horror() : CreatureScript("mob_soul_horror") { } - - struct mob_soul_horrorAI : public ScriptedAI - { - mob_soul_horrorAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap events; - - void Reset() - { - events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - events.ScheduleEvent(EVENT_SOUL_STRIKE, 6000); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SOUL_STRIKE: - DoCast(me->getVictim(), SPELL_SOUL_STRIKE); - events.RescheduleEvent(EVENT_SOUL_STRIKE, 8000); - return; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_soul_horrorAI(creature); - } -}; - void AddSC_forge_of_souls() { new npc_sylvanas_fos(); new npc_jaina_fos(); - new mob_spiteful_apparition(); - new mob_spectral_warden(); - new mob_soulguard_watchman(); - new mob_soulguard_reaper(); - new mob_soulguard_bonecaster(); - new mob_soulguard_animator(); - new mob_soulguard_adept(); - new mob_soul_horror(); } diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 64609efd7ff..a3b8c5df4e7 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -20,14 +20,15 @@ enum Yells { - SAY_AGGRO = -1658001, - SAY_SLAY_1 = -1658002, - SAY_SLAY_2 = -1658003, - SAY_DEATH = -1658004, - SAY_PHASE2 = -1658005, - SAY_PHASE3 = -1658006, - - SAY_TYRANNUS_DEATH = -1658007, + SAY_AGGRO = 0, + SAY_PHASE2 = 1, + SAY_PHASE3 = 2, + SAY_DEATH = 3, + SAY_SLAY = 4, + SAY_THROW_SARONITE = 5, + SAY_CAST_DEEP_FREEZE = 6, + + SAY_TYRANNUS_DEATH = -1658007, // todo }; enum Spells @@ -107,8 +108,9 @@ class boss_garfrost : public CreatureScript void EnterCombat(Unit* /*who*/) { - DoScriptText(SAY_AGGRO, me); + Talk(SAY_AGGRO); DoCast(me, SPELL_PERMAFROST); + me->CallForHelp(70.0f); events.ScheduleEvent(EVENT_THROW_SARONITE, 7000); instance->SetBossState(DATA_GARFROST, IN_PROGRESS); @@ -117,12 +119,13 @@ class boss_garfrost : public CreatureScript void KilledUnit(Unit* victim) { if (victim->GetTypeId() == TYPEID_PLAYER) - DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); + Talk(SAY_SLAY); } void JustDied(Unit* /*killer*/) { - DoScriptText(SAY_DEATH, me); + Talk(SAY_DEATH); + if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS))) DoScriptText(SAY_TYRANNUS_DEATH, tyrannus); @@ -134,6 +137,7 @@ class boss_garfrost : public CreatureScript if (events.GetPhaseMask() & PHASE_ONE_MASK && !HealthAbovePct(66)) { events.SetPhase(PHASE_TWO); + Talk(SAY_PHASE2); events.DelayEvents(8000); DoCast(me, SPELL_THUNDERING_STOMP); events.ScheduleEvent(EVENT_JUMP, 1500); @@ -143,6 +147,7 @@ class boss_garfrost : public CreatureScript if (events.GetPhaseMask() & PHASE_TWO_MASK && !HealthAbovePct(33)) { events.SetPhase(PHASE_THREE); + Talk(SAY_PHASE3); events.DelayEvents(8000); DoCast(me, SPELL_THUNDERING_STOMP); events.ScheduleEvent(EVENT_JUMP, 1500); @@ -199,7 +204,10 @@ class boss_garfrost : public CreatureScript { case EVENT_THROW_SARONITE: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + Talk(SAY_THROW_SARONITE); DoCast(target, SPELL_THROW_SARONITE); + } events.ScheduleEvent(EVENT_THROW_SARONITE, urand(12500, 20000)); break; case EVENT_CHILLING_WAVE: @@ -208,7 +216,10 @@ class boss_garfrost : public CreatureScript break; case EVENT_DEEP_FREEZE: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + Talk(SAY_CAST_DEEP_FREEZE); DoCast(target, SPELL_DEEP_FREEZE); + } events.ScheduleEvent(EVENT_DEEP_FREEZE, 35000, 0, PHASE_THREE); break; case EVENT_JUMP: diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index 24529801564..1301acf4c99 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -23,6 +23,13 @@ Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f}; // position for Jaina and Sylvanas Position const EventLeaderPos2 = {1054.368f, 107.14620f, 628.4467f, 0.0f}; +DoorData const Doors[] = +{ + {GO_ICE_WALL, DATA_GARFROST, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, + {GO_ICE_WALL, DATA_ICK, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, + {GO_HALLS_OF_REFLECTION_PORTCULLIS, DATA_TYRANNUS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, +}; + class instance_pit_of_saron : public InstanceMapScript { public: @@ -33,6 +40,7 @@ class instance_pit_of_saron : public InstanceMapScript instance_pit_of_saron_InstanceScript(Map* map) : InstanceScript(map) { SetBossNumber(MAX_ENCOUNTER); + LoadDoorData(Doors); _garfrostGUID = 0; _krickGUID = 0; _ickGUID = 0; @@ -154,6 +162,28 @@ class instance_pit_of_saron : public InstanceMapScript } } + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_ICE_WALL: + case GO_HALLS_OF_REFLECTION_PORTCULLIS: + AddDoor(go, true); + break; + } + } + + void OnGameObjectRemove(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_ICE_WALL: + case GO_HALLS_OF_REFLECTION_PORTCULLIS: + AddDoor(go, false); + break; + } + } + bool SetBossState(uint32 type, EncounterState state) { if (!InstanceScript::SetBossState(type, state)) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp index 70d72e52e67..b6c821ef66a 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp @@ -25,9 +25,6 @@ enum eSpells SPELL_HELLFIRE = 69586, SPELL_TACTICAL_BLINK = 69584, SPELL_FROST_BREATH = 69527, //Iceborn Proto-Drake - SPELL_BLINDING_DIRT = 70302, //Wrathbone Laborer - SPELL_PUNCTURE_WOUND = 70278, - SPELL_SHOVELLED = 69572, SPELL_LEAPING_FACE_MAUL = 69504, // Geist Ambusher }; @@ -36,11 +33,6 @@ enum eEvents // Ymirjar Flamebearer EVENT_FIREBALL = 1, EVENT_TACTICAL_BLINK = 2, - - //Wrathbone Laborer - EVENT_BLINDING_DIRT = 3, - EVENT_PUNCTURE_WOUND = 4, - EVENT_SHOVELLED = 5, }; class mob_ymirjar_flamebearer : public CreatureScript @@ -157,73 +149,6 @@ class mob_iceborn_protodrake : public CreatureScript } }; -class mob_wrathbone_laborer : public CreatureScript -{ - public: - mob_wrathbone_laborer() : CreatureScript("mob_wrathbone_laborer") { } - - struct mob_wrathbone_laborerAI: public ScriptedAI - { - mob_wrathbone_laborerAI(Creature* creature) : ScriptedAI(creature) - { - } - - void Reset() - { - _events.Reset(); - } - - void EnterCombat(Unit* /*who*/) - { - _events.ScheduleEvent(EVENT_BLINDING_DIRT, 8000); - _events.ScheduleEvent(EVENT_PUNCTURE_WOUND, 9000); - _events.ScheduleEvent(EVENT_SHOVELLED, 5000); - } - - void UpdateAI(const uint32 diff) - { - if (!UpdateVictim()) - return; - - _events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_BLINDING_DIRT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 10.0f, true)) - DoCast(target, SPELL_BLINDING_DIRT); - _events.RescheduleEvent(EVENT_BLINDING_DIRT, 10000); - return; - case EVENT_PUNCTURE_WOUND: - DoCastVictim(SPELL_PUNCTURE_WOUND); - _events.RescheduleEvent(EVENT_PUNCTURE_WOUND, 9000); - return; - case EVENT_SHOVELLED: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, -5.0f)) - DoCast(target, SPELL_SHOVELLED); - _events.RescheduleEvent(EVENT_SHOVELLED, 7000); - return; - } - } - - DoMeleeAttackIfReady(); - } - - private: - EventMap _events; - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new mob_wrathbone_laborerAI(creature); - } -}; - class mob_geist_ambusher : public CreatureScript { public: @@ -310,7 +235,6 @@ class spell_trash_mob_glacial_strike : public SpellScriptLoader void AddSC_pit_of_saron() { new mob_ymirjar_flamebearer(); - new mob_wrathbone_laborer(); new mob_iceborn_protodrake(); new mob_geist_ambusher(); new spell_trash_mob_glacial_strike(); diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h index 728e0ccd955..768c3ba40ec 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h @@ -90,6 +90,8 @@ enum CreatureIds enum GameObjectIds { GO_SARONITE_ROCK = 196485, + GO_ICE_WALL = 201885, + GO_HALLS_OF_REFLECTION_PORTCULLIS = 201848, }; #endif diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 5b208768b0c..fab9a5f0740 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -1290,7 +1290,7 @@ struct npc_argent_captainAI : public ScriptedAI if (spell->Id == SPELL_REVIVE_CHAMPION && !IsUndead) { IsUndead = true; - me->setDeathState(JUST_ALIVED); + me->setDeathState(JUST_RESPAWNED); uint32 newEntry = 0; switch (me->GetEntry()) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 661b3530bb8..2af73389ecb 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -1044,7 +1044,7 @@ class spell_algalon_phase_punch : public SpellScriptLoader { PrepareAuraScript(spell_algalon_phase_punch_AuraScript); - void HandlePeriodic(AuraEffect const* aurEff) + void HandlePeriodic(AuraEffect const* /*aurEff*/) { PreventDefaultAction(); if (GetStackAmount() != 1) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp index 3f01f21b189..58ba125b994 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp @@ -18,18 +18,27 @@ #include "ScriptMgr.h" #include "ulduar.h" -enum Sara_Yells +enum Sara { - SAY_SARA_PREFIGHT_1 = -1603310, - SAY_SARA_PREFIGHT_2 = -1603311, - SAY_SARA_AGGRO_1 = -1603312, - SAY_SARA_AGGRO_2 = -1603313, - SAY_SARA_AGGRO_3 = -1603314, - SAY_SARA_SLAY_1 = -1603315, - SAY_SARA_SLAY_2 = -1603316, - WHISP_SARA_INSANITY = -1603317, - SAY_SARA_PHASE2_1 = -1603318, - SAY_SARA_PHASE2_2 = -1603319, + // text + YELL_SARA_PREFIGHT = 0, + YELL_COMBAT_PHASE_1 = 1, + YELL_COMBAT_PHASE_2 = 2, + YELL_SLAY = 3, + + // Phase 1 spells + SPELL_SARAS_ANGER_1 = 63147, // Target Entry 33136 + SPELL_SARAS_ANGER_2 = 63744, // Target Entry 33136 + SPELL_SARAS_FEVOR_1 = 63138, // Target Player + SPELL_SARAS_FEVOR_2 = 63747, // Target Player + SPELL_SARAS_BLESSING_1 = 63134, // Target Player + SPELL_SARAS_BLESSING_2 = 63745, // Target Self + + // Phase 2 spells + SPELL_PHYCHOSIS = 63795, // Target Self + SPELL_MALADY_OF_THE_MIND = 63830, // Target Self + SPELL_DEATH_RAY = 63891, // Target Self + SPELL_BRAIN_LINK = 63802, // Target Self }; enum YoggSaron_Yells diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 79c54880430..37a13388b5f 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -690,7 +690,8 @@ public: { AddWave(); bActive = false; - uiActivationTimer = 5000; + // 1 minute waiting time after each boss fight + uiActivationTimer = (uiWaveCount == 6 || uiWaveCount == 12) ? 60000 : 5000; } else uiActivationTimer -= diff; } diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 13190ed013f..36dcb53ad00 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -750,8 +750,26 @@ class spell_dk_death_coil : public SpellScriptLoader } } + SpellCastResult CheckCast() + { + Unit* caster = GetCaster(); + if (Unit* target = GetExplTargetUnit()) + { + if (!caster->IsFriendlyTo(target) && !caster->isInFront(target)) + return SPELL_FAILED_UNIT_NOT_INFRONT; + + if (target->IsFriendlyTo(caster) && target->GetCreatureType() != CREATURE_TYPE_UNDEAD) + return SPELL_FAILED_BAD_TARGETS; + } + else + return SPELL_FAILED_BAD_TARGETS; + + return SPELL_CAST_OK; + } + void Register() { + OnCheckCast += SpellCheckCastFn(spell_dk_death_coil_SpellScript::CheckCast); OnEffectHitTarget += SpellEffectFn(spell_dk_death_coil_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 501c7c47676..0c879cfb029 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1513,7 +1513,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader if (group->isLFGGroup()) if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true)) if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId)) - if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty()) + if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty())) if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM) return; // in correct dungeon diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index a7fb2eb9077..896ed331bde 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -137,8 +137,9 @@ class spell_hun_chimera_shot : public SpellScriptLoader { int32 TickCount = aurEff->GetTotalTicks(); spellId = HUNTER_SPELL_CHIMERA_SHOT_SERPENT; - basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellInfo(), aurEff->GetAmount(), DOT, aura->GetStackAmount()); + basePoint = caster->SpellDamageBonusDone(unitTarget, aura->GetSpellInfo(), aurEff->GetAmount(), DOT, aura->GetStackAmount()); ApplyPctN(basePoint, TickCount * 40); + basePoint = unitTarget->SpellDamageBonusTaken(caster, aura->GetSpellInfo(), basePoint, DOT, aura->GetStackAmount()); } // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. else if (familyFlag[1] & 0x00000080) diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index eb2d3187636..09ff5935b6e 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1095,7 +1095,7 @@ class spell_item_shimmering_vessel : public SpellScriptLoader void HandleDummy(SpellEffIndex /* effIndex */) { if (Creature* target = GetHitCreature()) - target->setDeathState(JUST_ALIVED); + target->setDeathState(JUST_RESPAWNED); } void Register() @@ -1748,8 +1748,16 @@ class spell_item_rocket_boots : public SpellScriptLoader caster->CastSpell(caster, SPELL_ROCKET_BOOTS_PROC, true, NULL); } + SpellCastResult CheckCast() + { + if (GetCaster()->IsInWater()) + return SPELL_FAILED_ONLY_ABOVEWATER; + return SPELL_CAST_OK; + } + void Register() { + OnCheckCast += SpellCheckCastFn(spell_item_rocket_boots_SpellScript::CheckCast); OnEffectHitTarget += SpellEffectFn(spell_item_rocket_boots_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -2036,7 +2044,7 @@ public: void HandleDummy(SpellEffIndex /*effIndex*/) { - if (Unit* target = GetHitUnit()) + if (GetHitUnit()) GetCaster()->CastSpell(GetCaster(),SPELL_FORCE_CAST_SUMMON_GNOME_SOUL); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index cf8cae68c58..4baa1eb3735 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -289,8 +289,18 @@ class spell_pal_holy_shock : public SpellScriptLoader { Player* caster = GetCaster()->ToPlayer(); if (Unit* target = GetExplTargetUnit()) - if (!caster->IsFriendlyTo(target) && !caster->IsValidAttackTarget(target)) - return SPELL_FAILED_BAD_TARGETS; + { + if (!caster->IsFriendlyTo(target)) + { + if (!caster->IsValidAttackTarget(target)) + return SPELL_FAILED_BAD_TARGETS; + + if (!caster->isInFront(target)) + return SPELL_FAILED_UNIT_NOT_INFRONT; + } + } + else + return SPELL_FAILED_BAD_TARGETS; return SPELL_CAST_OK; } diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 9d042da0789..810cc20e04b 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1105,6 +1105,63 @@ public: } }; +enum LeaveNothingToChance +{ + NPC_UPPER_MINE_SHAFT = 27436, + NPC_LOWER_MINE_SHAFT = 27437, + + SPELL_UPPER_MINE_SHAFT_CREDIT = 48744, + SPELL_LOWER_MINE_SHAFT_CREDIT = 48745, +}; + +class spell_q12277_wintergarde_mine_explosion : public SpellScriptLoader +{ + public: + spell_q12277_wintergarde_mine_explosion() : SpellScriptLoader("spell_q12277_wintergarde_mine_explosion") { } + + class spell_q12277_wintergarde_mine_explosion_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12277_wintergarde_mine_explosion_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Creature* unitTarget = GetHitCreature()) + { + if (Unit* caster = GetCaster()) + { + if (caster->GetTypeId() == TYPEID_UNIT) + { + if (Unit* owner = caster->GetOwner()) + { + switch (unitTarget->GetEntry()) + { + case NPC_UPPER_MINE_SHAFT: + caster->CastSpell(owner, SPELL_UPPER_MINE_SHAFT_CREDIT, true); + break; + case NPC_LOWER_MINE_SHAFT: + caster->CastSpell(owner, SPELL_LOWER_MINE_SHAFT_CREDIT, true); + break; + default: + break; + } + } + } + } + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_q12277_wintergarde_mine_explosion_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q12277_wintergarde_mine_explosion_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1131,4 +1188,5 @@ void AddSC_quest_spell_scripts() new spell_q14112_14145_chum_the_water(); new spell_q9452_cast_net(); new spell_q12987_read_pronouncement(); + new spell_q12277_wintergarde_mine_explosion(); } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index f16f663ae2d..c9c036d5329 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -213,7 +213,7 @@ class spell_sha_earthbind_totem : public SpellScriptLoader return true; } - void HandleEffectPeriodic(AuraEffect const* aurEff) + void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { if (!GetCaster()) return; @@ -488,7 +488,7 @@ class spell_sha_healing_stream_totem : public SpellScriptLoader if (Unit* owner = caster->GetOwner()) { if (triggeringSpell) - damage = int32(owner->SpellHealingBonus(target, triggeringSpell, damage, HEAL)); + damage = int32(owner->SpellHealingBonusDone(target, triggeringSpell, damage, HEAL)); // Restorative Totems if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, ICON_ID_RESTORATIVE_TOTEMS, 1)) @@ -497,6 +497,8 @@ class spell_sha_healing_stream_totem : public SpellScriptLoader // Glyph of Healing Stream Totem if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_GLYPH_OF_HEALING_STREAM_TOTEM, EFFECT_0)) AddPctN(damage, aurEff->GetAmount()); + + damage = int32(target->SpellHealingBonusTaken(owner, triggeringSpell, damage, HEAL)); } caster->CastCustomSpell(target, SPELL_HEALING_STREAM_TOTEM_HEAL, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID()); } diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 3b683eb5795..0ba5c866d63 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -177,24 +177,27 @@ class spell_warr_deep_wounds : public SpellScriptLoader void HandleDummy(SpellEffIndex /* effIndex */) { int32 damage = GetEffectValue(); + Unit* caster = GetCaster(); if (Unit* target = GetHitUnit()) - if (Unit* caster = GetCaster()) - { - // apply percent damage mods - damage = caster->SpellDamageBonus(target, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE); + { + // apply percent damage mods + damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE); - ApplyPctN(damage, 16 * sSpellMgr->GetSpellRank(GetSpellInfo()->Id)); + ApplyPctN(damage, 16 * sSpellMgr->GetSpellRank(GetSpellInfo()->Id)); + + damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE); + + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_PERIODIC); + uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_PERIODIC); - uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude; + // Add remaining ticks to damage done + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_DEEP_WOUNDS_RANK_PERIODIC, EFFECT_0, caster->GetGUID())) + damage += aurEff->GetAmount() * (ticks - aurEff->GetTickNumber()); - // Add remaining ticks to damage done - if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_DEEP_WOUNDS_RANK_PERIODIC, EFFECT_0, caster->GetGUID())) - damage += aurEff->GetAmount() * (ticks - aurEff->GetTickNumber()); + damage = damage / ticks; - damage = damage / ticks; - caster->CastCustomSpell(target, SPELL_DEEP_WOUNDS_RANK_PERIODIC, &damage, NULL, NULL, true); - } + caster->CastCustomSpell(target, SPELL_DEEP_WOUNDS_RANK_PERIODIC, &damage, NULL, NULL, true); + } } void Register() diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index e1cfd077444..ecd1a439a58 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1975,33 +1975,31 @@ public: class npc_lightwell : public CreatureScript { -public: - npc_lightwell() : CreatureScript("npc_lightwell") { } - - struct npc_lightwellAI : public PassiveAI - { - npc_lightwellAI(Creature* creature) : PassiveAI(creature) {} + public: + npc_lightwell() : CreatureScript("npc_lightwell") { } - void Reset() + struct npc_lightwellAI : public PassiveAI { - DoCast(me, 59907, false); // Spell for Lightwell Charges - } + npc_lightwellAI(Creature* creature) : PassiveAI(creature) + { + DoCast(me, 59907, false); + } - void EnterEvadeMode() - { - if (!me->isAlive()) - return; + void EnterEvadeMode() + { + if (!me->isAlive()) + return; - me->DeleteThreatList(); - me->CombatStop(true); - me->ResetPlayerDamageReq(); - } - }; + me->DeleteThreatList(); + me->CombatStop(true); + me->ResetPlayerDamageReq(); + } + }; - CreatureAI* GetAI(Creature* creature) const - { - return new npc_lightwellAI(creature); - } + CreatureAI* GetAI(Creature* creature) const + { + return new npc_lightwellAI(creature); + } }; enum eTrainingDummy @@ -2099,34 +2097,26 @@ public: class npc_shadowfiend : public CreatureScript { -public: - npc_shadowfiend() : CreatureScript("npc_shadowfiend") { } - - struct npc_shadowfiendAI : public ScriptedAI - { - npc_shadowfiendAI(Creature* creature) : ScriptedAI(creature) {} + public: + npc_shadowfiend() : CreatureScript("npc_shadowfiend") { } - void DamageTaken(Unit* /*killer*/, uint32& damage) + struct npc_shadowfiendAI : public ScriptedAI { - if (me->isSummon()) - if (Unit* owner = me->ToTempSummon()->GetSummoner()) - if (owner->HasAura(GLYPH_OF_SHADOWFIEND) && damage >= me->GetHealth()) - owner->CastSpell(owner, GLYPH_OF_SHADOWFIEND_MANA, true); - } + npc_shadowfiendAI(Creature* creature) : ScriptedAI(creature) {} - void UpdateAI(uint32 const /*diff*/) - { - if (!UpdateVictim()) - return; + void DamageTaken(Unit* /*killer*/, uint32& damage) + { + if (me->isSummon()) + if (Unit* owner = me->ToTempSummon()->GetSummoner()) + if (owner->HasAura(GLYPH_OF_SHADOWFIEND) && damage >= me->GetHealth()) + owner->CastSpell(owner, GLYPH_OF_SHADOWFIEND_MANA, true); + } + }; - DoMeleeAttackIfReady(); + CreatureAI* GetAI(Creature* creature) const + { + return new npc_shadowfiendAI(creature); } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_shadowfiendAI(creature); - } }; /*###### @@ -2193,7 +2183,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_fire_elementalAI(creature); } @@ -2238,7 +2228,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_earth_elementalAI(creature); } @@ -2248,78 +2238,111 @@ public: # npc_wormhole ######*/ -#define GOSSIP_ENGINEERING1 "Borean Tundra." -#define GOSSIP_ENGINEERING2 "Howling Fjord." -#define GOSSIP_ENGINEERING3 "Sholazar Basin." -#define GOSSIP_ENGINEERING4 "Icecrown." -#define GOSSIP_ENGINEERING5 "Storm Peaks." +#define GOSSIP_ENGINEERING1 "Borean Tundra" +#define GOSSIP_ENGINEERING2 "Howling Fjord" +#define GOSSIP_ENGINEERING3 "Sholazar Basin" +#define GOSSIP_ENGINEERING4 "Icecrown" +#define GOSSIP_ENGINEERING5 "Storm Peaks" +#define GOSSIP_ENGINEERING6 "Underground..." -enum eWormhole +enum WormholeSpells { - SPELL_HOWLING_FJORD = 67838, + SPELL_BOREAN_TUNDRA = 67834, SPELL_SHOLAZAR_BASIN = 67835, SPELL_ICECROWN = 67836, SPELL_STORM_PEAKS = 67837, + SPELL_HOWLING_FJORD = 67838, + SPELL_UNDERGROUND = 68081, - TEXT_WORMHOLE = 907 + TEXT_WORMHOLE = 907, + + DATA_SHOW_UNDERGROUND = 1, }; class npc_wormhole : public CreatureScript { -public: - npc_wormhole() : CreatureScript("npc_wormhole") { } + public: + npc_wormhole() : CreatureScript("npc_wormhole") {} - bool OnGossipHello(Player* player, Creature* creature) - { - if (creature->isSummon()) + struct npc_wormholeAI : public PassiveAI + { + npc_wormholeAI(Creature* creature) : PassiveAI(creature) {} + + void InitializeAI() + { + _showUnderground = urand(0, 100) == 0; // Guessed value, it is really rare though + } + + uint32 GetData(uint32 type) + { + return (type == DATA_SHOW_UNDERGROUND && _showUnderground) ? 1 : 0; + } + + private: + bool _showUnderground; + }; + + bool OnGossipHello(Player* player, Creature* creature) { - if (player == creature->ToTempSummon()->GetSummoner()) + if (creature->isSummon()) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + if (player == creature->ToTempSummon()->GetSummoner()) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + + if (creature->AI()->GetData(DATA_SHOW_UNDERGROUND)) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->PlayerTalkClass->SendGossipMenu(TEXT_WORMHOLE, creature->GetGUID()); + player->PlayerTalkClass->SendGossipMenu(TEXT_WORMHOLE, creature->GetGUID()); + } } + + return true; } - return true; - } - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - bool roll = urand(0, 1); + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) + { + player->PlayerTalkClass->ClearMenus(); - switch (action) + switch (action) + { + case GOSSIP_ACTION_INFO_DEF + 1: // Borean Tundra + player->CLOSE_GOSSIP_MENU(); + creature->CastSpell(player, SPELL_BOREAN_TUNDRA, false); + break; + case GOSSIP_ACTION_INFO_DEF + 2: // Howling Fjord + player->CLOSE_GOSSIP_MENU(); + creature->CastSpell(player, SPELL_HOWLING_FJORD, false); + break; + case GOSSIP_ACTION_INFO_DEF + 3: // Sholazar Basin + player->CLOSE_GOSSIP_MENU(); + creature->CastSpell(player, SPELL_SHOLAZAR_BASIN, false); + break; + case GOSSIP_ACTION_INFO_DEF + 4: // Icecrown + player->CLOSE_GOSSIP_MENU(); + creature->CastSpell(player, SPELL_ICECROWN, false); + break; + case GOSSIP_ACTION_INFO_DEF + 5: // Storm peaks + player->CLOSE_GOSSIP_MENU(); + creature->CastSpell(player, SPELL_STORM_PEAKS, false); + break; + case GOSSIP_ACTION_INFO_DEF + 6: // Underground + player->CLOSE_GOSSIP_MENU(); + creature->CastSpell(player, SPELL_UNDERGROUND, false); + break; + } + + return true; + } + + CreatureAI* GetAI(Creature* creature) const { - case GOSSIP_ACTION_INFO_DEF + 1: //Borean Tundra - player->CLOSE_GOSSIP_MENU(); - if (roll) //At the moment we don't have chance on spell_target_position table so we hack this - player->TeleportTo(571, 4305.505859f, 5450.839844f, 63.005806f, 0.627286f); - else - player->TeleportTo(571, 3201.936279f, 5630.123535f, 133.658798f, 3.855272f); - break; - case GOSSIP_ACTION_INFO_DEF + 2: //Howling Fjord - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_HOWLING_FJORD, true); - break; - case GOSSIP_ACTION_INFO_DEF + 3: //Sholazar Basin - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_SHOLAZAR_BASIN, true); - break; - case GOSSIP_ACTION_INFO_DEF + 4: //Icecrown - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_ICECROWN, true); - break; - case GOSSIP_ACTION_INFO_DEF + 5: //Storm peaks - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_STORM_PEAKS, true); - break; + return new npc_wormholeAI(creature); } - return true; - } }; /*###### @@ -2865,7 +2888,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_fireworkAI(creature); } diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index 6bdf3ba9230..d315c6417ea 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -33,6 +33,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PREPARE_STATEMENT(CHAR_SEL_CHAR_CREATE_INFO, "SELECT level, race, class FROM characters WHERE account = ? LIMIT 0, ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_INS_CHARACTER_BAN, "INSERT INTO character_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?, 1)", CONNECTION_ASYNC) PREPARE_STATEMENT(CHAR_UPD_CHARACTER_BAN, "UPDATE character_banned SET active = 0 WHERE guid = ? AND active != 0", CONNECTION_ASYNC) + PREPARE_STATEMENT(CHAR_DEL_CHARACTER_BAN, "DELETE cb FROM character_banned cb INNER JOIN characters c ON c.guid = cb.guid WHERE c.account = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_SEL_BANINFO, "SELECT FROM_UNIXTIME(bandate), unbandate-bandate, active, unbandate, banreason, bannedby FROM character_banned WHERE guid = ? ORDER BY bandate ASC", CONNECTION_SYNCH) PREPARE_STATEMENT(CHAR_SEL_GUID_BY_NAME_FILTER, "SELECT guid, name FROM characters WHERE name LIKE CONCAT('%%', ?, '%%')", CONNECTION_SYNCH) PREPARE_STATEMENT(CHAR_SEL_BANINFO_LIST, "SELECT bandate, unbandate, bannedby, banreason FROM character_banned WHERE guid = ? ORDER BY unbandate", CONNECTION_SYNCH) diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index d2c9f3b3ac4..cf6bbd7bdfa 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -53,6 +53,7 @@ enum CharacterDatabaseStatements CHAR_SEL_CHAR_CREATE_INFO, CHAR_INS_CHARACTER_BAN, CHAR_UPD_CHARACTER_BAN, + CHAR_DEL_CHARACTER_BAN, CHAR_SEL_BANINFO, CHAR_SEL_GUID_BY_NAME_FILTER, CHAR_SEL_BANINFO_LIST, diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp index 70d874be31d..028d927a720 100755 --- a/src/server/shared/Database/Implementation/LoginDatabase.cpp +++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp @@ -33,6 +33,7 @@ void LoginDatabaseConnection::DoPrepareStatements() PREPARE_STATEMENT(LOGIN_SEL_ACCOUNT_BANNED_ALL, "SELECT account.id, username FROM account, account_banned WHERE account.id = account_banned.id AND active = 1 GROUP BY account.id", CONNECTION_SYNCH); PREPARE_STATEMENT(LOGIN_SEL_ACCOUNT_BANNED_BY_USERNAME, "SELECT account.id, username FROM account, account_banned WHERE account.id = account_banned.id AND active = 1 AND username LIKE CONCAT('%%', ?, '%%') GROUP BY account.id", CONNECTION_SYNCH); PREPARE_STATEMENT(LOGIN_INS_ACCOUNT_AUTO_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban', 1)", CONNECTION_ASYNC) + PREPARE_STATEMENT(LOGIN_DEL_ACCOUNT_BANNED, "DELETE FROM account_banned WHERE id = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(LOGIN_SEL_SESSIONKEY, "SELECT a.sessionkey, a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = ?", CONNECTION_SYNCH) PREPARE_STATEMENT(LOGIN_UPD_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?", CONNECTION_ASYNC) PREPARE_STATEMENT(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE username = ?", CONNECTION_ASYNC) @@ -86,5 +87,4 @@ void LoginDatabaseConnection::DoPrepareStatements() PREPARE_STATEMENT(LOGIN_SEL_ACCOUNT_WHOIS, "SELECT username, email, last_ip FROM account WHERE id = ?", CONNECTION_SYNCH); PREPARE_STATEMENT(LOGIN_SEL_REALMLIST_SECURITY_LEVEL, "SELECT allowedSecurityLevel from realmlist WHERE id = ?", CONNECTION_SYNCH); PREPARE_STATEMENT(LOGIN_DEL_ACCOUNT, "DELETE FROM account WHERE id = ?", CONNECTION_ASYNC); - } diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h index 2b9d94cbceb..7c2a94eec94 100755 --- a/src/server/shared/Database/Implementation/LoginDatabase.h +++ b/src/server/shared/Database/Implementation/LoginDatabase.h @@ -51,6 +51,7 @@ enum LoginDatabaseStatements LOGIN_SEL_ACCOUNT_BANNED_ALL, LOGIN_SEL_ACCOUNT_BANNED_BY_USERNAME, LOGIN_INS_ACCOUNT_AUTO_BANNED, + LOGIN_DEL_ACCOUNT_BANNED, LOGIN_SEL_SESSIONKEY, LOGIN_UPD_VS, LOGIN_UPD_LOGONPROOF, diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index 6927fdb483f..48a8bda32ed 100755 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -24,10 +24,10 @@ #include <ace/Stack_Trace.h> #include <ace/OS_NS_unistd.h> -#define WPAssert( assertion ) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError( "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); assert( #assertion &&0 ); ((void(*)())NULL)();} } -#define WPError( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); assert( false ); } -#define WPWarning( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); } -#define WPFatal( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); ACE_OS::sleep(10); assert( #assertion &&0 ); abort(); } +#define WPAssert(assertion) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError("\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); *((volatile int*)NULL) = 0; } } +#define WPError(assertion, errmsg) { if (!(assertion)) { sLog->outError("%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); *((volatile int*)NULL) = 0; } } +#define WPWarning(assertion, errmsg) { if (!(assertion)) { sLog->outError("\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); } } +#define WPFatal(assertion, errmsg) { if (!(assertion)) { sLog->outError("\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); ACE_OS::sleep(10); *((volatile int*)NULL) = 0; } } #define ASSERT WPAssert #endif diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index cf2f2188a70..1505f2c2cee 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -259,15 +259,15 @@ void ReadLiquidTypeTableDBC() exit(1); } - size_t LiqType_count = dbc.getRecordCount(); - size_t LiqType_maxid = dbc.getMaxId(); - LiqType = new uint16[LiqType_maxid + 1]; - memset(LiqType, 0xff, (LiqType_maxid + 1) * sizeof(uint16)); + size_t liqTypeCount = dbc.getRecordCount(); + size_t liqTypeMaxId = dbc.getMaxId(); + LiqType = new uint16[liqTypeMaxId + 1]; + memset(LiqType, 0xff, (liqTypeMaxId + 1) * sizeof(uint16)); - for(uint32 x = 0; x < LiqType_count; ++x) + for(uint32 x = 0; x < liqTypeCount; ++x) LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); - printf("Done! (%u LiqTypes loaded)\n", LiqType_count); + printf("Done! (%u LiqTypes loaded)\n", liqTypeCount); } // @@ -364,7 +364,7 @@ uint8 liquid_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE]; float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; -bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 build) +bool ConvertADT(char *filename, char *filename2, int /*cell_y*/, int /*cell_x*/, uint32 build) { ADT_file adt; diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h index 1f3b259bbfc..89f715e9e87 100644 --- a/src/tools/map_extractor/mpq_libmpq04.h +++ b/src/tools/map_extractor/mpq_libmpq04.h @@ -60,8 +60,8 @@ class MPQFile libmpq__off_t pointer,size; // disable copying - MPQFile(const MPQFile &f) {} - void operator=(const MPQFile &f) {} + MPQFile(const MPQFile& /*f*/) {} + void operator=(const MPQFile& /*f*/) {} public: MPQFile(const char* filename); // filenames are not case sensitive |
