fix: Fix for decreasing pet loyalty on feed + message (#2050)
This commit is contained in:
parent
6df76a7730
commit
e58462a117
1 changed files with 8 additions and 5 deletions
|
|
@ -4312,12 +4312,15 @@ namespace Server.Mobiles
|
||||||
}
|
}
|
||||||
else if (m_Loyalty < MaxLoyalty)
|
else if (m_Loyalty < MaxLoyalty)
|
||||||
{
|
{
|
||||||
// 50% chance to increase 10 loyalty per food
|
// Calculate the loyalty increase
|
||||||
m_Loyalty = Math.Min(MaxLoyalty, Utility.CoinFlips(amount, MaxLoyaltyIncrease) * 10);
|
int loyaltyIncrease = Utility.CoinFlips(amount, MaxLoyaltyIncrease) * 10;
|
||||||
}
|
|
||||||
|
|
||||||
// looks like in OSI pets say they are happier even if they are at maximum loyalty
|
if (loyaltyIncrease > 0) // Only update if there's an actual increase
|
||||||
SayTo(from, 502060); // Your pet looks happier.
|
{
|
||||||
|
m_Loyalty = Math.Min(MaxLoyalty, m_Loyalty + loyaltyIncrease);
|
||||||
|
SayTo(from, 502060); // Your pet looks happier.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Body.IsAnimal)
|
if (Body.IsAnimal)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue