Пример #1
0
    def _enchant_equipment_max_succeed(self, data, req, timer):
        res = hero_pb2.UpdateHeroEquipmentMaxRes()
        res.status = 0
        pack.pack_resource_info(data.resource.get(True), res.resource)
        response = res.SerializeToString()

        log = log_formater.output(data, "Enchant hero equipment max succeed",
                req, res, timer.count_ms())
        logger.notice(log)
        return response
Пример #2
0
    def _enchant_equipment_max_failed(self, err, req, timer):
        logger.fatal("Enchant hero equipment max failed[reason=%s]" % err)

        res = hero_pb2.UpdateHeroEquipmentMaxRes()
        res.status = -1
        response = res.SerializeToString()

        logger.notice("Enchant hero equipment max failed"
                "[user_id=%d][req=%s][res=%s][consume=%d]" %
                (timer.id, req, res, timer.count_ms()))
        return response