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/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'); 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); 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)); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 208863c37d5..62048612f1e 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();