| | |
| | | #在个人补偿中
|
| | | curPersonalCompensation = GameWorld.GetCompensationMgr().FindPersonalCompensation(curPlayerID, GUID)
|
| | | if curPersonalCompensation.PlayerID == curPlayerID:
|
| | | if not CheckCanDelCompensation(curPersonalCompensation, GUID):
|
| | | #有附件不可删除
|
| | | NotifyCompensationResult(curPlayer, GUID, 0)
|
| | | return
|
| | | |
| | | ClearPersonalCompensation(curPlayerID, GUID)
|
| | | NotifyCompensationResult(curPlayer, GUID, 1)
|
| | | #GameWorld.DebugLog("个人补偿中OnDelCompensation:%s"%GUID)
|
| | |
| | | #全服邮件
|
| | | curEntireRequire = GameWorld.GetCompensationMgr().FindEntireCompensation(GUID)
|
| | | if curEntireRequire.GUID == GUID:
|
| | | if not CheckCanDelCompensation(curEntireRequire, GUID):
|
| | | #有附件不可删除
|
| | | NotifyCompensationResult(curPlayer, GUID, 0)
|
| | | return
|
| | | |
| | | SetPrizeState(curPlayerID, GUID, Disable_State, GameWorld.GetCompensationMgr().FindPlayerRecState(curPlayerID, GUID)/10)
|
| | | NotifyCompensationResult(curPlayer, GUID, 1)
|
| | | #GameWorld.DebugLog("全服邮件OnDelCompensation:%s"%GUID)
|
| | | return
|
| | |
|
| | | NotifyCompensationResult(curPlayer, GUID, 0)
|
| | | |
| | | # 有附件的情况玩家不可主动删除邮件,避免误操作;系统可删除不用调用此接口
|
| | | def CheckCanDelCompensation(mailObj, GUID):
|
| | | if mailObj.Gold or mailObj.GoldPaper or mailObj.Silver:
|
| | | # 有附加货币不可删除
|
| | | return False
|
| | | |
| | | if GameWorld.GetCompensationMgr().FindItemCount(GUID):
|
| | | # 有附件物品不可删除
|
| | | return False
|
| | | return True
|
| | |
|
| | | # 邮件删除情况
|
| | | def NotifyCompensationResult(curPlayer, GUID, result):
|