fix: Prevent gargoyles from hopping on a mount (#561)

This commit is contained in:
Maciej Cz 2021-04-05 20:32:55 +01:00 committed by GitHub
parent 89223e9196
commit 572edf3e48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,10 +313,19 @@ namespace Server.Mobiles
{
var result = true;
if (mob is PlayerMobile mobile && mobile.MountBlockReason != BlockMountType.None)
if (mob is PlayerMobile mobile)
{
mobile.SendLocalizedMessage((int)mobile.MountBlockReason);
result = false;
if (mobile.MountBlockReason != BlockMountType.None)
{
mobile.SendLocalizedMessage((int)mobile.MountBlockReason);
result = false;
}
if (mobile.Race == Race.Gargoyle)
{
mobile.PrivateOverheadMessage(MessageType.Regular, mobile.SpeechHue, 1112281, mobile.NetState); // Gargoyles are unable to ride animals.
result = false;
}
}
return result;