awgil / ffxiv_visland

Island sanctuary automation
105 stars 35 forks source link

fix: use default item name instead of empty string #57

Closed status102 closed 3 months ago

status102 commented 6 months ago

I tried to click Import Recommendations From Clipboard on an overseas client and nothing happened with no error, no crash and even no log. It seems there are some things wrong with the _botNames.

Or this may do same things, but I didn't test it.

_craftSheet = Service.DataManager.GetExcelSheet<MJICraftworksObject>(ClientLanguage.English) ?? Service.DataManager.GetExcelSheet<MJICraftworksObject>();
_botNames = _craftSheet.Select(r => OfficialNameToBotName(r.Item.Value?.Name.RawString ?? string.Empty)).ToList();

Sorry for my poor English~

Jaksuhn commented 5 months ago

Are you on CN? The empty string is only generated if it cannot find the item name in the sheets. There is probably an issue with trying to access EN sheets from the CN client. Your PR wouldn't change anything here because the value is still null

status102 commented 5 months ago

Are you on CN? The empty string is only generated if it cannot find the item name in the sheets. There is probably an issue with trying to access EN sheets from the CN client. Your PR wouldn't change anything here because the value is still null

Yes, I use it on CN. GetDifferentLanguage(English) means GetExcelSheet(English) and there is no english resource in CN. I guess that is the reason. So I try to use default resource(CN resource) instead of specific language resource and it works. (Btw, I modified a localization version by dnspy but I think original version has the same question. So I make this PR