[7923] Search all available locale skill names in .learn all_recipes Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-31 16:24:56 -05:00
parent 067cbec40d
commit 72cab37bcc

View File

@@ -3971,6 +3971,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
wstrToLower( wnamepart );
uint32 classmask = m_session->GetPlayer()->getClassMask();
std::string name;
SkillLineEntry const *targetSkillInfo = NULL;
@@ -3987,8 +3988,27 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
int loc = GetSessionDbcLocale();
name = skillInfo->name[loc];
if(name.empty())
continue;
if(Utf8FitTo(name, wnamepart))
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
for(; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
name = skillInfo->name[loc];
if(name.empty())
continue;
if (Utf8FitTo(name, wnamepart))
break;
}
}
if(loc < MAX_LOCALE)
{
targetSkillInfo = skillInfo;
break;