def add(self): """docstring for add""" boss_name, boss_demage_name = self.get_boss_name() Ranking.init(boss_demage_name, 10) boss = MineBoss(boss_name, Ranking.instance(boss_demage_name), "mine_boss_stages") self._boss = boss current_time = time.time() self._last_time = current_time self._boss_num += 1 self.save_data() return "boss_id", boss
#coding:utf8 import action from gfirefly.server.logobj import logger from gtwisted.core import reactor from gfirefly.server.globalobject import GlobalObject from shared.utils.ranking import Ranking front_ip = GlobalObject().json_config['front_ip'] front_port = GlobalObject().json_config['front_port'] name = GlobalObject().json_config['name'] def tick(): result = GlobalObject().remote['login'].server_sync_remote( name, front_ip, front_port, 'recommend') if result is False: reactor.callLater(1, tick) else: reactor.callLater(60, tick) reactor.callLater(1, tick) # 初始化工会排行 Ranking.init('GuildLevel', 9999)
# -*- coding:utf-8 -*- """ created by server on 14-11-9下午5:11. """ import action from shared.time_event_manager.te_manager import te_manager from shared.utils.ranking import Ranking import time from gtwisted.core import reactor from app.world.core.rank_helper import tick_rank, do_tick_rank from app.world.core.limit_hero import tick_limit_hero from app.world.core.hjqy_boss import hjqy_manager # 初始化工会排行 Ranking.init('LevelRank1', 99999) Ranking.init('LevelRank2', 99999) Ranking.init('PowerRank1', 99999) Ranking.init('PowerRank2', 99999) Ranking.init('StarRank1', 99999) Ranking.init('StarRank2', 99999) Ranking.init('LimitHeroRank', 99999) # do_tick_rank() te_manager.add_event(24*60*60, 2, do_tick_rank) te_manager.add_event(24*60*60, 2, hjqy_manager.send_rank_reward_mails) tick_limit_hero()
from app.game.redis_mode import tb_character_info from shared.utils.ranking import Ranking def doWhenStop(): """服务器关闭前的处理 """ print "##############################" print "##########checkAdmins#############" print "##############################" MAdminManager().checkAdmins() GlobalObject().stophandler = doWhenStop Ranking.init('GuildLevel', 9999) Ranking.init('LevelRank1', 99999) Ranking.init('LevelRank2', 99999) Ranking.init('PowerRank1', 99999) Ranking.init('PowerRank2', 99999) Ranking.init('StarRank1', 99999) Ranking.init('StarRank2', 99999) Ranking.init('LimitHeroRank', 99999) if game_configs.base_config.get('initial') and GlobalObject().json_config.get( "name") == u"game": character_obj = tb_character_info.getObj(999) if not character_obj.exists(): character_obj = tb_character_info.getObj(9199) #print("999======", character_obj.exists()) print(GlobalObject().json_config.get("name"),
# -*- coding:utf-8 -*- """ created by server on 14-11-9下午5:11. """ from shared.utils.ranking import Ranking Ranking.init("WorldBossDemage", 10) Ranking.init("HjqyBossDamage", 10)
# -*- coding:utf-8 -*- """ created by server on 14-11-9下午5:11. """ from shared.utils.ranking import Ranking Ranking.init("WorldBossDemage", 10)