| | |
| | |
|
| | | #找该红包的抢信息
|
| | | grabRecordDict = __GetGrabRecord(redPacketID)
|
| | | if playerID in grabRecordDict or len(grabRecordDict) >= packetCnt:
|
| | | GameWorld.DebugLog(" 该玩家已抢过此红包!",playerID)
|
| | | if playerID in grabRecordDict:
|
| | | GameWorld.DebugLog(" 该玩家已抢过此红包!", playerID)
|
| | | __NotifyGrabRedPacketInfo(curPlayer, redPacketID, grabRecordDict)
|
| | | return
|
| | | |
| | | if len(grabRecordDict) >= packetCnt:
|
| | | GameWorld.DebugLog(" 红包已被抢完!", playerID)
|
| | | if state != State_HasAllGot:
|
| | | redPacketRecData.SetValue4(State_HasAllGot)
|
| | | #GameWorld.DebugLog(" 纠正红包已抢完状态! state=%s,updState=%s" % (state, State_HasAllGot))
|
| | | __NotifyFamilyRedPacketInfo(curFamily, redPacketRecData, grabRecordDict.keys())
|
| | | __NotifyGrabRedPacketInfo(curPlayer, redPacketID, grabRecordDict)
|
| | | return
|
| | |
|
| | |
| | | #{playerid:[抢到的钱,名字,job]}
|
| | | g_grabDataDict[redPacketID] = grabRecordDict
|
| | |
|
| | | if len(grabRecordDict) == packetCnt:
|
| | | if len(grabRecordDict) >= packetCnt:
|
| | | redPacketRecData.SetValue4(State_HasAllGot)
|
| | |
|
| | | #通知该玩家红包抢结果
|
| | |
| | |
|
| | | if curPlayer.GetPlayerID() in grabHeroIDList:
|
| | | state = State_HasGot
|
| | | if sendPack.IsAll and state in [State_HasGot, State_HasAllGot]:
|
| | | #GameWorld.DebugLog("已抢或抢完的不发: RedPacketID=%s,state=%s" % (packetInfo.RedPacketID, state))
|
| | | continue
|
| | | packetInfo.State = state
|
| | | packetInfo.PacketCnt = int(packetData.GetStrValue2())
|
| | |
|
| | | packetInfo.Wish = packetData.GetStrValue3()
|
| | | sendPack.RedPacketInfo.append(packetInfo)
|
| | | if len(sendPack.RedPacketInfo) > 250:
|
| | | #GameWorld.DebugLog("红包太多了!")
|
| | | break
|
| | |
|
| | | sendPack.Count = len(sendPack.RedPacketInfo)
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|