コード例 #1
0
        public virtual bool Payday(BaseHire m)
        {
            m_Pay  = 0;
            m_Pay += (int)m.Skills[SkillName.Macing].Base + (int)m.Skills[SkillName.Swords].Base;
            m_Pay += (int)m.Skills[SkillName.Fencing].Base + (int)m.Skills[SkillName.Wrestling].Base;

            if (m_Pay < 50)
            {
                m_Pay = 6;
            }
            else if (m_Pay >= 50 && m_Pay < 65)
            {
                m_Pay = 7;
            }
            else if (m_Pay >= 65 && m_Pay < 80)
            {
                m_Pay = 8;
            }
            else
            {
                m_Pay = 9;
            }

            return(true);
        }
コード例 #2
0
        public override bool OnDragDrop(Mobile from, Item item)
        {
            if (m_Pay != 0)
            {
                // Is the creature already hired
                if (Controlled == false)
                {
                    // Is the item the payment in gold
                    if (item is Gold)
                    {
                        // Is the payment in gold sufficient
                        if (item.Amount >= m_Pay)
                        {
                            // Check if this mobile already has a hire
                            BaseHire hire = (BaseHire)m_HireTable[from];

                            if (hire != null && !hire.Deleted && hire.GetOwner() == from)
                            {
                                SayTo(from, 500896);                                   // I see you already have an escort.
                                return(false);
                            }

                            // Try to add the hireling as a follower
                            if (AddHire(from) == true)
                            {
                                SayTo(from, 1043258, string.Format("{0}", (int)item.Amount / m_Pay));                                     //"I thank thee for paying me. I will work for thee for ~1_NUMBER~ days.", (int)item.Amount / m_Pay );
                                m_HireTable[from] = this;
                                m_HoldGold       += item.Amount;
                                m_PayTimer        = new PayTimer(this);
                                m_PayTimer.Start();
                                return(true);
                            }
                            else
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            this.SayHireCost();
                        }
                    }
                    else
                    {
                        SayTo(from, 1043268);                           // Tis crass of me, but I want gold
                    }
                }
                else
                {
                    Say(1042495);                      // I have already been hired.
                }
            }
            else
            {
                SayTo(from, 500200);                   // I have no need for that.
            }

            return(base.OnDragDrop(from, item));
        }
コード例 #3
0
 public virtual bool Payday(BaseHire m)
 {
     if (m_Scale == 0.0)
     {
         m_Scale = 1.0 * (Teiravon.TAVUtilities.CalculateLevel(m) / 100.0);
     }
     m_Pay = m_Pay < 10 ? 10 : m_Pay;
     return(true);
 }
コード例 #4
0
 public virtual bool Payday(BaseHire m)
 {
     m_Pay  = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactics].Value;
     m_Pay += (int)m.Skills[SkillName.Macing].Value + (int)m.Skills[SkillName.Swords].Value;
     m_Pay += (int)m.Skills[SkillName.Fencing].Value + (int)m.Skills[SkillName.Archery].Value;
     m_Pay += (int)m.Skills[SkillName.MagicResist].Value + (int)m.Skills[SkillName.Healing].Value;
     m_Pay += (int)m.Skills[SkillName.Magery].Value + (int)m.Skills[SkillName.Parry].Value;
     m_Pay /= 35;
     m_Pay += 1;
     return(true);
 }
コード例 #5
0
        public override bool OnDragDrop(Mobile from, Item item)
        {
            if (m_PayRate > 0)
            {
                // Is the creature already hired
                if (Controlled == false)
                {
                    // Is the item the payment in gold
                    if (item is Gold)
                    {
                        Gold payment = (Gold)item;

                        // Is the payment in gold sufficient
                        if (payment.Amount >= m_PayRate)
                        {
                            // Check if this mobile already has a hire
                            BaseHire hire = (BaseHire)HireTable[from];

                            if ((hire != null) &&
                                (hire.Deleted == false) &&
                                (hire.Alive == true) &&
                                (hire.GetOwner() == from))
                            {
                                SayTo(from, 500896);                                   // I see you already have an escort.
                                return(false);
                            }

                            // Try to add the hireling as a follower
                            return(AddHire(from, payment));
                        }
                        else
                        {
                            this.SayHireCost();
                        }
                    }
                    else
                    {
                        SayTo(from, 1043268);                           // Tis crass of me, but I want gold
                    }
                }
                else
                {
                    Say(1042495);                      // I have already been hired.
                }
            }
            else
            {
                SayTo(from, 500200);                   // I have no need for that.
            }

            return(base.OnDragDrop(from, item));
        }
コード例 #6
0
ファイル: BaseHire.cs プロジェクト: jicomub/Temrael
 public virtual bool Payday(BaseHire m)
 {
     if (IsInArmy || IsHired)
     {
         return(false);
     }
     //m_Pay = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactiques].Value;
     m_Pay  = (int)m.Skills[SkillName.ArmeContondante].Value + (int)m.Skills[SkillName.Epee].Value;
     m_Pay += (int)m.Skills[SkillName.ArmePerforante].Value + (int)m.Skills[SkillName.ArmeDistance].Value;
     m_Pay += (int)m.Skills[SkillName.Concentration].Value + (int)m.Skills[SkillName.Soins].Value;
     m_Pay += (int)m.Skills[SkillName.ArtMagique].Value + (int)m.Skills[SkillName.Parer].Value;
     m_Pay /= 10;
     m_Pay += 10;
     return(true);
 }
コード例 #7
0
ファイル: BaseHire.cs プロジェクト: tflynt91/TrueUO
            public static void RemoveTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    return;
                }

                if (Instance.Hires.Contains(hire))
                {
                    Instance.Hires.Remove(hire);

                    if (Instance.Hires.Count == 0)
                    {
                        Instance.Stop();
                    }
                }
            }
コード例 #8
0
ファイル: BaseHire.cs プロジェクト: tflynt91/TrueUO
            public static void RegisterTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    Instance = new PayTimer();
                }

                if (!Instance.Running)
                {
                    Instance.Start();
                }

                if (!Instance.Hires.Contains(hire))
                {
                    Instance.Hires.Add(hire);
                }
            }
コード例 #9
0
        public static void Initialize()
        {
            foreach (object o in World.Mobiles.Values)
            {
                if (o is BaseHire)
                {
                    BaseHire bh = (BaseHire)o;

                    Mobile Owner = bh.ControlMaster;

                    if (Owner != null)
                    {
                        HireTable[Owner] = bh;
                    }
                }
            }
        }
コード例 #10
0
        public virtual bool Payday(BaseHire m)
        {
            if (m is HireBard)
            {
                m_Pay = 20;
            }
            else if (m is HireBeggar)
            {
                m_Pay = 10;
            }
            else if (m is HireFighter || m is HireMercenary || m is HireWarrior)
            {
                m_Pay = 60;
            }
            else if (m is HireMage)
            {
                m_Pay = 60;
            }
            else if (m is HirePaladin)
            {
                m_Pay = 80;
            }
            else if (m is HirePeasant)
            {
                m_Pay = 10;
            }
            else if (m is HireRanger)
            {
                m_Pay = 70;
            }
            else if (m is HireSailor)
            {
                m_Pay = 50;
            }
            else if (m is HireThief)
            {
                m_Pay = 60;
            }
            else if (m is HirePirate)
            {
                m_Pay = 70;
            }

            return(true);
        }
コード例 #11
0
ファイル: BaseHire.cs プロジェクト: ygtkms/ServUO
            public static void RegisterTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    Instance = new PayTimer();
                }

                if (!Instance.Running)
                {
                    Instance.Start();
                }

                if (!Instance.Hires.Contains(hire))
                {
                    Console.WriteLine("ADding hire: {0}", hire);
                    Instance.Hires.Add(hire);
                }
            }
コード例 #12
0
ファイル: BaseHire.cs プロジェクト: ygtkms/ServUO
            public static void RemoveTimer(BaseHire hire)
            {
                if (Instance == null)
                {
                    return;
                }

                if (Instance.Hires.Contains(hire))
                {
                    Console.WriteLine("Removing Hire: {0}", hire);
                    Instance.Hires.Remove(hire);

                    if (Instance.Hires.Count == 0)
                    {
                        Instance.Stop();
                    }
                }
            }
コード例 #13
0
ファイル: BaseHire.cs プロジェクト: zerodowned/angelisland
        public virtual bool Payday( BaseHire m ) 
        { 
        	m_Pay = 0;
            m_Pay += (int)m.Skills[SkillName.Macing].Base + (int)m.Skills[SkillName.Swords].Base; 
            m_Pay += (int)m.Skills[SkillName.Fencing].Base + (int)m.Skills[SkillName.Wrestling].Base;
        	
			if ( m_Pay < 50 )
			{
				m_Pay = 6;
			}
			else if ( m_Pay >= 50 && m_Pay < 65 )
			{
				m_Pay = 7;
			}
			else if ( m_Pay >= 65 && m_Pay < 80 )
			{
				m_Pay = 8;
			}
			else
			{
				m_Pay = 9;
			}

            return true; 
        } 
コード例 #14
0
ファイル: BaseHire.cs プロジェクト: Ravenwolfe/xrunuo
 public HireEntry( BaseHire hire )
     : base(6120, 3)
 {
     m_Hire = hire;
 }
コード例 #15
0
ファイル: BaseHire.cs プロジェクト: twlizer/runuo
 public HireEntry(Mobile from, BaseHire hire) : base(6120, 3)
 {
     m_Hire   = hire;
     m_Mobile = from;
 }
コード例 #16
0
ファイル: BaseHire.cs プロジェクト: twlizer/runuo
 public PayTimer(BaseHire vend) : base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0))
 {
     m_Hire   = vend;
     Priority = TimerPriority.OneMinute;
 }
コード例 #17
0
ファイル: BaseHire.cs プロジェクト: greeduomacro/last-wish
			public HireEntry( Mobile from, BaseHire hire ) : base( 6120, 3 )
			{ 
				m_Hire = hire;
				m_Mobile = from;
			}
コード例 #18
0
ファイル: BaseHire.cs プロジェクト: greeduomacro/last-wish
			public PayTimer( BaseHire vend ) : base( TimeSpan.FromMinutes( 30.0 ), TimeSpan.FromMinutes( 30.0 ) ) 
			{ 
				m_Hire = vend;
				Priority = TimerPriority.OneMinute;
			}
コード例 #19
0
ファイル: BaseHire.cs プロジェクト: greeduomacro/last-wish
		public virtual bool Payday( BaseHire m ) 
		{ 
			m_Pay = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactics].Value;
			m_Pay += (int)m.Skills[SkillName.Macing].Value + (int)m.Skills[SkillName.Swords].Value;
			m_Pay += (int)m.Skills[SkillName.Fencing].Value + (int)m.Skills[SkillName.Archery].Value;
			m_Pay += (int)m.Skills[SkillName.MagicResist].Value + (int)m.Skills[SkillName.Healing].Value;
			m_Pay += (int)m.Skills[SkillName.Magery].Value + (int)m.Skills[SkillName.Parry].Value;
			m_Pay /= 35;
			m_Pay += 1;
			return true;
		}
コード例 #20
0
ファイル: BaseHire.cs プロジェクト: Ravenwolfe/xrunuo
 public PayTimer( BaseHire vend )
     : base(TimeSpan.FromMinutes( 30.0 ), TimeSpan.FromMinutes( 30.0 ))
 {
     m_Hire = vend;
 }
コード例 #21
0
ファイル: BaseHire.cs プロジェクト: FreeReign/Rebirth-Repack
 public PayTimer( BaseHire hire )
     : base(TimeSpan.FromMinutes( Clock.MinutesPerUODay ), TimeSpan.FromMinutes( Clock.MinutesPerUODay ))
 {
     m_Hire = hire;
     Priority = TimerPriority.OneMinute;
 }
コード例 #22
0
 public PayTimer(BaseHire vend)
     : base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0))
 {
     m_Hire = vend;
 }
コード例 #23
0
ファイル: BaseHire.cs プロジェクト: Godkong/RunUO
        public virtual bool Payday( BaseHire m )
        {
            if (m is HireBard)
                m_Pay = 20;
            else if (m is HireBeggar)
                m_Pay = 10;
            else if (m is HireFighter || m is HireMercenary || m is HireWarrior)
                m_Pay = 60;
            else if (m is HireMage)
                m_Pay = 60;
            else if (m is HirePaladin)
                m_Pay = 80;
            else if (m is HirePeasant)
                m_Pay = 10;
            else if (m is HireRanger)
                m_Pay = 70;
            else if (m is HireSailor)
                m_Pay = 50;
            else if (m is HireThief)
                m_Pay = 60;
            else if (m is HirePirate)
                m_Pay = 70;

            return true;
        }
コード例 #24
0
ファイル: BaseHire.cs プロジェクト: ITLongwell/aedilis2server
        public virtual bool Payday( BaseHire m ) 
        { 

	    m_Pay = 100; 

            return true; 
        } 
コード例 #25
0
 public HireEntry(BaseHire hire)
     : base(6120, 3)
 {
     m_Hire = hire;
 }
コード例 #26
0
 public PayTimer(BaseHire vend)
     : base(TimeSpan.FromMinutes(Clock.MinutesPerUODay), TimeSpan.FromMinutes(Clock.MinutesPerUODay))
 {
     m_Hire   = vend;
     Priority = TimerPriority.OneMinute;
 }