The scrolls are getting removed in bool CPIDblClick::Handle( void ) (cPlayerAction.cpp)...Test-case:
1. 'ADD ITEM 0x1f31
2. Target your own character to add the item to your backpack
3. Double-click the "Heal"-scroll that was added to your backpack
4. Observe that the scroll vanishes the moment you double-click it, when it should have vanished when you successfully targeted a valid target.
Code: Select all
// Begin Scrolls check
if( iUsed->GetID( 1 ) == 0x1F && ( iUsed->GetID( 2 ) > 0x2C && iUsed->GetID( 2 ) < 0x6D ) )
{
bool success = false;
tSock->CurrentSpellType( 1 ); // spell from scroll
if( iUsed->GetID( 2 ) == 0x2D ) // Reactive Armor spell scrolls
success = Magic->SelectSpell( tSock, 7 );
if( iUsed->GetID( 2 ) >= 0x2E && iUsed->GetID( 2 ) <= 0x34 ) // first circle spell scrolls
success = Magic->SelectSpell( tSock, iUsed->GetID( 2 ) - 0x2D );
else if( iUsed->GetID( 2 ) >= 0x35 && iUsed->GetID( 2 ) <= 0x6C ) // 2 to 8 circle spell scrolls
success = Magic->SelectSpell( tSock, iUsed->GetID( 2 ) - 0x2D + 1 );
if( success )
[color=red]iUsed->IncAmount( -1 );[/color]
return true;
}(magic.cpp), after a valid target has been verified?