-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/add battle points for clans 630 #657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PlayJeri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
Only thing I want to change is that the eventsHandler sends playerId to clan rewarder and not clanId. So the rewarder has to make another db query. Since the eventsHandler already has the clanId known it should send that to rewardForClanEvent and then remove the player query.
| if (playerErrors) return [null, playerErrors]; | ||
|
|
||
| const [, clanEventErrors] = await this.clanEventHandler.handleClanEvent( | ||
| player_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to clan_id
| * @returns true if clan was rewarded successfully | ||
| */ | ||
| async rewardForClanEvent( | ||
| player_id: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take in clan_id instead of player_id
| await this.playerService.readOneById<PlayerDto>(player_id); | ||
| if (playerErrors) return [null, playerErrors]; | ||
|
|
||
| if (!player.clan_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If (!clan_id)
My bad. The requested change isn't even possible.
PlayJeri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work
|
@PlayJeri no needed the player / clan id change? |
No need. I dont know what i was thinking earlier. My apologies 😅 |
Brief description
As a clan member, I want to get points for my clan when I win a battle, so that my clan can rise in a battle leaderboard.
Change list