- 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

@ -46,6 +46,14 @@ namespace Server.Engines.MLQuests.Objectives
m_DesiredAmount = amount;
m_AcceptedType = type;
m_Name = name;
if ( MLQuestSystem.Debug && ShowDetailed && name.Number > 0 )
{
int itemid = LabelToItemID( name.Number );
if ( itemid <= 0 || itemid > 0x4000 )
Console.WriteLine( "Warning: cliloc {0} is likely giving the wrong item ID", name.Number );
}
}
public bool CheckType( Type type )
@ -60,17 +68,10 @@ namespace Server.Engines.MLQuests.Objectives
public static int LabelToItemID( int label )
{
int result;
if ( label < 1078872 )
result = ( label - 1020000 );
return ( label - 1020000 );
else
result = ( label - 1078872 );
if ( MLQuestSystem.Debug && ( result <= 0 || result > 0x4000 ) )
Console.WriteLine( "Warning: cliloc {0} is likely giving the wrong item ID", label );
return result;
return ( label - 1078872 );
}
public override void WriteToGump( Gump g, ref int y )
@ -250,7 +251,7 @@ namespace Server.Engines.MLQuests.Objectives
y += 16;
g.AddHtmlLocalized( 103, y, 120, 16, 1074782, 0x15F90, false, false ); // Return to
g.AddLabel( 223, y, 0x481, Instance.GetReturnTo() );
g.AddLabel( 223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor( Instance.QuesterType ) );
y += 16;
}
}