Trinitycore: [3.3.5]Problems with declining names of pets and characters.

Created on 8 Sep 2019  路  12Comments  路  Source: TrinityCore/TrinityCore

Description:
Problems with declining names of pets and characters with Russian client.
Current behaviour:
When creating a character with a name on Russian or when changing the name of a pet on Russian, a window appears with a choice of declination of the name.
https://i.imgur.com/PGRb4yT.png
When we choose the first option, a window appears with an error declination name change.
https://i.imgur.com/tLSzOFA.png
If you choose the second option, then everything is fine.
https://i.imgur.com/8jzD1tF.png
Expected behaviour:
The first option should work without errors.
Branch(es):
3.3.5
TC rev. hash/commit:
8ecc45c
Operating system:
Linux

Branch-3.3.5a

Most helpful comment

I'll stop trying to defuse land mines the moment we run out of land mines waiting to blow up.

All 12 comments

this sounds like an issue that only contributors with a russian client can fix (just like I ended up fixing utf-8 issues on a sv-se OS)

I am wondering if it is an automatic refusal of using the word "Test" (Russian: "Tect") as a name in the first place. I presume that is why you get suggestions of variations with 1 more letter instead of simply "Test".

@illfated The problem will be with absolutely any name on Russian. I chose the word "褌械褋褌" as more understandable. The fact that there is added a single letter is normal, because we are inclined words depending on the context. This is a feature of the Russian language and similar languages, for example Ukrainian. For example, take the name John(袛卸芯薪):
English: His name is John.
Russian: 袝谐芯 懈屑褟 袛卸芯薪.
English: I'm not happy with John.
Russian: 携 薪械 写芯胁芯谢械薪 袛卸芯薪芯屑.
English: John has a holiday today.
Russian: 校 袛卸芯薪邪 褋械谐芯写薪褟 锌褉邪蟹写薪懈泻.
@jackpoz If you need a Russian client, I can provide a torrent file.

This problem occurred after 309851e. @Treeston, when will you stop breaking what already worked? xD

I'll stop trying to defuse land mines the moment we run out of land mines waiting to blow up.

And yeah, that would've started occurring after 309851e until 6a33021, a bunch of things broke in that commit because I fucked up name normalization by accident (no relation to cyrillic specifically).

Can you confirm the issue also exists on 6a33021?

@Treeston The issue is relevant at commit 537c4d1
There is an assumption that the error is somewhere in the calculation of the number of letters in the declined name.

@Treeston Where after your changes to the bool normalizePlayerName(std::string& name) calculates the length of a name with declined names?
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Globals/ObjectMgr.h#L888
If I correctly understood the comment on the variable MAX_INTERNAL_PLAYER_NAME, then it was calculated here:
https://github.com/TrinityCore/TrinityCore/commit/309851ea2442457c87f791bb44abfa89e04af1af#diff-1596ecd5424665946209f97259f1dba8L152

MAX_INTERNAL_PLAYER_NAME was used to determine the size of wstr_buf (in GetMainPartOfName) and nowhere else. It is no longer used after the changes.

@Treeston Well then, I ran out of ideas about this bug. If you suddenly have solutions to this bug, then I will be happy to test them.

eaa22b8a1722fd362bf5ef2c6944b5c50b121afd

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jerbookins picture jerbookins  路  3Comments

cbcs picture cbcs  路  3Comments

Rushor picture Rushor  路  3Comments

chilito picture chilito  路  3Comments

Tatara902 picture Tatara902  路  3Comments