fix: Fixes axes not working when equipped or in backpack (#2112)
This commit is contained in:
parent
b83c52a7b1
commit
d407847fc4
18 changed files with 224 additions and 227 deletions
|
|
@ -24,32 +24,30 @@ public partial class PrismaticCrystal : Item
|
|||
return;
|
||||
}
|
||||
|
||||
if (pm.InRange(GetWorldLocation(), 2))
|
||||
if (!pm.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
if (MLQuestSystem.GetContext(pm)?.IsDoingQuest(typeof(UnfadingMemoriesPartOne)) == true &&
|
||||
pm.Backpack.FindItemByType<PrismaticAmber>(false) == null)
|
||||
{
|
||||
Item amber = new PrismaticAmber();
|
||||
pm.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
return;
|
||||
}
|
||||
|
||||
if (pm.PlaceInBackpack(amber))
|
||||
{
|
||||
MLQuestSystem.MarkQuestItem(pm, amber);
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(502385); // Your pack cannot hold this item.
|
||||
amber.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1075464); // You already have as many of those as you need.
|
||||
}
|
||||
if (MLQuestSystem.GetContext(pm)?.IsDoingQuest(typeof(UnfadingMemoriesPartOne)) != true ||
|
||||
pm.Backpack.FindItemByType<PrismaticAmber>(false) != null)
|
||||
{
|
||||
pm.SendLocalizedMessage(1075464); // You already have as many of those as you need.
|
||||
return;
|
||||
}
|
||||
|
||||
var amber = new PrismaticAmber();
|
||||
|
||||
if (pm.PlaceInBackpack(amber))
|
||||
{
|
||||
MLQuestSystem.MarkQuestItem(pm, amber);
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
pm.SendLocalizedMessage(502385); // Your pack cannot hold this item.
|
||||
amber.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -467,12 +467,15 @@ public partial class PlantItem : Item, ISecurable
|
|||
return;
|
||||
}
|
||||
|
||||
var loc = GetWorldLocation();
|
||||
|
||||
if (!from.InLOS(loc) || !from.InRange(loc, 2))
|
||||
if (!IsChildOf(from))
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3E9, 1019045); // I can't reach that.
|
||||
return;
|
||||
var loc = GetWorldLocation();
|
||||
|
||||
if (!from.InLOS(loc) || !from.InRange(loc, 2))
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3E9, 1019045); // I can't reach that
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsUsableBy(from))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue