hxp
2024-12-26 22c964784d465c77365c2495f6d43117618d8482
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GMTExec/CrossPK.py
@@ -22,11 +22,7 @@
    import 其他模块需要写在此函数里,不然无法引用到
    '''
    import GameWorld
    import CrossRealmPlayer
    import PlayerCrossRealmPK
    import PlayerControl
    import ShareDefine
    import ChConfig
    
    orderId = exec_locals["orderId"]
    cmdInfo = exec_locals["cmdInfo"]
@@ -47,40 +43,8 @@
    pkScore = 32000 # 积分
    cWinCount = 50 # 连胜
    #  =================================================================
    zoneID = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    seasonID = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID)
    seasonState = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
    errorMsg = "OK"
    if not zoneID or not seasonID or seasonState == 2:
        errorMsg = "zone season or state error."
    else:
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DanLV, danLV)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TotalScore, pkScore)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CWinCount, cWinCount)
        if cWinCount > 0:
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_CLoseCount, 0)
        # 请求查询跨服服务器
        playerInfoDict = {"accID":curPlayer.GetAccID(),
                          "playerID":curPlayer.GetPlayerID(),
                          "playerName":CrossRealmPlayer.GetCrossPlayerName(curPlayer),
                          "playerJob":curPlayer.GetJob(),
                          "face":curPlayer.GetFace(),
                          "facePic":curPlayer.GetFacePic(),
                          "fightPower":PlayerControl.GetFightPower(curPlayer),
                          "realmLV":curPlayer.GetOfficialRank(),
                          "ondayScore":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_OnDayScore),
                          "pkScore":pkScore, "danLV":danLV, "cWinCount":cWinCount,
                          }
        resultDict.update({"PlayerInfo":playerInfoDict})
        dataMsg = {"ZoneID":zoneID, "SeasonID":seasonID, "GMSetCrossPK":1, "PlayerInfo":playerInfoDict}
        GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_PKBillboard, dataMsg)
        PlayerCrossRealmPK.SyncCrossRealmPKPlayerInfo(curPlayer)
    PlayerCrossRealmPK.GMSetPlayerCrossPKData(curPlayer, danLV, pkScore, cWinCount, resultDict)
    GameWorld.Log("This is MameServer GMT_Execfile run %s. orderId=%s" % (cmdInfo, orderId), curPlayer.GetPlayerID())
    resultDict.update({"zoneID":zoneID, "seasonID":seasonID, "seasonState":seasonState, "errorMsg":errorMsg})
    return
exec_locals = locals()