From fc3ecd460a8beced7011f9da9d110f2fa3d97cd9 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 24 Feb 2021 19:00:12 -0500 Subject: [PATCH] Misc fixes and DB updates --- .../Constants/Spells/SpellAuraConst.cs | 2 +- Source/Game/Handlers/MiscHandler.cs | 14 +++++-------- Source/Game/Networking/Packets/MiscPackets.cs | 10 +++++----- Source/Game/Spells/SpellEffects.cs | 20 ------------------- .../2021_02_22_00_world_druid_skull_bash.sql | 4 ++++ ...21_02_23_00_world_druid_ferocious_bite.sql | 4 ++++ .../world/master/2021_02_24_00_world.sql | 11 ++++++++++ ..._01_world_paladin_spells_remove_unused.sql | 11 ++++++++++ ...2_world_delete_outdate_starting_spells.sql | 2 ++ 9 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 sql/updates/world/master/2021_02_22_00_world_druid_skull_bash.sql create mode 100644 sql/updates/world/master/2021_02_23_00_world_druid_ferocious_bite.sql create mode 100644 sql/updates/world/master/2021_02_24_00_world.sql create mode 100644 sql/updates/world/master/2021_02_24_01_world_paladin_spells_remove_unused.sql create mode 100644 sql/updates/world/master/2021_02_24_02_world_delete_outdate_starting_spells.sql diff --git a/Source/Framework/Constants/Spells/SpellAuraConst.cs b/Source/Framework/Constants/Spells/SpellAuraConst.cs index bc0a9649f..131259714 100644 --- a/Source/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Source/Framework/Constants/Spells/SpellAuraConst.cs @@ -350,7 +350,7 @@ namespace Framework.Constants PhaseGroup = 326, // Phase Related PhaseAlwaysVisible = 327, // NYI - sets PhaseShiftFlags::AlwaysVisible TriggerSpellOnPowerPct = 328, - ModPowerGainPct = 329, // Nyi + ModPowerGainPct = 329, CastWhileWalking = 330, ForceWeather = 331, OverrideActionbarSpells = 332, diff --git a/Source/Game/Handlers/MiscHandler.cs b/Source/Game/Handlers/MiscHandler.cs index 7b7d2adb2..97a1d7b3b 100644 --- a/Source/Game/Handlers/MiscHandler.cs +++ b/Source/Game/Handlers/MiscHandler.cs @@ -821,19 +821,15 @@ namespace Game AdventureJournalDataResponse response = new AdventureJournalDataResponse(); response.OnLevelUp = adventureJournalUpdateSuggestions.OnLevelUp; - int count = 0; + foreach (var adventureJournal in CliDB.AdventureJournalStorage.Values) { - if (count >= 7) - break; - if (_player.MeetPlayerCondition(adventureJournal.PlayerConditionID)) { - AdventureJournalDataInfo dataInfo; - dataInfo.AdventureJournalID = (int)adventureJournal.Id; - dataInfo.Priority = adventureJournal.PriorityMax; - response.AdventureJournalDatas.Add(dataInfo); - count++; + AdventureJournalData adventureJournalData; + adventureJournalData.AdventureJournalID = (int)adventureJournal.Id; + adventureJournalData.Priority = adventureJournal.PriorityMax; + response.AdventureJournalDatas.Add(adventureJournalData); } } diff --git a/Source/Game/Networking/Packets/MiscPackets.cs b/Source/Game/Networking/Packets/MiscPackets.cs index 9bb8a4a5e..c2f0ad37a 100644 --- a/Source/Game/Networking/Packets/MiscPackets.cs +++ b/Source/Game/Networking/Packets/MiscPackets.cs @@ -1366,15 +1366,15 @@ namespace Game.Networking.Packets _worldPacket.WriteBit(OnLevelUp); _worldPacket.FlushBits(); _worldPacket.WriteInt32(AdventureJournalDatas.Count); - foreach (var dataInfo in AdventureJournalDatas) + foreach (var adventureJournal in AdventureJournalDatas) { - _worldPacket.WriteInt32(dataInfo.AdventureJournalID); - _worldPacket.WriteInt32(dataInfo.Priority); + _worldPacket.WriteInt32(adventureJournal.AdventureJournalID); + _worldPacket.WriteInt32(adventureJournal.Priority); } } public bool OnLevelUp; - public List AdventureJournalDatas = new List(); + public List AdventureJournalDatas = new List(); } //Structs @@ -1412,7 +1412,7 @@ namespace Game.Networking.Packets public ObjectGuid PersonalGUID; } - struct AdventureJournalDataInfo + struct AdventureJournalData { public int AdventureJournalID; public int Priority; diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 00d96251a..90f23576c 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -214,26 +214,6 @@ namespace Game.Spells } break; } - case SpellFamilyNames.Warlock: - { - break; - } - case SpellFamilyNames.Priest: - { - break; - } - case SpellFamilyNames.Druid: - { - // Ferocious Bite - if (m_caster.IsTypeId(TypeId.Player) && m_spellInfo.SpellFamilyFlags[3].HasAnyFlag(0x1000u)) - { - // converts each extra point of energy ( up to 25 energy ) into additional damage - int energy = -(m_caster.ModifyPower(PowerType.Energy, -25)); - // 25 energy = 100% more damage - MathFunctions.AddPct(ref damage, energy * 4); - } - break; - } case SpellFamilyNames.Deathknight: { // Blood Boil - bonus for diseased targets diff --git a/sql/updates/world/master/2021_02_22_00_world_druid_skull_bash.sql b/sql/updates/world/master/2021_02_22_00_world_druid_skull_bash.sql new file mode 100644 index 000000000..7b6ef84c3 --- /dev/null +++ b/sql/updates/world/master/2021_02_22_00_world_druid_skull_bash.sql @@ -0,0 +1,4 @@ +-- Attach druid's gore spell script +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dru_skull_bash'); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(106839, 'spell_dru_skull_bash'); diff --git a/sql/updates/world/master/2021_02_23_00_world_druid_ferocious_bite.sql b/sql/updates/world/master/2021_02_23_00_world_druid_ferocious_bite.sql new file mode 100644 index 000000000..12513e5b1 --- /dev/null +++ b/sql/updates/world/master/2021_02_23_00_world_druid_ferocious_bite.sql @@ -0,0 +1,4 @@ +-- Attach ferocious bite script +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_ferocious_bite'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(22568,'spell_dru_ferocious_bite'); diff --git a/sql/updates/world/master/2021_02_24_00_world.sql b/sql/updates/world/master/2021_02_24_00_world.sql new file mode 100644 index 000000000..69a365ce2 --- /dev/null +++ b/sql/updates/world/master/2021_02_24_00_world.sql @@ -0,0 +1,11 @@ +-- Add SL maps to tele locations +SET @TELE_START_ID = 1683; + +DELETE FROM `game_tele` WHERE `id` BETWEEN @TELE_START_ID+0 AND @TELE_START_ID+5; +INSERT INTO `game_tele` (`id`,`position_x`,`position_y`,`position_z`,`orientation`,`map`,`name`) VALUES +(@TELE_START_ID+0,2583,-2521,3308,0,2222,'Maldraxxus'), +(@TELE_START_ID+1,-2943,-4871,6705,0,2222,'Bastion'), +(@TELE_START_ID+2,-6926,883,5669,0,2222,'Ardenweald'), +(@TELE_START_ID+3,-2628,6036,4116,0,2222,'Revendreth'), +(@TELE_START_ID+4,4611,6796,4869,2,2222,'TheMaw'), +(@TELE_START_ID+5,-1834,1542,5275,4.712388,2222,'Oribos'); diff --git a/sql/updates/world/master/2021_02_24_01_world_paladin_spells_remove_unused.sql b/sql/updates/world/master/2021_02_24_01_world_paladin_spells_remove_unused.sql new file mode 100644 index 000000000..4de14d7ba --- /dev/null +++ b/sql/updates/world/master/2021_02_24_01_world_paladin_spells_remove_unused.sql @@ -0,0 +1,11 @@ +-- Remove old unused spell scripts +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_pal_aura_mastery', +'spell_pal_aura_mastery_immune', +'spell_pal_avenging_wrath', +'spell_pal_exorcism_and_holy_wrath_damage', +'spell_pal_eye_for_an_eye', +'spell_pal_righteous_defense', +'spell_pal_sacred_shield', +'spell_pal_shield_of_the_righteous', +'spell_pal_seal_of_righteousness'); diff --git a/sql/updates/world/master/2021_02_24_02_world_delete_outdate_starting_spells.sql b/sql/updates/world/master/2021_02_24_02_world_delete_outdate_starting_spells.sql new file mode 100644 index 000000000..6e590b831 --- /dev/null +++ b/sql/updates/world/master/2021_02_24_02_world_delete_outdate_starting_spells.sql @@ -0,0 +1,2 @@ +-- Delete initial Hunter Pet creation spells +DELETE FROM `playercreateinfo_cast_spell` WHERE `spell` IN (79597,79598,79593,79602,79600,79603,79599,79595,79594,79601,79596,153724);