-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameparameter.cpp
More file actions
49 lines (42 loc) · 1.59 KB
/
gameparameter.cpp
File metadata and controls
49 lines (42 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "common/macros.h"
#include "gameroot.h"
#include "context/context.h"
#include "Comm/ITableGame.h"
#include "utils/tarslog.h"
#include "message/sendclientmessage.h"
#include "logic/gamelogic/core/checkbegin.h"
#include "process/process.h"
#include "config/gameconfig.h"
namespace majong
{
namespace logic
{
namespace roomlogic
{
void GameParameter(void const *p, GameRoot *root)
{
PERFSTATS_ENTRY();
__TRY__
using namespace RoomSo;
using namespace context;
using namespace message;
using namespace gamelogic;
using namespace process;
using namespace config;
TGAME_GameParameter const *nnrs = static_cast<TGAME_GameParameter const *>(p);
DLOG_TRACE("roomid:"<<root->roomid()<<", "<<"TGAME_GameParameter_E" << ", smallBlind: " << nnrs->smallBlind << ", level: " << nnrs->blindlevel << ", ante: " << nnrs->ante);
//设置盲注,前注
root->cfg->setFrontBet(nnrs->smallBlind); //前注
root->cfg->setMinTake(nnrs->bigBlind); //最小携带
root->cfg->setMaxSeatNum(nnrs->ante); //座位数
root->cfg->setBlindLevel(nnrs->blindlevel);
if (nnrs->optionTime > 0)
{
root->cfg->setInitBetTime(1, nnrs->optionTime - 1);
}
__CATCH__
PERFSTATS_EXIT();
}
}
}
}