diff --git a/adventure/adventure.py b/adventure/adventure.py index 306d6a88..bf903a89 100755 --- a/adventure/adventure.py +++ b/adventure/adventure.py @@ -93,7 +93,7 @@ async def red_delete_data_for_user( user_id ).clear() # This will only ever touch the separate currency, leaving bot economy to be handled by core. - __version__ = "4.0.3" + __version__ = "4.0.4" def __init__(self, bot: Red): self.bot = bot diff --git a/adventure/loot.py b/adventure/loot.py index 901464f7..7cc093e3 100644 --- a/adventure/loot.py +++ b/adventure/loot.py @@ -365,7 +365,7 @@ async def _open_chest(self, ctx: commands.Context, user: discord.User, chest_typ ) return None slot = item.slot - old_item = getattr(character, item.slot.name, None) + old_item = getattr(character, item.slot.char_slot, None) old_stats = "" if old_item: @@ -520,7 +520,7 @@ async def _open_chest(self, ctx: commands.Context, user: discord.User, chest_typ f"{bold(ctx.author.display_name)}, you need to be level " f"`{equiplevel}` to equip this item. I've put it in your backpack.", ) - if not getattr(character, item.slot.name): + if not getattr(character, item.slot.char_slot): equip_msg = box( _("{user} equipped {item} ({slot} slot).").format( user=escape(ctx.author.display_name), item=item, slot=slot @@ -533,7 +533,7 @@ async def _open_chest(self, ctx: commands.Context, user: discord.User, chest_typ user=escape(ctx.author.display_name), item=item, slot=slot, - old_item=getattr(character, item.slot.name), + old_item=getattr(character, item.slot.char_slot), ), lang="ansi", )