| | |
| | |
|
| | | ## 是否匹配中
|
| | | def SetIsCrossPKMatching(curPlayer, isMatching):
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_IsCrossPKMatching, isMatching)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_IsCrossPKMatching, isMatching)
|
| | | return
|
| | | def GetIsCrossPKMatching(curPlayer): |
| | | return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_IsCrossPKMatching) and IsCrossRealmPKMatchState()
|
| | | def GetIsCrossPKMatching(curPlayer):
|
| | | return curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_IsCrossPKMatching) and IsCrossRealmPKMatchState()
|
| | |
|
| | | def DoPlayerOnDay(curPlayer):
|
| | | if GameWorld.IsCrossServer():
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayPKCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayWinCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayBuyCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_ItemAddCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DayPKCountAwardState, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DayWinCountAwardState, 0)
|
| | | SyncCrossRealmPKPlayerInfo(curPlayer)
|
| | |
| | | DR_GetCrossPKAward(curPlayer, zoneID, seasonID, eventName, True, mailDetail)
|
| | |
|
| | | # 查询 GameServer 玩家赛季排名
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_SeasonAwardState):
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_SeasonAwardState) and playerDanLV:
|
| | | OnQueryCrossPKSeasonOrderAward(curPlayer, zoneID, seasonID, True)
|
| | |
|
| | | # 重置状态
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayPKCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayWinCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_TodayBuyCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_ItemAddCount, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DayPKCountAwardState, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DayWinCountAwardState, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CrossPK_DanLVAwardState, 0)
|
| | |
| | | if dayFreeMatchCountMax:
|
| | | todayPKCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayPKCount)
|
| | | todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayBuyCount)
|
| | | if todayPKCount >= (dayFreeMatchCountMax + todayBuyCount):
|
| | | GameWorld.DebugLog("PK次数不足,无法发起匹配! todayPKCount=%s >= (dayFreeMatchCountMax=%s + todayBuyCount=%s)" |
| | | % (todayPKCount, dayFreeMatchCountMax, todayBuyCount), playerID)
|
| | | todayItemAddCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_ItemAddCount)
|
| | | |
| | | if todayPKCount >= (dayFreeMatchCountMax + todayBuyCount + todayItemAddCount):
|
| | | GameWorld.DebugLog("PK次数不足,无法发起匹配! todayPKCount=%s >= (dayFreeMatchCountMax=%s + todayBuyCount=%s + todayItemAddCount=%s)" |
| | | % (todayPKCount, dayFreeMatchCountMax, todayBuyCount, todayItemAddCount), playerID)
|
| | | return
|
| | |
|
| | | dataMsg = {
|
| | |
| | |
|
| | | elif awardType == 4:
|
| | | GameWorld.DebugLog("玩家领取赛季结算奖励!", playerID)
|
| | | totalScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TotalScore)
|
| | | if not totalScore:
|
| | | GameWorld.DebugLog("无赛季积分无法领取奖励!", playerID)
|
| | | return
|
| | | if GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState) != 2:
|
| | | GameWorld.DebugLog("非赛季结算阶段,不可领取!", playerID)
|
| | | return
|
| | |
| | | pkPlayerInfo.DayPKCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayPKCount)
|
| | | pkPlayerInfo.DayWinCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayWinCount)
|
| | | pkPlayerInfo.DayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayBuyCount)
|
| | | pkPlayerInfo.DayItemAddCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_ItemAddCount)
|
| | | NetPackCommon.SendFakePack(curPlayer, pkPlayerInfo)
|
| | | return
|
| | |
|