Exemple #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;
				}
			}
		}
 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;
         }
     }
 }
Exemple #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));
 }
Exemple #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));
        }
Exemple #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
        }
Exemple #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;
     }
 }
Exemple #7
0
 public static IEnumerable <Auction> GetAffiliatedAuctions(AuctionHouseFaction houseFaction)
 {
     return(FindAllByProperty("_houseFaction", (int)houseFaction));
 }
Exemple #8
0
		public static IEnumerable<Auction> GetAffiliatedAuctions(AuctionHouseFaction houseFaction)
		{
			return RealmWorldDBMgr.DatabaseProvider.FindAll<Auction>(auction => auction.HouseFaction == houseFaction);
		}
Exemple #9
0
 public static IEnumerable <Auction> GetAffiliatedAuctions(AuctionHouseFaction houseFaction)
 {
     return((IEnumerable <Auction>) ActiveRecordBase <Auction> .FindAllByProperty("_houseFaction",
                                                                                  (object)(int)houseFaction));
 }