Scripts/Commands: Fixed remaining crashes caused by removal of dbc locales

This commit is contained in:
Shauren committed 2012-08-16 13:27:54 +02:00
1 parent 137d973e5d
commit 21b1b72a6b
6 files changed
+15 -37

No files matched your search

+3 -22
View File
@@ -394,33 +394,14 @@ public:
!skillInfo->canLink) // only prof with recipes have set
continue;
int locale = handler->GetSessionDbcLocale();
name = skillInfo->name[locale];
name = skillInfo->name;
if (name.empty())
continue;
if (!Utf8FitTo(name, namePart))
{
locale = 0;
for (; locale < TOTAL_LOCALES; ++locale)
{
if (locale == handler->GetSessionDbcLocale())
continue;
continue;
name = skillInfo->name[locale];
if (name.empty())
continue;
if (Utf8FitTo(name, namePart))
break;
}
}
if (locale < TOTAL_LOCALES)
{
targetSkillInfo = skillInfo;
break;
}
targetSkillInfo = skillInfo;
}
if (!targetSkillInfo)