Skip to content

Commit 2d2816c

Browse files
author
Rochet2
committed
Merge TrinityCore 3.3.5 to ElunaTrinityWotlk [skip ci]
2 parents 39272fc + 94d3f9d commit 2d2816c

File tree

10 files changed

+541
-369
lines changed

10 files changed

+541
-369
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-- Magmadar
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_magmadar_lava_bomb';
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(19411, 'spell_magmadar_lava_bomb'),
5+
(20474, 'spell_magmadar_lava_bomb');
6+
7+
DELETE FROM `creature_text` WHERE `CreatureID` = 11982 AND `GroupID` = 1;
8+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
9+
(11982,1,0,"%s becomes exhausted!",16,0,100,0,0,0,8252,0,"magmadar EMOTE_EXHAUSTED");
10+
11+
UPDATE `creature_text` SET `BroadcastTextId` = 7797 WHERE `CreatureID` = 11982 AND `GroupID` = 0;
12+
13+
-- Golemagg
14+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 20553;
15+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
16+
(13,7,20553,0,0,31,0,3,11672,0,0,0,0,"","Group 0: Spell 'Golemagg's Trust' (Effect 0, 1, 2) targets creature 'Core Rager'");
17+
18+
-- Garr
19+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (20482,19515,23487);
20+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
21+
(13,3,20482,0,0,31,0,3,12099,0,0,0,0,"","Group 0: Spell 'Firesworn Eruption Trigger' (Effect 0, 1) targets creature 'Firesworn'"),
22+
(13,1,19515,0,0,31,0,3,12057,0,0,0,0,"","Group 0: Spell 'Frenzy' (Effect 0) targets creature 'Garr'"),
23+
(13,1,23487,0,0,31,0,3,12099,0,0,0,0,"","Group 0: Spell 'Separation Anxiety' (Effect 0) targets creature 'Firesworn'");
24+
25+
DELETE FROM `creature_text` WHERE `CreatureID` = 12057;
26+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
27+
(12057,0,0,"%s forces one of his Firesworn minions to erupt!",16,0,100,0,0,0,8254,0,"Garr EMOTE_MASSIVE_ERUPTION");
28+
29+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_garr_separation_anxiety';
30+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
31+
(23487, 'spell_garr_separation_anxiety');

src/server/game/Battlegrounds/BattlegroundQueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ bool BattlegroundQueue::CheckSkirmishForSameFaction(uint32 minPlayersPerTeam)
730730
//set correct team
731731
(*itr)->Team = otherTeamId;
732732
//add team to other queue
733-
m_QueuedGroups[uint8(BG_QUEUE_NORMAL_ALLIANCE) + uint8(teamIndex)].push_front(*itr);
733+
m_QueuedGroups[uint8(BG_QUEUE_NORMAL_ALLIANCE) + uint8(otherTeam)].push_front(*itr);
734734
//remove team from old queue
735735
GroupsQueueType::iterator itr2 = itr_team;
736736
++itr2;

src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp

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

18-
/* ScriptData
19-
SDName: Boss_Baron_Geddon
20-
SD%Complete: 100
21-
SDComment:
22-
SDCategory: Molten Core
23-
EndScriptData */
24-
2518
#include "ScriptMgr.h"
2619
#include "molten_core.h"
2720
#include "ScriptedCreature.h"
2821
#include "SpellAuraEffects.h"
22+
#include "SpellInfo.h"
2923
#include "SpellScript.h"
30-
#include "ObjectMgr.h"
3124

32-
enum Emotes
25+
enum GeddonTexts
3326
{
3427
EMOTE_SERVICE = 0
3528
};
3629

37-
enum Spells
30+
enum GeddonSpells
3831
{
3932
SPELL_INFERNO = 19695,
40-
SPELL_INFERNO_DMG = 19698,
4133
SPELL_IGNITE_MANA = 19659,
4234
SPELL_LIVING_BOMB = 20475,
4335
SPELL_ARMAGEDDON = 20478,
36+
37+
SPELL_INFERNO_DMG = 19698
4438
};
4539

46-
enum Events
40+
enum GeddonEvents
4741
{
4842
EVENT_INFERNO = 1,
49-
EVENT_IGNITE_MANA = 2,
50-
EVENT_LIVING_BOMB = 3,
43+
EVENT_IGNITE_MANA,
44+
EVENT_LIVING_BOMB,
45+
EVENT_ARMAGEDDON
5146
};
5247

48+
// 12056 - Baron Geddon
5349
struct boss_baron_geddon : public BossAI
5450
{
55-
boss_baron_geddon(Creature* creature) : BossAI(creature, BOSS_BARON_GEDDON)
51+
boss_baron_geddon(Creature* creature) : BossAI(creature, BOSS_BARON_GEDDON), _performedArmageddon(false) { }
52+
53+
void Reset() override
54+
{
55+
_Reset();
56+
_performedArmageddon = false;
57+
}
58+
59+
void JustEngagedWith(Unit* who) override
5660
{
61+
BossAI::JustEngagedWith(who);
62+
63+
events.ScheduleEvent(EVENT_INFERNO, 15s, 20s);
64+
events.ScheduleEvent(EVENT_IGNITE_MANA, 5s, 20s);
65+
events.ScheduleEvent(EVENT_LIVING_BOMB, 15s, 35s);
5766
}
5867

59-
void JustEngagedWith(Unit* victim) override
68+
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
6069
{
61-
BossAI::JustEngagedWith(victim);
62-
events.ScheduleEvent(EVENT_INFERNO, 45s);
63-
events.ScheduleEvent(EVENT_IGNITE_MANA, 30s);
64-
events.ScheduleEvent(EVENT_LIVING_BOMB, 35s);
70+
if (!_performedArmageddon && me->HealthBelowPctDamaged(2, damage))
71+
{
72+
_performedArmageddon = true;
73+
events.ScheduleEvent(EVENT_ARMAGEDDON, 0s);
74+
}
75+
}
76+
77+
void OnSpellCast(SpellInfo const* spell) override
78+
{
79+
if (spell->Id == SPELL_ARMAGEDDON)
80+
Talk(EMOTE_SERVICE);
6581
}
6682

6783
void UpdateAI(uint32 diff) override
@@ -71,15 +87,6 @@ struct boss_baron_geddon : public BossAI
7187

7288
events.Update(diff);
7389

74-
// If we are <2% hp cast Armageddon
75-
if (!HealthAbovePct(2))
76-
{
77-
me->InterruptNonMeleeSpells(true);
78-
DoCast(me, SPELL_ARMAGEDDON);
79-
Talk(EMOTE_SERVICE);
80-
return;
81-
}
82-
8390
if (me->HasUnitState(UNIT_STATE_CASTING))
8491
return;
8592

@@ -88,18 +95,20 @@ struct boss_baron_geddon : public BossAI
8895
switch (eventId)
8996
{
9097
case EVENT_INFERNO:
91-
DoCast(me, SPELL_INFERNO);
92-
events.ScheduleEvent(EVENT_INFERNO, 45s);
98+
DoCastSelf(SPELL_INFERNO);
99+
events.Repeat(20s, 35s);
93100
break;
94101
case EVENT_IGNITE_MANA:
95-
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true, -SPELL_IGNITE_MANA))
96-
DoCast(target, SPELL_IGNITE_MANA);
97-
events.ScheduleEvent(EVENT_IGNITE_MANA, 30s);
102+
DoCastSelf(SPELL_IGNITE_MANA);
103+
events.Repeat(25s, 40s);
98104
break;
99105
case EVENT_LIVING_BOMB:
100106
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
101107
DoCast(target, SPELL_LIVING_BOMB);
102-
events.ScheduleEvent(EVENT_LIVING_BOMB, 35s);
108+
events.Repeat(10s, 20s);
109+
break;
110+
case EVENT_ARMAGEDDON:
111+
DoCastSelf(SPELL_ARMAGEDDON);
103112
break;
104113
default:
105114
break;
@@ -111,13 +120,21 @@ struct boss_baron_geddon : public BossAI
111120

112121
DoMeleeAttackIfReady();
113122
}
123+
124+
private:
125+
bool _performedArmageddon;
114126
};
115127

116128
// 19695 - Inferno
117129
class spell_baron_geddon_inferno : public AuraScript
118130
{
119131
PrepareAuraScript(spell_baron_geddon_inferno);
120132

133+
bool Validate(SpellInfo const* /*spellInfo*/) override
134+
{
135+
return ValidateSpellInfo({ SPELL_INFERNO_DMG });
136+
}
137+
121138
void OnPeriodic(AuraEffect const* aurEff)
122139
{
123140
PreventDefaultAction();

0 commit comments

Comments
 (0)