| | |
| | | detail = gmCmdDict.get('Detail', "")
|
| | | serverID = int(gmCmdDict.get('OnlyServerID', "0"))
|
| | |
|
| | | ''' 需要验证guid是否已存在,如果存在
|
| | | 当 serverID 为0时,不允许插入
|
| | | 当 serverID 不为0时,需重新生成GUID,因为补偿物品是根据GUID查找的,如果 serverID 不一样但是GUID一样,就会导致领取多倍补偿物品 |
| | | '''
|
| | | compensationMgr = GameWorld.GetCompensationMgr()
|
| | | entireCnt = compensationMgr.GetEntireCompensationCount()
|
| | | for i in xrange(entireCnt):
|
| | | compensation = compensationMgr.AtEntireCompensation(i)
|
| | | if not compensation:
|
| | | continue
|
| | | |
| | | if compensation.GUID != GUID:
|
| | | continue
|
| | | |
| | | if not serverID:
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_NoNeed, "GUID already existed!")
|
| | | return
|
| | | |
| | | # 如果是单服的,GUID已经存在的情况下,重新分配个GUID,防止重复插入相同GUID的邮件,导致领取多倍补偿
|
| | | newGUID = str(uuid.uuid1())
|
| | | gmCmdDict['GUIDNEW'] = newGUID
|
| | | GameWorld.Log("发送单服补偿邮件,原GUID(%s)已存在,生成新GUID(%s), serverID=%s" % (GUID, newGUID, serverID))
|
| | | GUID = newGUID
|
| | | break
|
| | |
|
| | | #工具发过来的物品下标依据 'index,index,...' 不一定是从0开始并按顺序连续 =_=#
|
| | | intemIndexStrList = []
|