Pol  Revision:cb584c9
guardrgn.h
Go to the documentation of this file.
1 
8 #ifndef GUARDRGN_H
9 #define GUARDRGN_H
10 
11 #include <string>
12 
13 #include "../clib/compilerspecifics.h"
14 #include "region.h"
15 #include "zone.h"
16 
17 namespace Pol
18 {
19 namespace Clib
20 {
21 class ConfigElem;
22 } // namespace Clib
23 } // namespace Pol
24 
25 namespace Pol
26 {
27 namespace Network
28 {
29 class Client;
30 }
31 namespace Mobile
32 {
33 class Character;
34 }
35 
36 namespace Core
37 {
38 void read_justice_zones();
39 
40 class JusticeRegion : public Region
41 {
42  typedef Region base;
43 
44 public:
46 
47  const std::string& region_name() const;
48  const std::string& entertext() const;
49  const std::string& leavetext() const;
50 
51  bool RunEnterScript( Mobile::Character* chr );
52  bool RunLeaveScript( Mobile::Character* chr );
53  static bool RunNoCombatCheck( Network::Client* client );
54 
55  virtual size_t estimateSize() const POL_OVERRIDE;
56 
57 private:
58  bool guarded_;
59  bool nocombat_;
60  std::string region_name_;
61  std::string entertext_;
62  std::string leavetext_;
63  std::string enter_script_;
64  std::string leave_script_;
65 };
66 
67 inline const std::string& JusticeRegion::region_name() const
68 {
69  return region_name_;
70 }
71 
72 inline const std::string& JusticeRegion::entertext() const
73 {
74  return entertext_;
75 }
76 
77 inline const std::string& JusticeRegion::leavetext() const
78 {
79  return leavetext_;
80 }
81 }
82 }
83 #endif
#define POL_OVERRIDE
void read_justice_zones()
Definition: guardrgn.cpp:37
STL namespace.
const std::string & leavetext() const
Definition: guardrgn.h:77
const std::string & entertext() const
Definition: guardrgn.h:72
unsigned short RegionId
Definition: zone.h:23
Definition: berror.cpp:12