示例#1
0
		private void LinkAuctionSetter()
		{
			if (AuctionMgr.AllowInterFactionAuctions)
			{
				Auctions = AuctionMgr.Instance.NeutralAuctions;
				LinkedHouseFaction = AuctionHouseFaction.Neutral;
			}
			else
			{
				if (npc.Faction.IsAlliance)
				{
					Auctions = AuctionMgr.Instance.AllianceAuctions;
					LinkedHouseFaction = AuctionHouseFaction.Alliance;
				}
				else if (npc.Faction.IsHorde)
				{
					Auctions = AuctionMgr.Instance.HordeAuctions;
					LinkedHouseFaction = AuctionHouseFaction.Horde;
				}
				else
				{
					Auctions = AuctionMgr.Instance.NeutralAuctions;
					LinkedHouseFaction = AuctionHouseFaction.Neutral;
				}
			}
		}
示例#2
0
 private void LinkAuctionSetter()
 {
     if (AuctionMgr.AllowInterFactionAuctions)
     {
         Auctions           = AuctionMgr.Instance.NeutralAuctions;
         LinkedHouseFaction = AuctionHouseFaction.Neutral;
     }
     else
     {
         if (npc.Faction.IsAlliance)
         {
             Auctions           = AuctionMgr.Instance.AllianceAuctions;
             LinkedHouseFaction = AuctionHouseFaction.Alliance;
         }
         else if (npc.Faction.IsHorde)
         {
             Auctions           = AuctionMgr.Instance.HordeAuctions;
             LinkedHouseFaction = AuctionHouseFaction.Horde;
         }
         else
         {
             Auctions           = AuctionMgr.Instance.NeutralAuctions;
             LinkedHouseFaction = AuctionHouseFaction.Neutral;
         }
     }
 }
示例#3
0
 private static uint CalcAuctionCut(AuctionHouseFaction houseFaction, uint bid)
 {
     if (houseFaction == AuctionHouseFaction.Neutral && !AllowInterFactionAuctions)
     {
         return((uint)(0.150000005960464 * bid * AuctionHouseCutRate));
     }
     return((uint)(0.0500000007450581 * bid * AuctionHouseCutRate));
 }
示例#4
0
        private static uint GetAuctionDeposit(Item item, AuctionHouseFaction houseFaction, uint timeInMin)
        {
            if (item == null)
            {
                return(0);
            }
            uint houseDepositPercent = FactionHouseDepositPercent;

            if (houseFaction == AuctionHouseFaction.Neutral && !AllowInterFactionAuctions)
            {
                houseDepositPercent = NeutralHouseDepositPercent;
            }
            return(item.Template.SellPrice * (uint)item.Amount * houseDepositPercent / 100U * (timeInMin / 720U));
        }
示例#5
0
        private static uint GetAuctionDeposit(Item item, AuctionHouseFaction houseFaction, uint timeInMin)
        {
            if (item == null)
            {
                return(0);
            }

            var percent = FactionHouseDepositPercent;

            if (houseFaction == AuctionHouseFaction.Neutral && !AllowInterFactionAuctions)
            {
                percent = NeutralHouseDepositPercent;
            }

            var sellPrice = item.Template.SellPrice * (uint)item.Amount;

            return(((sellPrice * percent) / 100) * (timeInMin / (12 * 60)));            // deposit is per 12 hour interval
        }
示例#6
0
 private void LinkAuctionSetter()
 {
     if (AuctionMgr.AllowInterFactionAuctions)
     {
         this.Auctions           = Singleton <AuctionMgr> .Instance.NeutralAuctions;
         this.LinkedHouseFaction = AuctionHouseFaction.Neutral;
     }
     else if (this.npc.Faction.IsAlliance)
     {
         this.Auctions           = Singleton <AuctionMgr> .Instance.AllianceAuctions;
         this.LinkedHouseFaction = AuctionHouseFaction.Alliance;
     }
     else if (this.npc.Faction.IsHorde)
     {
         this.Auctions           = Singleton <AuctionMgr> .Instance.HordeAuctions;
         this.LinkedHouseFaction = AuctionHouseFaction.Horde;
     }
     else
     {
         this.Auctions           = Singleton <AuctionMgr> .Instance.NeutralAuctions;
         this.LinkedHouseFaction = AuctionHouseFaction.Neutral;
     }
 }
示例#7
0
 public static IEnumerable <Auction> GetAffiliatedAuctions(AuctionHouseFaction houseFaction)
 {
     return(FindAllByProperty("_houseFaction", (int)houseFaction));
 }
示例#8
0
		public static IEnumerable<Auction> GetAffiliatedAuctions(AuctionHouseFaction houseFaction)
		{
			return RealmWorldDBMgr.DatabaseProvider.FindAll<Auction>(auction => auction.HouseFaction == houseFaction);
		}
示例#9
0
 public static IEnumerable <Auction> GetAffiliatedAuctions(AuctionHouseFaction houseFaction)
 {
     return((IEnumerable <Auction>) ActiveRecordBase <Auction> .FindAllByProperty("_houseFaction",
                                                                                  (object)(int)houseFaction));
 }