GameServer
InstanceAreaTicket.h
[詳解]
1 
6 #ifndef __INSTANCEAREATICKET_H__
7 #define __INSTANCEAREATICKET_H__
8 
9 #include <boost/unordered_map.hpp>
10 #include "WeakPtrDefine.h"
11 #include "Math/Vector3D.h"
12 
18 {
21 
24 
27 };
28 
34 {
35 
36 public:
37 
40 
43 
44 };
45 
51 {
52 
53 private: // 別名定義.
54 
55  typedef boost::unordered_map<u32, InstanceAreaTicketInfo> InfoMap;
56 
57 public:
58 
65  InstanceAreaTicket(u32 InUuid, u32 InAreaId, const Vector3D &InStartPosition);
66 
71 
77  void AddClient(ClientPtr pClient);
78 
85  void RecvProcess(u32 Uuid, ETicketState Process);
86 
92  bool IsReady() const;
93 
99  bool IsDiscard() const;
100 
106  bool IsWaiting() const;
107 
113  u32 GetAreaId() const { return AreaId; }
114 
119  void BroadcastPublishPacket();
120 
125  void BroadcastDiscardPacket();
126 
132  void EnterToInstanceArea(AreaPtr pArea);
133 
134 private:
135 
136  // UUID
137  u32 Uuid;
138 
139  // エリアID
140  u32 AreaId;
141 
142  // 開始座標.
143  Vector3D StartPosition;
144 
145  // 情報リスト
146  InfoMap InfoList;
147 
148 };
149 
150 #endif // #ifndef __INSTANCEAREATICKET_H__
ClientPtr pClient
クライアント
Definition: InstanceAreaTicket.h:39
bool IsWaiting() const
待機中か?
Definition: InstanceAreaTicket.cpp:61
ETicketState State
ステート
Definition: InstanceAreaTicket.h:42
進入.
Definition: InstanceAreaTicket.h:23
インスタンスマップチケット
Definition: InstanceAreaTicket.h:50
InstanceAreaTicket(u32 InUuid, u32 InAreaId, const Vector3D &InStartPosition)
コンストラクタ
Definition: InstanceAreaTicket.cpp:16
void EnterToInstanceArea(AreaPtr pArea)
インスタンスエリアに突っ込む
Definition: InstanceAreaTicket.cpp:92
~InstanceAreaTicket()
デストラクタ
Definition: InstanceAreaTicket.h:70
void BroadcastDiscardPacket()
破棄チケットをバラ撒く
Definition: InstanceAreaTicket.cpp:82
weak_ptr< AreaBase > AreaPtr
Definition: WeakPtrDefine.h:25
Definition: Vector3D.h:8
ETicketState
チケットステート
Definition: InstanceAreaTicket.h:17
u32 GetAreaId() const
エリアIDを取得
Definition: InstanceAreaTicket.h:113
void BroadcastPublishPacket()
発行チケットをバラ撒く
Definition: InstanceAreaTicket.cpp:72
unsigned int u32
Definition: TypeDefs.h:10
void RecvProcess(u32 Uuid, ETicketState Process)
処理を受信した
Definition: InstanceAreaTicket.cpp:33
void AddClient(ClientPtr pClient)
クライアント追加
Definition: InstanceAreaTicket.cpp:24
weak_ptr< Client > ClientPtr
Definition: WeakPtrDefine.h:22
bool IsDiscard() const
破棄されているか?
Definition: InstanceAreaTicket.cpp:50
処理待ち
Definition: InstanceAreaTicket.h:20
bool IsReady() const
準備が完了しているか?
Definition: InstanceAreaTicket.cpp:39
破棄.
Definition: InstanceAreaTicket.h:26
チケット情報
Definition: InstanceAreaTicket.h:33