fix item exchange - fixes #8

This commit is contained in:
fusion32 2025-08-28 19:08:47 -03:00
parent 29b62e631b
commit c670fea4ac

View File

@ -550,7 +550,6 @@ void TCreature::Move(Object Obj, int DestX, int DestY, int DestZ, uint8 Count){
}
try{
// TODO(fusion): Find out what is this last parameter to `Move`.
::Move(this->ID, Obj, DestCon, MoveCount, false, DestObj);
}catch(RESULT r){
// NOTE(fusion): Attempt to exchange inventory items.
@ -562,7 +561,7 @@ void TCreature::Move(Object Obj, int DestX, int DestY, int DestZ, uint8 Count){
|| r == ONEWEAPONONLY)){
Object ObjCon = Obj.getContainer();
::Move(this->ID, DestObj, ObjCon, -1, false, NONE);
::Move(this->ID, Obj, DestCon, MoveCount, false, NONE);
::Move(this->ID, Obj, DestCon, MoveCount, false, DestObj);
}else{
throw;
}