polserver/pol-core/pol/module/uomod3.cpp
Kevin Eady 12d6186d10
Script option enhancements (#118)
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES

* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT

* wip beginning work on templatization

* Use PolModule in pol-specific modules

* wip, creating PolModule with getXYZParam

* wip 1, moving getXYZ to UOExecutor

* compilable with PolObjectImp / PolApplicObj

* add type guard

* wip, change signatures

change signatures of script_method, script_method_id, and
custom_script_method

* compilable (windows)

* linux fixes

* namespace fixes

* remove uoexhelp

* formatting

* compilable

- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h

* finish uoexec() helper

* some cleanup
2020-02-08 09:21:35 +01:00

39 lines
845 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
{
namespace 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 );
}
else
return new BError( "Mobile must not be offline" );
}
else
return new BError( "Invalid parameter type" );
}
}
}