From 5b5908c1f4843d0fd35bffaf1b22fbd995e1bbe9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 23 五月 2019 20:14:49 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(草园刷怪数定制支持)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
index 9e8b39f..6454838 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -140,13 +140,22 @@
for npcID in npcIDList:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GrasslandNPCCount % npcID, 0)
npcCountDict = {}
- for _ in xrange(refreshCount):
- npcID = GameWorld.GetResultByRandomList(npcIDRateList)
- if npcID:
- npcCount = npcCountDict.get(npcID, 0) + 1
- npcCountDict[npcID] = npcCount
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GrasslandNPCCount % npcID, npcCount)
-
+ # {寻访次数:{mapID:{npcID:个数, ...}, ...}, ...}
+ refreshMapNPCDictAppoint = IpyGameDataPY.GetFuncEvalCfg("CrossGrasslandCfg", 3)
+ fairyDomainVisitCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainVisitCnt)
+ if fairyDomainVisitCnt in refreshMapNPCDictAppoint:
+ appointRefreshMapNPCDict = refreshMapNPCDictAppoint[fairyDomainVisitCnt]
+ npcCountDict = appointRefreshMapNPCDict.get(mapID, {})
+ if not npcCountDict:
+ for _ in xrange(refreshCount):
+ npcID = GameWorld.GetResultByRandomList(npcIDRateList)
+ if npcID:
+ npcCount = npcCountDict.get(npcID, 0) + 1
+ npcCountDict[npcID] = npcCount
+
+ for npcID, npcCount in npcCountDict.items():
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GrasslandNPCCount % npcID, npcCount)
+
if mapID == ChConfig.Def_FBMapID_CrossGrasslandXian:
FBCommon.DelFBEnterTicket(curPlayer, mapID, lineID)
--
Gitblit v1.8.0