33using Craftimizer . Simulator . Actions ;
44using Craftimizer . Solver ;
55using Craftimizer . Utils ;
6+ using Dalamud . Game . ClientState . Objects . Enums ;
67using Dalamud . Game . Text ;
78using Dalamud . Game . Text . SeStringHandling . Payloads ;
89using Dalamud . Interface ;
1718using FFXIVClientStructs . FFXIV . Client . Game ;
1819using FFXIVClientStructs . FFXIV . Client . Game . UI ;
1920using FFXIVClientStructs . FFXIV . Client . System . String ;
20- using FFXIVClientStructs . FFXIV . Client . UI ;
2121using FFXIVClientStructs . FFXIV . Client . UI . Misc ;
2222using FFXIVClientStructs . FFXIV . Component . GUI ;
2323using ImGuiNET ;
2424using System ;
2525using System . Collections . Generic ;
26+ using System . Globalization ;
2627using System . Linq ;
2728using System . Numerics ;
2829using System . Runtime . InteropServices ;
@@ -589,7 +590,7 @@ private void DrawCharacterStats()
589590 if ( ImGui . IsItemHovered ( ) )
590591 ImGuiUtils . Tooltip ( "Open in map" ) ;
591592
592- ImGuiUtils . TextCentered ( $ "{ questTerritory } ({ questLocation . X : 0.0 } , { questLocation . Y : 0.0 } )") ;
593+ ImGuiUtils . TextCentered ( $ "{ questTerritory } ({ GetCoordinatesString ( questLocation ) } )") ;
593594 }
594595 break ;
595596 case CraftableStatus . WrongClassJob :
@@ -624,13 +625,13 @@ private void DrawCharacterStats()
624625 if ( ImGui . IsItemHovered ( ) )
625626 ImGuiUtils . Tooltip ( "Open in map" ) ;
626627
627- ImGuiUtils . TextCentered ( $ "{ vendorTerritory } ({ vendorLoation . X : 0.0 } , { vendorLoation . Y : 0.0 } )") ;
628+ ImGuiUtils . TextCentered ( $ "{ vendorTerritory } ({ GetCoordinatesString ( vendorLoation ) } )") ;
628629 }
629630 break ;
630631 case CraftableStatus . RequiredItem :
631632 {
632633 var item = RecipeData . Recipe . ItemRequired . Value ! ;
633- var itemName = item . Name . ExtractText ( ) ;
634+ var itemName = item . Name . ExtractCleanText ( ) ;
634635 var imageSize = ImGui . GetFrameHeight ( ) ;
635636
636637 ImGuiUtils . TextCentered ( $ "You are missing the required equipment.") ;
@@ -644,7 +645,7 @@ private void DrawCharacterStats()
644645 case CraftableStatus . RequiredStatus :
645646 {
646647 var status = RecipeData . Recipe . StatusRequired . Value ! ;
647- var statusName = status . Name . ExtractText ( ) ;
648+ var statusName = status . Name . ExtractCleanText ( ) ;
648649 var statusIcon = Service . IconManager . GetIconCached ( status . Icon ) ;
649650 var imageSize = new Vector2 ( ImGui . GetFrameHeight ( ) * ( statusIcon . AspectRatio ?? 1 ) , ImGui . GetFrameHeight ( ) ) ;
650651
@@ -1158,10 +1159,10 @@ private CraftableStatus CalculateCraftStatus(Gearsets.GearsetItem[] gearItems)
11581159 private static ( string NpcName , string Territory , Vector2 MapLocation , MapLinkPayload Payload ) ResolveLevelData ( uint levelRowId )
11591160 {
11601161 var level = LuminaSheets . LevelSheet . GetRow ( levelRowId ) ;
1161- var territory = level . Territory . Value . PlaceName . Value . Name . ExtractText ( ) ;
1162+ var placeName = level . Territory . Value . PlaceName . Value . Name . ExtractCleanText ( ) ;
11621163 var location = WorldToMap2 ( new ( level . X , level . Z ) , level . Map . Value ! ) ;
11631164
1164- return ( ResolveNpcResidentName ( level . Object . RowId ) , territory , location , new ( level . Territory . RowId , level . Map . RowId , location . X , location . Y ) ) ;
1165+ return ( ResolveNpcResidentName ( level . Object . RowId ) , placeName , location , new ( level . Territory . RowId , level . Map . RowId , location . X , location . Y ) ) ;
11651166 }
11661167
11671168 private static Vector2 WorldToMap2 ( Vector2 worldCoordinates , Lumina . Excel . Sheets . Map map )
@@ -1171,8 +1172,12 @@ private static Vector2 WorldToMap2(Vector2 worldCoordinates, Lumina.Excel.Sheets
11711172
11721173 private static string ResolveNpcResidentName ( uint npcRowId )
11731174 {
1174- var resident = LuminaSheets . ENpcResidentSheet . GetRow ( npcRowId ) ;
1175- return resident . Singular . ExtractText ( ) ;
1175+ return Service . SeStringEvaluator . EvaluateObjStr ( ObjectKind . EventNpc , npcRowId ) ;
1176+ }
1177+
1178+ private static string GetCoordinatesString ( Vector2 pos )
1179+ {
1180+ return $ "{ pos . X . ToString ( "0.0" , CultureInfo . InvariantCulture ) } , { pos . Y . ToString ( "0.0" , CultureInfo . InvariantCulture ) } ";
11761181 }
11771182
11781183 private static int ? GetGearsetForJob ( ClassJob job )
0 commit comments