feat: implement purchasing of skins #353
@ -14,7 +14,7 @@ import {
 | 
			
		||||
    ISeasonChallenge,
 | 
			
		||||
    ITypeCount,
 | 
			
		||||
    InventorySlot,
 | 
			
		||||
    IWeaponSkin
 | 
			
		||||
    IWeaponSkinClient
 | 
			
		||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IGenericUpdate } from "../types/genericUpdate";
 | 
			
		||||
import {
 | 
			
		||||
@ -458,7 +458,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri
 | 
			
		||||
    return changedInventory.FlavourItems[flavourItemIndex].toJSON();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const addSkin = async (typeName: string, accountId: string): Promise<IWeaponSkin> => {
 | 
			
		||||
export const addSkin = async (typeName: string, accountId: string): Promise<IWeaponSkinClient> => {
 | 
			
		||||
    const inventory = await getInventory(accountId);
 | 
			
		||||
    const index = inventory.WeaponSkins.push({ ItemType: typeName }) - 1;
 | 
			
		||||
    const changedInventory = await inventory.save();
 | 
			
		||||
 | 
			
		||||
@ -138,7 +138,7 @@ export interface IInventoryResponse {
 | 
			
		||||
    LastRegionPlayed: string;
 | 
			
		||||
    XPInfo: ITypeXPItem[];
 | 
			
		||||
    Recipes: ITypeCount[];
 | 
			
		||||
    WeaponSkins: IWeaponSkin[];
 | 
			
		||||
    WeaponSkins: IWeaponSkinClient[];
 | 
			
		||||
    PendingRecipes: IPendingRecipeResponse[];
 | 
			
		||||
    TrainingDate: IMongoDate;
 | 
			
		||||
    PlayerLevel: number;
 | 
			
		||||
@ -852,7 +852,7 @@ export interface IWeaponSkinDatabase {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IWeaponSkin extends IWeaponSkinDatabase {
 | 
			
		||||
export interface IWeaponSkinClient extends IWeaponSkinDatabase {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user