Danbias/Code/Game/DanBiasServer/ServerObjects/Lobby/MainLobby.cpp

46 lines
722 B
C++
Raw Normal View History

2013-12-12 09:33:59 +01:00
#include "MainLobby.h"
2013-12-16 09:00:11 +01:00
#include <PlayerProtocols.h>
#include <PostBox\PostBox.h>
2013-12-12 09:33:59 +01:00
namespace DanBias
{
MainLobby::MainLobby()
{
this->box = new Oyster::PostBox<DanBias::NetworkSession::NetEvent>();
2013-12-12 09:33:59 +01:00
}
MainLobby::~MainLobby()
{
delete this->box;
this->box = 0;
2013-12-12 09:33:59 +01:00
}
void MainLobby::Release()
{
this->CloseSession(0);
2013-12-13 23:47:16 +01:00
}
void MainLobby::Frame()
{
2013-12-16 09:50:23 +01:00
ParseEvents();
2013-12-16 09:00:11 +01:00
}
//////// Private
2013-12-16 09:50:23 +01:00
void MainLobby::ParseEvents()
2013-12-16 09:00:11 +01:00
{
if(this->box && !this->box->IsEmpty())
2013-12-16 09:50:23 +01:00
{
2013-12-18 08:44:10 +01:00
NetEvent &e = this->box->Fetch();
2013-12-16 09:00:11 +01:00
2013-12-16 09:50:23 +01:00
if(e.protocol[0].type != Oyster::Network::NetAttributeType_Short) return;
2013-12-12 09:33:59 +01:00
2013-12-16 09:50:23 +01:00
short f = e.protocol[0].value.netShort;
switch (f)
{
default:
break;
}
2013-12-13 23:47:16 +01:00
}
2013-12-12 09:33:59 +01:00
}
2013-12-16 09:00:11 +01:00
2013-12-12 09:33:59 +01:00
}//End namespace DanBias