mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[7923] Search all available locale skill names in .learn all_recipes
This commit is contained in:
parent
79dab3dae5
commit
bf4201c0f4
2 changed files with 22 additions and 2 deletions
|
|
@ -3978,6 +3978,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
|
||||||
wstrToLower( wnamepart );
|
wstrToLower( wnamepart );
|
||||||
|
|
||||||
uint32 classmask = m_session->GetPlayer()->getClassMask();
|
uint32 classmask = m_session->GetPlayer()->getClassMask();
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
SkillLineEntry const *targetSkillInfo = NULL;
|
SkillLineEntry const *targetSkillInfo = NULL;
|
||||||
|
|
@ -3994,8 +3995,27 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
|
||||||
|
|
||||||
int loc = GetSessionDbcLocale();
|
int loc = GetSessionDbcLocale();
|
||||||
name = skillInfo->name[loc];
|
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;
|
targetSkillInfo = skillInfo;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7922"
|
#define REVISION_NR "7923"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue