@@ -2629,18 +2629,18 @@ void CClient::addAOSTooltip(const CObjBase *pObj, bool fRequested, bool fShop)
26292629 if ( iMaxWeight > 0 )
26302630 {
26312631 m_TooltipData.Add (t = new CClientTooltip (1072241 )); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones
2632- t->FormatArgs (" %" FMTSIZE_T " \t %d\t %d\t %d" , pContainer->GetCount (), MAX_ITEMS_CONT , pContainer->GetTotalWeight () / WEIGHT_UNITS , iMaxWeight / WEIGHT_UNITS );
2632+ t->FormatArgs (" %zu \t %d\t %d\t %d" , pContainer->GetCount (), MAX_ITEMS_CONT , pContainer->GetTotalWeight () / WEIGHT_UNITS , iMaxWeight / WEIGHT_UNITS );
26332633 }
26342634 else
26352635 {
26362636 m_TooltipData.Add (t = new CClientTooltip (1073841 )); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~ stones
2637- t->FormatArgs (" %" FMTSIZE_T " \t %d\t %d" , pContainer->GetCount (), MAX_ITEMS_CONT , pContainer->GetTotalWeight () / WEIGHT_UNITS );
2637+ t->FormatArgs (" %zu \t %d\t %d" , pContainer->GetCount (), MAX_ITEMS_CONT , pContainer->GetTotalWeight () / WEIGHT_UNITS );
26382638 }
26392639 }
26402640 else
26412641 {
26422642 m_TooltipData.Add (t = new CClientTooltip (1050044 )); // ~1_COUNT~ items, ~2_WEIGHT~ stones
2643- t->FormatArgs (" %" FMTSIZE_T " \t %d" , pContainer->GetCount (), pContainer->GetTotalWeight () / WEIGHT_UNITS );
2643+ t->FormatArgs (" %zu \t %d" , pContainer->GetCount (), pContainer->GetTotalWeight () / WEIGHT_UNITS );
26442644 }
26452645
26462646 if ( pItem->m_WeightReduction != 0 )
@@ -2651,7 +2651,7 @@ void CClient::addAOSTooltip(const CObjBase *pObj, bool fRequested, bool fShop)
26512651 }
26522652 }
26532653
2654- const CChar *pCraftsman = static_cast <CGrayUID>(pItem->GetDefNum (" CRAFTEDBY" )).CharFind ();
2654+ const CChar *pCraftsman = static_cast <CGrayUID>(static_cast < DWORD >( pItem->GetDefNum (" CRAFTEDBY" ) )).CharFind ();
26552655 if ( pCraftsman )
26562656 {
26572657 m_TooltipData.Add (t = new CClientTooltip (1050043 )); // crafted by ~1_NAME~
@@ -3361,28 +3361,28 @@ void CClient::SendPacket(TCHAR *pszKey)
33613361 if ( packet->getLength () > SCRIPT_MAX_LINE_LEN - 4 )
33623362 {
33633363 // We won't get here because this lenght is enforced in all scripts
3364- DEBUG_ERR ((" SENDPACKET function exceeded max length allowed (%" FMTSIZE_T " /%d)\n " , packet->getLength (), SCRIPT_MAX_LINE_LEN - 4 ));
3364+ DEBUG_ERR ((" SENDPACKET function exceeded max length allowed (%zu /%d)\n " , packet->getLength (), SCRIPT_MAX_LINE_LEN - 4 ));
33653365 delete packet;
33663366 return ;
33673367 }
33683368
33693369 GETNONWHITESPACE (pszKey);
3370-
3371- if ( toupper (*pszKey) == ' D' )
3372- {
3373- ++pszKey;
3374- packet->writeInt32 (static_cast <DWORD >(Exp_GetLLVal (pszKey)));
3375- }
3376- else if ( toupper (*pszKey) == ' W' )
3377- {
3378- ++pszKey;
3379- packet->writeInt16 (static_cast <WORD >(Exp_GetLLVal (pszKey)));
3380- }
3381- else
3370+ switch ( toupper (*pszKey) )
33823371 {
3383- if ( toupper (*pszKey) == ' B ' )
3372+ case ' D ' :
33843373 ++pszKey;
3385- packet->writeByte (static_cast <BYTE >(Exp_GetLLVal (pszKey)));
3374+ packet->writeInt32 (static_cast <DWORD >(Exp_GetLLVal (pszKey)));
3375+ break ;
3376+ case ' W' :
3377+ ++pszKey;
3378+ packet->writeInt16 (static_cast <WORD >(Exp_GetLLVal (pszKey)));
3379+ break ;
3380+ case ' B' :
3381+ ++pszKey;
3382+ // fall through
3383+ default :
3384+ packet->writeByte (static_cast <BYTE >(Exp_GetLLVal (pszKey)));
3385+ break ;
33863386 }
33873387 }
33883388
0 commit comments