-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathendtimer.cpp
More file actions
44 lines (39 loc) · 1.15 KB
/
Copy pathendtimer.cpp
File metadata and controls
44 lines (39 loc) · 1.15 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
#include "common/macros.h"
#include "gameroot.h"
#include "logic/gamelogic/core/endtimer.h"
#include "utils/tarslog.h"
#include "dz.pb.h"
#include "process/process.h"
#include "message/sendclientmessage.h"
#include "xtime4lib.h"
namespace game
{
namespace logic
{
namespace gamelogic
{
void EndTimer(E_NN_XTIME xtimekey, GameRoot *root, bool toclient)
{
__TRY__
//
if (xtimekey == NN_XTIME_KILL_ALL)
{
Aggr::getInstance()->kill(root->roomid());
}
else
{
Aggr::getInstance()->kill(root->roomid(), xtimekey);
}
//
if (toclient)
{
using namespace message;
//通知客户端
XGameDZProto::NN_msg2csDefault nncm;
sendAllClientMessage<XGameDZProto::NN_msg2csDefault>(XGameDZProto::NN_msg2sTimerEnd_E, nncm, root);
}
__CATCH__
}
}
}
}