| | |
| | | except ValueError:
|
| | | return defValue
|
| | |
|
| | | def ToFloat(input, defValue = 0):
|
| | | try:
|
| | | result = float(input)
|
| | | return result
|
| | | |
| | | except ValueError:
|
| | | return defValue
|
| | | |
| | | ## 判断2个对象是否同国籍
|
| | | # @param srcObj 起点对象
|
| | | # @param desObj 目标对象
|
| | |
| | |
|
| | | return 0
|
| | |
|
| | | def DebugAnswer(curPlayer, text):
|
| | | def DebugAnswer(curPlayer, text, isLog=True):
|
| | | '''转码后再发DebugAnswer'''
|
| | | #===========================================================================
|
| | | # if not GetGameWorld().GetDebugLevel():
|
| | | # return
|
| | | #===========================================================================
|
| | | DebugLog(text)
|
| | | if isLog:
|
| | | DebugLog(text)
|
| | | text = text.decode(ShareDefine.Def_Game_Character_Encoding).encode(GetCharacterEncoding())
|
| | | curPlayer.DebugAnswer(text)
|
| | | return
|