Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old April 25, 2014, 16:27   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,672
PowerWyrm is on a distinguished road
[3.5] Oops

Strange that nobody reported that already. When your character has nothing in inventory and you press 'e', you get "You are not wielding or wearing anything." message whatever your current equipment is. When you actually are not wearing anything and press 'e', your inventory is displayed instead of the expected message.

This is due to a copy/paste error from do_cmd_inven() in do_cmd_equip() which uses p_ptr->inventory[0].kind for the test instead of looking for any item in equipment slots like this:

Code:
    int item, i, last_slot = 0;
    int ret = 3;
    object_type *o_ptr;

    /* Find the last occupied equipment slot */
    for (i = INVEN_WIELD; i < ALL_INVEN_TOTAL; i++)
    {
        o_ptr = &p_ptr->inventory[i];
        if (o_ptr->kind) last_slot = i;
    }

    /* Check inventory, since get_item() will default to inventory list when equipment is empty. -- this cannot work if inventory is empty!!! */
    //if (!p_ptr->inventory[0].kind)
    if (!last_slot) {
        msg("You are not wielding or wearing anything.");
        return;
    }
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old April 25, 2014, 16:33   #2
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,672
PowerWyrm is on a distinguished road
Filed as #1824.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.