def onEntitiesEnabled(self):
     if len(self.arenaInitialList) == 0:
         self.isFirstEnter = True
         return
     self.isFirstEnter = False
     self.client.onGetThreeArenaValue(self.arenaInitialList)
     offset = util.getLeftSecsToNextHMS(0, 0, 0)
     self.addTimer(offset, 24 * 60 * 60, TimerDefine.Timer_arena_reward)
Exemple #2
0
 def onEntitiesEnabled(self):
     if self.babyDBID != 0:
         KBEngine.createBaseFromDBID("Baby", self.babyDBID, self.loadBabyCB)
     offset = util.getLeftSecsToNextHMS(0, 0, 0)
     self.addTimer(offset, 24 * 60 * 60,
                   TimerDefine.Timer_reset_lottery_free_times)
     self.addTimer(offset, 24 * 60 * 60, TimerDefine.Timer_reset_shop_item)
     """
Exemple #3
0
    def onEntitiesEnabled(self):
        # 刷新在线状态
        self.changeOnlineState(1)

        offset = util.getLeftSecsToWeekEndHMS(0, 0, 0)
        self.addTimer(offset, 7 * 24 * 60 * 60,
                      TimerDefine.Timer_reset_guild_weekDonate)

        dayOffset = util.getLeftSecsToNextHMS(0, 0, 0)
        self.addTimer(dayOffset, 24 * 60 * 60,
                      TimerDefine.Timer_reset_guild_dayDonate)

        buildOffset = util.getLeftSecsToNextMins(1)
        self.addTimer(buildOffset, 60, TimerDefine.Timer_guild_build_upgrade)
Exemple #4
0
    def onEntitiesEnabled(self):
        resetBuyTime = bodyPowerConfig.bodyPowerConfig[1]["resetBuyTime"]
        resetBuyTimeOffset = util.getLeftSecsToNextHMS(resetBuyTime, 0, 0)
        self.addTimer(resetBuyTimeOffset, 24 * 60 * 60, TimerDefine.Timer_body_power_reset_buy_times)

        # 恢复购买美元次数
        resetBuyTime = bodyPowerConfig.euroConfig[1]["resetBuyTime"]
        self.addTimer(resetBuyTimeOffset, 24 * 60 * 60, TimerDefine.Timer_reset_buy_euro)
        # 定时恢复心跳
        recoverTime = bodyPowerConfig.bodyPowerConfig[1]["recoverTime"] *60
        self.addTimer(recoverTime, recoverTime, TimerDefine.Timer_body_power_recover)


        # 下线时间体力恢复

        self.onOfflineRecoverPower()


        pass
Exemple #5
0
 def onEntitiesEnabled(self):
     rebateTime = shopConfig.baseConfig[1]["rebateTime"]
     offset = util.getLeftSecsToNextHMS(rebateTime, 0, 0)
     self.addTimer(offset, 24 * 60 * 60, TimerDefine.Timer_shop_recover)
Exemple #6
0
 def onEntitiesEnabled(self):
     rebateTime = lotteryConfig.baseConfig[1]["resetTime"]
     offset = util.getLeftSecsToNextHMS(rebateTime,0,0)
     self.addTimer(offset, 24 * 60 * 60, TimerDefine.Timer_reset_lottery_free_times)