From 5d7c40ddd0f7a7589f5dd2e7835de8094f63d803 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 04 十二月 2018 15:16:53 +0800
Subject: [PATCH] 1 已删除 PyNetPack
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
index 77afcd7..854b607 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
@@ -85,7 +85,7 @@
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)
@@ -174,7 +174,7 @@
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():
@@ -297,13 +297,14 @@
% (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
@@ -446,7 +447,7 @@
if PlayerFriend.IsFriend(playerID, tagPlayerID):
return checkRelation
if checkRelation == 2:
- if curPlayer.GetFamilyID() == tagFamilyID:
+ if tagFamilyID and curPlayer.GetFamilyID() == tagFamilyID:
return checkRelation
return 0
@@ -516,7 +517,8 @@
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
@@ -542,7 +544,7 @@
return
-def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList):
+def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList, isLogin=False):
if not syncHelpRecordList:
return
@@ -550,7 +552,7 @@
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
--
Gitblit v1.8.0