本文整理汇总了C#中Server.Items.Bandage类的典型用法代码示例。如果您正苦于以下问题:C# Bandage类的具体用法?C# Bandage怎么用?C# Bandage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bandage类属于Server.Items命名空间,在下文中一共展示了Bandage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FamousPiratesMace
public FamousPiratesMace()
: base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.9, 0.9)
{
int Hue = 2075;
// Skills and Stats
this.InitStats(350, 350, 310);
this.Skills[SkillName.Macing].Base = 150;
this.Skills[SkillName.Anatomy].Base = 150;
this.Skills[SkillName.Healing].Base = 150;
this.Skills[SkillName.Tactics].Base = 150;
// Name
this.Name = "Captain Hector Barbossa";
// Equip
WarHammer war = new WarHammer();
war.Movable = true;
war.Crafter = this;
war.Quality = WeaponQuality.Exceptional;
AddItem(war);
Boots bts = new Boots();
bts.Movable = false;
bts.Hue = Hue;
AddItem(bts);
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Regular;
cht.Crafter = this;
cht.Quality = ArmorQuality.Exceptional;
AddItem(cht);
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Regular;
chl.Crafter = this;
chl.Quality = ArmorQuality.Exceptional;
AddItem(chl);
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Regular;
pla.Crafter = this;
pla.Quality = ArmorQuality.Exceptional;
AddItem(pla);
TricorneHat tch = new TricorneHat();
tch.Movable = false;
tch.Hue = Hue;
AddItem(tch);
Bandage band = new Bandage(20);
AddToBackpack(band);
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:57,代码来源:FamousPiratesSpecific.cs
示例2: ArmyBaseMace
public ArmyBaseMace(int Team) : base(Team, AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// An ArmyBase Hammerman
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats((90 + Utility.Random(35)), (90 + Utility.Random(35)), (75 + Utility.Random(15)));
this.Skills[SkillName.Macing].Base = (90 + Utility.Random(30));
this.Skills[SkillName.Anatomy].Base = (90 + Utility.Random(30));
this.Skills[SkillName.Healing].Base = (90 + Utility.Random(30));
this.Skills[SkillName.Tactics].Base = (90 + Utility.Random(30));
// Name
this.Name = "Hammerman";
// Equip
WarHammer war = new WarHammer();
war.Movable = true;
war.Crafter = this;
war.Quality = WeaponQuality.Regular;
AddItem( war );
Boots bts = new Boots();
bts.Hue = iHue;
AddItem( bts );
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Newbied;
cht.Crafter = this;
cht.Quality = ArmorQuality.Regular;
AddItem( cht );
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Newbied;
chl.Crafter = this;
chl.Quality = ArmorQuality.Regular;
AddItem( chl );
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Newbied;
pla.Crafter = this;
pla.Quality = ArmorQuality.Regular;
AddItem( pla );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:53,代码来源:ArmyMembers.cs
示例3: Scissor
public bool Scissor( Mobile from, Scissors scissors )
{
if ( Deleted || !from.CanSee( this ) ) return false;
//base.ScissorHelper( from, new Bandage(), 1 );
this.Consume( 1 );
Bandage give = new Bandage();
give.Hue = this.Hue;
from.AddToBackpack( give );
return true;
}
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:12,代码来源:UncutCloth.cs
示例4: DummyMace
public DummyMace() : base( AIType.AI_SphereMelee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Macer
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
InitStats( 125, 125, 90 );
Skills[SkillName.Macing].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Healing].Base = 120;
Skills[SkillName.Tactics].Base = 120;
// Name
Name = "Macer";
// Equip
WarHammer war = new WarHammer();
war.Movable = true;
war.Crafter = this;
war.Quality = WeaponQuality.Regular;
AddItem( war );
Boots bts = new Boots();
bts.Hue = iHue;
AddItem( bts );
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Newbied;
cht.Crafter = this;
cht.Quality = ArmorQuality.Regular;
AddItem( cht );
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Newbied;
chl.Crafter = this;
chl.Quality = ArmorQuality.Regular;
AddItem( chl );
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Newbied;
pla.Crafter = this;
pla.Quality = ArmorQuality.Regular;
AddItem( pla );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:52,代码来源:DummySpecific.cs
示例5: GiveRewards
public override void GiveRewards()
{
//Random gold amount to add
BankCheck gold = new BankCheck( Utility.RandomMinMax( 200, 300 ) );
if( !Owner.AddToBackpack( gold ) )
{
gold.MoveToWorld(Owner.Location,Owner.Map);
}
//Adding Quest Reward Token(s)
for(int x = 0; x < 1; x++)
{
RandomTalisman talisman = new RandomTalisman();
if(!Owner.AddToBackpack( talisman ) )
{
talisman.MoveToWorld(Owner.Location,Owner.Map);
}
}
Item bonusitem;
bonusitem = new Bandage( 10 );
//Adding Bonus Item #1
if(!Owner.AddToBackpack( bonusitem ) )
{
bonusitem.MoveToWorld(Owner.Location,Owner.Map);
}
Item item;
//Add Reward Item #1
item = new AdventurersMachete();
if( item is BaseWeapon )
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if( item is BaseArmor )
BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if( item is BaseJewel )
BaseRunicTool.ApplyAttributesTo((BaseJewel)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if( item is BaseHat )
BaseRunicTool.ApplyAttributesTo((BaseHat)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if(!Owner.AddToBackpack( item ) )
{
item.MoveToWorld(Owner.Location,Owner.Map);
}
base.GiveRewards();
}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:44,代码来源:Help.cs
示例6: InternalTarget
public InternalTarget(Bandage bandage)
: base(GetRange(bandage.Expansion), false, TargetFlags.Beneficial)
{
m_Bandage = bandage;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:5,代码来源:Bandage.cs
示例7: InitOutfit
public override void InitOutfit()
{
WipeLayers();
AddItem( new Shirt( Utility.RandomNeutralHue() ) );
AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
AddItem( new Boots( Utility.RandomNeutralHue() ) );
switch ( Utility.Random( 4 ) )
{
case 0: AddItem( new ShortHair( Utility.RandomHairHue() ) ); break;
case 1: AddItem( new TwoPigTails( Utility.RandomHairHue() ) ); break;
case 2: AddItem( new ReceedingHair( Utility.RandomHairHue() ) ); break;
case 3: AddItem( new KrisnaHair( Utility.RandomHairHue() ) ); break;
}
AddItem( new Kryss() );
PackGold( 50, 60 );
Bandage aids = new Bandage();
aids.Amount = Utility.Random( 1, 3 );
AddItem( aids );
Lockpick picks = new Lockpick();
picks.Amount = Utility.Random( 1, 3 );
AddItem( picks );
}
开发者ID:zerodowned,项目名称:angelisland,代码行数:26,代码来源:Thief.cs
示例8: BandageTarget
public BandageTarget( Bandage bandage ) : base( Bandage.range, false, TargetFlags.Beneficial ){
m_Bandage = bandage;
}
开发者ID:greeduomacro,项目名称:uotitan,代码行数:3,代码来源:Bandage.cs
示例9: InternalTarget
public InternalTarget( Bandage bandage )
: base(1, false, TargetFlags.None)
{
m_Bandage = bandage;
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:5,代码来源:Bandage.cs
示例10: DummyFence
public DummyFence() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Fencer
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Fencing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
// Name
this.Name = "Fencer";
// Equip
Spear ssp = new Spear();
ssp.Movable = true;
ssp.Crafter = this;
ssp.Quality = WeaponQuality.Regular;
AddItem( ssp );
Boots snd = new Boots();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Newbied;
cht.Crafter = this;
cht.Quality = ArmorQuality.Regular;
AddItem( cht );
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Newbied;
chl.Crafter = this;
chl.Quality = ArmorQuality.Regular;
AddItem( chl );
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Newbied;
pla.Crafter = this;
pla.Quality = ArmorQuality.Regular;
AddItem( pla );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:52,代码来源:DummySpecific.cs
示例11: UseBandage
public static int UseBandage(BaseCreature from, bool healmaster, Bandage bandage)
{
if (from.IsDeadPet)
return 12;
var delay = (500 + (50*((120 - from.Dex)/10)))/100;
if (delay < 3)
delay = 3;
if (from.Controlled && from.ControlMaster != null && from.Hits >= (from.Hits/2) && healmaster)
{
if (from.InRange(from.ControlMaster, 2) && from.ControlMaster.Alive &&
from.ControlMaster.Hits < from.ControlMaster.HitsMax)
BandageContext.BeginHeal(from, from.ControlMaster, bandage);
}
else if (from.Hits < from.HitsMax)
{
BandageContext.BeginHeal(from, from, bandage);
}
return delay + 3;
}
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:23,代码来源:Abilities.cs
示例12: InternalTarget
public InternalTarget(Bandage bandage)
: base(Bandage.Range, false, TargetFlags.Beneficial)
{
m_Bandage = bandage;
}
开发者ID:Jascen,项目名称:UOSmart,代码行数:5,代码来源:Bandage.cs
示例13: DummyAssassin
public DummyAssassin() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Hybrid Assassin
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 105, 105, 105 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Swords].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
// Name
this.Name = "Hybrid Assassin";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddToBackpack( book );
Katana kat = new Katana();
kat.Movable = false;
kat.LootType = LootType.Newbied;
kat.Crafter = this;
kat.Poison = Poison.Deadly;
kat.PoisonCharges = 12;
kat.Quality = WeaponQuality.Regular;
AddToBackpack( kat );
LeatherArms lea = new LeatherArms();
lea.Movable = false;
lea.LootType = LootType.Newbied;
lea.Crafter = this;
lea.Quality = ArmorQuality.Regular;
AddItem( lea );
LeatherChest lec = new LeatherChest();
lec.Movable = false;
lec.LootType = LootType.Newbied;
lec.Crafter = this;
lec.Quality = ArmorQuality.Regular;
AddItem( lec );
LeatherGorget leg = new LeatherGorget();
leg.Movable = false;
leg.LootType = LootType.Newbied;
leg.Crafter = this;
leg.Quality = ArmorQuality.Regular;
AddItem( leg );
LeatherLegs lel = new LeatherLegs();
lel.Movable = false;
lel.LootType = LootType.Newbied;
lel.Crafter = this;
lel.Quality = ArmorQuality.Regular;
AddItem( lel );
Sandals snd = new Sandals();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
Cap cap = new Cap();
cap.Hue = iHue;
AddItem( cap );
Robe robe = new Robe();
robe.Hue = iHue;
AddItem( robe );
DeadlyPoisonPotion pota = new DeadlyPoisonPotion();
pota.LootType = LootType.Newbied;
AddToBackpack( pota );
DeadlyPoisonPotion potb = new DeadlyPoisonPotion();
potb.LootType = LootType.Newbied;
AddToBackpack( potb );
DeadlyPoisonPotion potc = new DeadlyPoisonPotion();
potc.LootType = LootType.Newbied;
AddToBackpack( potc );
DeadlyPoisonPotion potd = new DeadlyPoisonPotion();
potd.LootType = LootType.Newbied;
AddToBackpack( potd );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:95,代码来源:DummySpecific.cs
示例14: OnDoubleClick
public override void OnDoubleClick( Mobile m )
{
if ( m_TalismanType == TalismanType.None )
return;
if ( this.Parent != m )
{
m.SendLocalizedMessage( 502641 ); // You must equip this item to use it.
}
else if ( m_ChargeTimeLeft > 0 )
{
int tmptime = ( m_ChargeTimeLeft2 - ( DateTime.Now.Second - m_ChargeTimeLeft3.Second ) + 1 );
if ( tmptime > ( m_ChargeTimeLeft2 + 1 ) )
tmptime -= 60;
if ( tmptime > m_ChargeTimeLeft2 )
tmptime = m_ChargeTimeLeft2;
m.SendLocalizedMessage( 1074882, tmptime.ToString() ); // You must wait ~1_val~ seconds for this to recharge.
}
else if ( m_Charges == 0 )
{
m.SendLocalizedMessage( 501250 ); // This magic item is out of charges.
}
else
{
if ( (int) m_TalismanType <= 4 )
{
//Removal
m.Target = new InternalTarget( this );
}
//Mana Phase
else if ( m_TalismanType == TalismanType.ManaPhase )
{
ManaPhase.OnUse( m, this );
}
else if ( (int) m_TalismanType >= 9 )
{
//Summon creature
BaseCreature bc = (BaseCreature) Activator.CreateInstance( SummonEntry.GetNPC( m_TalismanType ) );
if ( BaseCreature.Summon( bc, m, m.Location, -1, TimeSpan.FromMinutes( 10.0 ) ) )
{
bc.FixedParticles( 0x3728, 1, 10, 9910, EffectLayer.Head );
bc.PlaySound( bc.GetIdleSound() );
m_SummonedCreature = bc;
m_Charges--;
InvalidateProperties();
ChargeTimeLeft = 1800;
m_ChargeTimer = new ChargeTimeLeftTimer( this );
m_ChargeTimer.Start();
m_ChargeTimeLeft3 = DateTime.Now;
}
}
else if ( m_TalismanType == TalismanType.SummonRandom )
{
//Summon Random
TalismanType tmpbc = SummonEntry.GetRandom();
BaseCreature bc = (BaseCreature) Activator.CreateInstance( SummonEntry.GetNPC( tmpbc ) );
if ( BaseCreature.Summon( bc, m, m.Location, -1, TimeSpan.FromMinutes( 10.0 ) ) )
{
bc.FixedParticles( 0x3728, 1, 10, 9910, EffectLayer.Head );
bc.PlaySound( bc.GetIdleSound() );
m_SummonedCreature = bc;
m_Charges--;
InvalidateProperties();
ChargeTimeLeft = 1800;
m_ChargeTimer = new ChargeTimeLeftTimer( this );
m_ChargeTimer.Start();
m_ChargeTimeLeft3 = DateTime.Now;
}
}
else
{
Item summonitem;
int message;
// Summon item
if ( m_TalismanType == TalismanType.SummonBandage )
{
summonitem = new Bandage( 10 );
summonitem.ItemID = 0x0EE9;
summonitem.Hue = 0xA3;
message = 1075002; // You have been given some clean bandages.
}
else if ( m_TalismanType == TalismanType.SummonBoard )
{
summonitem = new Board( 10 );
summonitem.Hue = 0xA3;
message = 1075000; // You have been given some wooden boards.
}
else// if ( m_TalismanType == TalismanType.SummonIngot )
{
summonitem = new IronIngot( 10 );
summonitem.Hue = 0xA3;
message = 1075001; // You have been given some ingots.
}
m.AddToBackpack( summonitem );
m.SendLocalizedMessage( message );
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:BaseTalisman.cs
示例15: NewPlayerPackage
//.........这里部分代码省略.........
armor.EnergyBonus = 1;
armor.FireBonus = 1;
//armor.ArmorRatingBonus = 2;
armor.PoisonBonus = 1;
DropItem(armor);
armor.Location = new Point3D(71, 78, 0);
armor = new LeatherArms();
armor.Hue = 537;
armor.LootType = LootType.Newbied;
armor.ArmorAttributes.DurabilityBonus = 20;
armor.Attributes.LowerManaCost = 2;
armor.Attributes.LowerRegCost = 5;
armor.Attributes.Luck = 10;
armor.Attributes.BonusStam = 3;
armor.Attributes.RegenStam = 1;
armor.ColdBonus = 1;
armor.EnergyBonus = 1;
armor.FireBonus = 1;
//armor.ArmorRatingBonus = 2;
armor.PoisonBonus = 1;
DropItem(armor);
armor.Location = new Point3D(94, 84, 0);
armor = new LeatherGloves();
armor.Hue = 537;
armor.LootType = LootType.Newbied;
armor.ArmorAttributes.DurabilityBonus = 20;
armor.Attributes.LowerManaCost = 2;
armor.Attributes.LowerRegCost = 5;
armor.Attributes.Luck = 10;
armor.Attributes.BonusStr = 2;
armor.ColdBonus = 1;
armor.EnergyBonus = 1;
armor.FireBonus = 1;
//armor.ArmorRatingBonus = 2;
armor.PoisonBonus = 1;
DropItem(armor);
armor.Location = new Point3D(108, 85, 0);
armor = new LeatherGorget();
armor.Hue = 537;
armor.LootType = LootType.Newbied;
armor.ArmorAttributes.DurabilityBonus = 20;
armor.Attributes.LowerManaCost = 2;
armor.Attributes.LowerRegCost = 5;
armor.Attributes.BonusInt = 2;
armor.Attributes.Luck = 10;
armor.ColdBonus = 1;
armor.EnergyBonus = 1;
armor.FireBonus = 1;
//armor.ArmorRatingBonus = 2;
armor.PoisonBonus = 1;
DropItem(armor);
armor.Location = new Point3D(122, 79, 0);
armor = new LeatherCap();
armor.Hue = 537;
armor.LootType = LootType.Newbied;
armor.ArmorAttributes.DurabilityBonus = 20;
armor.Attributes.BonusDex = 2;
armor.Attributes.LowerManaCost = 2;
armor.Attributes.LowerRegCost = 5;
armor.Attributes.Luck = 10;
armor.ColdBonus = 1;
armor.EnergyBonus = 1;
armor.FireBonus = 1;
//armor.ArmorRatingBonus = 2;
armor.PoisonBonus = 1;
DropItem(armor);
armor.Location = new Point3D(115, 88, 0);
armor = new MetalShield();
armor.Hue = 537;
armor.LootType = LootType.Newbied;
armor.ArmorAttributes.DurabilityBonus = 20;
armor.Attributes.AttackChance = 5;
armor.Attributes.DefendChance = 5;
armor.Attributes.SpellChanneling = 1;
armor.Attributes.Luck = 10;
armor.ColdBonus = 1;
armor.EnergyBonus = 1;
armor.FireBonus = 1;
//armor.ArmorRatingBonus = 2;
armor.PoisonBonus = 1;
DropItem(armor);
armor.Location = new Point3D(132, 85, 0);
BaseJewel ring = new GoldRing();
ring.LootType = LootType.Newbied;
ring.Attributes.NightSight = 1;
ring.Attributes.SpellDamage = 5;
ring.Attributes.WeaponDamage = 5;
DropItem(ring);
ring.Location = new Point3D(140, 60, 0);
Item item = new Bandage(100);
DropItem(item);
item.Location = new Point3D(135, 66, 0);
}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:101,代码来源:NewPlayerPackage.cs
示例16: BandageContext
public BandageContext( Mobile healer, Mobile patient, TimeSpan delay, Bandage origin )
{
m_Healer = healer;
m_Patient = patient;
if( m_Patient != null && !m_Patient.Alive )
{
if( m_Healer.Skills[SkillName.Anatomy].Base < 100.0 || m_Healer.Skills[SkillName.Healing].Base < 100.0 )
{
if( m_Healer.Skills[SkillName.Anatomy].Base < 100.0 && m_Healer.Skills[SkillName.Healing].Base < 100.0 )
{
m_Healer.SendAsciiMessage( "You need GM healing and anatomy to resurrect your target." );
return;
}
else if( m_Healer.Skills[SkillName.Anatomy].Base < 100.0 )
{
m_Healer.SendAsciiMessage( "You need GM anatomy to resurrect your target." );
return;
}
else if( m_Healer.Skills[SkillName.Healing].Base < 100.0 )
{
m_Healer.SendAsciiMessage( "You need GM healing to resurrect your target." );
return;
}
}
if( m_Healer.Hits <= 50 )
{
m_Healer.SendAsciiMessage( "You need to have more than 50 hp to resurrect your target" );
return;
}
if( m_Patient.Region is HouseRegion )
{
m_Healer.SendAsciiMessage( "You can't resurrect people in house regions." );
//Server.Multis.BaseHouse patientHouse = (m_Patient.Region as HouseRegion).House;
////The owner can resurrect who ever he wants.
//if (patientHouse.IsOwner(m_Healer) || patientHouse.IsCoOwner(m_Healer))
//{
// m_Patient.Resurrect();
// m_Patient.Hits = 10;
// m_Healer.PublicOverheadMessage(MessageType.Regular, 0x22, true, "*You see " + m_Healer.Name + " resurrecting " + m_Patient.Name + "*");
// m_Healer.Hits -= 50;
//}
////The patient can be ressed by anoyone as long as he is an owner, co owner or friend
//else if (patientHouse.IsOwner(m_Patient) || patientHouse.IsCoOwner(m_Patient) || patientHouse.IsFriend(m_Patient))
//{
// m_Patient.Resurrect();
// m_Patient.Hits = 10;
// m_Healer.PublicOverheadMessage(MessageType.Regular, 0x22, true, "*You see " + m_Healer.Name + " resurrecting " + m_Patient.Name + "*");
// m_Healer.Hits -= 50;
//}
//else
//{
// m_Patient.SendAsciiMessage("You cannot be resurrected in this region!");
// m_Healer.SendAsciiMessage("You cannot resurrect in this region!");
//}
}
else
{
m_Patient.PlaySound( 0x214 );
m_Patient.Resurrect();
m_Patient.Hits = 10;
m_Healer.PublicOverheadMessage( MessageType.Regular, 0x22, true, "*You see " + m_Healer.Name + " resurrecting " + m_Patient.Name + "*" );
m_Healer.Hits -= 50;
origin.Consume(1);
}
}
else
{
m_Timer = new InternalTimer( this, delay, origin );
m_Timer.Start();
}
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:76,代码来源:Bandage.cs
示例17: CreateItem
public static void CreateItem(ItemInfo info, Mobile m)
{
if (m == null)
return;
Item item = null;
BaseCreature bc = null;
switch (info.IncrID)
{
case 0: item = new BlackPearl(999); break;
case 1: item = new Bloodmoss(999); break;
case 2: item = new MandrakeRoot(999); break;
case 3: item = new Garlic(999); break;
case 4: item = new Ginseng(999); break;
case 5: item = new Nightshade(999); break;
case 6: item = new SpidersSilk(999); break;
case 7: item = new SulfurousAsh(999); break;
case 8: item = new Bag();
((Bag)item).DropItem( new BlackPearl(100) );
((Bag)item).DropItem( new Bloodmoss(100) );
((Bag)item).DropItem( new MandrakeRoot(100) );
((Bag)item).DropItem( new Garlic(100) );
((Bag)item).DropItem( new Ginseng(100) );
((Bag)item).DropItem( new Nightshade(100) );
((Bag)item).DropItem( new SpidersSilk(100) );
((Bag)item).DropItem( new SulfurousAsh(100) );
break;
case 9: item = new BatWing(999); break;
case 10: item = new GraveDust(999); break;
case 11: item = new DaemonBlood(999); break;
case 12: item = new NoxCrystal(999); break;
case 13: item = new PigIron(999); break;
case 14: item = new Bag();
((Bag)item).DropItem( new BatWing(100) );
((Bag)item).DropItem( new GraveDust(100) );
((Bag)item).DropItem( new DaemonBlood(100) );
((Bag)item).DropItem( new NoxCrystal(100) );
((Bag)item).DropItem( new PigIron(100) );
break;
case 15: for (int i=0; i < 2; i++) //The last potion is dropped later
{
item = new RefreshPotion();
m.AddToBackpack(item);
}
item = new RefreshPotion();
break;
case 16: for (int i=0; i < 2; i++) //The last potion is dropped later
{
item = new RefreshPotion();
m.AddToBackpack(item);
}
item = new LesserCurePotion();
break;
case 17: for (int i=0; i < 2; i++) //The last potion is dropped later
{
item = new RefreshPotion();
m.AddToBackpack(item);
}
item = new LesserHealPotion();
break;
case 18: for (int i=0; i < 2; i++) //The last potion is dropped later
{
item = new RefreshPotion();
m.AddToBackpack(item);
}
item = new NightSightPotion();
break;
case 19: item = new Bandage(50); break;
case 20: item = new Bandage(200); break;
case 21: item = new Bandage(1000); break;
case 22: item = new Arrow(100); break;
case 23: item = new Arrow(1000); break;
case 24: item = new Bolt(100); break;
case 25: item = new Bolt(1000); break;
case 26: bc = new Horse(); break;
case 27: bc = new PackLlama(); break;
case 28: item = new Club();
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 29: item = new WarFork();
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 30: item = new Katana();
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 31: item = new Bow();
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 32: item = new MetalKiteShield();
BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 33: item = new WoodenShield();
BaseRunicTool.ApplyAttributesTo((BaseShield)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 34: item = new LeatherChest();
BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
case 35: item = new LeatherGloves();
BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax(1, 4), 40, 80);
break;
//.........这里部分代码省略.........
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:101,代码来源:LLVendorItems.cs
示例18: EndHeal
public void EndHeal( Bandage origin )
{
StopHeal();
if( m_Healer is PlayerMobile )
((PlayerMobile)m_Healer).WeaponTimerCheck();
int healerNumber = -1;
int patientNumber = -1;
bool checkSkills = false;
SkillName primarySkill = GetPrimarySkill( m_Patient );
SkillName secondarySkill = GetSecondarySkill( m_Patient );
BaseCreature petPatient = m_Patient as BaseCreature;
if( !m_Healer.Alive )
healerNumber = 500962; // You were unable to finish your work before you died.
else if (m_Healer.Paralyzed)
{
m_Healer.SendAsciiMessage("You were unable to finish your work before you got paralyzed");
return;
}
else if( !m_Healer.InRange( m_Patient, Bandage.Range ) )
healerNumber = 500963; // You did not stay close enough to heal your target.
else if( !m_Patient.Alive || ( petPatient != null && petPatient.IsDeadPet ) )
{
double healing = m_Healer.Skills[primarySkill].Value;
double anatomy = m_Healer.Skills[secondarySkill].Value;
double chance = ( ( healing - 68.0 ) / 50.0 ) - ( m_Slips * 0.02 );
if( ( ( checkSkills = ( healing >= 80.0 && anatomy >= 80.0 ) ) && chance > Utility.RandomDouble() ) || ( Core.SE && petPatient is FactionWarHorse && petPatient.ControlMaster == m_Healer ) )
//TODO: Dbl check doesn't check for faction of the horse here?
{
if( m_Patient.Map == null || !m_Patient.Map.CanFit( m_Patient.Location, 16, false, false ) )
healerNumber = 501042; // Target can not be resurrected at that location.
else if( m_Patient.Region != null && m_Patient.Region.IsPartOf( "Khaldun" ) )
{
healerNumber = 1010395;
// The veil of death in this area is too strong and resists thy efforts to restore life.
}
else
{
healerNumber = 500965; // You are able to resurrect your patient.
m_Patient.FixedEffect( 0x376A, 10, 16 );
if( petPatient != null && petPatient.IsDeadPet )
{
Mobile master = petPatient.ControlMaster;
if (master != null && m_Healer == master)
{
petPatient.ResurrectPet();
for (int i = 0; i < petPatient.Skills.Length; ++i)
{
petPatient.Skills[i].Base -= 0.1;
}
}
else if (master != null && master.InRange(petPatient, 3))
{
healerNumber = 503255; // You are able to resurrect the creature.
master.CloseGump( typeof( PetResurrectGump ) );
master.SendGump( new PetResurrectGump( m_Healer, petPatient ) );
}
else
{
bool found = false;
List<Mobile> friends = petPatient.Friends;
for( int i = 0; friends != null && i < friends.Count; ++i )
{
Mobile friend = friends[i];
if( friend.InRange( petPatient, 3 ) )
{
healerNumber = 503255; // You are able to resurrect the creature.
friend.CloseGump( typeof( PetResurrectGump ) );
friend.SendGump( new PetResurrectGump( m_Healer, petPatient ) );
found = true;
break;
}
}
if( !found )
healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection.
}
}
else
{
m_Patient.CloseGump( typeof( ResurrectGump ) );
m_Patient.SendGump( new ResurrectGump( m_Patient, m_Healer ) );
}
}
}
//.........这里部分代码省略.........
开发者ID:FreeReign,项目名称:imaginenation,代码行数:101,代码来源:Bandage.cs
示例19: BeginHeal
public static BandageContext BeginHeal( Mobile healer, Mobile patient, Bandage origin )
{
bool isDeadPet = ( patient is BaseCreature && ( (BaseCreature)patient ).IsDeadPet );
if( patient is Golem )
{
healer.SendLocalizedMessage( 500970 ); // Bandages cannot be used on that.
}
else if( patient is BaseCreature && ( (BaseCreature)patient ).IsAnimatedDead )
{
healer.SendLocalizedMessage( 500951 ); // You cannot heal that.
}
else if( !patient.Poisoned && patient.Hits >= patient.HitsMax && !BleedAttack.IsBleeding( patient ) && !isDeadPet )
{
healer.SendAsciiMessage("That being is not damaged!");
}
else if( !patient.Alive && ( patient.Map == null || !patient.Map.CanFit( patient.Location, 16, false, false ) ) )
{
healer.SendLocalizedMessage( 501042 ); // Target cannot be resurrected at that location.
}
else if( healer.CanBeBeneficial( patient, true, true ) )
{
//Maka
if( healer is PlayerMobile )
((PlayerMobile)healer).WeaponTimerCheck();
healer.RevealingAction();
if ( patient.Player)
healer.DoBeneficial( patient );
bool onSelf = ( healer == patient );
int dex = healer.Dex;
//double seconds;
double bandageDelay = ( patient.Alive ? 2.5 : 0.0 );
/*
if ( onSelf )
{
if ( Core.AOS )
seconds = 5.0 + (0.5 * ((double)(120 - dex) / 10)); // TODO: Verify algorithm
else
seconds = 9.4 + (0.6 * ((double)(120 - dex) / 10));
}
else
{
if ( Core.AOS && GetPrimarySkill( patient ) == SkillName.Veterinary )
{
seconds = 2.0;
}
else if ( Core.AOS )
{
if (dex < 204)
{
seconds = 3.2-(Math.Sin((double)dex/130)*2.5) + resDelay;
}
else
{
seconds = 0.7 + resDelay;
}
}
else
{
if ( dex >= 100 )
seconds = 3.0 + resDelay;
else if ( dex >= 40 )
seconds = 4.0 + resDelay;
else
seconds = 5.0 + resDelay;
}
}
*/
BandageContext context = GetContext( healer );
if( context != null )
context.StopHeal();
//seconds *= 1000;
//context = new BandageContext(healer, patient, TimeSpan.FromMilliseconds(seconds));
context = new BandageContext( healer, patient, TimeSpan.FromSeconds( bandageDelay ), origin );
m_Table[healer] = context;
healer.SendAsciiMessage( string.Format( "You put the clean bandages on the wounded {0}.", patient.Name ) );
return context;
}
return null;
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:90,代码来源:Bandage.cs
示例20: InternalTimer
public InternalTimer( BandageContext context, TimeSpan delay, Bandage origin ) : base( delay )
{
m_Context = context;
Priority = TimerPriority.FiftyMS;
m_Origin = origin;
//if (context.Healer != context.Patient)
// context.Patient.SendAsciiMessage(string.Format("{0} begins to heal you.", context.Healer.Name));
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:9,代码来源:Bandage.cs
注:本文中的Server.Items.Bandage类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论