Skip to content

Commit

Permalink
fix: arena slot type dedicated to 3v3soloQ, fix compatiblity with spe…
Browse files Browse the repository at this point in the history
…ctator
  • Loading branch information
Helias committed Sep 5, 2024
1 parent e11ee5c commit e278cb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/sql/db-world/as_2024_03_17_00.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DELETE FROM `creature_template` WHERE `entry`=1000003;
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `speed_swim`, `speed_flight`, `detection_range`, `scale`, `rank`, `dmgschool`, `DamageModifier`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `spell_school_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
('1000003', '0', '0', '0', '0', '0', 'Arena 3v3 SoloQ', '3v3 Solo Queue Arena Master', '', '0', '80', '80', '2', '35', '1', '1', '1.14286', 1, 1, 20, '1', '1', '0', 1, 1, 1, 1, 1, '1', '131078', '0', '0', '0', '0', '0', '0', '0', '7', '0', '0', '0', '0', '0', '0', '0', '0', '', '0', '1', 1, 1, 1, 1, '0', '0', '1', '138936390', 0, '0', 'npc_solo3v3', '12340');
(1000003, 0, 0, 0, 0, 0, 'Arena 3v3 SoloQ', '3v3 Solo Queue Arena Master', '', 0, 80, 80, 2, 35, 1, 1, 1.14286, 1, 1, 20, 1, 1, 0, 1, 1, 1, 1, 1, 1, 131078, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 1, 1, 1, 0, 0, 1, 138936390, 0, 0, 'npc_solo3v3', '12340');


DELETE FROM `creature_template_model` WHERE `CreatureID` = 1000003;
Expand Down
9 changes: 5 additions & 4 deletions src/solo3v3_sc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ bool NpcSolo3v3::OnGossipSelect(Player* player, Creature* creature, uint32 /*sen
s << "\nWeek Wins: " << at->GetStats().WeekWins;

ChatHandler(player->GetSession()).PSendSysMessage("{}", s.str().c_str());
CloseGossipMenuFor(player);
}

return true;
Expand Down Expand Up @@ -234,7 +235,7 @@ bool NpcSolo3v3::JoinQueueArena(Player* player, Creature* creature, bool isRated
return false;

uint8 arenatype = ARENA_TYPE_3v3_SOLO;
uint8 arenaslot = ArenaTeam::GetSlotByType(ARENA_TEAM_5v5);
uint8 arenaslot = ArenaTeam::GetSlotByType(ARENA_TYPE_3v3_SOLO);
uint32 arenaRating = 0;
uint32 matchmakerRating = 0;

Expand Down Expand Up @@ -506,7 +507,7 @@ void Team3v3arena::OnGetSlotByType(const uint32 type, uint8& slot)
{
if (type == ARENA_TEAM_SOLO_3v3)
{
slot = 2;
slot = ARENA_SLOT_SOLO_3v3;
}
}

Expand Down Expand Up @@ -541,7 +542,7 @@ void PlayerScript3v3Arena::OnLogin(Player* pPlayer)

void PlayerScript3v3Arena::GetCustomGetArenaTeamId(const Player* player, uint8 slot, uint32& id) const
{
if (slot == 2)
if (slot == ARENA_SLOT_SOLO_3v3)
{
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamByCaptain(player->GetGUID(), ARENA_TEAM_SOLO_3v3))
{
Expand All @@ -552,7 +553,7 @@ void PlayerScript3v3Arena::GetCustomGetArenaTeamId(const Player* player, uint8 s

void PlayerScript3v3Arena::GetCustomArenaPersonalRating(const Player* player, uint8 slot, uint32& rating) const
{
if (slot == 2)
if (slot == ARENA_SLOT_SOLO_3v3)
{
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamByCaptain(player->GetGUID(), ARENA_TEAM_SOLO_3v3))
{
Expand Down

0 comments on commit e278cb3

Please sign in to comment.