mirror of
https://github.com/ServUO/ServUO
synced 2026-08-11 20:23:04 -04:00
- fixed label in PillarOfStrength - DemonHuntersStandard now has Exorcism slayer - Fixed Chicken Coop Crash - Fixed instances where scale collar wasn't un-freezing on tame - Scouring Toxin now wipes out plant hues - Fixed Runic Tool Consolidation - Maps can now be crafted in other facets - Removed redundant DryReed class - Added proper clilocs on reeds, pigments and plant clippings - Basket weaving has been moved to Tinkering menu, per EA - Added resource target to plant hue items crafting - Fixed craft menu issues in Carpentry - Fixed void pool spawn crash - Damage Increase now counts as an imbuing Property - Added buff icon for curse Weapon - Strange buff is now removed properly -
69 lines
No EOL
1.9 KiB
C#
69 lines
No EOL
1.9 KiB
C#
using System;
|
|
using Server.Items;
|
|
using Server.Mobiles;
|
|
using System.Collections.Generic;
|
|
using Server.Gumps;
|
|
namespace Server.Engines.Quests
|
|
{
|
|
public class CollectionsObtainObjective : ObtainObjective
|
|
{
|
|
private bool m_HasObtained;
|
|
|
|
public bool HasObtained
|
|
{
|
|
get { return m_HasObtained; }
|
|
set { m_HasObtained = true; }
|
|
}
|
|
|
|
public CollectionsObtainObjective(Type obtain, string name, int amount) : base(obtain, name, amount)
|
|
{
|
|
m_HasObtained = false;
|
|
}
|
|
|
|
public override bool Update(object o)
|
|
{
|
|
if (this.Quest == null || this.Quest.Owner == null)
|
|
return false;
|
|
|
|
if (m_HasObtained)
|
|
return base.Update(o);
|
|
|
|
return false;
|
|
}
|
|
|
|
public static void CheckReward(PlayerMobile pm, Item item)
|
|
{
|
|
if (pm.Quests != null)
|
|
{
|
|
foreach (BaseQuest q in pm.Quests)
|
|
{
|
|
foreach (BaseObjective obj in q.Objectives)
|
|
{
|
|
if (obj is CollectionsObtainObjective && ((CollectionsObtainObjective)obj).Obtain == item.GetType())
|
|
{
|
|
((CollectionsObtainObjective)obj).HasObtained = true;
|
|
pm.SendSound(q.UpdateSound);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void Serialize(GenericWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
|
|
writer.Write((int)0); // version
|
|
writer.Write(m_HasObtained);
|
|
}
|
|
|
|
public override void Deserialize(GenericReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
|
|
int version = reader.ReadInt();
|
|
m_HasObtained = reader.ReadBool();
|
|
}
|
|
}
|
|
} |