コード例 #1
0
ファイル: adaptors.py プロジェクト: fabura/GameAdminTools
 def adapt(self, params=None):
     result =  DefaultAdaptor.adapt(self, params)
     if 'job' in params:
         result.update({"SubJobDropDownList":params["job"],
                        "change":"Change of a sub-class"})
         return result
     raise InternalException(message="Job field is required!")
コード例 #2
0
    def adapt(self, params=None):
        result = DefaultAdaptor.adapt(self, params)
        if self.defaults.__len__() == 0:
            return result

        result.update(self.defaults)

        if "modifyWay" in params or params["modifyWay"] == "absolute":
            for field in self.defaults:
                if field in params:
                    result[field] = params[field]
# if relative change
        else:
            for field in self.defaults:
                if field in params:
                    try:
                        result[field] = self.defaults[field] + params[field]
                    except TypeError:
                        continue


#        we will always change absolute because face and hair properties do not save if relative change
        result["modifyWay"] = "absolute"
        if "memo" in params:
            result["memo"] = params["memo"] + " Created by script"
        else:
            result["memo"] = "Created by script"

        return result
コード例 #3
0
ファイル: adaptors.py プロジェクト: fabura/GameAdminTools
    def adapt(self, params=None):
        result = DefaultAdaptor.adapt(self, params)
        if self.defaults.__len__() == 0:
            return result

        result.update(self.defaults)

        if "modifyWay" in params or params["modifyWay"] == "absolute":
            for field in self.defaults:
                if field in params:
                    result[field] = params[field]
# if relative change
        else:
            for field in self.defaults:
                if field in params:
                    try:
                        result[field] = self.defaults[field] + params[field]
                    except TypeError:
                        continue

#        we will always change absolute because face and hair properties do not save if relative change
        result["modifyWay"] = "absolute"
        if "memo" in params:
            result["memo"] = params["memo"] + " Created by script"
        else:
            result["memo"] = "Created by script"

        return result
コード例 #4
0
 def adapt(self, params=None):
     result = DefaultAdaptor.adapt(self, params)
     if 'job' in params:
         result.update({
             "SubJobDropDownList": params["job"],
             "change": "Change of a sub-class"
         })
         return result
     raise InternalException(message="Job field is required!")
コード例 #5
0
 def adapt(self, params=None):
     result = DefaultAdaptor.adapt(self, params)
     if "approve" in params:
         result.update({"approve": "Approve"})
         return result
     elif "reject" in params:
         result.update({"reject": "Reject"})
         return result
     else:
         raise InternalException(message="Approve or reject?")
コード例 #6
0
ファイル: adaptors.py プロジェクト: fabura/GameAdminTools
 def adapt(self, params=None):
     result = DefaultAdaptor.adapt(self, params)
     if "approve" in params:
         result.update({
             "approve": "Approve"
         })
         return result
     elif "reject" in params:
         result.update({
             "reject" : "Reject"
         })
         return result
     else:
         raise InternalException(message="Approve or reject?")
コード例 #7
0
ファイル: adaptors.py プロジェクト: fabura/GameAdminTools
    def adapt(self, params=None):
    #         result is a sum of system info (Viewstate and so on) and params
        result = DefaultAdaptor.adapt(self, params)
        current_time = datetime.datetime.now()
        to_date = current_time.strftime("%Y-%m-%d %H:%M")
        #       for last day
        from_date = (current_time - datetime.timedelta(1)).strftime("%Y-%m-%d %H:%M")

        defaults = {
            #            'action': '803',
            'search': 'Search',
            'rowsPerPage': Lineage2ListLogHandler.LOGS_BY_PAGE,
            'SearchTarget': "targetChar",
            'toDate': to_date,
            'fromDate': from_date,
#            todo worldlist
            'worldList': 71
        }

        defaults.update(result)
        return defaults
コード例 #8
0
    def adapt(self, params=None):
        #         result is a sum of system info (Viewstate and so on) and params
        result = DefaultAdaptor.adapt(self, params)
        current_time = datetime.datetime.now()
        to_date = current_time.strftime("%Y-%m-%d %H:%M")
        #       for last day
        from_date = (current_time -
                     datetime.timedelta(1)).strftime("%Y-%m-%d %H:%M")

        defaults = {
            #            'action': '803',
            'search': 'Search',
            'rowsPerPage': Lineage2ListLogHandler.LOGS_BY_PAGE,
            'SearchTarget': "targetChar",
            'toDate': to_date,
            'fromDate': from_date,
            #            todo worldlist
            'worldList': 71
        }

        defaults.update(result)
        return defaults
コード例 #9
0
ファイル: adaptors.py プロジェクト: fabura/GameAdminTools
 def adapt(self, params=None):
     result = DefaultAdaptor.adapt(self, params)
     result['loginSubmit'] = 'Login'
     result['id'] = self.page.support.getLogin()
     result['password'] = self.page.support.getPassword()
     return result
コード例 #10
0
 def adapt(self, params=None):
     result = DefaultAdaptor.adapt(self, params)
     result['loginSubmit'] = 'Login'
     result['id'] = self.page.support.getLogin()
     result['password'] = self.page.support.getPassword()
     return result