def __init__(self, uid=None): """初始化天赋信息 ships = { 210001: { "level": 1, "quality": 1, "star": 1, "skills": { 220001: 1, 220002: 1, 220003: 1, 220004: 1, }, }, } Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.ships = {} # 战舰信息 self.team = [0, 0, 0] # 战舰队形
def __init__(self, uid=None): """ Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.mission = [0] * 6 self.mission_fight = 0 self.arena = [0] * 6 self.arena_fight = 0 self.trial = [0] * 6 self.trial_fight = 0 self.act_gold = [0] * 6 self.act_gold_fight = 0 self.act_exp = [0] * 6 self.act_exp_fight = 0 self.act_fire = [0] * 6 self.act_fire_fight = 0 self.act_ice = [0] * 6 self.act_ice_fight = 0 self.act_phantom = [0] * 6 self.act_phantom_fight = 0 self.worldboss = [0] * 6 self.worldboss_fight = 0
def __init__(self, uid=None): """ Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.friends = [] # 好友信息
def __init__(self, uid=None): """初始化装备信息 Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid # 玩家ID self.equips = {} # 装备信息
def __init__(self, uid=None): """初始化天赋信息 Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.talents = {} # 天赋信息
def __init__(self, uid=None): """初始化角色机甲技能信息 Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.skills = {} # 机甲技能信息
def __init__(self, uid=None): """初始化角色机甲战魂信息 Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.spirits = {} # 战魂信息
def __init__(self, uid=None): """初始化运维活动数据 Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.acts = {} # 活动数据,动态数据,随时检测服务器全局的活动配置更新
def __init__(self, uid=None): """ Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.misc = {"items": [], "last_refresh": 0, "bought": []} self.honor = {"items": [], "last_refresh": 0, "bought": []} self.trial = {"items": [], "last_refresh": 0, "bought": []} self.group = {"items": [], "last_refresh": 0, "bought": []} self.mystery = {"items": [], "last_refresh": 0, "bought": []} # 副本随机商店
def __init__(self, uid=None): """初始化任务信息 Args: uid: 平台用户ID """ BaseModel.__init__(self) self.uid = uid # 用户ID self.last_refresh_date = 0 self.daily_tasks = {} # 日常任务 self.main_completed_tasks = [] # 已经提交完的任务列表 self.main_doing_tasks = {} # 主线任务
def __init__(self, uid=None): """ 初始化角色游戏信息 Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.ban_chat = 0 # 禁言截止时间 0 - 未被禁言 self.ban_account = 0 # 账号封禁截止时间 0 - 未被封禁账号 self.boss_enter_tag = 0 # 0 - 未进入 1 - 已进入
def __init__(self, uid=None): """初始化角色签到信息 Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid self.last_sign = 0 # 上次签到日期 20151110 self.month_sign_days = 0 # 本月内累计签到次数 self.last_award_index = 0 # 已领取的累计签到奖励ID self.total_sign_days = 0 # 总签到次数
def __init__(self, uid=None): """初始化角色机甲信息 Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.heros = {} # 机甲信息 self.pick_info = { "gold_cd": 0, "diamond_pick_times": 0, "diamond_ten_times": 0, }
def __init__(self, id=None): """初始化角色账号映射信息 Args: id: account_id """ BaseModel.__init__(self) self.id = id self.password = "" self.type = 0 self.uids = {} self.login_history = [] self.created_at = int(time.time()) self.open_id = "" # 平台原始id
def __init__(self, uid=None): """初始化角色基本信息 Args: uid: 角色游戏ID """ BaseModel.__init__(self) self.uid = uid # 角色uid self.name = "" self.update_name_times = 0 # 更改名字的次数 self.avatar = static_const.USER_DEFAULT_HERO # 默认头像为第一个机甲的ID self.user_sign = "" # 个性签名 self.account_id = None # 账户ID self.platform = None # 平台 self.sid = None # 服务器id self.state = 1 # 角色状态 0 冻结, 1 正常 self.type = 0 # 角色类型 0 普通玩家, 1 内部账号 维护更新时,内部账户可随意进出游戏 self.create_time = 0 # 角色创建时间 self.last_request = 0 # 客户端和服务器最后交互时间 self.last_sign_time = 0 # 上次登录签名时间,用于验证多端登录 self.total_login_days = 0 # 累计登录天数 self.login_history_dates = [] # 登录历史日期 self.used_cdkey_tags = [] # 玩家已经使用过的物品兑换码 self._game_info = None # 角色游戏属性 self._ext_info = None # 角色附加属性 self._vip = None # 角色vip属性 self._daily_info = None # 每日数据 self._task = None # 任务数据 self._package = None # 角色包裹 self._hero = None # 卡牌信息 self._equip = None # 装备信息 self._skill = None # 技能信息 self._spirit = None # 战魂信息 self._array = None # 阵列信息 self._mission = None # 副本任务 self._talent = None # 天赋信息 self._warship = None # 战舰信息 self._mall = None # 商店数据 self._group = None # 帮派数据 self._arena = None # 竞技场数据 self._trial = None # 试炼数据 self._sign = None # 签到数据 self._activity = None # 运维活动数据
def __init__(self, uid=None): """初始化vip信息 Args: uid: 平台角色ID """ BaseModel.__init__(self) self.uid = uid self.bought_gifts = 0 self.charged_index = 0 self.card_data = { "state": 0, "count1": 0, "count2": 0, "time1": 0, "time2": 0 }
def __init__(self, uid=None): BaseModel.__init__(self) self.uid = uid # 角色ID self.max_rank = 0 # 历史最高排名 self.win_times = 0 # 胜场次数 self.last_fight = 0 # 上次挑战时间戳 self.awarded_index = [] # 排名奖励已经领取过的编号 self.effective_fighters = [] # 有效4名对手列表 self.fight = 0 # 竞技场战力, 竞技场阵容中机甲战力之和 self.daily_update = time.strftime('%Y%m%d%H') # 上次刷新日期 self.daily_challenge_times = 0 # 今日挑战次数 self.daily_add_times = 0 # 今日购买挑战次数 self.daily_refresh_times = 0 # 今日“换一批”次数 self.daily_scores = 0 # 今日获得积分数 self.daily_awarded_index = [] # 每日积分奖励领取状态 self.daily_admire_list = [] # 今日膜拜对手【只限竞技场前10名】 # 心跳协议中使用的签署时间,每开一次竞技场。更新此时间,心跳中需要发送的消息筛选以此为准 self.extra_data = {"heartbeat_last_sign": int(time.time())}
def __init__(self, uid=None): """初始化角色游戏信息 Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid self.role_exp = 0 self.role_level = 0 self.gold = 10000 self.diamond = 0 self.current_energy = 0 self.energy_update = 0 self.vip_exp = 0 self.vip_level = 0 self.fight = 0 # 玩家最强战力,最强6个机甲战力之和,战力排行榜中用到 self.last_updated_fight = 0 self.honor_point = 0 # 技能点相关数据 vip_cfg = game_config.vip_priv_cfg.get(self.vip_level) self.current_skill_point = 0 self.skill_point_recover_interval = vip_cfg["skill_point_cd"] self.skill_point_update_time = 0 self.talent_point = 0 self.trial_point = 0 self.group_point = 0 self.weak_point = 0 self.box_key = 0 self.clone_point = 0 self.last_guide_id = 0 # 上次阅读聊天的时间,用来做私聊推送的起始时间点 self.last_chat_read = 0 # 上次跑马灯广播的ID,每次读取从这个值开始往后取,取了之后更新为最大的ID号 self.broadcast_id = 0
def __init__(self, uid=None): """初始化角色机甲信息 Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid # 角色ID self.group_id = 0 # 帮派ID self.donate = {"tiger_exp1": 0, "tiger_exp2": 0, "bird_exp1": 0, "bird_exp2": 0} # 捐献获得经验 self.game_data = { "tiger_points": -1, # 当前点数 "tiger_change_times": 0, # 每回合中花钱改投次数 "tiger_best_score": 0, # 历史最好成绩 "bird_best_score": 0, # 历史最好成绩 } self.cd = 0 # 退出时间戳 self.train_dict = {} # 训练姬甲起始时间点 example: {100001: 1463367207} self.train_list = [0,0,0,-1,-1,-1,-1,-1,-1] # 训练锁队列 example: [100001, 0, -1] 0 已开启 -1 未开启
def __init__(self, uid=None): """初始化每日数据 Args: uid: 角色ID """ BaseModel.__init__(self) self.uid = uid self.date = time.strftime('%Y%m%d%H') self.buy_energy_times = 0 self.buy_gold_times = 0 self.hero_pick_info = { "gold": 0, "diamond": 1 } # 金币抽卡为今日免费抽取次数, 钻石抽卡为当前是否可以抽卡 0 - 不可,1 - 可以免费抽卡 self.mission_info = {} self.act_missions = { } # 活动副本数据 {1:{"past_times": 0, "score": 45000, "award_index": []}, } self.world_chat_times = 0 self.mall_pick_cd = 0 self.mall_refresh_times = dict.fromkeys(range(1, 5), 0) self.resign_tag = 0 # 今日是否已经补签 self.group_info = { "donate_times": 0, # 今日捐献总次数 "tiger_time1": 0, # 老虎机投掷次数 "tiger_time2": 0, # 老虎机免费改投次数 "bird_times": 0, # 小鸟使用次数 "bird_daily_best": 0, # 小鸟今日最佳 "bird_awards": {}, # 今日已获得奖励列表 } self.online_awards = {"index": 0, "last": 0} # 每日在线奖励 self.group_train_express_times = 0 # 今日已使用训练所加速次数 self.boss_encourage_times = 0 # 今日世界boss鼓舞次数 self.boss_last_fight = 0 # 今日上次挑战世界boss时间戳 self.boss_supported = "" # 支持的玩家
def __init__(self, uid=None): BaseModel.__init__(self) self.uid = uid # 角色ID self.daily_yesterday_max = 0 # 昨日爬到的最高层数,用来计算哪些战斗层数可以跳过 self.history_scores = 0 # 历史积分 self.awarded_index = [] # 领取奖励列表 self.daily_update = 0 # 上次刷新日期 self.daily_scores = 0 # 今日目前获得积分 self.daily_fighters = {} # 今日匹配到的对手目标 self.daily_buffs = {} # 今日随机到的buff层数据. {1: [12001,12003], 2: [13001]} self.daily_awards = { } # 今日随机到的物品层数据. {1: {item_id: item_num, item_id2: item_num2}, 2: {}} self.stars = 0 # 今日积累的总星星数量 self.daily_bought_buffs = {} # 今日已购买到的buff列表 {1:[buff_id], 2:[]} self.daily_current_process = 1 # 今日当前爬到的层数 self.daily_hero_states = {} # 记录玩家今日被换下阵的机甲的状态 {hero_id: 血量百分比, } self.tmp_current_fighter = 0 # 玩家选择的对手 self.tmp_fighter_states = {} # 当前战斗层阵容状态 {hero_id: 血量百分比, } self.tmp_box_counter = 0 # 某一层开箱子计数器