Skip to content

Commit

Permalink
fix character name retrieve
Browse files Browse the repository at this point in the history
  • Loading branch information
moonheart committed Oct 31, 2023
1 parent e702816 commit 0d23269
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions MementoMori.Ortega/Common/Utils/ItemUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,18 @@ public static string GetItemName(ItemType itemType, long itemId)
return Masters.TextResourceTable.Get("[CommonItemEquipmentFragmentFormat]", name);
}
case ItemType.Character:
{
var characterMb = Masters.CharacterTable.GetById(itemId);
var combinedName = characterMb.GetCombinedName();
return Masters.TextResourceTable.Get("[CommonItemCharacterFragment]", combinedName);
return combinedName;
}
case ItemType.CharacterFragment:
var characterFragmentMb = Masters.CharacterTable.GetById(itemId);
return Masters.TextResourceTable.Get(characterFragmentMb.NameKey);
{
var characterMb = Masters.CharacterTable.GetById(itemId);
var combinedName = characterMb.GetCombinedName();
return Masters.TextResourceTable.Get("[CommonItemCharacterFragment]", combinedName);
break;

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (osx-arm64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (osx-x64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (win-x64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (linux-arm64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (linux-x64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (win-x64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (linux-arm64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (osx-arm64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (linux-x64)

Unreachable code detected

Check warning on line 71 in MementoMori.Ortega/Common/Utils/ItemUtil.cs

View workflow job for this annotation

GitHub Actions / publish (osx-x64)

Unreachable code detected
}
case ItemType.DungeonBattleRelic:
var dungeonBattleRelicMb = Masters.DungeonBattleRelicTable.GetById(itemId);
return Masters.TextResourceTable.Get(dungeonBattleRelicMb.NameKey);
Expand Down

0 comments on commit 0d23269

Please sign in to comment.