Skip to content

Commit

Permalink
Search first for Female Declensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jun 29, 2020
1 parent f04ee96 commit 1d980f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/container_combatentes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,12 @@
--> check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
local find_name_declension = function (petTooltip, playerName)
--> 2 - male, 3 - female
for gender = 2, 3 do
for gender = 3, 2, -1 do
for declensionSet = 1, GetNumDeclensionSets(playerName, gender) do
--> check genitive case of player name
local genitive = DeclineName(playerName, gender, declensionSet)
if petTooltip:find(genitive) then
--print("found genitive: ", gender, declensionSet, playerName, petTooltip:find(genitive))
return true
end
end
Expand Down Expand Up @@ -440,6 +441,7 @@
if (find_name_declension (text1, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
else
--print("not found declension (1):", pName, nome)
if (text1:find (playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
end
Expand All @@ -463,6 +465,7 @@
if (find_name_declension (text2, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
else
--print("not found declension (2):", pName, nome)
if (text2:find (playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
end
Expand Down

0 comments on commit 1d980f0

Please sign in to comment.