mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 15:26:49 +01:00
Add/get table functions implemented on ext charlist
This commit is contained in:
@@ -182,9 +182,9 @@ function CharacterList.terminate()
|
||||
CharacterList = nil
|
||||
end
|
||||
|
||||
function CharacterList.create(characters, premDays)
|
||||
function CharacterList.create(characters, account)
|
||||
G.characters = characters
|
||||
G.premDays = premDays
|
||||
G.premDays = account.premDays
|
||||
|
||||
characterList:destroyChildren()
|
||||
local accountStatusLabel = charactersWindow:getChildById('accountStatusLabel')
|
||||
@@ -212,8 +212,8 @@ function CharacterList.create(characters, premDays)
|
||||
|
||||
characterList:focusChild(focusLabel, ActiveFocusReason)
|
||||
|
||||
if premDays > 0 then
|
||||
accountStatusLabel:setText(tr("Account Status:\nPremium Account (%s) days left", premDays))
|
||||
if account.premDays > 0 then
|
||||
accountStatusLabel:setText(tr("Account Status:\nPremium Account (%s) days left", account.premDays))
|
||||
else
|
||||
accountStatusLabel:setText(tr('Account Status:\nFree Account'))
|
||||
end
|
||||
|
||||
@@ -28,7 +28,7 @@ local function onMotd(protocol, motd)
|
||||
motdButton:show()
|
||||
end
|
||||
|
||||
local function onCharacterList(protocol, characters, premDays)
|
||||
local function onCharacterList(protocol, characters, account)
|
||||
if enterGame:getChildById('rememberPasswordBox'):isChecked() then
|
||||
g_settings.set('account', g_crypt.encrypt(G.account))
|
||||
g_settings.set('password', g_crypt.encrypt(G.password))
|
||||
@@ -40,7 +40,7 @@ local function onCharacterList(protocol, characters, premDays)
|
||||
loadBox:destroy()
|
||||
loadBox = nil
|
||||
|
||||
CharacterList.create(characters, premDays)
|
||||
CharacterList.create(characters, account)
|
||||
CharacterList.show()
|
||||
|
||||
local lastMotdNumber = g_settings.getNumber("motd")
|
||||
|
||||
Reference in New Issue
Block a user