- 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:
parent
0fcd5821a5
commit
71a9e054de
36 changed files with 627 additions and 258 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ namespace Server.Mobiles
|
|||
Region reg = Region;
|
||||
Type[] list = reg.IsPartOf( "Haven Island" ) ? m_MLQuestTypesNH : m_MLQuestTypes;
|
||||
|
||||
if ( MLQuestSystem.Debug )
|
||||
Console.WriteLine( "DEBUG: Assigning quest to BaseEscortable {0}, Region = {1}", Serial, ( reg == null ) ? "-null-" : reg.Name );
|
||||
|
||||
int randomIdx = Utility.Random( list.Length );
|
||||
|
||||
for ( int i = 0; i < list.Length; ++i )
|
||||
|
|
@ -55,13 +52,13 @@ namespace Server.Mobiles
|
|||
|
||||
if ( okay )
|
||||
{
|
||||
SetMLQuest( quest );
|
||||
m_MLQuest = quest;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( MLQuestSystem.Debug )
|
||||
{
|
||||
Console.WriteLine( "WARNING: Type {0} should not be eligible as it is not a registered quest", questType.Name );
|
||||
Console.WriteLine( "Warning: Escortable cannot be assigned quest type '{0}', it is not registered", questType.Name );
|
||||
}
|
||||
|
||||
randomIdx = ( randomIdx + 1 ) % list.Length;
|
||||
|
|
@ -70,7 +67,7 @@ namespace Server.Mobiles
|
|||
if ( m_MLQuest == null )
|
||||
{
|
||||
if ( MLQuestSystem.Debug )
|
||||
Console.WriteLine( "WARNING: No suitable quest found for escort {0}", Serial );
|
||||
Console.WriteLine( "Warning: No suitable quest found for escort {0}", Serial );
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -174,12 +171,6 @@ namespace Server.Mobiles
|
|||
typeof( EscortToNHBank )
|
||||
};
|
||||
|
||||
public void SetMLQuest( MLQuest quest )
|
||||
{
|
||||
m_MLQuest = quest;
|
||||
quest.Register( this );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseEscortable()
|
||||
: base(AIType.AI_Melee, FightMode.Aggressor, 22, 1, 0.2, 1.0)
|
||||
|
|
@ -571,7 +562,7 @@ namespace Server.Mobiles
|
|||
MLQuest quest = MLQuestSystem.ReadQuestRef( reader );
|
||||
|
||||
if ( MLQuestSystem.Enabled && quest != null && !StaticMLQuester )
|
||||
SetMLQuest( quest );
|
||||
m_MLQuest = quest;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue