mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-09 02:30:29 +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);
|
||||
|
||||
Reference in New Issue
Block a user