2016-01-28 14:52:40 +01:00
|
|
|
/** @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)
|
|
|
|
|
*/
|
2016-02-11 22:54:43 +01:00
|
|
|
|
|
|
|
|
#include "../../bscript/berror.h"
|
|
|
|
|
#include "../mobile/charactr.h"
|
|
|
|
|
#include "../statmsg.h"
|
2018-01-29 21:55:48 +01:00
|
|
|
#include "uomod.h"
|
|
|
|
|
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
namespace Pol
|
|
|
|
|
{
|
|
|
|
|
namespace Module
|
|
|
|
|
{
|
|
|
|
|
using namespace Bscript;
|
|
|
|
|
BObjectImp* UOExecutorModule::mf_SendStatus( /* mob */ )
|
|
|
|
|
{
|
|
|
|
|
Mobile::Character* chr;
|
2020-02-08 09:21:35 +01:00
|
|
|
if ( getCharacterParam( 0, chr ) )
|
2016-02-19 19:26:35 +01:00
|
|
|
{
|
|
|
|
|
if ( !chr->has_active_client() )
|
|
|
|
|
return new BError( "No client attached" );
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-12-07 23:34:16 +01:00
|
|
|
if ( chr->logged_in() )
|
2016-02-19 19:26:35 +01:00
|
|
|
{
|
|
|
|
|
send_full_statmsg( chr->client, chr );
|
|
|
|
|
return new BLong( 1 );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return new BError( "Mobile must not be offline" );
|
2016-02-11 22:54:43 +01:00
|
|
|
}
|
2016-02-19 19:26:35 +01:00
|
|
|
else
|
|
|
|
|
return new BError( "Invalid parameter type" );
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-12-07 23:34:16 +01:00
|
|
|
}
|