mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/MMaps: Use an enum for the poly flags
This commit is contained in:
@@ -139,13 +139,13 @@ bool PathGenerator::CalculatePath(float destX, float destY, float destZ, bool fo
|
||||
|
||||
void PathGenerator::CreateFilter()
|
||||
{
|
||||
uint16 includeFlags = 1 | 2;
|
||||
uint16 includeFlags = POLY_FLAG_WALK | POLY_FLAG_SWIM;
|
||||
uint16 excludeFlags = 0;
|
||||
|
||||
if (_sourceUnit->GetTypeId() == TYPEID_UNIT && !_sourceUnit->ToCreature()->CanSwim())
|
||||
{
|
||||
includeFlags = 1;
|
||||
excludeFlags = 2;
|
||||
includeFlags = POLY_FLAG_WALK;
|
||||
excludeFlags = POLY_FLAG_SWIM;
|
||||
}
|
||||
|
||||
_filter.setIncludeFlags(includeFlags);
|
||||
|
||||
@@ -37,6 +37,12 @@ enum PathType
|
||||
PATHFIND_SHORT = 0x20, // path is longer or equal to its limited path length
|
||||
};
|
||||
|
||||
enum PolyFlag
|
||||
{
|
||||
POLY_FLAG_WALK = 1,
|
||||
POLY_FLAG_SWIM = 2
|
||||
};
|
||||
|
||||
class PathGenerator
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user