forked from liuxq/MyGameServerAssets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccount.py
More file actions
32 lines (26 loc) · 780 Bytes
/
Copy pathAccount.py
File metadata and controls
32 lines (26 loc) · 780 Bytes
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
# -*- coding: utf-8 -*-
import KBEngine
from KBEDebug import *
class Account(KBEngine.Entity):
def __init__(self):
KBEngine.Entity.__init__(self)
DEBUG_MSG("Account::__init__:%s." % (self.__dict__))
self.base.reqAvatarList()
def onReqAvatarList(self, infos):
"""
defined method.
"""
DEBUG_MSG("Account:onReqAvatarList::%s" % (list(infos['values'])))
self.base.reqCreateAvatar("kbe_bot_%s" % self.id, 1)
def onCreateAvatarResult(self, retcode, info):
"""
defined method.
"""
DEBUG_MSG("Account:onCreateAvatarResult::%s, retcode=%i" % (dict(info), retcode))
if retcode == 0:
self.base.selectAvatarGame(info["dbid"])
def onRemoveAvatar(self, dbid):
"""
defined method.
"""
DEBUG_MSG("Account:onRemoveAvatar:: dbid=%i" % (dbid))