* partial fox for #97 * Fix #97 --------- Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com> Co-authored-by: Athozus <athozus@gmail.com>
This commit is contained in:
parent
fab6f1a1e5
commit
42db40b7a7
@ -114,6 +114,7 @@ function mail.delete_mail(playername, msg_ids)
|
||||
if type(msg_ids) ~= "table" then -- if this is not a table
|
||||
msg_ids = { msg_ids }
|
||||
end
|
||||
if #entry.inbox > 0 then
|
||||
for i = #entry.inbox, 1, -1 do
|
||||
for _, deleted_msg in ipairs(msg_ids) do
|
||||
if entry.inbox[i].id == deleted_msg then
|
||||
@ -121,6 +122,8 @@ function mail.delete_mail(playername, msg_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if #entry.outbox > 0 then
|
||||
for i = #entry.outbox, 1, -1 do
|
||||
for _, deleted_msg in ipairs(msg_ids) do
|
||||
if entry.outbox[i].id == deleted_msg then
|
||||
@ -128,6 +131,8 @@ function mail.delete_mail(playername, msg_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if #entry.drafts > 0 then
|
||||
for i = #entry.drafts, 1, -1 do
|
||||
for _, deleted_msg in ipairs(msg_ids) do
|
||||
if entry.drafts[i].id == deleted_msg then
|
||||
@ -135,6 +140,7 @@ function mail.delete_mail(playername, msg_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
mail.set_storage_entry(playername, entry)
|
||||
mail.hud_update(playername, entry.inbox)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user