fix: Fixes transfer pet spam (#2291)

This commit is contained in:
Bohica 2025-12-20 09:52:34 -08:00 committed by GitHub
parent 0d25f83de5
commit 99d8a3db41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -486,6 +486,7 @@ public abstract partial class BaseAI
{
from.SendLocalizedMessage(502040);
// As a young player, you may not friend pets to older players.
Mobile.ControlOrder = OrderType.None;
return true;
}
@ -493,6 +494,7 @@ public abstract partial class BaseAI
{
from.SendLocalizedMessage(502041);
// As an older player, you may not friend pets to young players.
Mobile.ControlOrder = OrderType.None;
return true;
}
@ -501,6 +503,7 @@ public abstract partial class BaseAI
SendTransferRefusalMessages(from, to, 1043248, 1043249);
// 1043248: The pet refuses to be transferred because it will not obey ~1_NAME~.~3_BLANK~
// 1043249: The pet will not accept you as a master because it does not trust you.~3_BLANK~
Mobile.ControlOrder = OrderType.None;
return false;
}
@ -509,6 +512,7 @@ public abstract partial class BaseAI
SendTransferRefusalMessages(from, to, 1043250, 1043251);
// 1043250: The pet refuses to be transferred because it will not obey you sufficiently.~3_BLANK~
// 1043251: The pet will not accept you as a master because it does not trust ~2_NAME~.~3_BLANK~
Mobile.ControlOrder = OrderType.None;
return false;
}
@ -517,6 +521,7 @@ public abstract partial class BaseAI
{
from.SendMessage("You can not transfer a pet while in combat.");
to.SendMessage("You can not transfer a pet while in combat.");
Mobile.ControlOrder = OrderType.None;
return false;
}
@ -525,6 +530,7 @@ public abstract partial class BaseAI
if (fromState == null || toState == null)
{
Mobile.ControlOrder = OrderType.None;
return false;
}
@ -534,6 +540,7 @@ public abstract partial class BaseAI
// You cannot transfer a pet with a trade pending
to.SendLocalizedMessage(1010507);
// You cannot transfer a pet with a trade pending
Mobile.ControlOrder = OrderType.None;
return false;
}
@ -552,4 +559,4 @@ public abstract partial class BaseAI
from.SendLocalizedMessage(fromMessage, args);
to.SendLocalizedMessage(toMessage, args);
}
}
}