From 0c0e97dde31a0f0bb9cdec313b827a8d967a40b8 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 27 十一月 2024 11:51:55 +0800 Subject: [PATCH] 10318 【英文】【越南】【BT】【砍树】统一增加奖励获得封包(增加每日礼包事件DailyGiftbag;屏蔽多余的CTG事件下发;) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py index aca9647..d9af3a4 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py @@ -404,6 +404,8 @@ GameWorld.Log('创建家族 : %s(%s), fakeIndex=%s, creatFamilyTimes=%s' % (fullFamilyName, curFamily.GetID(), fakeIndex, creatFamilyTimes+1), curPlayerID) PlayerControl.WorldNotify(0, "jiazu_liubo_671654", [curPlayer.GetName(), fullFamilyName, curFamily.GetID()]) + + PlayerFamilyZhenbaoge.OnZhenbaogeReset(curFamily) return ## 获取家族全名 @@ -3713,6 +3715,8 @@ __DoChuangong_Response(curPlayer, tagPlayerID, isOK) return + if msgType == "ThanksGift": + __DoChuangong_ThanksGift(curPlayer, msgData) return def __CheckChuangongPlayer(curPlayer, tagPlayerID): @@ -3732,8 +3736,26 @@ def __DoChuangong_Invite(curPlayer, tagPlayerID): ## 邀请 playerID = curPlayer.GetPlayerID() - tagPlayer = __CheckChuangongPlayer(curPlayer, tagPlayerID) + curFamily = curPlayer.GetFamily() + if not curFamily: + return + tagMember = curFamily.FindMember(tagPlayerID) + if not tagMember: + GameWorld.DebugLog("非盟友无法传功! tagPlayerID=%s" % tagPlayerID, curPlayer.GetPlayerID()) + return + tagPlayer = tagMember.GetPlayer() if not tagPlayer: + clientPack = ChPyNetSendPack.tagGCChuangongStart() + clientPack.Clear() + clientPack.PlayerID = tagMember.GetPlayerID() + clientPack.Name = tagMember.GetName() + clientPack.NameLen = len(clientPack.Name) + clientPack.LV = tagMember.GetLV() + clientPack.Job = tagMember.GetJob() + clientPack.RealmLV = tagMember.GetOfficialRank() + NetPackCommon.SendFakePack(curPlayer, clientPack) + PyGameData.g_chuangongTagPlayerDict[playerID] = tagPlayerID + GameWorld.DebugLog("对方离线,则自己直接开始传功: tagPlayerID=%s, %s" % (tagPlayerID, PyGameData.g_chuangongPlayerDict), playerID) return invitePlayerIDList = PyGameData.g_chuangongPlayerDict.get(playerID, []) if tagPlayerID not in invitePlayerIDList: @@ -3789,6 +3811,27 @@ clientPack.Job = tagPlayer.GetJob() clientPack.RealmLV = tagPlayer.GetOfficialRank() NetPackCommon.SendFakePack(curPlayer, clientPack) + PyGameData.g_chuangongTagPlayerDict[curPlayer.GetPlayerID()] = tagPlayer.GetPlayerID() + return + +def __DoChuangong_ThanksGift(curPlayer, msgData): + itemID = msgData[0] + playerID = curPlayer.GetPlayerID() + tagPlayerID = PyGameData.g_chuangongTagPlayerDict.pop(playerID, 0) + GameWorld.DebugLog("__DoChuangong_ThanksGift tagPlayerID=%s" % tagPlayerID, playerID) + if not tagPlayerID: + return + curFamily = curPlayer.GetFamily() + if not curFamily: + return + tagMember = curFamily.FindMember(tagPlayerID) + if not tagMember: + return + assistPlayerDict = {tagPlayerID:{"PlayerName":tagMember.GetName(), "Job":tagMember.GetJob(), + "LV":tagMember.GetLV(), "RealmLV":tagMember.GetOfficialRank(), + "Face":tagMember.GetFace(), "FacePic":tagMember.GetFacePic()}} + GameWorld.DebugLog(" assistPlayerDict %s" % assistPlayerDict, playerID) + PlayerAssist.AddNewAssistThanksEx(curPlayer, itemID, assistPlayerDict) return ##-------------------------------------------------------------------------------------------------- -- Gitblit v1.8.0