Skip to content

Commit ee817a6

Browse files
committed
Merge branch 'master' of github.com:azerothcore/mod-arena-3v3-solo-queue
2 parents 1efbc92 + 78a93e3 commit ee817a6

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

src/solo3v3_sc.cpp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -726,33 +726,6 @@ bool PlayerScript3v3Arena::CanBattleFieldPort(Player* player, uint8 arenaType, B
726726
return true;
727727
}
728728

729-
730-
// class Spell_SC : public SpellSC
731-
// {
732-
// public:
733-
// Spell_SC() : SpellSC("Spell_SC") { }
734-
735-
// bool CanSelectSpecTalent(Spell* spell) override
736-
// {
737-
// if (!spell)
738-
// return false;
739-
740-
// if (spell->GetCaster()->isPlayer())
741-
// {
742-
// Player* plr = spell->GetCaster()->ToPlayer();
743-
744-
// if (plr->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO) /*||
745-
// plr->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_1v1)*/)
746-
// {
747-
// plr->GetSession()->SendAreaTriggerMessage("You can't change your talents while in queue for 3v3."); // or 1v1
748-
// return false;
749-
// }
750-
// }
751-
752-
// return true;
753-
// }
754-
// }
755-
756729
void AddSC_Solo_3v3_Arena()
757730
{
758731
if (!ArenaTeam::ArenaSlotByType.count(ARENA_TEAM_SOLO_3v3))
@@ -776,4 +749,5 @@ void AddSC_Solo_3v3_Arena()
776749
new ConfigLoader3v3Arena();
777750
new PlayerScript3v3Arena();
778751
new Arena_SC();
752+
new Solo3v3Spell();
779753
}

src/solo3v3_sc.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "Config.h"
2626
#include "Battleground.h"
2727
#include "solo3v3.h"
28+
#include "Spell.h"
2829

2930
#define NPC_TEXT_3v3 1000004
3031

@@ -143,3 +144,30 @@ class Arena_SC : public ArenaScript
143144
return true;
144145
}
145146
};
147+
148+
class Solo3v3Spell : public SpellSC
149+
{
150+
public:
151+
Solo3v3Spell() : SpellSC("Solo3v3Spell") { }
152+
153+
154+
bool CanSelectSpecTalent(Spell* spell) override
155+
{
156+
if (!spell)
157+
return false;
158+
159+
if (spell->GetCaster()->IsPlayer())
160+
{
161+
Player* plr = spell->GetCaster()->ToPlayer();
162+
163+
if (plr->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO))
164+
{
165+
plr->GetSession()->SendAreaTriggerMessage("You can't change your talents while in queue for solo arena.");
166+
return false;
167+
}
168+
}
169+
170+
return true;
171+
}
172+
173+
};

0 commit comments

Comments
 (0)