chore: Cleanup enchanted sextant (#904)
This commit is contained in:
parent
284c3d0f34
commit
529fd90005
1 changed files with 14 additions and 40 deletions
|
|
@ -102,14 +102,8 @@ namespace Server.Items
|
||||||
banks = m_IlshenarBanks;
|
banks = m_IlshenarBanks;
|
||||||
moongates = PMList.Ilshenar;
|
moongates = PMList.Ilshenar;
|
||||||
#else
|
#else
|
||||||
from.NetState.SendMessageLocalized(
|
// The magic of the sextant fails...
|
||||||
Serial,
|
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, 1061684);
|
||||||
ItemID,
|
|
||||||
MessageType.Label,
|
|
||||||
0x482,
|
|
||||||
3,
|
|
||||||
1061684
|
|
||||||
); // The magic of the sextant fails...
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -155,43 +149,23 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int moonMsg;
|
int moonMsg = moongateDistance switch
|
||||||
if (moongateDistance == double.MaxValue)
|
|
||||||
{
|
{
|
||||||
moonMsg = 1048021; // The sextant fails to find a Moongate nearby.
|
double.MaxValue => 1048021, // The sextant fails to find a Moongate nearby.
|
||||||
}
|
> m_LongDistance => 1046449 + (int)from.GetDirectionTo(closestMoongate), // A moongate is * from here
|
||||||
else if (moongateDistance > m_LongDistance)
|
> m_ShortDistance => 1048010 + (int)from.GetDirectionTo(closestMoongate), // There is a Moongate * of here.
|
||||||
{
|
_ => 1048018 // You are next to a Moongate at the moment.
|
||||||
moonMsg = 1046449 + (int)from.GetDirectionTo(closestMoongate); // A moongate is * from here
|
};
|
||||||
}
|
|
||||||
else if (moongateDistance > m_ShortDistance)
|
|
||||||
{
|
|
||||||
moonMsg = 1048010 + (int)from.GetDirectionTo(closestMoongate); // There is a Moongate * of here.
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
moonMsg = 1048018; // You are next to a Moongate at the moment.
|
|
||||||
}
|
|
||||||
|
|
||||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, moonMsg);
|
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, moonMsg);
|
||||||
|
|
||||||
int bankMsg;
|
int bankMsg = bankDistance switch
|
||||||
if (bankDistance == double.MaxValue)
|
|
||||||
{
|
{
|
||||||
bankMsg = 1048020; // The sextant fails to find a Bank nearby.
|
double.MaxValue => 1048020, // The sextant fails to find a Bank nearby.
|
||||||
}
|
> m_LongDistance => 1046462 + (int)from.GetDirectionTo(closestBank), // A town is * from here
|
||||||
else if (bankDistance > m_LongDistance)
|
> m_ShortDistance => 1048002 + (int)from.GetDirectionTo(closestBank), // There is a city Bank * of here.
|
||||||
{
|
_ => 1048019 // You are next to a Bank at the moment.
|
||||||
bankMsg = 1046462 + (int)from.GetDirectionTo(closestBank); // A town is * from here
|
};
|
||||||
}
|
|
||||||
else if (bankDistance > m_ShortDistance)
|
|
||||||
{
|
|
||||||
bankMsg = 1048002 + (int)from.GetDirectionTo(closestBank); // There is a city Bank * of here.
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bankMsg = 1048019; // You are next to a Bank at the moment.
|
|
||||||
}
|
|
||||||
|
|
||||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x5AA, 3, bankMsg);
|
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x5AA, 3, bankMsg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue