public Item Construct(bool inTokuno, bool isMondain, bool isStygian)
{
try
{
Item item;
if (m_Type == typeof(BaseRanged))
{
item = Loot.RandomRangedWeapon(inTokuno, isMondain, isStygian);
}
else if (m_Type == typeof(BaseWeapon))
{
item = Loot.RandomWeapon(inTokuno, isMondain, isStygian);
}
else if (m_Type == typeof(BaseArmor))
{
item = Loot.RandomArmorOrHat(inTokuno, isMondain, isStygian);
}
else if (m_Type == typeof(BaseShield))
{
item = Loot.RandomShield(isStygian);
}
else if (m_Type == typeof(BaseJewel))
{
item = Core.AOS ? Loot.RandomJewelry(isStygian) : Loot.RandomArmorOrShieldOrWeapon(isStygian);
}
else if (m_Type == typeof(BaseInstrument))
{
item = Loot.RandomInstrument();
}
else if (m_Type == typeof(Amber)) // gem
{
item = Loot.RandomGem();
}
// Iomega0318
// socket lootpack drop mod
else if (m_Type == typeof(BaseSocketAugmentation)) // socket augmentation
{
item = Loot.RandomAugment();
}
else if (m_Type == typeof(ClumsyScroll)) // low scroll
{
item = RandomScroll(1, 3);
}
else if (m_Type == typeof(ArchCureScroll)) // med scroll
{
item = RandomScroll(4, 7);
}
else if (m_Type == typeof(SummonAirElementalScroll)) // high scroll
{
item = RandomScroll(8, 8);
}
else
{
item = Activator.CreateInstance(m_Type) as Item;
}
//Iomega0318
item = AutoUnravel.Unravel(item);
return item;
}
catch
{ }
return null;
}