Skip to content

Commit

Permalink
Merge pull request #1665 from gettakaro/fix-7d2d-shop-not-giving-corr…
Browse files Browse the repository at this point in the history
…ect-quality

Fix 7d2d shop not giving correct quality
  • Loading branch information
niekcandaele authored Oct 18, 2024
2 parents 0928de4 + af522b2 commit a2e5f41
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 146 deletions.
4 changes: 2 additions & 2 deletions packages/app-api/src/controllers/GameServerController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ class GiveItemInputDTO extends TakaroDTO<GiveItemInputDTO> {

@IsNumber({ allowNaN: false, allowInfinity: false })
amount: number;
@IsNumber({ allowNaN: false, allowInfinity: false })
quality: number;
@IsString()
quality: string;
}

class TeleportPlayerInputDTO extends TakaroDTO<TeleportPlayerInputDTO> {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-api/src/service/GameServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ export class GameServerService extends TakaroService<
const gameInstance = await this.getGame(gameServerId);
return gameInstance.listBans();
}
async giveItem(gameServerId: string, playerId: string, item: string, amount: number, quality?: number) {
async giveItem(gameServerId: string, playerId: string, item: string, amount: number, quality?: string) {
const gameInstance = await this.getGame(gameServerId);
const pog = await this.pogService.getPog(playerId, gameServerId);
return gameInstance.giveItem(pog, item, amount, quality);
Expand Down
2 changes: 1 addition & 1 deletion packages/app-api/src/service/Shop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class ShopListingService extends TakaroService<
for (let i = 0; i < order.amount; i++) {
await Promise.allSettled(
listing.items.map((item) =>
gameServerService.giveItem(gameServerId, pog.playerId, item.item.code, item.amount),
gameServerService.giveItem(gameServerId, pog.playerId, item.item.code, item.amount, item.quality),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.9.0
7.8.0
Loading

0 comments on commit a2e5f41

Please sign in to comment.