polserver/pol-core/pol/module/uomod3.cpp
turleypol bce1154d7a
ClangTidy readability-else-after-return (#857)
* trigger tidy

* Automated clang-tidy change: readability-else-after-return

* compile test

* rerun

* Automated clang-tidy change: readability-else-after-return

* trigger..

* Automated clang-tidy change: readability-else-after-return

* manually removed a few

* Automated clang-tidy change: readability-else-after-return

* removed duplicate code

* fix remaining warnings

* fixed scope

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-18 09:35:52 +01:00

34 lines
838 B
C++

/** @file
*
* @par History
* - 2005/09/23 Shinigami: added mf_SendStatus - to send full status packet to support extensions
* - 2005/09/30 Shinigami: added Player Check to mf_SendStatus (crashed on NPCs)
*/
#include "../../bscript/berror.h"
#include "../mobile/charactr.h"
#include "../statmsg.h"
#include "uomod.h"
namespace Pol::Module
{
using namespace Bscript;
BObjectImp* UOExecutorModule::mf_SendStatus( /* mob */ )
{
Mobile::Character* chr;
if ( getCharacterParam( 0, chr ) )
{
if ( !chr->has_active_client() )
return new BError( "No client attached" );
if ( chr->logged_in() )
{
send_full_statmsg( chr->client, chr );
return new BLong( 1 );
}
return new BError( "Mobile must not be offline" );
}
return new BError( "Invalid parameter type" );
}
} // namespace Pol::Module