mirror of
https://github.com/sica42/RollFor.git
synced 2025-10-26 12:06:49 +00:00
Make auto name matcher not case sensitive. Tiny fix to tooltip reader
This commit is contained in:
parent
f160fcc143
commit
af2ad07577
@ -1,7 +1,7 @@
|
||||
## Interface: 11200
|
||||
## Title: RollFor
|
||||
## Author: Obszczymucha
|
||||
## Version: 4.7.8
|
||||
## Version: 4.7.81
|
||||
## Notes: An automated item roller with soft ressing support via raidres.fly.dev.
|
||||
## SavedVariables: RollForDb
|
||||
## SavedVariablesPerCharacter: RollForCharDb
|
||||
|
||||
@ -24,7 +24,7 @@ function M.new( config, boss_list, player_info )
|
||||
|
||||
-- On Turtle, PLAYER_TARGET_CHANGED gets emitted with some float number as an argument automatically.
|
||||
-- We don't want to respond to these events.
|
||||
local auto_target = tonumber( arg1 )
|
||||
local auto_target = tonumber(arg1 ) and tonumber( arg1 ) ~= math.floor( arg1 )
|
||||
|
||||
if is_a_boss and not auto_target and not m.is_master_loot() and player_info.is_leader() then
|
||||
m.api.SetLootMethod( "master", player_info.get_name() )
|
||||
|
||||
@ -105,6 +105,9 @@ end
|
||||
|
||||
local function get_similarity_predictions( present_players_who_did_not_softres, absent_players_who_did_softres, sort )
|
||||
local result = {}
|
||||
local function capitalize( str )
|
||||
return string.upper( string.sub( str, 1, 1 ) ) .. string.lower( string.sub( str, 2 ) )
|
||||
end
|
||||
|
||||
for _, player in pairs( present_players_who_did_not_softres ) do
|
||||
local predictions = {}
|
||||
@ -112,7 +115,7 @@ local function get_similarity_predictions( present_players_who_did_not_softres,
|
||||
for _, candidate in pairs( absent_players_who_did_softres ) do
|
||||
local prediction = {
|
||||
[ "candidate" ] = candidate,
|
||||
[ "similarity" ] = string_similarity( player, candidate ),
|
||||
[ "similarity" ] = string_similarity( player, capitalize( candidate ) ),
|
||||
[ "levenshtein" ] = get_levenshtein( player, candidate )
|
||||
}
|
||||
table.insert( predictions, prediction )
|
||||
|
||||
@ -145,8 +145,9 @@ function M.new( popup_builder, awarded_loot, version_broadcast, event_bus, confi
|
||||
this.changelog.content.parent = this.changelog
|
||||
|
||||
local changelog = {
|
||||
{ ver = "4.7.81", text = "Made auto name matcher not case sensitive. Tiny improvement to tooltip reader." },
|
||||
{ ver = "4.7.8", text = "Adjust positioning of client roll popup so it aligns to bottom" },
|
||||
{ ver = "4.7.7", text = "Add key bindinds to toggle options, winners and SR import windows" },
|
||||
{ ver = "4.7.7", text = "Add key bindings to toggle options, winners and SR import windows" },
|
||||
{ ver = "4.7.7", text = "Add changelog to options window" },
|
||||
{ ver = "4.7.7", text = "Add client settings to options window" },
|
||||
{ ver = "4.7.7", text = "Add client option to auto-roll on SR items" },
|
||||
|
||||
@ -32,6 +32,7 @@ function M.new( api )
|
||||
local function set_loot_slot( slot )
|
||||
ensure_frame()
|
||||
|
||||
m_frame:SetOwner( m.api.WorldFrame, "ANCHOR_NONE" )
|
||||
m_frame:ClearLines()
|
||||
m_frame:SetLootItem( slot )
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user