- Modified the quest system to allow non-BaseCreature quest givers, now requires IQuestGiver.

- Added base quest giver items, both timed and untimed.
- Added BatteredBucket and Lost and Found quest.
- Moved quester 'friendly names' to a class attribute. If left unspecified, the type name is used.
- Misc quest corrections.
- The bag of sending will now reject nontransferable items.
- Fixed quest items generating error messages when StackWith was attempted on them. (StackWith is not supposed to produce feedback.)
- Quest items can now be dropped onto the player's backpack.
This commit is contained in:
eos 2013-02-24 00:31:44 +00:00
parent 0fcd5821a5
commit 71a9e054de
36 changed files with 627 additions and 258 deletions

View file

@ -165,7 +165,7 @@ namespace Server.Mobiles
}
}
public partial class BaseCreature : Mobile, IHonorTarget
public partial class BaseCreature : Mobile, IHonorTarget, IQuestGiver
{
public const int MaxLoyalty = 100;
@ -336,14 +336,14 @@ namespace Server.Mobiles
}
}
public virtual bool CanGiveMLQuest { get { return ( MLQuests.Count != 0 ); } }
public virtual bool StaticMLQuester { get { return true; } }
protected virtual List<MLQuest> ConstructQuestList()
{
return null;
}
public virtual bool CanGiveMLQuest { get { return ( MLQuests.Count != 0 ); } }
public virtual bool CanShout { get { return false; } }
public const int ShoutRange = 8;
@ -379,18 +379,6 @@ namespace Server.Mobiles
{
}
private void RegisterQuests()
{
foreach ( MLQuest quest in MLQuests )
quest.Register( this );
}
private void UnregisterQuests()
{
foreach ( MLQuest quest in MLQuests )
quest.Unregister( this );
}
#endregion
#region Bonding
@ -1751,9 +1739,6 @@ namespace Server.Mobiles
NameHue = 0x35;
GenerateLoot( true );
if ( MLQuestSystem.Enabled && StaticMLQuester )
RegisterQuests();
}
public BaseCreature( Serial serial ) : base( serial )
@ -2127,9 +2112,6 @@ namespace Server.Mobiles
if ( IsAnimatedDead )
Spells.Necromancy.AnimateDeadSpell.Register( m_SummonMaster, this );
if ( MLQuestSystem.Enabled && StaticMLQuester )
RegisterQuests();
}
public virtual bool IsHumanInTown()
@ -3007,7 +2989,7 @@ namespace Server.Mobiles
Spells.Necromancy.AnimateDeadSpell.Unregister( m_SummonMaster, this );
if ( MLQuestSystem.Enabled )
UnregisterQuests();
MLQuestSystem.HandleDeletion( this );
base.OnAfterDelete();
}