Pol  Revision:f37d500
uomod3.cpp
Go to the documentation of this file.
1 
8 #include "../../bscript/berror.h"
9 #include "../mobile/charactr.h"
10 #include "../statmsg.h"
11 #include "../uoexhelp.h"
12 #include "uomod.h"
13 
14 
15 namespace Pol
16 {
17 namespace Module
18 {
19 using namespace Bscript;
21 {
22  Mobile::Character* chr;
23  if ( getCharacterParam( exec, 0, chr ) )
24  {
25  if ( !chr->has_active_client() )
26  return new BError( "No client attached" );
27 
28  if ( chr->logged_in() )
29  {
30  send_full_statmsg( chr->client, chr );
31  return new BLong( 1 );
32  }
33  else
34  return new BError( "Mobile must not be offline" );
35  }
36  else
37  return new BError( "Invalid parameter type" );
38 }
39 }
40 }
Network::Client * client
Definition: charactr.h:871
bool has_active_client() const
Definition: charactr.cpp:448
bool logged_in() const
Definition: charactr.cpp:428
bool getCharacterParam(Bscript::Executor &exec, unsigned param, Mobile::Character *&chrptr)
Definition: uoexhelp.cpp:140
void send_full_statmsg(Network::Client *client, Mobile::Character *chr)
Definition: statmsg.cpp:32
Bscript::BObjectImp * mf_SendStatus()
Definition: uomod3.cpp:20
Definition: berror.cpp:12