fix: Fixes travel issues (#1285)
This commit is contained in:
parent
6d34cf8824
commit
0facd73842
3 changed files with 19 additions and 15 deletions
|
|
@ -660,7 +660,6 @@ namespace Server.Spells
|
|||
m_TravelType = type;
|
||||
|
||||
var v = (int)type;
|
||||
var isValid = true;
|
||||
|
||||
if (caster != null)
|
||||
{
|
||||
|
|
@ -669,16 +668,21 @@ namespace Server.Spells
|
|||
|
||||
if (destination?.CheckTravel(caster, loc, type, out message) == false || current?.CheckTravel(caster, loc, type, out message) == false)
|
||||
{
|
||||
isValid = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; isValid && i < m_Validators.Length; ++i)
|
||||
for (var i = 0; i < m_Validators.Length; ++i)
|
||||
{
|
||||
isValid = m_Rules[v, i] || !m_Validators[i](map, loc);
|
||||
var isValid = m_Rules[v, i] || !m_Validators[i](map, loc);
|
||||
if (!isValid)
|
||||
{
|
||||
message = InvalidTravelMessage(type);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return !isValid;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsWindLoc(Point3D loc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue