def __init__(self): utility.DirtyFlag.__init__(self) self.data = None self.boss = {} #{bossid:obj} self.save_cache = {} # 存储缓存 self._loop_task = None Game.sub(MSG_FRAME_STOP, self._frame_stop)
def init_app_common(): public_init() Game.res_mgr = ResMgr() Game.res_mgr.load() Game.condition_mgr = ConditionMgr() #注册开始消息 Game.sub(MSG_FRAME_START, start_common) #时间管理 from game.mgr.timer import Timer Game.timer = Timer() #初始化rpc功能模块 from game.mgr.player import GPlayerMgr rpc_player_mgr = GPlayerMgr() #服务器信息 from game.mgr.server import ServerInfo rpc_server_info = ServerInfo() #好友管理 from game.mgr.friend import FriendMgr rpc_friend_mgr = FriendMgr() # 邮箱 from game.mgr.mail import MailMgr rpc_mail_mgr = MailMgr() #答题管理 from game.mgr.exam import ExamMgr rpc_exam_mgr = ExamMgr() #全民boss from game.mgr.boss import QmBossMgr rpc_qmboss_mgr = QmBossMgr() #野外boss from game.mgr.boss import YwBossMgr rpc_ywboss_mgr = YwBossMgr() # 生死劫boss from game.mgr.boss import SsjBossMgr rpc_ssjboss_mgr = SsjBossMgr() #服务器公共资源管理 from game.mgr.commonres import CommonresMgr rpc_commonres_mgr = CommonresMgr() #房间管理-本地 from game.mgr.room import RoomMgrCommon rpc_room_mgr_common = RoomMgrCommon() #日常pvp-本地 from game.mgr.daylyPVP import DaylyPVPMgrCommon rpc_dayly_pvp_mgr_common = DaylyPVPMgrCommon() #帮会管理 from game.mgr.guild import GuildMgr rpc_guild_mgr = GuildMgr() return rpc_player_mgr, rpc_server_info, rpc_friend_mgr, rpc_mail_mgr, rpc_exam_mgr, \ rpc_qmboss_mgr, rpc_ywboss_mgr, rpc_ssjboss_mgr, rpc_commonres_mgr, \ rpc_dayly_pvp_mgr_common, rpc_room_mgr_common, rpc_guild_mgr
def __init__(self): utility.DirtyFlag.__init__(self) self.data = None self.opentime = 0 self.mergetime = 0 self.profile_start = 0 self.profile_end = 0 self.save_cache = {} # 存储缓存 Game.sub(MSG_FRAME_STOP, self._frame_stop)
def __init__(self): utility.DirtyFlag.__init__(self) self.data = None self.cycleWeek = CycleWeek(self, keepCyc=2) self.players = {} #玩家缓存数据 self.pid_matchId = {} self.save_cache = {} self._save_loop_task = None Game.sub(MSG_FRAME_STOP, self._frame_stop)
def __init__(self): utility.DirtyFlag.__init__(self) self.data = None self.firstKill = { } #{ssjId:{names:[], round:1, time:0} 全服首杀队伍 首杀者名字 首杀回合数 首杀时间戳 self.minKill = { } #{ssjId:{names:[], round:1, time:0} 最少回合队伍 名字 最少回合数 最少回合击杀时间戳 self.save_cache = {} # 存储缓存 self._loop_task = None Game.sub(MSG_FRAME_STOP, self._frame_stop)
def __init__(self): utility.DirtyFlag.__init__(self) self.data = None self.boss = {} # {bossid:obj} self.save_cache = {} # 存储缓存 self._loop_task = None self.runaway_timer = None #逃跑定时器 self.refresh_timer = None #刷新定时器 Game.sub(MSG_FRAME_STOP, self._frame_stop)
def init_app_logic(): public_init() Game.res_mgr = ResMgr() Game.res_mgr.load() Game.condition_mgr = ConditionMgr() #注册开始消息 Game.sub(MSG_FRAME_START, start_logic) #初始化rpc功能模块 from game.mgr.logicgame import LogicGame Game.logic_game = LogicGame() #玩家管理器 from game.mgr.player import SubPlayerMgr Game.player_mgr = SubPlayerMgr() Game.logic_game.stop_mgrs.append(Game.player_mgr) return Game.logic_game, Game.player_mgr
def init_app_room(): public_init() Game.res_mgr = ResMgr() Game.res_mgr.load() #注册开始消息 Game.sub(MSG_FRAME_START, start_room) #初始化rpc功能模块 from game.mgr.timer import Timer Game.timer = Timer() #战斗 Game.fight_mgr = FightMgr() from game.mgr.room import RoomMgr rpc_room_mgr = RoomMgr() from game.mgr.daylyPVP import DaylyPVPMgr rpc_dayly_pvp_mgr = DaylyPVPMgr() from game.mgr.txdy import TxdyMgr rpc_txdy_mgr = TxdyMgr() from game.mgr.globalData import GlobalDataMgr rpc_globalData_mgr = GlobalDataMgr() from game.mgr.crossRank import CrossRankMgr rpc_cross_rank_mgr = CrossRankMgr() from game.mgr.levelContest import LevelContestMgr rpc_level_contest_mgr = LevelContestMgr() from game.mgr.groupPK import GroupPKMgr rpc_grouppk_mgr = GroupPKMgr() return rpc_room_mgr, rpc_dayly_pvp_mgr, rpc_txdy_mgr, rpc_cross_rank_mgr, rpc_level_contest_mgr, rpc_grouppk_mgr, rpc_globalData_mgr
def __init__(self): self.alls = {} # {gid: guild} Game.sub(MSG_FRAME_STOP, self._frame_stop) self._loop_task = None