#W# Confict: Fixed BaseCreature git merge conflict.
This commit is contained in:
commit
ad38314ca7
112 changed files with 5397 additions and 616 deletions
|
|
@ -158,7 +158,7 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
else
|
||||
{
|
||||
_target.SendLocalizedMessage(500404); // They seem unwilling to give you any money.
|
||||
_from.SendLocalizedMessage(500404); // They seem unwilling to give you any money.
|
||||
}
|
||||
|
||||
const int TargeterCooldown = 30000; // 30s
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using Server.Factions;
|
|||
using Server.Items;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
using Server.Spells.Fifth;
|
||||
using Server.Spells.Ninjitsu;
|
||||
|
|
@ -45,6 +46,9 @@ public static class Stealing
|
|||
public static bool IsEmptyHanded(Mobile from) =>
|
||||
from.FindItemOnLayer(Layer.OneHanded) == null && from.FindItemOnLayer(Layer.TwoHanded) == null;
|
||||
|
||||
private static bool IsInLockedContainer(Item item) =>
|
||||
item.Parent is Item parent && (parent is LockableContainer { Locked: true } || IsInLockedContainer(parent));
|
||||
|
||||
public static TimeSpan OnUse(Mobile m)
|
||||
{
|
||||
if (!IsEmptyHanded(m))
|
||||
|
|
@ -249,15 +253,24 @@ public static class Stealing
|
|||
{
|
||||
_thief.SendLocalizedMessage(502710); // You can't steal that!
|
||||
}
|
||||
else if (_thief.AccessLevel < AccessLevel.GameMaster && IsInLockedContainer(toSteal))
|
||||
{
|
||||
_thief.SendLocalizedMessage(501747); // It appears to be locked.
|
||||
}
|
||||
else
|
||||
{
|
||||
var w = toSteal.Weight + toSteal.TotalWeight;
|
||||
var reject = LRReason.Inspecific;
|
||||
|
||||
if (w > MaxWeightToSteal)
|
||||
{
|
||||
// This item is too heavy to steal from someone's backpack.
|
||||
_thief.SendLocalizedMessage(502722);
|
||||
}
|
||||
else if (root is Container { IsDecoContainer: false } && !toSteal.CheckLift(_thief, toSteal, ref reject))
|
||||
{
|
||||
_thief.SendLocalizedMessage(502710); // You can't steal that!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (toSteal.Stackable && toSteal.Amount > 1)
|
||||
|
|
@ -368,6 +381,11 @@ public static class Stealing
|
|||
|
||||
if (stolen != null)
|
||||
{
|
||||
if (root is Container)
|
||||
{
|
||||
stolen.OnItemLifted(from, stolen);
|
||||
}
|
||||
|
||||
from.AddToBackpack(stolen);
|
||||
|
||||
if (!(stolen is Container || stolen.Stackable))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue