Skip to content

Commit c5f5cb2

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-lfgsolo
2 parents ba846e8 + 7d33481 commit c5f5cb2

File tree

13 files changed

+505
-442
lines changed

13 files changed

+505
-442
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_ruins_of_ahnqiraj_itch', 'spell_temple_of_ahnqiraj_itch');
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(25185, 'spell_ruins_of_ahnqiraj_itch'),
5+
(26077, 'spell_temple_of_ahnqiraj_itch');
6+
7+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 15325;
8+
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (15325,15236) AND `source_type` = 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`,`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
10+
(15325,0,0,0,0,0,100,0,5000,10000,10000,15000,0,11,25185,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Hive'Zara Wasp - In Combat - Cast 'Itch'"),
11+
(15236,0,0,0,0,0,100,0,5000,10000,10000,15000,0,11,26077,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Vekniss Wasp - In Combat - Cast 'Itch'");
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--
2+
UPDATE `creature` SET `spawntimesecs`=300 WHERE `id`=6491 AND `spawntimesecs`=120;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sartura_whirlwind';
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(26084, 'spell_sartura_whirlwind'),
5+
(26686, 'spell_sartura_whirlwind');
6+
7+
DELETE FROM `creature_text` WHERE `CreatureID` = 15516 AND `GroupID` = 3;
8+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
9+
(15516,3,0,"%s goes into a frenzy!",16,0,100,0,0,0,2384,0,"sartura EMOTE_FRENZY");
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--
2+
UPDATE `creature_text` SET `Text` = '%s becomes enraged!', `BroadcastTextId` = 7798, `comment` = 'huhuran EMOTE_ENRAGE' WHERE `CreatureID` = 15509 AND `GroupID` = 0;
3+
UPDATE `creature_text` SET `BroadcastTextId` = 4428 WHERE `CreatureID` = 15509 AND `GroupID` = 1;
4+
5+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_huhuran_wyvern_sting';
6+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
7+
(26180, 'spell_huhuran_wyvern_sting');

src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -15,119 +15,119 @@
1515
* with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18+
/*
19+
* Timers requires to be revisited
20+
*/
21+
1822
#include "ScriptMgr.h"
1923
#include "karazhan.h"
2024
#include "ScriptedCreature.h"
25+
#include "SpellInfo.h"
2126

22-
enum Spells
23-
{
24-
SPELL_REPENTANCE = 29511,
25-
SPELL_HOLYFIRE = 29522,
26-
SPELL_HOLYWRATH = 32445,
27-
SPELL_HOLYGROUND = 29523,
28-
SPELL_BERSERK = 26662
29-
};
30-
31-
enum Yells
27+
enum MaidenOfVirtueTexts
3228
{
3329
SAY_AGGRO = 0,
3430
SAY_SLAY = 1,
3531
SAY_REPENTANCE = 2,
3632
SAY_DEATH = 3
3733
};
3834

39-
enum Events
35+
enum MaidenOfVirtueSpells
36+
{
37+
SPELL_HOLYGROUND = 29523,
38+
SPELL_REPENTANCE = 29511,
39+
SPELL_HOLYFIRE = 29522,
40+
SPELL_HOLYWRATH = 32445,
41+
SPELL_BERSERK = 26662
42+
};
43+
44+
enum MaidenOfVirtueEvents
4045
{
4146
EVENT_REPENTANCE = 1,
42-
EVENT_HOLYFIRE = 2,
43-
EVENT_HOLYWRATH = 3,
44-
EVENT_ENRAGE = 4
47+
EVENT_HOLYFIRE,
48+
EVENT_HOLYWRATH,
49+
EVENT_BERSERK
4550
};
4651

47-
class boss_maiden_of_virtue : public CreatureScript
52+
// 16457 - Maiden of Virtue
53+
struct boss_maiden_of_virtue : public BossAI
4854
{
49-
public:
50-
boss_maiden_of_virtue() : CreatureScript("boss_maiden_of_virtue") { }
55+
boss_maiden_of_virtue(Creature* creature) : BossAI(creature, DATA_MAIDEN_OF_VIRTUE) { }
5156

52-
struct boss_maiden_of_virtueAI : public BossAI
57+
void JustEngagedWith(Unit* who) override
5358
{
54-
boss_maiden_of_virtueAI(Creature* creature) : BossAI(creature, DATA_MAIDEN_OF_VIRTUE) { }
59+
BossAI::JustEngagedWith(who);
60+
Talk(SAY_AGGRO);
61+
62+
DoCastSelf(SPELL_HOLYGROUND, true);
63+
events.ScheduleEvent(EVENT_REPENTANCE, 33s, 45s);
64+
events.ScheduleEvent(EVENT_HOLYFIRE, 8s);
65+
events.ScheduleEvent(EVENT_HOLYWRATH, 15s, 25s);
66+
events.ScheduleEvent(EVENT_BERSERK, 10min);
67+
}
5568

56-
void KilledUnit(Unit* /*Victim*/) override
57-
{
58-
if (roll_chance_i(50))
59-
Talk(SAY_SLAY);
60-
}
69+
void OnSpellCast(SpellInfo const* spell) override
70+
{
71+
if (spell->Id == SPELL_REPENTANCE)
72+
Talk(SAY_REPENTANCE);
73+
}
6174

62-
void JustDied(Unit* /*killer*/) override
63-
{
64-
Talk(SAY_DEATH);
65-
_JustDied();
66-
}
75+
void KilledUnit(Unit* /*victim*/) override
76+
{
77+
if (roll_chance_i(50))
78+
Talk(SAY_SLAY);
79+
}
6780

68-
void JustEngagedWith(Unit* who) override
69-
{
70-
BossAI::JustEngagedWith(who);
71-
Talk(SAY_AGGRO);
72-
73-
DoCastSelf(SPELL_HOLYGROUND, true);
74-
events.ScheduleEvent(EVENT_REPENTANCE, 33s, 45s);
75-
events.ScheduleEvent(EVENT_HOLYFIRE, 8s);
76-
events.ScheduleEvent(EVENT_HOLYWRATH, 15s, 25s);
77-
events.ScheduleEvent(EVENT_ENRAGE, 10min);
78-
}
81+
void JustDied(Unit* /*killer*/) override
82+
{
83+
Talk(SAY_DEATH);
84+
_JustDied();
85+
}
7986

80-
void UpdateAI(uint32 diff) override
81-
{
82-
if (!UpdateVictim())
83-
return;
87+
void UpdateAI(uint32 diff) override
88+
{
89+
if (!UpdateVictim())
90+
return;
8491

85-
events.Update(diff);
92+
events.Update(diff);
8693

87-
if (me->HasUnitState(UNIT_STATE_CASTING))
88-
return;
94+
if (me->HasUnitState(UNIT_STATE_CASTING))
95+
return;
8996

90-
while (uint32 eventId = events.ExecuteEvent())
97+
while (uint32 eventId = events.ExecuteEvent())
98+
{
99+
switch (eventId)
91100
{
92-
switch (eventId)
93-
{
94-
case EVENT_REPENTANCE:
95-
DoCastVictim(SPELL_REPENTANCE);
96-
Talk(SAY_REPENTANCE);
97-
events.Repeat(Seconds(35));
98-
break;
99-
case EVENT_HOLYFIRE:
100-
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50, true))
101-
DoCast(target, SPELL_HOLYFIRE);
102-
events.Repeat(Seconds(8), Seconds(19));
103-
break;
104-
case EVENT_HOLYWRATH:
105-
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 80, true))
106-
DoCast(target, SPELL_HOLYWRATH);
107-
events.Repeat(Seconds(15), Seconds(25));
108-
break;
109-
case EVENT_ENRAGE:
110-
DoCastSelf(SPELL_BERSERK, true);
111-
break;
112-
default:
113-
break;
114-
}
115-
116-
if (me->HasUnitState(UNIT_STATE_CASTING))
117-
return;
101+
case EVENT_REPENTANCE:
102+
DoCastVictim(SPELL_REPENTANCE);
103+
events.Repeat(35s);
104+
break;
105+
case EVENT_HOLYFIRE:
106+
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50, true))
107+
DoCast(target, SPELL_HOLYFIRE);
108+
events.Repeat(8s, 19s);
109+
break;
110+
case EVENT_HOLYWRATH:
111+
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 80, true))
112+
DoCast(target, SPELL_HOLYWRATH);
113+
events.Repeat(15s, 25s);
114+
break;
115+
case EVENT_BERSERK:
116+
DoCastSelf(SPELL_BERSERK);
117+
break;
118+
default:
119+
break;
118120
}
119121

120-
DoMeleeAttackIfReady();
122+
if (me->HasUnitState(UNIT_STATE_CASTING))
123+
return;
121124
}
122-
};
123125

124-
CreatureAI* GetAI(Creature* creature) const override
125-
{
126-
return GetKarazhanAI<boss_maiden_of_virtueAI>(creature);
126+
DoMeleeAttackIfReady();
127127
}
128128
};
129129

130130
void AddSC_boss_maiden_of_virtue()
131131
{
132-
new boss_maiden_of_virtue();
132+
RegisterKarazhanCreatureAI(boss_maiden_of_virtue);
133133
}

src/server/scripts/EasternKingdoms/Karazhan/karazhan.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,6 @@ inline AI* GetKarazhanAI(T* obj)
118118
return GetInstanceAI<AI>(obj, KZScriptName);
119119
}
120120

121+
#define RegisterKarazhanCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetKarazhanAI)
122+
121123
#endif

src/server/scripts/Events/winter_veil.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ class spell_winter_veil_mistletoe : public SpellScript
4747

4848
void HandleScript(SpellEffIndex /*effIndex*/)
4949
{
50-
if (Player* target = GetHitPlayer())
51-
{
52-
uint32 spellId = RAND(SPELL_CREATE_HOLLY, SPELL_CREATE_MISTLETOE, SPELL_CREATE_SNOWFLAKES);
53-
GetCaster()->CastSpell(target, spellId, true);
54-
}
50+
GetCaster()->CastSpell(GetHitUnit(), RAND(SPELL_CREATE_HOLLY, SPELL_CREATE_MISTLETOE, SPELL_CREATE_SNOWFLAKES), true);
5551
}
5652

5753
void Register() override
@@ -86,18 +82,15 @@ class spell_winter_veil_px_238_winter_wondervolt : public SpellScript
8682
return ValidateSpellInfo(WonderboltTransformSpells);
8783
}
8884

89-
void HandleScript(SpellEffIndex effIndex)
85+
void HandleScript(SpellEffIndex /*effIndex*/)
9086
{
91-
PreventHitDefaultEffect(effIndex);
87+
Unit* target = GetHitUnit();
9288

93-
if (Unit* target = GetHitUnit())
94-
{
95-
for (uint32 spell : WonderboltTransformSpells)
96-
if (target->HasAura(spell))
97-
return;
89+
for (uint32 spell : WonderboltTransformSpells)
90+
if (target->HasAura(spell))
91+
return;
9892

99-
target->CastSpell(target, Trinity::Containers::SelectRandomContainerElement(WonderboltTransformSpells), true);
100-
}
93+
target->CastSpell(target, Trinity::Containers::SelectRandomContainerElement(WonderboltTransformSpells), true);
10194
}
10295

10396
void Register() override
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms of the GNU General Public License as published by the
6+
* Free Software Foundation; either version 2 of the License, or (at your
7+
* option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12+
* more details.
13+
*
14+
* You should have received a copy of the GNU General Public License along
15+
* with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include "ScriptMgr.h"
19+
#include "SpellAuras.h"
20+
#include "SpellScript.h"
21+
#include "Unit.h"
22+
23+
enum AQ20Itch
24+
{
25+
SPELL_HIVEZARA_CATALYST = 25187
26+
};
27+
28+
// 25185 - Itch
29+
class spell_ruins_of_ahnqiraj_itch : public AuraScript
30+
{
31+
PrepareAuraScript(spell_ruins_of_ahnqiraj_itch);
32+
33+
bool Validate(SpellInfo const* /*spellInfo*/) override
34+
{
35+
return ValidateSpellInfo({ SPELL_HIVEZARA_CATALYST });
36+
}
37+
38+
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
39+
{
40+
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
41+
return;
42+
43+
if (Unit* caster = GetCaster())
44+
caster->CastSpell(GetTarget(), SPELL_HIVEZARA_CATALYST, true);
45+
}
46+
47+
void Register() override
48+
{
49+
AfterEffectRemove += AuraEffectRemoveFn(spell_ruins_of_ahnqiraj_itch::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
50+
}
51+
};
52+
53+
void AddSC_ruins_of_ahnqiraj()
54+
{
55+
RegisterSpellScript(spell_ruins_of_ahnqiraj_itch);
56+
}

0 commit comments

Comments
 (0)