当前位置: 首页>>代码示例>>C#>>正文


C# Factions.Faction类代码示例

本文整理汇总了C#中Server.Factions.Faction的典型用法代码示例。如果您正苦于以下问题:C# Faction类的具体用法?C# Faction怎么用?C# Faction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Faction类属于Server.Factions命名空间,在下文中一共展示了Faction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Election

		public Election( Faction faction )
		{
			m_Faction = faction;
			m_Candidates = new List<Candidate>();

			StartTimer();
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:Election.cs

示例2: Generate

        public static void Generate(Faction faction)
        {
            Map facet = Faction.Facet;

            List<Town> towns = Town.Towns;

            StrongholdDefinition stronghold = faction.Definition.Stronghold;

			if (!CheckExistance(stronghold.JoinStone, facet, typeof(JoinStone)))
			{
				JoinStone join = new JoinStone(faction);
				WeakEntityCollection.Add("factions", join);
				join.MoveToWorld(stronghold.JoinStone, facet);
			}

			if (!CheckExistance(stronghold.FactionStone, facet, typeof(FactionStone)))
			{
				FactionStone stone = new FactionStone(faction);
				WeakEntityCollection.Add("factions", stone);
				stone.MoveToWorld(stronghold.FactionStone, facet);
			}

            for (int i = 0; i < stronghold.Monoliths.Length; ++i)
            {
                Point3D monolith = stronghold.Monoliths[i];

				if (!CheckExistance(monolith, facet, typeof(StrongholdMonolith)))
				{
					StrongholdMonolith mono = new StrongholdMonolith(towns[i], faction);
					WeakEntityCollection.Add("factions", mono);
					mono.MoveToWorld(monolith, facet);
				}
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:34,代码来源:Generator.cs

示例3: InitOutfit

		public override void InitOutfit( Faction faction )
		{
			new Horse().Rider = this;

			AddItem( new StuddedChest() );
			AddItem( new StuddedArms() );
			AddItem( new StuddedGloves() );
			AddItem( new StuddedGorget() );
			AddItem( new StuddedLegs() );
			AddItem( new Boots() );
			AddItem( new SkullCap() );

			Bow bow = new Bow();

			bow.Movable = false;
			bow.Crafter = this;
			bow.Quality = WeaponQuality.Exceptional;

			AddItem( bow );

			Container pack = new Backpack();

			pack.Movable = false;

			Arrow arrows = new Arrow( 250 );

			arrows.LootType = LootType.Newbied;

			pack.DropItem( arrows );
			pack.DropItem( new Gold( 10, 25 ) );

			AddItem( pack );
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:33,代码来源:ArcherGuard.cs

示例4: InitBody

		public override void InitBody( Faction faction )
		{
			InitStats( 100, 125, 25 );
			Title = "the guard";

			SpeechHue = Utility.RandomDyedHue();

			Hue = Utility.RandomSkinHue();

			if ( Female = Utility.RandomBool() )
			{
				Body = 0x191;
				Name = NameList.RandomName( "female" );
			}
			else
			{
				Body = 0x190;
				Name = NameList.RandomName( "male" );
			}

			Skills[SkillName.Anatomy].Base = 120.0;
			Skills[SkillName.Tactics].Base = 120.0;
			Skills[SkillName.Archery].Base = 120.0;
			Skills[SkillName.MagicResist].Base = 120.0;
			Skills[SkillName.DetectHidden].Base = 100.0;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:26,代码来源:ArcherGuard.cs

示例5: PlayerState

        public PlayerState(GenericReader reader, Faction faction, List<PlayerState> owner)
        {
            this.m_Faction = faction;
            this.m_Owner = owner;

            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 1:
                    {
                        this.m_IsActive = reader.ReadBool();
                        this.m_LastHonorTime = reader.ReadDateTime();
                        goto case 0;
                    }
                case 0:
                    {
                        this.m_Mobile = reader.ReadMobile();

                        this.m_KillPoints = reader.ReadEncodedInt();
                        this.m_MerchantTitle = (MerchantTitle)reader.ReadEncodedInt();

                        this.m_Leaving = reader.ReadDateTime();

                        break;
                    }
            }

            this.Attach();
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:30,代码来源:PlayerState.cs

示例6: Generate

        public static void Generate( Faction faction )
        {
            Map facet = Faction.Facet;

            TownCollection towns = Town.Towns;

            StrongholdDefintion stronghold = faction.Definition.Stronghold;

            if ( !CheckExistance( stronghold.JoinStone, facet, typeof( JoinStone ) ) )
            {
                new JoinStone( faction ).MoveToWorld( stronghold.JoinStone, facet );
            }

            if ( !CheckExistance( stronghold.FactionStone, facet, typeof( FactionStone ) ) )
            {
                new FactionStone( faction ).MoveToWorld( stronghold.FactionStone, facet );
            }

            for ( int i = 0; i < stronghold.Monoliths.Length; ++i )
            {
                Point3D monolith = stronghold.Monoliths[i];

                if ( !CheckExistance( monolith, facet, typeof( StrongholdMonolith ) ) )
                {
                    new StrongholdMonolith( towns[i], faction ).MoveToWorld( monolith, facet );
                }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:28,代码来源:Generator.cs

示例7: JoinStoneGump

        public JoinStoneGump(PlayerMobile from, Faction faction)
            : base(20, 30)
        {
            this.m_From = from;
            this.m_Faction = faction;

            this.AddPage(0);

            this.AddBackground(0, 0, 550, 440, 5054);
            this.AddBackground(10, 10, 530, 420, 3000);

            this.AddHtmlText(20, 30, 510, 20, faction.Definition.Header, false, false);
            this.AddHtmlText(20, 130, 510, 100, faction.Definition.About, true, true);

            this.AddHtmlLocalized(20, 60, 100, 20, 1011429, false, false); // Led By :
            this.AddHtml(125, 60, 200, 20, faction.Commander != null ? faction.Commander.Name : "Nobody", false, false);

            this.AddHtmlLocalized(20, 80, 100, 20, 1011457, false, false); // Tithe rate :
            if (faction.Tithe >= 0 && faction.Tithe <= 100 && (faction.Tithe % 10) == 0)
                this.AddHtmlLocalized(125, 80, 350, 20, 1011480 + (faction.Tithe / 10), false, false);
            else
                this.AddHtml(125, 80, 350, 20, faction.Tithe + "%", false, false);

            this.AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(55, 400, 200, 20, 1011425, false, false); // JOIN THIS FACTION

            this.AddButton(300, 400, 4005, 4007, 0, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(335, 400, 200, 20, 1011012, false, false); // CANCEL
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:29,代码来源:JoinStoneGump.cs

示例8: Election

        public Election(GenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 0:
                    {
                        this.m_Faction = Faction.ReadReference(reader);

                        this.m_LastStateTime = reader.ReadDateTime();
                        this.m_State = (ElectionState)reader.ReadEncodedInt();

                        this.m_Candidates = new List<Candidate>();

                        int count = reader.ReadEncodedInt();

                        for (int i = 0; i < count; ++i)
                        {
                            Candidate cd = new Candidate(reader);

                            if (cd.Mobile != null)
                                this.m_Candidates.Add(cd);
                        }

                        break;
                    }
            }

            this.StartTimer();
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:31,代码来源:Election.cs

示例9: EventWarHorse

		public EventWarHorse( Faction faction ) : base( "a war horse", 0xE2, 0x3EA0, AIType.AI_Melee, FightMode.Agressor, 10, 1, 0.2, 0.4 )
		{
			BaseSoundID = 0xA8;

			SetStr( 400 );
			SetDex( 180 );
			SetInt( 100 );

			SetHits( 300 );
			SetMana( 100 );
			SetStam( 180 );

			SetDamage( 15, 25 );

			SetSkill( SkillName.MagicResist, 100 );
			SetSkill( SkillName.Tactics, 120 );
			SetSkill( SkillName.Wrestling, 120 );

			Fame = 300;
			Karma = 300;

			Tamable = true;
			ControlSlots = 1;

			Faction = faction;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:26,代码来源:Eventwarhorse.cs

示例10: FactionTownStoneGump

		public FactionTownStoneGump( PlayerMobile from, Faction faction, Town town ) : base( 50, 50 )
		{
			m_From = from;
			m_Faction = faction;
			m_Town = town;

			AddPage( 0 );

			AddBackground( 0, 0, 320, 250, 5054 );
			AddBackground( 10, 10, 300, 230, 3000 );

			AddHtmlText( 25, 30, 250, 25, town.Definition.FactionTownStoneHeader, false, false );

			AddHtmlLocalized( 55, 60, 150, 25, 1011557, false, false ); // Hire Sheriff
			AddButton( 20, 60, 4005, 4007, 1, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 55, 90, 150, 25, 1011559, false, false ); // Hire Finance Minister
			AddButton( 20, 90, 4005, 4007, 2, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 55, 120, 150, 25, 1011558, false, false ); // Fire Sheriff
			AddButton( 20, 120, 4005, 4007, 3, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 55, 150, 150, 25, 1011560, false, false ); // Fire Finance Minister
			AddButton( 20, 150, 4005, 4007, 4, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 55, 210, 150, 25, 1011441, false, false ); // EXIT
			AddButton( 20, 210, 4005, 4007, 0, GumpButtonType.Reply, 0 );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:28,代码来源:TownStoneGump.cs

示例11: StrongholdRegion

        public StrongholdRegion(Faction faction)
            : base(faction.Definition.FriendlyName, Faction.Facet, Region.DefaultPriority, faction.Definition.Stronghold.Area)
        {
            this.m_Faction = faction;

            this.Register();
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:StrongholdRegion.cs

示例12: Election

		public Election( Faction faction )
		{
			m_Faction = faction;
			m_Candidates = new CandidateCollection();

			StartTimer();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:Election.cs

示例13: BaseMonolith

		public BaseMonolith( Town town, Faction faction ) : base( 0x1183 )
		{
			Movable = false;
			Town = town;
			Faction = faction;
			m_Monoliths.Add( this );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:BaseMonolith.cs

示例14: FactionWarHorse

		public FactionWarHorse( Faction faction ) : base( 0xE2, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
		{
			BaseSoundID = 0xA8;

			SetStr( 400, 550 );
			SetDex( 180 );
			SetInt( 51, 55 );

			SetHits( 240 );
			SetMana( 0 );

			SetDamage( 2, 4 );

			

			
			
			
			
			

			SetSkill( SkillName.MagicResist, 25.1, 30.0 );
			SetSkill( SkillName.Tactics, 29.3, 44.0 );
			SetSkill( SkillName.Wrestling, 29.3, 44.0 );

			Fame = 300;
			Karma = 300;

			Tamable = true;
			ControlSlots = 1;

			Faction = faction;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:33,代码来源:FactionWarHorse.cs

示例15: FactionHorseVendor

 public FactionHorseVendor( Town town, Faction faction )
     : base(town, faction, "the Horse Breeder")
 {
     SetSkill( SkillName.AnimalLore, 64.0, 100.0 );
     SetSkill( SkillName.AnimalTaming, 90.0, 100.0 );
     SetSkill( SkillName.Veterinary, 65.0, 88.0 );
 }
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:7,代码来源:FactionHorseVendor.cs


注:本文中的Server.Factions.Faction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。