Skip to content

Commit

Permalink
Merge 3.3.5 to npcbots_3.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Jul 15, 2022
2 parents 0505fc2 + 13d8676 commit 6d962c5
Show file tree
Hide file tree
Showing 13 changed files with 675 additions and 283 deletions.
80 changes: 80 additions & 0 deletions sql/updates/world/3.3.5/2022_07_10_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
--
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
'spell_magus_telestra_summon_clones',
'spell_magus_telestra_clone_dies');
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(47710,'spell_magus_telestra_summon_clones'),
(47711,'spell_magus_telestra_clone_dies'),
(47712,'spell_magus_telestra_clone_dies'),
(47713,'spell_magus_telestra_clone_dies');

DELETE FROM `spell_target_position` WHERE `ID` = 47754;
INSERT INTO `spell_target_position` (`ID`,`EffectIndex`,`MapID`,`PositionX`,`PositionY`,`PositionZ`,`Orientation`,`VerifiedBuild`) VALUES
(47754,0,576,504.742,88.9122,-16.1245,0,11159);

UPDATE `creature_template` SET `minlevel` = 72, `maxlevel` = 72 WHERE `entry` = 26731;


-- Should be 15214 but it has 2 models.
UPDATE `spell_dbc` SET `ProcChance` = 101, `Effect1` = 6, `EffectImplicitTargetA1` = 1, `EffectApplyAuraName1` = 56, `EffectMiscValue1` = 2334, `DmgMultiplier1` = 1 WHERE `Id` = 41577;

UPDATE `creature_template` SET `BaseAttackTime` = 2000 WHERE `entry` IN (26928,26929,26930);

DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26928,26929,26930) AND `source_type` = 0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2692800,2692900,2693000) AND `source_type` = 9;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26928,0,0,0,37,0,100,0,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On AI Initialize - Set Invincibility HP 1"),
(26928,0,1,0,11,0,100,0,0,0,0,0,0,11,47705,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Spawn - Cast 'Grand Magus Telestra (Fire) Visual'"),
(26928,0,2,0,2,0,100,1,0,1,0,0,0,80,2692800,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - Between 0-1% Health - Run Script (No Repeat)"),
(26928,0,3,0,0,0,100,2,0,0,1600,2400,0,11,47723,64,0,0,0,0,2,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat CMC - Cast 'Scorch'"),
(26928,0,4,0,0,0,100,4,0,0,1600,2400,0,11,56938,64,0,0,0,0,2,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat CMC - Cast 'Scorch'"),
(26928,0,5,0,0,0,100,2,6000,12000,6000,12000,0,11,47721,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat - Cast 'Fire Blast'"),
(26928,0,6,0,0,0,100,4,6000,12000,6000,12000,0,11,56939,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat - Cast 'Fire Blast'"),

(2692800,9,0,0,0,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,23,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Data 0 1 (Summoner)"),
(2692800,9,1,0,0,0,100,0,0,0,0,0,0,28,47705,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Remove Aura 'Grand Magus Telestra (Fire) Visual'"),
(2692800,9,2,0,0,0,100,0,0,0,0,0,0,11,41577,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Transform: Invisible Stalker'"),
(2692800,9,3,0,0,0,100,0,0,0,0,0,0,11,47711,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Telestra Clone Dies (Fire)'"),
(2692800,9,4,0,0,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Reactstate Passive"),
(2692800,9,5,0,0,0,100,0,0,0,0,0,0,146,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Uninteractible"),
-- Actually despawn after 3 sec, but aura can't be applied if caster is already destroyed
-- (if clone is just 20 yards away from boss, aura will not be applied, breaking whole encounter)

-- Great, now, as creature can continue cast COMBAT spells while being passive AND THAT IS ACTUALLY PROBABLY CORRECT,
-- but we increased despawn time to 30 sec, hackily silence it, what else we can do
(2692800,9,6,0,0,0,100,0,0,0,0,0,0,11,42201,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Eternal Silence'"),
(2692800,9,7,0,0,0,100,0,30000,30000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Despawn"),


(26929,0,0,0,37,0,100,0,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On AI Initialize - Set Invincibility HP 1"),
(26929,0,1,0,11,0,100,0,0,0,0,0,0,11,47704,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Spawn - Cast 'Grand Magus Telestra (Arcane) Visual'"),
(26929,0,2,0,2,0,100,1,0,1,0,0,0,80,2692900,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - Between 0-1% Health - Run Script (No Repeat)"),
(26929,0,3,0,0,0,100,0,6000,8000,12000,12000,0,11,47731,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat - Cast 'Critter'"),
(26929,0,4,0,0,0,100,0,10000,15000,15000,15000,0,11,47736,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat - Cast 'Time Stop'"),

(2692900,9,0,0,0,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,23,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Data 0 1 (Summoner)"),
(2692900,9,1,0,0,0,100,0,0,0,0,0,0,28,47704,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Remove Aura 'Grand Magus Telestra (Arcane) Visual'"),
(2692900,9,2,0,0,0,100,0,0,0,0,0,0,11,41577,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Transform: Invisible Stalker'"),
(2692900,9,3,0,0,0,100,0,0,0,0,0,0,11,47713,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Telestra Clone Dies (Arcane)'"),
(2692900,9,4,0,0,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Reactstate Passive"),
(2692900,9,5,0,0,0,100,0,0,0,0,0,0,146,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Uninteractible"),
(2692900,9,6,0,0,0,100,0,0,0,0,0,0,11,42201,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Eternal Silence'"),
(2692900,9,7,0,0,0,100,0,30000,30000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Despawn"),


(26930,0,0,0,37,0,100,0,0,0,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On AI Initialize - Set Invincibility HP 1"),
(26930,0,1,0,11,0,100,0,0,0,0,0,0,11,47706,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Spawn - Cast 'Grand Magus Telestra (Frost) Visual'"),
(26930,0,2,0,2,0,100,1,0,1,0,0,0,80,2693000,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - Between 0-1% Health - Run Script (No Repeat)"),
(26930,0,3,0,0,0,100,2,0,0,1200,1200,0,11,47729,64,0,0,0,0,2,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat CMC - Cast 'Ice Barb'"),
(26930,0,4,0,0,0,100,4,0,0,1200,1200,0,11,56937,64,0,0,0,0,2,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat CMC - Cast 'Ice Barb'"),
(26930,0,5,0,0,0,100,2,8000,12000,10000,15000,0,11,47727,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat - Cast 'Blizzard'"),
(26930,0,6,0,0,0,100,4,8000,12000,10000,15000,0,11,56936,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - In Combat - Cast 'Blizzard'"),

(2693000,9,0,0,0,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,23,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Data 0 1 (Summoner)"),
(2693000,9,1,0,0,0,100,0,0,0,0,0,0,28,47706,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Remove Aura 'Grand Magus Telestra (Frost) Visual'"),
(2693000,9,2,0,0,0,100,0,0,0,0,0,0,11,41577,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Transform: Invisible Stalker'"),
(2693000,9,3,0,0,0,100,0,0,0,0,0,0,11,47712,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Telestra Clone Dies (Frost)'"),
(2693000,9,4,0,0,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Reactstate Passive"),
(2693000,9,5,0,0,0,100,0,0,0,0,0,0,146,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Set Uninteractible"),
(2693000,9,6,0,0,0,100,0,0,0,0,0,0,11,42201,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Cast 'Eternal Silence'"),
(2693000,9,7,0,0,0,100,0,30000,30000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Grand Magus Telestra - On Script - Despawn");
49 changes: 49 additions & 0 deletions sql/updates/world/3.3.5/2022_07_11_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--
DELETE FROM `smart_scripts` WHERE `entryorguid` = 5108 AND `source_type` = 2;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(5108,2,0,1,46,0,100,0,5108,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Areatrigger (The Stormwright's Shelf) - On Trigger - Store Targetlist"),
(5108,2,1,2,61,0,100,0,0,0,0,0,0,100,1,0,0,0,0,0,19,29079,0,0,0,0,0,0,0,"Areatrigger (The Stormwright's Shelf) - On Link - Send Target 1 (Shrine of the Tempest)"),
(5108,2,2,0,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,29079,0,0,0,0,0,0,0,"Areatrigger (The Stormwright's Shelf) - On Link - Set Data 0 1 (Shrine of the Tempest)");

DELETE FROM `areatrigger_scripts` WHERE `entry` = 5108;
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5108,"SmartTrigger");

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 5108 AND `SourceId` = 2;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(22,1,5108,2,0,9,0,12741,0,0,0,0,0,"","Group 0: Execute SAI (Action 0) if player has taken quest 'Strength of the Tempest'");

DELETE FROM `smart_scripts` WHERE `entryorguid` = 29079 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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(29079,0,0,0,38,0,100,0,0,1,0,0,0,11,53062,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Shrine of the Tempest - On Data Set 0 1 - Cast 'Lightning Strike'");

DELETE FROM `spell_scripts` WHERE `id` = 53062;
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sholazar_lightning_strike';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(53062,'spell_sholazar_lightning_strike');

--
DELETE FROM `spell_scripts` WHERE `id` = 51071;
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sholazar_flight_to_sholazar';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(51071,'spell_sholazar_flight_to_sholazar');

DELETE FROM `creature_text` WHERE `CreatureID` = 28192;

-- Yes, it is unrealistic that other 8 will be used
DELETE FROM `spell_scripts` WHERE `id` IN (53341,53343);
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_chapter1_runeforging_credit';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(53323,'spell_chapter1_runeforging_credit'),
(53331,'spell_chapter1_runeforging_credit'),
(53341,'spell_chapter1_runeforging_credit'),
(53342,'spell_chapter1_runeforging_credit'),
(53343,'spell_chapter1_runeforging_credit'),
(53344,'spell_chapter1_runeforging_credit'),
(54446,'spell_chapter1_runeforging_credit'),
(54447,'spell_chapter1_runeforging_credit'),
(62158,'spell_chapter1_runeforging_credit'),
(70164,'spell_chapter1_runeforging_credit');

-- Already scripted.
DELETE FROM `spell_scripts` WHERE `id` IN (40904,44997);
2 changes: 2 additions & 0 deletions sql/updates/world/3.3.5/2022_07_13_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--
UPDATE `creature_template_addon` SET `bytes2` = 257 WHERE `entry` = 17551;
20 changes: 20 additions & 0 deletions sql/updates/world/3.3.5/2022_07_13_01_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--
DELETE FROM `spell_scripts` WHERE `id` IN (57337,57397,58466,58475,66477);
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
'spell_item_great_feast',
'spell_item_fish_feast',
'spell_item_gigantic_feast',
'spell_item_small_feast',
'spell_item_bountiful_feast',
'spell_gen_feast');
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(57301,'spell_item_great_feast'),
(57426,'spell_item_fish_feast'),
(58465,'spell_item_gigantic_feast'),
(58474,'spell_item_small_feast'),
(66476,'spell_item_bountiful_feast'),
(57337,'spell_gen_feast'),
(57397,'spell_gen_feast'),
(58466,'spell_gen_feast'),
(58475,'spell_gen_feast'),
(66477,'spell_gen_feast');
6 changes: 3 additions & 3 deletions src/common/Cryptography/SessionKeyGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <cstring>
#include "CryptoHash.h"

#ifndef TRINITY_SESSIONKEYGENERATOR_HPP
#define TRINITY_SESSIONKEYGENERATOR_HPP

#include <cstring>
#include "CryptoHash.h"

template <typename Hash>
class SessionKeyGenerator
{
Expand Down
6 changes: 5 additions & 1 deletion src/server/game/Spells/SpellInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2935,7 +2935,11 @@ void SpellInfo::ApplyAllSpellImmunitiesTo(Unit* target, uint8 effIndex, bool app
{
target->ApplySpellImmune(Id, IMMUNITY_STATE, auraType, apply);
if (apply && HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
target->RemoveAurasByType(auraType);
target->RemoveAurasByType(auraType, [](AuraApplication const* aurApp) -> bool
{
// if the aura has SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY, then it cannot be removed by immunity
return !aurApp->GetBase()->GetSpellInfo()->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY);
});
}

for (SpellEffects effectType : immuneInfo.SpellEffectImmune)
Expand Down
13 changes: 12 additions & 1 deletion src/server/game/Spells/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3150,6 +3150,16 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->_GetEffect(EFFECT_0).TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ANY);
});

// Warsong Gulch Anti-Stall Debuffs
ApplySpellFix({
46392, // Focused Assault
46393, // Brutal Assault
}, [](SpellInfo* spellInfo)
{
// due to discrepancies between ranks
spellInfo->Attributes |= SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY;
});

// Summon Skeletons
ApplySpellFix({ 52611, 52612 }, [](SpellInfo* spellInfo)
{
Expand Down Expand Up @@ -3386,7 +3396,8 @@ void SpellMgr::LoadSpellInfoCorrections()
});

ApplySpellFix({
36384 // Skartax Purple Beam
36384, // Skartax Purple Beam
47731 // Critter
}, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 2;
Expand Down
44 changes: 44 additions & 0 deletions src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,49 @@ class spell_gift_of_the_harvester : public SpellScript
}
};

/*######
## Quest 12842: Runeforging: Preparation For Battle
######*/

enum Runeforging
{
SPELL_RUNEFORGING_CREDIT = 54586,
QUEST_RUNEFORGING = 12842
};

/* 53323 - Rune of Swordshattering
53331 - Rune of Lichbane
53341 - Rune of Cinderglacier
53342 - Rune of Spellshattering
53343 - Rune of Razorice
53344 - Rune of the Fallen Crusader
54446 - Rune of Swordbreaking
54447 - Rune of Spellbreaking
62158 - Rune of the Stoneskin Gargoyle
70164 - Rune of the Nerubian Carapace */
class spell_chapter1_runeforging_credit : public SpellScript
{
PrepareSpellScript(spell_chapter1_runeforging_credit);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_RUNEFORGING_CREDIT }) &&
sObjectMgr->GetQuestTemplate(QUEST_RUNEFORGING);
}

void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Player* caster = GetCaster()->ToPlayer())
if (caster->GetQuestStatus(QUEST_RUNEFORGING) == QUEST_STATUS_INCOMPLETE)
caster->CastSpell(caster, SPELL_RUNEFORGING_CREDIT);
}

void Register() override
{
OnEffectHit += SpellEffectFn(spell_chapter1_runeforging_credit::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};

void AddSC_the_scarlet_enclave_c1()
{
new npc_unworthy_initiate();
Expand All @@ -1114,4 +1157,5 @@ void AddSC_the_scarlet_enclave_c1()
new npc_dkc1_gothik();
RegisterCreatureAI(npc_scarlet_ghoul);
RegisterSpellScript(spell_gift_of_the_harvester);
RegisterSpellScript(spell_chapter1_runeforging_credit);
}

0 comments on commit 6d962c5

Please sign in to comment.