Skip to content

Commit

Permalink
fix #2323
Browse files Browse the repository at this point in the history
  • Loading branch information
BastLast committed Nov 30, 2023
1 parent 76388b3 commit 640c3b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/text/smallEvents/witch.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
"greenApple": "🍏",
"heart": "🫀",
"mushroom": "🍄",
"nothing": "",
"nothing": "🤷",
"package": "📦",
"rat": "🐀",
"redApple": "🍎",
Expand Down
6 changes: 5 additions & 1 deletion src/core/smallEvents/fightPetSmallEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {FeralPet} from "../database/game/models/FeralPet";
import {ClassInfoConstants} from "../constants/ClassInfoConstants";
import {NumberChangeReason} from "../constants/LogsConstants";
import {DraftbotInteraction} from "../messages/DraftbotInteraction";
import {Data} from "../Data";

/**
* Returns an object composed of three random witch events
Expand Down Expand Up @@ -52,7 +53,10 @@ function getRandomFightPetActions(player: Player): FightPetAction[] {
function retrieveSelectedEvent(fightPetActionMessage: DraftBotReactionMessage): FightPetAction {
const reaction = fightPetActionMessage.getFirstReaction();
// If the player did not react, we use the nothing happen event with the menu reaction deny
const reactionEmoji = reaction ? reaction.emoji.name : Constants.REACTIONS.NOT_REPLIED_REACTION;
const reactionEmoji = reaction
? reaction.emoji.name === Constants.REACTIONS.NOT_REPLIED_REACTION
? Data.getModule("smallEvents.fightPet").getString("fightPetActionEmotes.doNothing")
: reaction.emoji.name : Data.getModule("smallEvents.fightPet").getString("fightPetActionEmotes.doNothing");
return FightPetActions.getFightPetActionByEmoji(reactionEmoji);
}

Expand Down

0 comments on commit 640c3b5

Please sign in to comment.