Skip to content

Commit

Permalink
Fixed: Function 'CRIMINAL 0' not updating char notoriety/buff when re…
Browse files Browse the repository at this point in the history
…moving criminal flag
  • Loading branch information
coruja747 committed Jan 8, 2017
1 parent 5cb0bf3 commit bdc53e3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/REVISIONS-56-SERIES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,5 @@ Changed: Item i_light_source (function EQUIPHALO) now will be equipped on layer_

08-01-2017, Coruja
Changed: Updated internal Libev libs v4.22 to v4.24.
Changed: Updated internal Zlib libs v1.2.8 to v1.2.10.
Changed: Updated internal Zlib libs v1.2.8 to v1.2.10.
Fixed: Function 'CRIMINAL 0' not updating char notoriety/buff when removing criminal flag.
17 changes: 15 additions & 2 deletions src/graysvr/CChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3390,9 +3390,22 @@ bool CChar::r_Verb( CScript &s, CTextConsole * pSrc ) // Execute command from sc
}
break;
case CHV_CRIMINAL:
if ( s.HasArgs() && ! s.GetArgVal())
if ( s.HasArgs() && !s.GetArgVal() )
{
StatFlag_Clear( STATF_Criminal );
CItem *pCriminal = LayerFind(LAYER_FLAG_Criminal);
if ( pCriminal )
{
// Removing criminal memory will already clear flag, noto and buff
pCriminal->Delete();
}
else
{
// Otherwise clear it manually if there's no memory set
StatFlag_Clear(STATF_Criminal);
NotoSave_Update();
if ( m_pClient )
m_pClient->removeBuff(BI_CRIMINALSTATUS);
}
}
else
{
Expand Down
8 changes: 0 additions & 8 deletions src/graysvr/CCharact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ void CChar::LayerAdd( CItem * pItem, LAYER_TYPE layer )
default:
break;
}


}

pItem->Update();
Expand Down Expand Up @@ -2447,12 +2445,6 @@ bool CChar::OnTickEquip( CItem * pItem )
return true;
}

case LAYER_FLAG_Criminal:
// update char notoriety when criminal timer goes off
StatFlag_Clear( STATF_Criminal );
NotoSave_Update();
return( false );

case LAYER_FLAG_Murders:
// decay the murder count.
{
Expand Down

0 comments on commit bdc53e3

Please sign in to comment.