From d09cc1b3976d6a62ebc0ea5bd962eb6c4a27cae2 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 26 Jun 2018 21:57:48 +0200 Subject: [PATCH 1/5] Core/Talents: fixed loading some mastery auras --- src/server/game/Entities/Player/Player.cpp | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 807ccbbbfa1..4b6104c5a24 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -17539,6 +17539,28 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder) SetTalentResetCost(fields[29].GetUInt32()); SetTalentResetTime(time_t(fields[30].GetUInt32())); + SetSpecsCount(fields[58].GetUInt8()); + SetActiveSpec(fields[59].GetUInt8()); + + // sanity check + if (GetSpecsCount() > MAX_TALENT_SPECS || GetActiveSpec() > MAX_TALENT_SPEC || GetSpecsCount() < MIN_TALENT_SPECS) + { + SetActiveSpec(0); + TC_LOG_ERROR("entities.player", "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUID().GetCounter(), GetSpecsCount(), GetActiveSpec()); + } + + // Only load selected specializations, learning mastery spells requires this + Tokenizer talentTrees(fields[31].GetString(), ' ', MAX_TALENT_SPECS); + for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i) + { + if (i >= talentTrees.size()) + break; + + uint32 talentTree = atol(talentTrees[i]); + if (sTalentTabStore.LookupEntry(talentTree)) + SetPrimaryTalentTree(i, talentTree); + } + m_taxi.LoadTaxiMask(fields[22].GetString()); // must be before InitTaxiNodesForLevel uint32 extraflags = fields[37].GetUInt16(); @@ -17625,28 +17647,6 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder) //mails are loaded only when needed ;-) - when player in game click on mailbox. //_LoadMail(); - SetSpecsCount(fields[58].GetUInt8()); - SetActiveSpec(fields[59].GetUInt8()); - - // sanity check - if (GetSpecsCount() > MAX_TALENT_SPECS || GetActiveSpec() > MAX_TALENT_SPEC || GetSpecsCount() < MIN_TALENT_SPECS) - { - SetActiveSpec(0); - TC_LOG_ERROR("entities.player", "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUID().GetCounter(), GetSpecsCount(), GetActiveSpec()); - } - - // Only load selected specializations, learning mastery spells requires this - Tokenizer talentTrees(fields[31].GetString(), ' ', MAX_TALENT_SPECS); - for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i) - { - if (i >= talentTrees.size()) - break; - - uint32 talentTree = atol(talentTrees[i]); - if (sTalentTabStore.LookupEntry(talentTree)) - SetPrimaryTalentTree(i, talentTree); - } - _LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_TALENTS)); _LoadSpells(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELLS)); From 64e8ae5ca9fd4493947b06e95e3f78e7410eeba6 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 26 Jun 2018 22:32:23 +0200 Subject: [PATCH 2/5] Core/Spells: fixed Harmony mastery --- .../world/4.3.4/2018_06_26_11_world.sql | 7 ++++++ src/server/scripts/Spells/spell_druid.cpp | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_06_26_11_world.sql diff --git a/sql/updates/world/4.3.4/2018_06_26_11_world.sql b/sql/updates/world/4.3.4/2018_06_26_11_world.sql new file mode 100644 index 00000000000..346b956a280 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_06_26_11_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc` WHERE `SpellId`= 77495; +INSERT INTO `spell_proc` (`SpellId`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `ProcsPerMinute`, `Chance`, `Cooldown`, `Charges`) VALUES +(77495, 0, 7, 0x00000020 | 0x00000040 , 0x02000000 | 0x00000002, 0x0, 0x00004000, 2, 1, 0, 32, 0, 100, 0, 0); + +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dru_harmony'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(77495,'spell_dru_harmony'); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 208863c37d5..a5a4d298dc1 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -47,6 +47,7 @@ enum DruidSpells SPELL_DRUID_GLYPH_OF_INNERVATE = 54833, SPELL_DRUID_GLYPH_OF_STARFIRE = 54846, SPELL_DRUID_GLYPH_OF_TYPHOON = 62135, + SPELL_DRUID_HARMONY = 100977, SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241, SPELL_DRUID_IDOL_OF_WORSHIP = 60774, SPELL_DRUID_INCREASED_MOONFIRE_DURATION = 38414, @@ -1307,6 +1308,29 @@ class spell_dru_wild_growth : public SpellScriptLoader } }; +// 77495 - Harmony +class spell_dru_harmony : public AuraScript +{ + PrepareAuraScript(spell_dru_harmony); + + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ SPELL_DRUID_HARMONY }); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + int32 amount = aurEff->GetAmount(); + GetTarget()->CastCustomSpell(SPELL_DRUID_HARMONY, SPELLVALUE_BASE_POINT0, amount, GetTarget(), true, nullptr, aurEff); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_dru_harmony::HandleProc, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER); + } +}; + void AddSC_druid_spell_scripts() { RegisterAuraScript(spell_dru_berserk); @@ -1318,6 +1342,7 @@ void AddSC_druid_spell_scripts() new spell_dru_glyph_of_innervate(); new spell_dru_glyph_of_starfire(); new spell_dru_glyph_of_starfire_proc(); + RegisterAuraScript(spell_dru_harmony); new spell_dru_idol_lifebloom(); new spell_dru_innervate(); new spell_dru_insect_swarm(); From c8996cdc8860e0118968d37dee525a3ebf2b6b10 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 26 Jun 2018 22:34:32 +0200 Subject: [PATCH 3/5] fixed another warning... --- src/server/scripts/Spells/spell_druid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index a5a4d298dc1..62048612f1e 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -1313,7 +1313,7 @@ class spell_dru_harmony : public AuraScript { PrepareAuraScript(spell_dru_harmony); - bool Validate(SpellInfo const* spellInfo) override + bool Validate(SpellInfo const* /*spellInfo*/) override { return ValidateSpellInfo({ SPELL_DRUID_HARMONY }); } From 96e9aab5a4f44a7f78e00c9e8abbef90826b2898 Mon Sep 17 00:00:00 2001 From: Killyana Date: Wed, 27 Jun 2018 02:37:22 +0200 Subject: [PATCH 4/5] DB/Creature: Fix Training Dummy auras --- .../world/4.3.4/2018_06_27_00_world.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_06_27_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_06_27_00_world.sql b/sql/updates/world/4.3.4/2018_06_27_00_world.sql new file mode 100644 index 00000000000..4773a133088 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_06_27_00_world.sql @@ -0,0 +1,29 @@ +-- +DELETE FROM `creature_addon` WHERE `guid` IN (314196, 314193, 314185, 314169, 314147, 314150, 314154, 307660, 307668, 307669, 307675, 307676, 307670, 311815, 311816, 311814, 311818, 311817, 311839, 312152, 312158, 312161, 312164); +INSERT INTO `creature_addon` (`guid`, `Auras`) VALUES +-- Stormwind +(314196, '61574 98892'), +(314193, '61574 98892'), +(314185, '61574 98892'), +(314169, '61574 98892'), +(314147, '61574 98892'), +(314150, '61574 98892'), +(314154, '61574 98892'), +-- Ironforge +(307660, '61574 98892'), +(307668, '61574 98892'), +(307669, '61574 98892'), +(307675, '61574 98892'), +(307676, '61574 98892'), +(307670, '61574 98892'), +-- Darnassus +(311815, '61574 98892'), +(311816, '61574 98892'), +(311814, '61574 98892'), +(311818, '61574 98892'), +(311817, '61574 98892'), +(311839, '61574 98892'), +(312152, '61574 98892'), +(312158, '61574 98892'), +(312161, '61574 98892'), +(312164, '61574 98892'); From b4902584ff7f63482f1cd2bfbe9f4e608c7fe65a Mon Sep 17 00:00:00 2001 From: Killyana Date: Wed, 27 Jun 2018 20:02:58 +0200 Subject: [PATCH 5/5] DB/GameObject: The Stonecore normal donjon portal --- sql/updates/world/4.3.4/2018_06_27_01_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_06_27_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_06_27_01_world.sql b/sql/updates/world/4.3.4/2018_06_27_01_world.sql new file mode 100644 index 00000000000..3ccae3dce3f --- /dev/null +++ b/sql/updates/world/4.3.4/2018_06_27_01_world.sql @@ -0,0 +1,4 @@ +-- The Stonecore normal donjon portal +DELETE FROM `gameobject` WHERE `guid`=200868; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseUseFlags`, `phaseMask`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +(200868, 207897, 646, 5042, 5303, 1, 0, 1, 169, 0, -1, 1029.14, 618.686, 155.706, 1.77533, 0, 0, 0.775599, 0.631225, 120, 255, 1, "", 26365);