Remove unsued properties + improved how user data is stored/generated
This commit is contained in:
parent
43d7e05f21
commit
4b8b3b77a7
@ -101,7 +101,7 @@ export class RagfairOfferGenerator
|
||||
* @param items Items in the offer
|
||||
* @param barterScheme Cost of item (currency or barter)
|
||||
* @param loyalLevel Loyalty level needed to buy item
|
||||
* @param sellInOnePiece Set StackObjectsCount to 1
|
||||
* @param isPackOffer Is offer being created flaged as a pack
|
||||
* @returns IRagfairOffer
|
||||
*/
|
||||
protected createOffer(
|
||||
@ -110,7 +110,7 @@ export class RagfairOfferGenerator
|
||||
items: Item[],
|
||||
barterScheme: IBarterScheme[],
|
||||
loyalLevel: number,
|
||||
sellInOnePiece = false,
|
||||
isPackOffer = false,
|
||||
): IRagfairOffer
|
||||
{
|
||||
const isTrader = this.ragfairServerHelper.isTrader(userID);
|
||||
@ -148,12 +148,9 @@ export class RagfairOfferGenerator
|
||||
startTime: time,
|
||||
endTime: this.getOfferEndTime(userID, time),
|
||||
loyaltyLevel: loyalLevel,
|
||||
sellInOnePiece: sellInOnePiece,
|
||||
priority: false,
|
||||
sellInOnePiece: isPackOffer,
|
||||
locked: false,
|
||||
unlimitedCount: false,
|
||||
notAvailable: false,
|
||||
CurrentItemCount: itemRootCount,
|
||||
};
|
||||
|
||||
this.offerCounter++;
|
||||
@ -184,9 +181,10 @@ export class RagfairOfferGenerator
|
||||
const playerProfile = this.profileHelper.getPmcProfile(userID)!;
|
||||
return {
|
||||
id: playerProfile._id,
|
||||
memberType: MemberCategory.DEFAULT,
|
||||
memberType: playerProfile.Info.MemberCategory,
|
||||
selectedMemberCategory: playerProfile.Info.SelectedMemberCategory,
|
||||
nickname: playerProfile.Info.Nickname,
|
||||
rating: playerProfile.RagfairInfo.rating,
|
||||
rating: playerProfile.RagfairInfo.rating ?? 0,
|
||||
isRatingGrowing: playerProfile.RagfairInfo.isRatingGrowing,
|
||||
avatar: undefined,
|
||||
aid: playerProfile.aid,
|
||||
|
@ -24,10 +24,6 @@ export interface IRagfairOffer
|
||||
/** Rouble price */
|
||||
summaryCost: number
|
||||
user: IRagfairOfferUser
|
||||
notAvailable: boolean
|
||||
/** TODO - implement this value - not currently used */
|
||||
CurrentItemCount: number
|
||||
priority: boolean
|
||||
}
|
||||
|
||||
export interface OfferRequirement
|
||||
@ -43,6 +39,7 @@ export interface IRagfairOfferUser
|
||||
nickname?: string
|
||||
rating?: number
|
||||
memberType: MemberCategory
|
||||
selectedMemberCategory?: MemberCategory
|
||||
avatar?: string
|
||||
isRatingGrowing?: boolean
|
||||
aid?: number
|
||||
|
Loading…
x
Reference in New Issue
Block a user