mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
[7923] Search all available locale skill names in .learn all_recipes Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user