Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
302 stars 42 forks source link

Weapon swap lets you steal back sold items #555

Closed kristofferbergstrom closed 5 years ago

kristofferbergstrom commented 5 years ago

If the player has more than one weapon swap config, and you swap to an item that's been dropped at the player's feet, the item is instantly picked up and equipped. This doesn't seem take the item's current ownership into account, and can be used to steal back any item that has been donated or sold to a shop.

AquariusPower commented 5 years ago

https://github.com/Attnam/ivan/blob/master/Main/Source/cmdswapweap.cpp#L406

I think it could be solved with !it->GetRoom() as if(hasItem(iv,it) || (it->GetSquareUnder()==Char->GetSquareUnder() && !it->GetRoom()) ) { (based on pickup command code) can someone test it?

red-kangaroo commented 5 years ago

This should be fixed now.