Skip to content

Commit

Permalink
Fix a bug in ActionCards showing the wrong player ids.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: c496e2dfa0fb41f09b0b5d7ae55ba4c86845989c
  • Loading branch information
cpojer committed Aug 5, 2024
1 parent fe542eb commit 3754ea4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hera/editor/lib/ActionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import {
DynamicPlayerIDs,
encodeDynamicPlayerID,
isDynamicPlayerID,
PlayerID,
resolveDynamicPlayerID,
} from '@deities/athena/map/Player.tsx';
Expand Down Expand Up @@ -145,7 +146,7 @@ export default memo(function ActionCard({
const portrait = unit?.sprite.portrait;
const player = hasCurrentPlayer
? resolveDynamicPlayerID(map, action.player, currentPlayer)
: 0;
: action.player;
const message =
formatText && factionNames && map && userDisplayName
? formatCharacterText(
Expand All @@ -156,7 +157,7 @@ export default memo(function ActionCard({
: 'name',
map,
userDisplayName,
player,
isDynamicPlayerID(player) ? 0 : player,
factionNames,
)
: action.message;
Expand Down

0 comments on commit 3754ea4

Please sign in to comment.