aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions/ConditionMgr.cpp
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2016-08-20 14:36:26 +0200
committertreeston <treeston.mmoc@gmail.com>2016-08-20 14:36:45 +0200
commit08b383305146962f686af716c90f10776a12bc12 (patch)
treeb6f334e87ef4e2b4603d523a4cee08b454a08a08 /src/server/game/Conditions/ConditionMgr.cpp
parentf67d1158d108b82e0b399c8acac3f4dd06f24d67 (diff)
Core/Conditions: Add new CONDITION_TAXI (46). Does what it says on the tin. Tagging issue #15560.
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 2629013585a..a31d73b6dfb 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -107,7 +107,8 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND
{ "Sit/stand state", true, true, false },
{ "Daily Quest Completed",true, false, false },
{ "Charmed", false, false, false },
- { "Pet type", true, false, false }
+ { "Pet type", true, false, false },
+ { "On Taxi", false, false, false }
};
// Checks if object meets the condition
@@ -471,6 +472,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
condMeets = (((1 << pet->getPetType()) & ConditionValue1) != 0);
break;
}
+ case CONDITION_TAXI:
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = player->IsInFlight();
+ break;
+ }
default:
condMeets = false;
break;
@@ -653,6 +660,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() const
case CONDITION_PET_TYPE:
mask |= GRID_MAP_TYPE_MASK_PLAYER;
break;
+ case CONDITION_TAXI:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
default:
ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!");
break;
@@ -2185,6 +2195,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
break;
case CONDITION_IN_WATER:
case CONDITION_CHARMED:
+ case CONDITION_TAXI:
default:
break;
}