mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 22:15:15 +00:00
fix(Core/Conditions): correctly check if player queued random dungeon (#24424)
This commit is contained in:
@@ -542,13 +542,13 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
|
||||
condMeets = object->GetMap()->GetDifficulty() == ConditionValue1;
|
||||
break;
|
||||
}
|
||||
case CONDITION_RANDOM_DUNGEON:
|
||||
case CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON:
|
||||
{
|
||||
if (Unit* unit = object->ToUnit())
|
||||
{
|
||||
if (Player* player = unit->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
if (Player* player = unit->ToPlayer())
|
||||
{
|
||||
if (sLFGMgr->selectedRandomLfgDungeon(player->GetGUID()))
|
||||
if (sLFGMgr->IsPlayerQueuedForRandomDungeon(player->GetGUID()))
|
||||
{
|
||||
if (!ConditionValue1)
|
||||
condMeets = true;
|
||||
@@ -803,7 +803,7 @@ uint32 Condition::GetSearcherTypeMaskForCondition()
|
||||
case CONDITION_CHARMED:
|
||||
mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
|
||||
break;
|
||||
case CONDITION_RANDOM_DUNGEON:
|
||||
case CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON:
|
||||
mask |= GRID_MAP_TYPE_MASK_PLAYER;
|
||||
break;
|
||||
case CONDITION_WORLD_SCRIPT:
|
||||
@@ -2486,7 +2486,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CONDITION_RANDOM_DUNGEON:
|
||||
case CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON:
|
||||
if (cond->ConditionValue1 > 1)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "RandomDungeon condition has useless data in value1 ({}).", cond->ConditionValue1);
|
||||
|
||||
@@ -88,7 +88,7 @@ enum ConditionTypes
|
||||
CONDITION_HAS_AURA_TYPE = 102, // aura_type 0 0 true if has aura type
|
||||
CONDITION_WORLD_SCRIPT = 103, // conditionId state 0 true if WorldState::IsConditionFulfilled returns true
|
||||
CONDITION_AI_DATA = 104, // dataId value 0 true if AI::GetData returns value
|
||||
CONDITION_RANDOM_DUNGEON = 105, // difficulty (0 = any) 0 0 true if player is queued for a random dungeon via RDF (param1 = Difficulty)
|
||||
CONDITION_PLAYER_QUEUED_RANDOM_DUNGEON = 105, // checkDifficulty difficulty 0 true if player is queued for a random dungeon via RDF
|
||||
|
||||
CONDITION_AC_END = 106 // placeholder
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user