Core/Misc: Use DB2Manager::IsInArea for area-related criterias and conditions
Port From (https://github.com/TrinityCore/TrinityCore/commit/9f68215bb61e46265c6667b6c71f0d2376835686)
This commit is contained in:
@@ -196,7 +196,7 @@ namespace Game.Conditions
|
||||
}
|
||||
break;
|
||||
case ConditionTypes.Areaid:
|
||||
condMeets = obj.GetAreaId() == ConditionValue1;
|
||||
condMeets = Global.DB2Mgr.IsInArea(obj.GetAreaId(), ConditionValue1);
|
||||
break;
|
||||
case ConditionTypes.Spell:
|
||||
if (player != null)
|
||||
|
||||
@@ -2394,7 +2394,7 @@ namespace Game
|
||||
|
||||
for (var i = 0; i < condition.AreaID.Length; ++i)
|
||||
if (condition.AreaID[i] != 0)
|
||||
results[i] = player.GetAreaId() == condition.AreaID[i] || player.GetZoneId() == condition.AreaID[i];
|
||||
results[i] = Global.DB2Mgr.IsInArea(player.GetAreaId(), condition.AreaID[i]);
|
||||
|
||||
if (!PlayerConditionLogic(condition.AreaLogic, results))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user