コード例 #1
0
ファイル: ops_pack.py プロジェクト: webiumsk/WOT-0.9.12
def packPascalString(s):
    if isinstance(s, unicode):
        s = s.encode('utf8')
    s = truncate_utf8(s, MAX_PASCAL_STRING_LEN)
    buffer = struct.pack('<H', len(s))
    buffer += s
    return buffer
コード例 #2
0
ファイル: ctx.py プロジェクト: kusaku/wot_scripts
 def __init__(self, databaseIDs, comment, waitingID = ''):
     super(SendInvitesUnitCtx, self).__init__(waitingID=waitingID)
     self.__databaseIDs = databaseIDs[:300]
     if comment:
         self.__comment = truncate_utf8(comment, INVITE_COMMENT_MAX_LENGTH)
     else:
         self.__comment = ''
コード例 #3
0
ファイル: commonops_pack.py プロジェクト: kusaku/wot_scripts
def packPascalString(s):
    if isinstance(s, unicode):
        s = s.encode('utf8')
    s = truncate_utf8(s, MAX_PASCAL_STRING_LEN)
    buffer = struct.pack('<H', len(s))
    buffer += s
    return buffer
コード例 #4
0
ファイル: __init__.py プロジェクト: webiumsk/WOT-0.9.14-CT
 def __init__(self, databaseIDs, comment, waitingID=""):
     super(SendInvitesCtx, self).__init__(waitingID=waitingID)
     self.__databaseIDs = databaseIDs[:300]
     if comment:
         self.__comment = truncate_utf8(comment, INVITE_COMMENT_MAX_LENGTH)
     else:
         self.__comment = ""
コード例 #5
0
 def __init__(self, playerIDs, comment='', waitingID=''):
     super(SendInvitesCtx, self).__init__(waitingID=waitingID)
     self.__playerIDs = playerIDs[:300]
     if comment:
         self.__comment = truncate_utf8(
             comment, prb_settings.INVITE_COMMENT_MAX_LENGTH)
     else:
         self.__comment = ''
コード例 #6
0
ファイル: prb_ctx.py プロジェクト: jamesxia4/wot_client
 def __init__(self,
              waitingID='',
              isOpened=True,
              comment='',
              isRequestToCreate=True,
              funcExit=prb_settings.FUNCTIONAL_EXIT.PREBATTLE):
     super(TeamSettingsCtx, self).__init__(waitingID=waitingID,
                                           funcExit=funcExit)
     self.__isOpened = isOpened
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
     self.__isForced = False
     self._isRequestToCreate = isRequestToCreate
コード例 #7
0
 def __init__(self,
              prbType,
              waitingID='',
              isOpened=True,
              comment='',
              isRequestToCreate=True,
              flags=_FUNCTIONAL_FLAG.UNDEFINED):
     super(TeamSettingsCtx, self).__init__(entityType=prbType,
                                           waitingID=waitingID,
                                           flags=flags)
     self.__isOpened = isOpened
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
     self._isRequestToCreate = isRequestToCreate
コード例 #8
0
 def __init__(self,
              clubDbID,
              minWinRate=0,
              minBattleCount=0,
              description='',
              waitingID='',
              confirmID=''):
     super(SetApplicantsRequirements, self).__init__(clubDbID,
                                                     waitingID=waitingID,
                                                     confirmID=confirmID)
     self.__minWinRate = minWinRate
     self.__minBattleCount = minBattleCount
     self.__description = truncate_utf8(description,
                                        CLUB_LIMITS.MAX_SHORT_DESC_LENGTH)
コード例 #9
0
 def setComment(self, comment):
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
コード例 #10
0
ファイル: prb_ctx.py プロジェクト: webiumsk/WOT0.10.0
 def setComment(self, comment):
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
コード例 #11
0
ファイル: prb_ctx.py プロジェクト: webiumsk/WOT0.10.0
 def __init__(self, prbType, waitingID = '', isOpened = True, comment = '', isRequestToCreate = True, flags = _FUNCTIONAL_FLAG.UNDEFINED):
     super(_TeamSettingsCtx, self).__init__(entityType=prbType, waitingID=waitingID, flags=flags)
     self.__isOpened = isOpened
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
     self._isRequestToCreate = isRequestToCreate
コード例 #12
0
ファイル: prb_ctx.py プロジェクト: webiumsk/WOT0.10.0
 def __init__(self, comment, waitingID = ''):
     super(ChangeCommentCtx, self).__init__(entityType=prb_getters.getPrebattleType(), waitingID=waitingID)
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
コード例 #13
0
ファイル: prb_ctx.py プロジェクト: webiumsk/WoT
 def __init__(self, waitingID = '', isOpened = True, comment = '', isRequestToCreate = True, funcExit = prb_settings.FUNCTIONAL_EXIT.PREBATTLE):
     super(TeamSettingsCtx, self).__init__(waitingID=waitingID, funcExit=funcExit)
     self.__isOpened = isOpened
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
     self.__isForced = False
     self._isRequestToCreate = isRequestToCreate
コード例 #14
0
ファイル: prb_ctx.py プロジェクト: webiumsk/WoT
 def __init__(self, comment, waitingID = ''):
     super(ChangeCommentCtx, self).__init__(waitingID=waitingID)
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
コード例 #15
0
ファイル: unit_ctx.py プロジェクト: webiumsk/WOT-0.9.12-CT
 def __init__(self, comment, waitingID = ''):
     super(ChangeCommentUnitCtx, self).__init__(waitingID=waitingID)
     self.__comment = truncate_utf8(comment, prb_settings.UNIT_COMMENT_MAX_LENGTH)
コード例 #16
0
 def __init__(self, comment, waitingID=''):
     super(ChangeCommentUnitCtx, self).__init__(waitingID)
     self.__comment = truncate_utf8(comment,
                                    prb_settings.UNIT_COMMENT_MAX_LENGTH)
コード例 #17
0
 def __init__(self, comment, waitingID=''):
     super(ChangeCommentCtx, self).__init__(waitingID)
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
コード例 #18
0
 def __init__(self, comment, waitingID=''):
     super(ChangeCommentCtx, self).__init__(entityType=prb_getters.getPrebattleType(), waitingID=waitingID)
     self.__comment = truncate_utf8(comment, PREBATTLE_COMMENT_MAX_LENGTH)
コード例 #19
0
ファイル: contexts.py プロジェクト: webiumsk/WOT-0.9.15.1
 def __init__(self, clubDbID, minWinRate = 0, minBattleCount = 0, description = '', waitingID = '', confirmID = ''):
     super(SetApplicantsRequirements, self).__init__(clubDbID, waitingID=waitingID, confirmID=confirmID)
     self.__minWinRate = minWinRate
     self.__minBattleCount = minBattleCount
     self.__description = truncate_utf8(description, CLUB_LIMITS.MAX_SHORT_DESC_LENGTH)