feat(Core/Conditions): CONDITION_TAXI

This commit is contained in:
IntelligentQuantum
2022-01-29 16:06:46 +03:30
committed by GitHub
parent 1ec6ea1cea
commit ebda297390
2 changed files with 12 additions and 2 deletions

View File

@@ -419,6 +419,13 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
condMeets = unit->HasAuraType(AuraType(ConditionValue1));
break;
}
case CONDITION_TAXI:
{
if (Player* player = object->ToPlayer())
condMeets = player->IsInFlight();
break;
}
case CONDITION_CHARMED:
{
if (Unit* unit = object->ToUnit())
@@ -610,6 +617,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition()
case CONDITION_HAS_AURA_TYPE:
mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
break;
case CONDITION_TAXI:
mask |= GRID_MAP_TYPE_MASK_PLAYER;
break;
case CONDITION_CHARMED:
mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
break;
@@ -1672,7 +1682,6 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
return false;
case CONDITION_STAND_STATE:
case CONDITION_PET_TYPE:
case CONDITION_TAXI:
LOG_ERROR("sql.sql", "SourceEntry {} in `condition` table has a ConditionType that is not yet supported on AzerothCore ({}), ignoring.", cond->SourceEntry, uint32(cond->ConditionType));
return false;
default:
@@ -2256,6 +2265,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
break;
}
case CONDITION_TAXI:
case CONDITION_IN_WATER:
case CONDITION_CHARMED:
default:

View File

@@ -78,7 +78,7 @@ enum ConditionTypes
CONDITION_DAILY_QUEST_DONE = 43, // quest id 0 0 true if daily quest has been completed for the day
CONDITION_CHARMED = 44, // 0 0 0 true if unit is currently charmed
CONDITION_PET_TYPE = 45, // TODO: NOT SUPPORTED YET
CONDITION_TAXI = 46, // TODO: NOT SUPPORTED YET
CONDITION_TAXI = 46, // 0 0 0 true if player is on taxi
CONDITION_QUESTSTATE = 47, // quest_id state_mask 0 true if player is in any of the provided quest states for the quest (1 = not taken, 2 = completed, 8 = in progress, 32 = failed, 64 = rewarded)
CONDITION_QUEST_OBJECTIVE_PROGRESS = 48, // quest_id objectiveIndex objectiveCount true if player has reached the specified objectiveCount quest progress for the objectiveIndex for the specified quest
CONDITION_DIFFICULTY_ID = 49, // don't use on 3.3.5a