本文整理汇总了C#中Server.Items.Bag类的典型用法代码示例。如果您正苦于以下问题:C# Bag类的具体用法?C# Bag怎么用?C# Bag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bag类属于Server.Items命名空间,在下文中一共展示了Bag类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ChristmasDonationBox
public ChristmasDonationBox()
{
Weight = 1.0;
//Hue = 38;
Item item = null;
Name = "christmas gift box";
PlaceItemIn( 35, 30, (item = new RedStocking()) );
PlaceItemIn( 48, 30, (item = new RedStocking()) );
PlaceItemIn( 35, 75, (item = new FreshGinger()) );
PlaceItemIn( 46, 63, (item = new FreshGinger()) );
PlaceItemIn( 80, 26, (item = new GingerbreadCookie()) );
PlaceItemIn( 80, 36, (item = new GingerbreadCookie()) );
PlaceItemIn( 80, 46, (item = new GingerbreadCookie()) );
PlaceItemIn( 80, 56, (item = new GingerbreadCookie()) );
PlaceItemIn( 80, 66, (item = new GingerbreadCookie()) );
PlaceItemIn( 80, 76, (item = new GingerbreadCookie()) );
PlaceItemIn( 146, 31, (item = new RedCandyCane()) );
PlaceItemIn( 146, 41, (item = new RedCandyCane()) );
PlaceItemIn( 146, 51, (item = new RedCandyCane()) );
PlaceItemIn( 146, 61, (item = new RedCandyCane()) );
BaseContainer cont;
PlaceItemIn( 123, 55, (cont = new Bag()) );
cont.Hue = 38;
cont.PlaceItemIn( 131, 75, (item = new ChristmasHouseAddonDeed()) );
cont.PlaceItemIn( 131, 85, (item = new ChristmasCastleAddonDeed()) );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:33,代码来源:ChristmasDonationBox.cs
示例2: SurvivalPack
public SurvivalPack()
{
Weight = 1.0;
Hue = 1871;
Item item = null;
Name = "a survival pack";
PlaceItemIn( 60, 131, (item = new SkillBall( 10 )) );
item.Hue = 1871;
item.Name = "a +10 SkillBall - Works on skills 90.0 and below";
PlaceItemIn( 110, 103, (item = new SkillBall( 50 )) );
item.Hue = 1871;
item.Name = "a +50 SkillBall - Works on skills 50.0 and below";
PlaceItemIn( 46, 65, (item = new SkillBall( 25 )) );
item.Hue = 1871;
item.Name = "a +25 SkillBall - Works on skills 75.0 and below";
BaseContainer cont;
PlaceItemIn( 131, 121, (cont = new Bag()) );
cont.Hue = 2413;
cont.PlaceItemIn( 29, 39, new SulfurousAsh(5000) );
cont.PlaceItemIn( 29, 64, new Nightshade(5000) );
cont.PlaceItemIn( 29, 89, new SpidersSilk(5000) );
cont.PlaceItemIn( 60, 64, new Garlic(5000) );
cont.PlaceItemIn( 60, 89, new Ginseng(5000) );
cont.PlaceItemIn( 88, 39, new Bloodmoss(5000) );
cont.PlaceItemIn( 88, 64, new BlackPearl(5000) );
cont.PlaceItemIn( 88, 89, new MandrakeRoot(5000) );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:35,代码来源:SurvivalPack.cs
示例3: GiveReward
public bool GiveReward( Mobile to )
{
Bag bag = new Bag();
bag.DropItem( new Gold( Utility.RandomMinMax( 1500, 2000 ) ) ); //Edit by Blady. Default was (500, 1000)
if ( Utility.RandomBool() )
{
BaseWeapon weapon = Loot.RandomWeapon();
if ( Core.AOS )
{
BaseRunicTool.ApplyAttributesTo( weapon, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
}
bag.DropItem( weapon );
}
else
{
Item item;
if ( Core.AOS )
{
item = Loot.RandomArmorOrShieldOrJewelry();
if ( item is BaseArmor )
BaseRunicTool.ApplyAttributesTo( (BaseArmor)item, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
else if ( item is BaseJewel )
BaseRunicTool.ApplyAttributesTo( (BaseJewel)item, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
}
else
{
BaseArmor armor = Loot.RandomArmorOrShield();
item = armor;
armor.ProtectionLevel = (ArmorProtectionLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
armor.Durability = (ArmorDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
}
bag.DropItem( item );
}
bag.DropItem( new Obsidian() );
if ( to.PlaceInBackpack( bag ) )
{
return true;
}
else
{
bag.Delete();
return false;
}
}
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:60,代码来源:ElwoodMcCarrin.cs
示例4: DungeonDonationBox
public DungeonDonationBox()
{
Weight = 1.0;
Hue = 1109;
Item item = null;
Name = "dungeon decoration chest";
PlaceItemIn( 16, 51, (item = new BoneThrone()) );
PlaceItemIn( 16, 51, (item = new BoneThrone()) );
PlaceItemIn( 58, 70, (item = new InscribedTombStone()) );
PlaceItemIn( 58, 70, (item = new InscribedTombStone()) );
PlaceItemIn( 58, 70, (item = new IronMaiden()) );
PlaceItemIn( 44, 57, (new BoneTable()) );
PlaceItemIn( 44, 57, (new BoneTable()) );
BaseContainer cont;
PlaceItemIn( 131, 121, (cont = new Bag()) );
cont.Hue = 2413;
cont.PlaceItemIn( 131, 75, (item = new OpenCoffinAddonDeed()) );
cont.PlaceItemIn( 131, 75, (item = new OpenCoffinAddonDeed()) );
cont.PlaceItemIn( 140, 51, (item = new StoneCoffinAddonDeed()) );
cont.PlaceItemIn( 140, 51, (item = new StoneCoffinAddonDeed()) );
cont.PlaceItemIn( 58, 83, (item = new ShadowAltarAddonDeed()) );
cont.PlaceItemIn( 58, 83, (item = new ShadowAltarAddonDeed()) );
cont.PlaceItemIn( 56, 50, (item = new BoneCouchAddonDeed()) );
cont.PlaceItemIn( 56, 50, (item = new BoneCouchAddonDeed()) );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:35,代码来源:DungeonDonationBox.cs
示例5: Wisp
public Wisp()
: base(AIType.AI_Mage, FightMode.Agressor, 10, 1, 0.45, 0.8)
{
Body = 58;
Name = "a wisp";
SetStr( 196, 225 );
SetHits( 196, 225 );
SetDex( 196, 225 );
SetStam( 96, 125 );
SetInt( 196, 225 );
SetMana( 196, 225 );
BaseSoundID = 466;
SetSkill( SkillName.Tactics, 80 );
SetSkill( SkillName.MagicResist, 80 );
SetSkill( SkillName.Parry, 80 );
SetSkill( SkillName.Magery, 80 );
SetSkill( SkillName.Wrestling, 80 );
VirtualArmor = 20;
SetDamage( 15, 20 );
Container cont = new Bag();
PackItem( cont );
LootPack.FilthyRich.Generate( this, cont );
LootPack.FilthyRich.Generate( this, cont );
LootPack.Rich.Generate( this, cont );
}
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:29,代码来源:Wisp.cs
示例6: BagOfMagicJewels
public BagOfMagicJewels( int amount )
{
this.Name = "Bag Of Jewels";
this.Hue = DimensionsNewAge.Scripts.HueItemConst.HueMagicColorRandom;
Bag bagBracelet = new Bag();
bagBracelet.DropItem(new BraceletAlchemy());
bagBracelet.DropItem(new BraceletBlacksmithing());
bagBracelet.DropItem(new BraceletMining());
bagBracelet.DropItem(new BraceletBowcraft());
bagBracelet.DropItem(new BraceletTaming());
bagBracelet.DropItem(new BraceletLumberjacking());
bagBracelet.DropItem(new BraceletSnooping());
bagBracelet.DropItem(new BraceletTailoring());
bagBracelet.DropItem(new BraceletPoisoning());
bagBracelet.DropItem(new BraceletStealing());
this.DropItem(bagBracelet);
Bag bagNecklace = new Bag();
bagNecklace.DropItem(new NecklaceFencing());
bagNecklace.DropItem(new NecklaceMacefighting());
bagNecklace.DropItem(new NecklaceSwordsmanship());
bagNecklace.DropItem(new NecklaceArchery());
bagNecklace.DropItem(new NecklaceTactics());
bagNecklace.DropItem(new NecklaceWrestling());
this.DropItem(bagNecklace);
Bag bagRing = new Bag();
bagRing.DropItem(new RingDexterity());
bagRing.DropItem(new RingStrenght());
bagRing.DropItem(new RingInteligence());
bagRing.DropItem(new RingPower());
this.DropItem(bagRing);
}
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:34,代码来源:BagOfMagicJewels.cs
示例7: GiveReward
public bool GiveReward( Mobile to )
{
Bag bag = new Bag();
bag.DropItem( new Gold( Utility.RandomMinMax( 500, 1000 ) ) );
if ( Utility.RandomBool() )
{
BaseWeapon weapon = Loot.RandomWeapon();
BaseRunicTool.ApplyAttributesTo( weapon, 2, 20, 30 );
bag.DropItem( weapon );
}
else
{
Item item = Loot.RandomArmorOrShieldOrJewelry();
if ( item is BaseArmor )
BaseRunicTool.ApplyAttributesTo( (BaseArmor) item, 2, 20, 30 );
else if ( item is BaseJewel )
BaseRunicTool.ApplyAttributesTo( (BaseJewel) item, 2, 20, 30 );
bag.DropItem( item );
}
bag.DropItem( new Obsidian() );
return to.PlaceInBackpack( bag );
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:ElwoodMcCarrin.cs
示例8: JukaMage
public JukaMage()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a juka mage";
this.Body = 765;
this.SetStr(201, 300);
this.SetDex(71, 90);
this.SetInt(451, 500);
this.SetHits(121, 180);
this.SetDamage(4, 10);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 20, 30);
this.SetResistance(ResistanceType.Fire, 35, 45);
this.SetResistance(ResistanceType.Cold, 30, 40);
this.SetResistance(ResistanceType.Poison, 10, 20);
this.SetResistance(ResistanceType.Energy, 35, 45);
this.SetSkill(SkillName.Anatomy, 80.1, 90.0);
this.SetSkill(SkillName.EvalInt, 80.2, 100.0);
this.SetSkill(SkillName.Magery, 99.1, 100.0);
this.SetSkill(SkillName.Meditation, 80.2, 100.0);
this.SetSkill(SkillName.MagicResist, 140.1, 150.0);
this.SetSkill(SkillName.Tactics, 80.1, 90.0);
this.SetSkill(SkillName.Wrestling, 80.1, 90.0);
this.Fame = 15000;
this.Karma = -15000;
this.VirtualArmor = 16;
Container bag = new Bag();
int count = Utility.RandomMinMax(10, 20);
for (int i = 0; i < count; ++i)
{
Item item = Loot.RandomReagent();
if (item == null)
continue;
if (!bag.TryDropItem(this, item, false))
item.Delete();
}
this.PackItem(bag);
this.PackItem(new ArcaneGem());
if (Core.ML && Utility.RandomDouble() < .33)
this.PackItem(Engines.Plants.Seed.RandomPeculiarSeed(4));
this.m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(2, 5));
}
开发者ID:Crome696,项目名称:ServUO,代码行数:59,代码来源:JukaMage.cs
示例9: OutlanderMage
public OutlanderMage()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an outlander mage";
Body = 770;
Team = 2;
SetStr(201, 300);
SetDex(71, 90);
SetInt(451, 500);
SetHits(121, 180);
SetDamage(4, 10);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 20, 30);
SetResistance(ResistanceType.Fire, 35, 45);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 10, 20);
SetResistance(ResistanceType.Energy, 35, 45);
SetSkill(SkillName.Anatomy, 80.1, 90.0);
SetSkill(SkillName.EvalInt, 80.2, 100.0);
SetSkill(SkillName.Magery, 99.1, 100.0);
SetSkill(SkillName.Meditation, 80.2, 100.0);
SetSkill(SkillName.MagicResist, 140.1, 150.0);
SetSkill(SkillName.Tactics, 80.1, 90.0);
SetSkill(SkillName.Wrestling, 80.1, 90.0);
Fame = 15000;
Karma = -15000;
VirtualArmor = 16;
Container bag = new Bag();
int count = Utility.RandomMinMax(10, 20);
for (int i = 0; i < count; ++i)
{
Item item = Loot.RandomReagent();
if (item == null)
continue;
if (!bag.TryDropItem(this, item, false))
item.Delete();
}
PackItem(bag);
PackItem(new OutlanderHead());
PackItem(new ArcaneGem());
m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(2, 5));
}
开发者ID:greeduomacro,项目名称:annox,代码行数:57,代码来源:OutlanderMage.cs
示例10: JukaMage
public JukaMage() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a juka mage";
Body = 765;
SetStr( 201, 300 );
SetDex( 71, 90 );
SetInt( 451, 500 );
SetHits( 121, 180 );
SetDamage( 4, 10 );
SetSkill( SkillName.Anatomy, 80.1, 90.0 );
SetSkill( SkillName.EvalInt, 80.2, 100.0 );
SetSkill( SkillName.Magery, 99.1, 100.0 );
SetSkill( SkillName.Meditation, 80.2, 100.0 );
SetSkill( SkillName.MagicResist, 140.1, 150.0 );
SetSkill( SkillName.Tactics, 80.1, 90.0 );
SetSkill( SkillName.Wrestling, 80.1, 90.0 );
Fame = 15000;
Karma = -15000;
VirtualArmor = 16;
Container bag = new Bag();
int count = Utility.RandomMinMax( 10, 20 );
for ( int i = 0; i < count; ++i )
{
Item item = Loot.RandomReagent();
if ( item == null )
continue;
if ( !bag.TryDropItem( this, item, false ) )
item.Delete();
}
PackItem( bag );
PackItem( new ArcaneGem() );
PackGold( 250, 400 );
PackGem();
PackScroll( 0, 6 );
PackScroll( 0, 6 );
PackArmor( 0, 4 );
PackWeapon( 0, 3 );
m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:54,代码来源:JukaMage.cs
示例11: ComputeRewards
public override ArrayList ComputeRewards()
{
ArrayList list = new ArrayList();
Container cont = new Bag();
int minProp = Level + 1;
if (minProp > 3)
minProp = 3;
//EUtility.AddRandomLoot(cont, (Level + 1) * 3, (int)(Level * 300 + AmountMax / 20.0 * 300), ScaleTypes.PlayerLuck, minProp, 5, 10, 100);
cont.DropItem(HuntBodUtility.GetSmallRewardItem(Level));
list.Add(cont);
return list;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:18,代码来源:SmallHuntBOD.cs
示例12: OnBeforeDeath
public override bool OnBeforeDeath()
{
BoneMagi rm = new BoneMagi();
rm.Team = this.Team;
rm.Map = this.Map;
rm.Location = this.Location;
Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );
Container bag = new Bag();
switch ( Utility.Random( 9 ))
{
case 0: bag.DropItem( new Amber() ); break;
case 1: bag.DropItem( new Amethyst() ); break;
case 2: bag.DropItem( new Citrine() ); break;
case 3: bag.DropItem( new Diamond() ); break;
case 4: bag.DropItem( new Emerald() ); break;
case 5: bag.DropItem( new Ruby() ); break;
case 6: bag.DropItem( new Sapphire() ); break;
case 7: bag.DropItem( new StarSapphire() ); break;
case 8: bag.DropItem( new Tourmaline() ); break;
}
switch ( Utility.Random( 8 ))
{
case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
case 3: bag.DropItem( new Garlic( 3 ) ); break;
case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
case 5: bag.DropItem( new Nightshade( 3 ) ); break;
case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
case 7: bag.DropItem( new Ginseng( 3 ) ); break;
}
bag.DropItem( new Gold( 2000, 3500 ));
rm.AddItem( bag );
this.Delete();
return false;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:42,代码来源:Armond.cs
示例13: BagBetaTest
public BagBetaTest()
{
Hue = 780;
Name = "Bag BetaTeste";
Bag bagGold = new Bag();
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
bagGold.DropItem(new Gold(50000));
this.DropItem(bagGold);
this.DropItem(new BagOfOres(250));
this.DropItem(new Server.Multis.Deeds.CastleDeed());
}
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:21,代码来源:BagBetaTest.cs
示例14: BagOfAssassinGear
public BagOfAssassinGear() : base()
{
DropItem( new ACreedBelt() );
DropItem( new ACreedBoneArms() );
DropItem( new ACreedChainCoif() );
DropItem( new ACreedJinBori() );
DropItem( new ACreedKilt() );
DropItem( new ACreedMempo() );
DropItem( new ACreedShirt() );
DropItem( new ACreedSkirt() );
DropItem( new ACreedStuddedChest() );
DropItem( new ACreedThighBoots() );
DropItem( new ACreedLeafGloves() );
DropItem( new ACreedSword() );
Bag bag = new Bag();
for ( int i = 0; i < 16; i++ )
{
bag.DropItem( new Dagger() );
}
SmokeBomb smoke = new SmokeBomb();
smoke.Amount = 15;
bag.DropItem( smoke );
bag.DropItem( new GreaterHealPotion( 15 ) );
DropItem( bag );
bag = new Bag();
for ( int i = 0; i < 34; i++ )
{
bag.DropItem( new UpgradeACreedGarbDeed() );
}
DropItem( bag );
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:38,代码来源:BagOfACreedGear.cs
示例15: PackBagofRecallRegs
public Bag PackBagofRecallRegs( int amount )
{
Bag bag = new Bag();
PackItem( bag );
bag.DropItem( new BlackPearl ( amount ) );
bag.DropItem( new Bloodmoss ( amount ) );
bag.DropItem( new MandrakeRoot ( amount ) );
return bag;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:9,代码来源:BaseCreature.cs
示例16: OnBeforeDeath
public override bool OnBeforeDeath()
{
SkeletalKnight rm = new SkeletalKnight();
rm.Team = this.Team;
rm.MoveToWorld( this.Location, this.Map );
Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );
Container bag = new Bag();
switch ( Utility.Random( 9 ))
{
case 0: bag.DropItem( new Amber() ); break;
case 1: bag.DropItem( new Amethyst() ); break;
case 2: bag.DropItem( new Citrine() ); break;
case 3: bag.DropItem( new Diamond() ); break;
case 4: bag.DropItem( new Emerald() ); break;
case 5: bag.DropItem( new Ruby() ); break;
case 6: bag.DropItem( new Sapphire() ); break;
case 7: bag.DropItem( new StarSapphire() ); break;
case 8: bag.DropItem( new Tourmaline() ); break;
}
switch ( Utility.Random( 8 ))
{
case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
case 3: bag.DropItem( new Garlic( 3 ) ); break;
case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
case 5: bag.DropItem( new Nightshade( 3 ) ); break;
case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
case 7: bag.DropItem( new Ginseng( 3 ) ); break;
}
bag.DropItem( new Gold( 1000, 1500 ));
rm.AddItem( bag );
// TODO: need to drop thie 3 MID loot here too
// Category 3 MID
//PackMagicItem( 1, 2, 0.10 );
//PackMagicItem( 1, 2, 0.05 );
this.Delete();
return false;
}
开发者ID:zerodowned,项目名称:angelisland,代码行数:47,代码来源:KhaldunZealot.cs
示例17: OnResponse
public override void OnResponse(NetState state, RelayInfo info)
{
if (state == null || state.Mobile == null)
return;
m_Result.DataItems = GetUnclaimed(m_Result.DataItems);
if (m_Result.Status == ResultStatus.OK && m_Result.DataItems.Count == 0)
{
m_Result.Status = ResultStatus.NoUndeliveredDonationsFound;
}
if (info.ButtonID == (int)Buttons.Previous && m_Page > 0)
{
state.Mobile.SendGump(new ClaimDonationsGump(m_Page - 1, this.X, this.Y, m_Result));
}
else if (info.ButtonID == (int)Buttons.Next)
{
state.Mobile.SendGump(new ClaimDonationsGump(m_Page + 1, this.X, this.Y, m_Result));
}
else if (info.ButtonID == (int)Buttons.OK && m_Result.Status == ResultStatus.OK)
{
state.Mobile.CloseAllGumps();
if (state.Mobile != null && !state.Mobile.Deleted && state.Mobile.NetState != null)
{
if (state.Mobile.BankBox == null)
{
state.Mobile.SendMessage("You don't seem to have a bankbox, contact a GM.");
}
else
{
ArrayList temp = new ArrayList();
Bag bag = new Bag();
bag.Hue = 33;
bag.Name = "a donation claim bag";
foreach (DataItem item in m_Result.DataItems)
{
//Make sure we check amount
for (int i = 0; i < item.Amount; i++)
{
Item toGive = GetItem(item.ProductID);
if (toGive != null)
{
bag.DropItem(toGive);
}
else
{
state.Mobile.SendMessage("An error ocurred claiming an item in order number: {0}. An errorlog has been created, please contact an administrator.");
string error = String.Format("An error ocurred trying to fetch item for product number: {0} in order: {1} for {2}({3}).",
item.ProductID, item.OrderID, state.Mobile.RawName, (state.Mobile.Account as Account).Username);
Log(error);
}
}
// Register claim. We only register each order one time
if (!temp.Contains(item.OrderID))
{
temp.Add(item.OrderID);
ClaimedOrder claim = new ClaimedOrder(item.OrderID, state.Mobile);
m_ClaimedOrders.Add(claim);
}
}
state.Mobile.BankBox.DropItem(bag);
state.Mobile.SendMessage("Your have claimed your donations. They have been added to your bankbox. Thank you for donating!");
}
}
}
else
{
//state.Mobile.SendMessage("You could not claim the donations, because you claimed them wile this gump was open");
}
}
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:76,代码来源:Donation.cs
示例18: ReadyPlayer
private void ReadyPlayer(Mobile m)
{
if (!m_ScoreTable.ContainsKey(m.Serial))
m_ScoreTable.Add(m.Serial, new ScoreKeeper(m));
if (!m_UseSphereRules)
{
#region DistroCode
bool MagicWeapons = MagicWeaponRule == pMagicWeaponRule.Allowed;
bool MagicArmor = MagicArmorRule == pMagicArmorRule.Allowed;
bool Potions = PotionRule == pPotionRule.Allowed;
bool Bandages = BandageRule == pBandaidRule.Allowed;
bool Pets = PetRule == pPetRule.Allowed;
bool Mounts = MountRule == pMountRule.Allowed;
if (!m.Alive)
m.Resurrect();
Container bp = m.Backpack;
Container bag = new Bag();
bag.Hue = 38;
BankBox bank = m.BankBox;
Item oncurs = m.Holding;
if (oncurs != null)
bp.DropItem(oncurs);
m.CurePoison(m);
m.Hits = m.HitsMax;
m.Mana = m.ManaMax;
m.Stam = m.StamMax;
m.StatMods.Clear();
List<Item> items = new List<Item>();
foreach (Layer layer in PvpCore.EquipmentLayers)
{
Item item = m.FindItemOnLayer(layer);
if (item != null)
{
if (item is BaseWeapon && !MagicWeapons)
{
BaseWeapon weapon = (BaseWeapon)item;
if (weapon.AccuracyLevel != WeaponAccuracyLevel.Regular)
items.Add(weapon);
else if (weapon.DamageLevel != WeaponDamageLevel.Regular)
items.Add(weapon);
else if (weapon.DurabilityLevel != WeaponDurabilityLevel.Regular)
items.Add(weapon);
}
else if (item is BaseArmor && !MagicArmor)
{
BaseArmor armor = (BaseArmor)item;
if (armor.Durability != ArmorDurabilityLevel.Regular)
items.Add(armor);
else if (armor.ProtectionLevel != ArmorProtectionLevel.Regular)
items.Add(armor);
}
}
}
if (m.Backpack != null)
{
foreach (Item item in m.Backpack.Items)
{
if (item != null)
{
if (item is BaseWeapon && !MagicWeapons)
{
BaseWeapon weapon = (BaseWeapon) item;
if (weapon.AccuracyLevel != WeaponAccuracyLevel.Regular)
items.Add(weapon);
else if (weapon.DamageLevel != WeaponDamageLevel.Regular)
items.Add(weapon);
else if (weapon.DurabilityLevel != WeaponDurabilityLevel.Regular)
items.Add(weapon);
}
else if (item is BaseArmor && !MagicArmor)
{
BaseArmor armor = (BaseArmor) item;
if (armor.Durability != ArmorDurabilityLevel.Regular)
items.Add(armor);
else if (armor.ProtectionLevel != ArmorProtectionLevel.Regular)
items.Add(armor);
}
else if (item is BasePotion && !Potions)
items.Add(item);
else if (item is EtherealMount && !Mounts)
items.Add(item);
else if (item is Bandage && !Bandages)
items.Add(item);
}
//.........这里部分代码省略.........
开发者ID:FreeReign,项目名称:imaginenation,代码行数:101,代码来源:DMStone.cs
示例19: AddPowerScrolls
private static void AddPowerScrolls( BankBox bank )
{
Bag bag = new Bag();
for ( int i = 0; i < PowerScroll.Skills.Count; ++i )
bag.DropItem( new PowerScroll( PowerScroll.Skills[i], 120.0 ) );
bag.DropItem( new StatCapScroll( 250 ) );
bank.DropItem( bag );
}
开发者ID:svvota,项目名称:runuo,代码行数:11,代码来源:CharacterCreation.cs
示例20: FillBankbox
private static void FillBankbox( Mobile m )
{
if ( Core.AOS )
{
FillBankAOS( m );
return;
}
BankBox bank = m.BankBox;
bank.DropItem( new BankCheck( 1000000 ) );
// Full spellbook
Spellbook book = new Spellbook();
book.Content = ulong.MaxValue;
bank.DropItem( book );
Bag bag = new Bag();
for ( int i = 0; i < 5; ++i )
bag.DropItem( new Moonstone( MoonstoneType.Felucca ) );
// Felucca moonstones
bank.DropItem( bag );
bag = new Bag();
for ( int i = 0; i < 5; ++i )
bag.DropItem( new Moonstone( MoonstoneType.Trammel ) );
// Trammel moonstones
bank.DropItem( bag );
// Treasure maps
bank.DropItem( new TreasureMap( 1, Map.Trammel ) );
bank.DropItem( new TreasureMap( 2, Map.Trammel ) );
bank.DropItem( new TreasureMap( 3, Map.Trammel ) );
bank.DropItem( new TreasureMap( 4, Map.Trammel ) );
bank.DropItem( new TreasureMap( 5, Map.Trammel ) );
// Bag containing 50 of each reagent
bank.DropItem( new BagOfReagents( 50 ) );
// Craft tools
bank.DropItem( MakeNewbie( new Scissors() ) );
bank.DropItem( MakeNewbie( new SewingKit( 1000 ) ) );
bank.DropItem( MakeNewbie( new SmithHammer( 1000 ) ) );
bank.DropItem( MakeNewbie( new FletcherTools( 1000 ) ) );
bank.DropItem( MakeNewbie( new DovetailSaw( 1000 ) ) );
bank.DropItem( MakeNewbie( new MortarPestle( 1000 ) ) );
bank.DropItem( MakeNewbie( new ScribesPen( 1000 ) ) );
bank.DropItem( MakeNewbie( new TinkerTools( 1000 ) ) );
// A few dye tubs
bank.DropItem( new Dyes() );
bank.DropItem( new DyeTub() );
bank.DropItem( new DyeTub() );
bank.DropItem( new BlackDyeTub() );
DyeTub darkRedTub = new DyeTub();
darkRedTub.DyedHue = 0x485;
darkRedTub.Redyable = false;
bank.DropItem( darkRedTub );
// Some food
bank.DropItem( MakeNewbie( new Apple( 1000 ) ) );
// Resources
bank.DropItem( MakeNewbie( new Feather( 1000 ) ) );
bank.DropItem( MakeNewbie( new BoltOfCloth( 1000 ) ) );
bank.DropItem( MakeNewbie( new BlankScroll( 1000 ) ) );
bank.DropItem( MakeNewbie( new Hides( 1000 ) ) );
bank.DropItem( MakeNewbie( new Bandage( 1000 ) ) );
bank.DropItem( MakeNewbie( new Bottle( 1000 ) ) );
bank.DropItem( MakeNewbie( new Log( 1000 ) ) );
bank.DropItem( MakeNewbie( new IronIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new DullCopperIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new ShadowIronIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new CopperIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new BronzeIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new GoldIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new AgapiteIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new VeriteIngot( 5000 ) ) );
bank.DropItem( MakeNewbie( new ValoriteIngot( 5000 ) ) );
// Reagents
bank.DropItem( MakeNewbie( new BlackPearl( 1000 ) ) );
bank.DropItem( MakeNewbie( new Bloodmoss( 1000 ) ) );
bank.DropItem( MakeNewbie( new Garlic( 1000 ) ) );
bank.DropItem( MakeNewbie( new Ginseng( 1000 ) ) );
bank.DropItem( MakeNewbie( new MandrakeRoot( 1000 ) ) );
bank.DropItem( MakeNewbie( new Nightshade( 1000 ) ) );
bank.DropItem( MakeNewbie( new SulfurousAsh( 1000 ) ) );
bank.DropItem( MakeNewbie( new SpidersSilk( 1000 ) ) );
//.........这里部分代码省略.........
开发者ID:svvota,项目名称:runuo,代码行数:101,代码来源:CharacterCreation.cs
注:本文中的Server.Items.Bag类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论