本文整理汇总了C#中Server.Items.RunebookEntry类的典型用法代码示例。如果您正苦于以下问题:C# RunebookEntry类的具体用法?C# RunebookEntry怎么用?C# RunebookEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RunebookEntry类属于Server.Items命名空间,在下文中一共展示了RunebookEntry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GateTravelSpell
public GateTravelSpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book)
: base(caster, scroll, m_Info)
{
m_Entry = entry;
m_Book = book;
m_Scroll = scroll;
}
示例2: NaturesPassageSpell
public NaturesPassageSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book ) : base( caster, scroll, m_Info )
{
m_Entry = entry;
m_Book = book;
}
示例3: RemoveRunebook_Callback
public static void RemoveRunebook_Callback(Mobile from, bool okay, MasterRunebook master, InternalRunebook book, int id)
{
if (okay)
{
Container pack = from.Backpack;
if (pack == null || pack.Deleted)
{
from.SendMessage("Unable to find a backpack in which to place a new Runebook.");
return;
}
int count = book.Entries.Count;
if (count > 0)
{
if (from.AccessLevel < AccessLevel.GameMaster)
{
if (from.Backpack.ConsumeTotal(new Type[] { typeof(BlankScroll), typeof(RecallScroll), typeof(GateTravelScroll) },
new int[] { 10, 1, 1 }) >= 0)
{
from.SendMessage("You do not have the materials needed to create the runebook.");
return;
}
if (from.CheckSkill(SkillName.Inscribe, 100, 120))
{
from.SendMessage("You failed to extract the book. Some materials were lost.");
return;
}
}
Runebook runebook = new Runebook(book.MaxCharges);
for (int x = 0; x < count; x++)
{
RunebookEntry rbe = new RunebookEntry(
((RunebookEntry)book.Entries[0]).Location, ((RunebookEntry)book.Entries[0]).Map,
((RunebookEntry)book.Entries[0]).Description, ((RunebookEntry)book.Entries[0]).House);
runebook.Entries.Add(rbe);
book.Entries.RemoveAt(0);
}
runebook.CurCharges = book.CurCharges;
runebook.Name = book.Name;
book.Name = string.Format("Book #{0}", ((int)(id + 1)).ToString());
pack.DropItem(runebook);
from.SendMessage("Runebook extracted. Some materials were used.");
}
else
{
from.SendMessage("You cannot remove an empty Runebook.");
}
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new InternalRunebookGump(from, book, master, id));
}
else
{
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new InternalRunebookGump(from, book, master, id));
}
}
示例4: DropRune
public void DropRune( Mobile from, RunebookEntry e, int index )
{
if (CheckAccess(from))
{
if (m_DefaultIndex > index)
m_DefaultIndex -= 1;
else if (m_DefaultIndex == index)
m_DefaultIndex = -1;
m_Entries.RemoveAt(index);
RecallRune rune = new RecallRune();
rune.Target = e.Location;
rune.TargetMap = e.Map;
rune.Description = e.Description;
rune.House = e.House;
rune.Marked = true;
rune.ChargesLeft = e.ChargesLeft;
from.AddToBackpack(rune);
from.SendLocalizedMessage(502421); // You have removed the rune.
}
else
{
from.SendLocalizedMessage(502413); // That cannot be done while the book is locked down.
}
}
示例5: DropRune
public void DropRune( Mobile from, RunebookEntry e, int index )
{
if ( m_DefaultIndex == index )
m_DefaultIndex = -1;
m_Entries.RemoveAt( index );
RecallRune rune = new RecallRune();
rune.Target = e.Location;
rune.TargetMap = e.Map;
rune.Description = e.Description;
rune.House = e.House;
rune.Marked = true;
from.AddToBackpack( rune );
//al: fix for default rune changing
if (index == m_DefaultIndex)
{
//case 1: default rune removed => disable default rune.
m_DefaultIndex = -1;
}
else if (index < m_DefaultIndex)
{
//case 2: index of removed rune < m_DefaultIndex => fix m_DefaultIndex
m_DefaultIndex--;
}
//--
from.SendLocalizedMessage( 502421 ); // You have removed the rune.
}
示例6: MushroomGatewaySpell
public MushroomGatewaySpell( Mobile caster, Item scroll, RunebookEntry entry ) : base( caster, scroll, m_Info )
{
m_Entry = entry;
}
示例7: AvatarHeavensGateSpell
public AvatarHeavensGateSpell( Mobile caster, Item scroll, RunebookEntry entry )
: base(caster, scroll, m_Info)
{
m_Entry = entry;
}
示例8: DropRune
public void DropRune(Mobile from, RunebookEntry e, int index)
{
if (this.m_DefaultIndex > index)
this.m_DefaultIndex -= 1;
else if (this.m_DefaultIndex == index)
this.m_DefaultIndex = -1;
this.m_Entries.RemoveAt(index);
RecallRune rune = new RecallRune();
rune.Target = e.Location;
rune.TargetMap = e.Map;
rune.Description = e.Description;
rune.House = e.House;
rune.Marked = true;
from.AddToBackpack(rune);
from.SendLocalizedMessage(502421); // You have removed the rune.
}
示例9: DropRune
public void DropRune(Mobile from, RunebookEntry e, int index)
{
if (this.m_DefaultIndex > index)
this.m_DefaultIndex -= 1;
else if (this.m_DefaultIndex == index)
this.m_DefaultIndex = -1;
this.m_Entries.RemoveAt(index);
if (e.Galleon != null)
{
if (e.Galleon.Deleted)
{
from.SendMessage("You discard the rune as the galleon is no longer available.");
return;
}
else
{
ShipRune rune = new ShipRune(e.Galleon);
from.AddToBackpack(rune);
}
}
else
{
RecallRune rune = new RecallRune();
rune.Target = e.Location;
rune.TargetMap = e.Map;
rune.Description = e.Description;
rune.House = e.House;
rune.Marked = true;
from.AddToBackpack(rune);
}
from.SendLocalizedMessage(502421); // You have removed the rune.
}
示例10: RangerPhoenixFlightSpell
public RangerPhoenixFlightSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book )
: base(caster, scroll, m_Info)
{
m_Entry = entry;
m_Book = book;
}
示例11: UndeadTravelByPoisonSpell
public UndeadTravelByPoisonSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book )
: base(caster, scroll, m_Info)
{
m_Entry = entry;
m_Book = book;
}
示例12: UndeadGraveyardGatewaySpell
public UndeadGraveyardGatewaySpell( Mobile caster, Item scroll, RunebookEntry entry )
: base(caster, scroll, m_Info)
{
m_Entry = entry;
}
示例13: DropRune
public void DropRune( Mobile from, RunebookEntry e, int index )
{
if ( m_DefaultIndex == index )
m_DefaultIndex = -1;
m_Entries.RemoveAt( index );
RecallRune rune = new RecallRune();
rune.Target = e.Location;
rune.TargetMap = e.Map;
rune.Description = e.Description;
rune.House = e.House;
rune.Marked = true;
from.AddToBackpack( rune );
from.SendAsciiMessage( "You have removed the rune." );
}
示例14: DropRune
public void DropRune(Mobile from, RunebookEntry e, int index)
{
if (m_DefaultIndex > index)
{
m_DefaultIndex -= 1;
}
else if (m_DefaultIndex == index)
{
m_DefaultIndex = -1;
}
Entries.RemoveAt(index);
from.AddToBackpack(
new RecallRune
{
Target = e.Location,
TargetMap = e.Map,
Description = e.Description,
House = e.House,
Marked = true,
Hue = e.Hue
});
from.SendLocalizedMessage(502421); // You have removed the rune.
}
示例15: SacredJourneySpell
public SacredJourneySpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book)
: base(caster, scroll, m_Info)
{
this.m_Entry = entry;
this.m_Book = book;
}