diff --git a/core/igncore.py b/core/igncore.py index 67155a6..a8b95d0 100644 --- a/core/igncore.py +++ b/core/igncore.py @@ -42,7 +42,7 @@ class IgnCore: self.last_timer_event = 0 self.start_time = int(time.time()) self.major_version = "IGNCore v2.6" - self.minor_version = "3" + self.minor_version = "4" self.incoming_queue = FifoQueue() self.mass_message_queue = None self.conns = DictObject() diff --git a/core/text.py b/core/text.py index 842b1c7..8985519 100644 --- a/core/text.py +++ b/core/text.py @@ -203,11 +203,13 @@ class Text: def mapper(tup): page, index = tup + suffix = "" if num_pages == 1: label2 = self.format_message(label) else: - label2 = self.format_message(label) + " (Page " + str(index) + " / " + str(num_pages) + ")" - return self.format_message(chatblob.page_prefix) + self.format_page(label2, page) + self.format_message(chatblob.page_postfix) + label2 = self.format_message(label) + suffix = " (Page " + str(index) + " / " + str(num_pages) + ")" + return self.format_message(chatblob.page_prefix) + self.format_page(label2, page) + suffix + self.format_message(chatblob.page_postfix) return list(map(mapper, zip(pages, range(1, num_pages + 1)))) diff --git a/modules/core/accounting/services/account_service.py b/modules/core/accounting/services/account_service.py index edb9d72..fefd7c3 100644 --- a/modules/core/accounting/services/account_service.py +++ b/modules/core/accounting/services/account_service.py @@ -476,7 +476,7 @@ class AccountService: f"LEFT JOIN (SELECT * FROM online WHERE bot=?) o ON a.char_id=o.char_id " f"WHERE a.char_id NOT IN (SELECT char_id from org_bots) " f"and a.disabled = 0 {'and o.char_id is not null' if online_only else ''} " - f"group by o.char_id order by a.main, a.main=a.char_id desc, p.level desc, p.ai_level desc", + f"group by a.char_id order by a.main, a.main=a.char_id desc, p.level desc, p.ai_level desc", [self.bot.get_char_id()]) def get_by_group(self, group) -> List[DictObject]: diff --git a/modules/standard/loot/loot_lists_controller.py b/modules/standard/loot/loot_lists_controller.py index a1d8190..c14b11c 100644 --- a/modules/standard/loot/loot_lists_controller.py +++ b/modules/standard/loot/loot_lists_controller.py @@ -353,22 +353,23 @@ class LootListsController: blob += "%s\n" % category if category is not None else "" for item in items: - item.id = self.text.make_item(item.low_id, item.high_id, item.ql, item.name) - if item.multiloot > 1: - single_link = self.text.make_chatcmd("Add to loot", "/tell loot %s 1" % item.id) - single_link1 = self.text.make_chatcmd("Add to auction", "/tell auction prepare %s " % item.id) - multi_link = self.text.make_chatcmd( - "Add x%d to loot" % item.multiloot, "/tell loot %s %d" % (item.id, item.multiloot)) - multi_link2 = self.text.make_chatcmd( - "Add x%d to auction" % item.multiloot, "/tell auction prepare %s (ALL)" % item.id) - add_links = "└ [%s] [%s]
└ [%s] [%s (ALL) - One Winner]" % ( - single_link, multi_link, single_link1, multi_link2) - else: - add_links = "└ [%s]
└ [%s]" % ( - self.text.make_chatcmd("Add to loot", "/tell loot %s 1" % item.id), - self.text.make_chatcmd("Add to auction", "/tell auction prepare %s" % item.id)) + comment = f" ({item.comment})" if item.comment != "" else "" + item.id = self.text.make_item(item.low_id, item.high_id, item.ql, item.name + comment) - comment = " (%s)" % item.comment if item.comment != "" else "" + if item.multiloot > 1: + print(item) + single_link = self.text.make_chatcmd("Add to loot", f"/tell loot {item.id}") + single_link1 = self.text.make_chatcmd("Add to auction", f"/tell auction prepare {item.id} ") + multi_link = self.text.make_chatcmd( + f"Add x{item.multiloot:d} to loot", f"/tell loot {item.id} {item.multiloot}") + multi_link2 = self.text.make_chatcmd( + f"Add x{item.multiloot:d} to auction", f"/tell auction prepare {item.id} (ALL)") + add_links = f"└ [{single_link}] [{multi_link}]
└ [{single_link1}] [{multi_link2} (ALL) - One Winner]" + else: + add_links = f"└ [{self.text.make_chatcmd('Add to loot', f'/tell loot {item.id} {comment}')}]
" \ + f"└ [{self.text.make_chatcmd('Add to auction', f'/tell auction prepare {item.id}')}]" + + # comment = f" ({item.comment})" if item.comment != "" else "" if self.setting_service.get("use_item_icons").get_value(): item_link = self.text.make_item(item.low_id, item.high_id, item.ql, "" % item.icon)