Pol  Revision:cb584c9
help.cpp
Go to the documentation of this file.
1 
6 #include <stddef.h>
7 
8 #include "../bscript/eprog.h"
9 #include "../clib/refptr.h"
10 #include "../plib/systemstate.h"
11 #include "mobile/charactr.h"
12 #include "network/client.h"
13 #include "pktin.h"
14 #include "scrstore.h"
15 
16 namespace Pol
17 {
18 namespace Core
19 {
20 void handle_help( Network::Client* client, PKTIN_9B* /*msg*/ )
21 {
23  find_script( "misc/help", true, Plib::systemstate.config.cache_interactive_scripts );
24  if ( prog.get() != nullptr )
25  {
26  client->chr->start_script( prog.get(), false );
27  }
28 }
29 }
30 }
SystemState systemstate
Definition: systemstate.cpp:12
T * get() const
Definition: refptr.h:176
Mobile::Character * chr
Definition: client.h:182
void handle_help(Network::Client *client, PKTIN_9B *)
Definition: help.cpp:20
bool start_script(Bscript::EScriptProgram *prog, bool start_attached, Bscript::BObjectImp *param2=nullptr, Bscript::BObjectImp *param3=nullptr, Bscript::BObjectImp *param4=nullptr)
Definition: chrituse.cpp:30
ref_ptr< Bscript::EScriptProgram > find_script(const std::string &name, bool complain_if_not_found, bool cache_script)
Definition: scrstore.cpp:38
Definition: berror.cpp:12