Skip to content

Commit 9e7a604

Browse files
Merge AzerothCore 3.3.5 to ElunaAzerothcore [skip ci]
2 parents 7f3d288 + 911d602 commit 9e7a604

20 files changed

Lines changed: 330 additions & 22 deletions

data/sql/updates/db_world/2026_01_16_00.sql

Lines changed: 243 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-- DB update 2026_01_16_00 -> 2026_01_17_00
2+
--
3+
DELETE FROM `prospecting_loot_template` WHERE (`Entry` = 23424);
4+
INSERT INTO `prospecting_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
5+
(23424, 21929, 0, 0, 0, 1, 1, 1, 2, 'Flame Spessarite'),
6+
(23424, 23077, 0, 0, 0, 1, 1, 1, 2, 'Blood Garnet'),
7+
(23424, 23079, 0, 0, 0, 1, 1, 1, 2, 'Deep Peridot'),
8+
(23424, 23107, 0, 0, 0, 1, 1, 1, 2, 'Shadow Draenite'),
9+
(23424, 23112, 0, 0, 0, 1, 1, 1, 2, 'Golden Draenite'),
10+
(23424, 23117, 0, 0, 0, 1, 1, 1, 2, 'Azure Moonstone'),
11+
(23424, 23436, 0, 4, 0, 1, 2, 1, 1, 'Living Ruby'),
12+
(23424, 23437, 0, 4, 0, 1, 2, 1, 1, 'Talasite'),
13+
(23424, 23438, 0, 4, 0, 1, 2, 1, 1, 'Star of Elune'),
14+
(23424, 23439, 0, 4, 0, 1, 2, 1, 1, 'Noble Topaz'),
15+
(23424, 23440, 0, 4, 0, 1, 2, 1, 1, 'Dawnstone'),
16+
(23424, 23441, 0, 4, 0, 1, 2, 1, 1, 'Nightseye');
17+
18+
DELETE FROM `reference_loot_template` WHERE `Entry` = 1000;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- DB update 2026_01_17_00 -> 2026_01_17_01
2+
--
3+
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 26261) AND (`source_type` = 0) AND (`id` IN (0));
4+
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`, `event_param6`, `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
5+
(26261, 0, 0, 0, 8, 0, 100, 512, 47394, 0, 0, 0, 0, 0, 80, 2626100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grizzly Hills Giant - On Spellhit \'Kurun\'s Blessing\' - Run Script');
6+
7+
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 47394) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 26417) AND (`ConditionValue2` = 15) AND (`ConditionValue3` = 0);
8+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
9+
(17, 0, 47394, 0, 0, 29, 1, 26417, 15, 0, 0, 0, 0, '', 'For Kurun\'s Blessing (47394) to have an effect the target Grizzly Hills Giant (26261) must be engaged with a Runed Giant (26417)');
10+
11+
UPDATE `creature` SET `spawntimesecs` = 120 WHERE `id1` = 26261;

src/server/game/Conditions/ConditionMgr.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,13 +542,13 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
542542
condMeets = object->GetMap()->GetDifficulty() == ConditionValue1;
543543
break;
544544
}
545-
case CONDITION_RANDOM_DUNGEON:
545+
case CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON:
546546
{
547547
if (Unit* unit = object->ToUnit())
548548
{
549-
if (Player* player = unit->GetCharmerOrOwnerPlayerOrPlayerItself())
549+
if (Player* player = unit->ToPlayer())
550550
{
551-
if (sLFGMgr->selectedRandomLfgDungeon(player->GetGUID()))
551+
if (sLFGMgr->IsPlayerQueuedForRandomDungeon(player->GetGUID()))
552552
{
553553
if (!ConditionValue1)
554554
condMeets = true;
@@ -803,7 +803,7 @@ uint32 Condition::GetSearcherTypeMaskForCondition()
803803
case CONDITION_CHARMED:
804804
mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
805805
break;
806-
case CONDITION_RANDOM_DUNGEON:
806+
case CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON:
807807
mask |= GRID_MAP_TYPE_MASK_PLAYER;
808808
break;
809809
case CONDITION_WORLD_SCRIPT:
@@ -2486,7 +2486,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
24862486
return false;
24872487
}
24882488
break;
2489-
case CONDITION_RANDOM_DUNGEON:
2489+
case CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON:
24902490
if (cond->ConditionValue1 > 1)
24912491
{
24922492
LOG_ERROR("sql.sql", "RandomDungeon condition has useless data in value1 ({}).", cond->ConditionValue1);

src/server/game/Conditions/ConditionMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ enum ConditionTypes
8888
CONDITION_HAS_AURA_TYPE = 102, // aura_type 0 0 true if has aura type
8989
CONDITION_WORLD_SCRIPT = 103, // conditionId state 0 true if WorldState::IsConditionFulfilled returns true
9090
CONDITION_AI_DATA = 104, // dataId value 0 true if AI::GetData returns value
91-
CONDITION_RANDOM_DUNGEON = 105, // difficulty (0 = any) 0 0 true if player is queued for a random dungeon via RDF (param1 = Difficulty)
91+
CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON = 105, // checkDifficulty difficulty 0 true if player is queued for a random dungeon via RDF
9292

9393
CONDITION_AC_END = 106 // placeholder
9494
};

src/server/game/DungeonFinding/LFGGroupData.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,13 @@ namespace lfg
139139
return m_KicksLeft;
140140
}
141141

142+
void LfgGroupData::AddRandomQueuedPlayer(ObjectGuid guid)
143+
{
144+
m_RandomQueuedPlayers.insert(guid);
145+
}
146+
147+
[[nodiscard]] bool LfgGroupData::IsRandomQueuedPlayer(ObjectGuid guid) const
148+
{
149+
return m_RandomQueuedPlayers.contains(guid);
150+
}
142151
} // namespace lfg

src/server/game/DungeonFinding/LFGGroupData.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ namespace lfg
3737
void SetState(LfgState state);
3838
void RestoreState();
3939
void AddPlayer(ObjectGuid guid);
40+
void AddRandomQueuedPlayer(ObjectGuid guid);
41+
[[nodiscard]] bool IsRandomQueuedPlayer(ObjectGuid guid) const;
4042
uint8 RemovePlayer(ObjectGuid guid);
4143
void RemoveAllPlayers();
4244
void SetLeader(ObjectGuid guid);
@@ -66,6 +68,7 @@ namespace lfg
6668
LfgState m_OldState; ///< Old State
6769
ObjectGuid m_Leader; ///< Leader GUID
6870
LfgGuidSet m_Players; ///< Players in group
71+
LfgGuidSet m_RandomQueuedPlayers; ///< Players that queued for random dungeon
6972
// Dungeon
7073
uint32 m_Dungeon; ///< Dungeon entry
7174
bool _isLFGGroup;

src/server/game/DungeonFinding/LFGMgr.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,6 +2583,18 @@ namespace lfg
25832583
GroupsStore[gguid].AddPlayer(guid);
25842584
}
25852585

2586+
void LFGMgr::AddPlayerQueuedForRandomDungeonToGroup(ObjectGuid gguid, ObjectGuid guid)
2587+
{
2588+
const LfgDungeonSet& dungeons = GetSelectedDungeons(guid);
2589+
if (dungeons.empty())
2590+
return;
2591+
2592+
uint32 dungeonId = *dungeons.begin();
2593+
LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId);
2594+
if (dungeon && (dungeon->type == LFG_TYPE_RANDOM))
2595+
GroupsStore[gguid].AddRandomQueuedPlayer(guid);
2596+
}
2597+
25862598
void LFGMgr::SetLeader(ObjectGuid gguid, ObjectGuid leader)
25872599
{
25882600
GroupsStore[gguid].SetLeader(leader);
@@ -2839,4 +2851,12 @@ namespace lfg
28392851
sDisableMgr->IsDisabledFor(DISABLE_TYPE_LFG_MAP, mapId, nullptr);
28402852
}
28412853

2854+
bool LFGMgr::IsPlayerQueuedForRandomDungeon(ObjectGuid guid)
2855+
{
2856+
auto gguid = GetGroup(guid);
2857+
if (!gguid)
2858+
return false;
2859+
2860+
return GroupsStore[gguid].IsRandomQueuedPlayer(guid);
2861+
}
28422862
} // namespace lfg

src/server/game/DungeonFinding/LFGMgr.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,9 @@ namespace lfg
506506
uint8 RemovePlayerFromGroup(ObjectGuid gguid, ObjectGuid guid);
507507
/// Adds player to group
508508
void AddPlayerToGroup(ObjectGuid gguid, ObjectGuid guid);
509+
/// Store player that selected random queue to group
510+
void AddPlayerQueuedForRandomDungeonToGroup(ObjectGuid gguid, ObjectGuid guid);
511+
bool IsPlayerQueuedForRandomDungeon(ObjectGuid guid);
509512
/// Xinef: Set Random Players Count
510513
void SetRandomPlayersCount(ObjectGuid guid, uint8 count);
511514
/// Xinef: Get Random Players Count

src/server/game/DungeonFinding/LFGScripts.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ namespace lfg
187187

188188
sLFGMgr->SetGroup(guid, gguid);
189189
sLFGMgr->AddPlayerToGroup(gguid, guid);
190+
sLFGMgr->AddPlayerQueuedForRandomDungeonToGroup(gguid, guid);
190191

191192
// pussywizard: after all necessary actions handle raid browser
192193
if (sLFGMgr->GetState(guid) == LFG_STATE_RAIDBROWSER)

0 commit comments

Comments
 (0)