blessed/insurance items shouldnt drop to corpse with the containers they are in.
This commit is contained in:
parent
b61d41cb54
commit
7f191c3b80
1 changed files with 27 additions and 0 deletions
|
|
@ -2080,8 +2080,35 @@ namespace Server.Mobiles
|
||||||
private int m_InsuranceCost;
|
private int m_InsuranceCost;
|
||||||
private int m_InsuranceBonus;
|
private int m_InsuranceBonus;
|
||||||
|
|
||||||
|
private bool FindItems_Callback(Item item)
|
||||||
|
{
|
||||||
|
if (!item.Deleted && (item.LootType == LootType.Blessed || item.Insured == true))
|
||||||
|
{
|
||||||
|
if (this.Backpack != item.ParentEntity)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public override bool OnBeforeDeath()
|
public override bool OnBeforeDeath()
|
||||||
{
|
{
|
||||||
|
NetState state = NetState;
|
||||||
|
state.CancelAllTrades();
|
||||||
|
|
||||||
|
DropHolding();
|
||||||
|
|
||||||
|
if (Backpack != null && !Backpack.Deleted)
|
||||||
|
{
|
||||||
|
List<Item> ilist = Backpack.FindItemsByType<Item>(FindItems_Callback);
|
||||||
|
|
||||||
|
for (int i = 0; i < ilist.Count; i++)
|
||||||
|
{
|
||||||
|
Backpack.AddItem(ilist[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_NonAutoreinsuredItems = 0;
|
m_NonAutoreinsuredItems = 0;
|
||||||
m_InsuranceCost = 0;
|
m_InsuranceCost = 0;
|
||||||
m_InsuranceAward = base.FindMostRecentDamager( false );
|
m_InsuranceAward = base.FindMostRecentDamager( false );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue