fix: Fixes random 0 (#783)
This commit is contained in:
parent
c5e35c9b69
commit
3ade2d5e73
1 changed files with 2 additions and 1 deletions
|
|
@ -399,7 +399,8 @@ namespace Server.Mobiles
|
||||||
|
|
||||||
if (spell == null)
|
if (spell == null)
|
||||||
{
|
{
|
||||||
if (!m_Mobile.DisallowAllMoves && Utility.Random((int)m_Mobile.GetDistanceToSqrt(toDispel)) == 0)
|
var distance = (int)m_Mobile.GetDistanceToSqrt(toDispel);
|
||||||
|
if (!m_Mobile.DisallowAllMoves && distance > 0 && Utility.Random(distance) == 0)
|
||||||
{
|
{
|
||||||
spell = new TeleportSpell(m_Mobile);
|
spell = new TeleportSpell(m_Mobile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue