Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,71 +3,72 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class KronusScrollBox : MetalBox
|
||||
{
|
||||
[Constructible]
|
||||
public KronusScrollBox()
|
||||
{
|
||||
ItemID = 0xE80;
|
||||
Movable = false;
|
||||
public class KronusScrollBox : MetalBox
|
||||
{
|
||||
[Constructible]
|
||||
public KronusScrollBox()
|
||||
{
|
||||
ItemID = 0xE80;
|
||||
Movable = false;
|
||||
|
||||
for ( int i = 0; i < 40; i++ )
|
||||
{
|
||||
Item scroll = Loot.RandomScroll( 0, 15, SpellbookType.Necromancer );
|
||||
scroll.Movable = false;
|
||||
DropItem( scroll );
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Item scroll = Loot.RandomScroll(0, 15, SpellbookType.Necromancer);
|
||||
scroll.Movable = false;
|
||||
DropItem(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
public KronusScrollBox( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public KronusScrollBox(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from is PlayerMobile pm && pm.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is DarkTidesQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindCallingScrollObjective ) );
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(FindCallingScrollObjective));
|
||||
|
||||
if ( (obj != null && !obj.Completed) || DarkTidesQuest.HasLostCallingScroll( from ) )
|
||||
{
|
||||
Item scroll = new KronusScroll();
|
||||
if (obj != null && !obj.Completed || DarkTidesQuest.HasLostCallingScroll(from))
|
||||
{
|
||||
Item scroll = new KronusScroll();
|
||||
|
||||
if ( pm.PlaceInBackpack( scroll ) )
|
||||
{
|
||||
pm.SendLocalizedMessage( 1060120, "", 0x41 ); // You rummage through the scrolls until you find the Scroll of Calling. You quickly put it in your pack.
|
||||
if (pm.PlaceInBackpack(scroll))
|
||||
{
|
||||
pm.SendLocalizedMessage(1060120, "",
|
||||
0x41); // You rummage through the scrolls until you find the Scroll of Calling. You quickly put it in your pack.
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage( 1060148, "", 0x41 ); // You were unable to take the scroll.
|
||||
scroll.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj != null && !obj.Completed)
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
|
||||
scroll.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick( from );
|
||||
}
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue