public static long GetRegisterCost(NkSoldierInfo SoldierInfo, long lSellCost, AuctionDefine.ePAYTYPE ePayType) { long result = 0L; if (SoldierInfo == null) { return(result); } int num = (int)AuctionMainDlg.GetAuctionSellPrice(); long num2 = (long)((int)SoldierInfo.GetLevel() * num); float auctionSellPriceRate = AuctionMainDlg.GetAuctionSellPriceRate(); long num3 = (long)((float)lSellCost * auctionSellPriceRate); if (ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS) { int heartsValue = AuctionMainDlg.GetHeartsValue(); if (0 < heartsValue) { num3 *= (long)heartsValue; } } result = num2; if (num2 < num3) { result = num3; } return(result); }
public static long GetRegisterCost(ITEM Item, long lSellCost, AuctionDefine.ePAYTYPE ePayType) { long result = 0L; if (Item == null) { return(result); } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(Item.m_nItemUnique); if (itemInfo != null) { int num = (int)AuctionMainDlg.GetAuctionSellPrice(); long num2 = (long)(itemInfo.m_nUseMinLevel * num); float auctionSellPriceRate = AuctionMainDlg.GetAuctionSellPriceRate(); long num3 = (long)((float)lSellCost * auctionSellPriceRate); if (ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS) { int heartsValue = AuctionMainDlg.GetHeartsValue(); if (0 < heartsValue) { num3 *= (long)heartsValue; } } result = num2; if (num2 < num3) { result = num3; } } return(result); }