| | |
| | | helpBattlePlayer.playerName = recData.GetStrValue1()
|
| | | helpBattlePlayer.todayXianyuanCoin = int(recData.GetStrValue2())
|
| | | helpCountDictStr = recData.GetStrValue3()
|
| | | if helpCountDictStr.startswith("{") and helpCountDictStr.endswith("{"):
|
| | | if helpCountDictStr.startswith("{") and helpCountDictStr.endswith("}"):
|
| | | helpBattlePlayer.todayHelpCountDict = eval(helpCountDictStr)
|
| | | else:
|
| | | GameWorld.ErrLog("LoadCheckInPlayerError: helpCountDictStr=%s" % helpCountDictStr, playerID)
|
| | |
| | | if playerID not in PyGameData.g_fbHelpBattleRecord:
|
| | | return
|
| | | unNotifyRecordList = PyGameData.g_fbHelpBattleRecord.pop(playerID)
|
| | | SendMapServer_FBHelpBattleRecord(curPlayer, unNotifyRecordList)
|
| | | SendMapServer_FBHelpBattleRecord(curPlayer, unNotifyRecordList, True)
|
| | | return
|
| | |
|
| | | def OnMinuteProcess():
|
| | |
| | | % (curPlayer.GetLV(), fightPower, curPlayer.GetFamilyID(), curPlayer.GetVIPLv(), todayXianyuanCoin, checkInCount + 1, haveViewCache), playerID)
|
| | | return [isOK, haveViewCache]
|
| | |
|
| | | def UpdateCheckInPlayerInfo(playerID, fightPower, familyID):
|
| | | def UpdateCheckInPlayerInfo(playerID, fightPower, familyID, playerName):
|
| | | ## 更新登记的助战玩家等级战力
|
| | | if playerID not in PyGameData.g_fbHelpBattleCheckInPlayerDict:
|
| | | return
|
| | | helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[playerID]
|
| | | helpBattlePlayer.fightPower = fightPower
|
| | | helpBattlePlayer.familyID = familyID
|
| | | helpBattlePlayer.playerName = playerName
|
| | | GameWorld.DebugLog("更新助战玩家等级战力: fightPower=%s,familyID=%s" % (fightPower, familyID), playerID)
|
| | | return
|
| | |
|
| | |
| | | coinAdd = int((baseHelpPoint + relationAdd) * addCoinRate / 10000.0)
|
| | | canAddMax = max(playerXianyuanCoinUpper - todayXianyuanCoin, 0)
|
| | | coinAddReal = min(coinAdd, canAddMax) # 实际加仙缘币
|
| | | GameWorld.DebugLog(" 助战增加仙缘币: coinAddReal=%s, todayMapHelpCount=%s" % (coinAddReal, todayMapHelpCount), calledPlayerID)
|
| | | GameWorld.DebugLog(" 助战增加仙缘币: todayXianyuanCoin=%s,coinUpper=%s,canAddMax=%s,coinAdd=%s,coinAddReal=%s, todayMapHelpCount=%s" |
| | | % (todayXianyuanCoin, playerXianyuanCoinUpper, canAddMax, coinAdd, coinAddReal, todayMapHelpCount), calledPlayerID)
|
| | |
|
| | | # GameServer 直接先加
|
| | | helpBattlePlayer.todayXianyuanCoin += coinAddReal
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList):
|
| | | def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList, isLogin=False):
|
| | | if not syncHelpRecordList:
|
| | | return
|
| | |
|
| | |
| | | for record in syncHelpRecordList:
|
| | | helpRecordList.append([record.callPlayerID, record.callPlayerName, record.mapID, record.funcLineID,
|
| | | record.xianyuanCoinAdd, record.relation, record.vipLV, record.recordTime])
|
| | | addXianyuanCoinMsg = str(["HelpRecord", helpRecordList])
|
| | | addXianyuanCoinMsg = str(["HelpRecord", helpRecordList, isLogin])
|
| | | curPlayer.MapServer_QueryPlayerResult(0, 0, 'FBHelpBattle', addXianyuanCoinMsg, len(addXianyuanCoinMsg))
|
| | | GameWorld.DebugLog(" MapServer_QueryPlayerResult %s" % addXianyuanCoinMsg, curPlayer.GetPlayerID())
|
| | | return
|