Core/Player: Fix old issue with creating a character if using declined names. Thx to someone, whose name was lost on old forums
This commit is contained in:
@@ -8003,8 +8003,15 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
bool ObjectMgr::CheckDeclinedNames(std::wstring mainpart, DeclinedName const& names)
|
||||
bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& names)
|
||||
{
|
||||
// get main part of the name
|
||||
std::wstring mainpart = GetMainPartOfName(w_ownname, 0);
|
||||
// prepare flags
|
||||
bool x = true;
|
||||
bool y = true;
|
||||
|
||||
// check declined names
|
||||
for (uint8 i =0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
{
|
||||
std::wstring wname;
|
||||
@@ -8012,9 +8019,12 @@ bool ObjectMgr::CheckDeclinedNames(std::wstring mainpart, DeclinedName const& na
|
||||
return false;
|
||||
|
||||
if (mainpart != GetMainPartOfName(wname, i+1))
|
||||
return false;
|
||||
x = false;
|
||||
|
||||
if (w_ownname != wname)
|
||||
y = false;
|
||||
}
|
||||
return true;
|
||||
return (x || y);
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::GetAreaTriggerScriptId(uint32 trigger_id)
|
||||
|
||||
Reference in New Issue
Block a user