From cd1e83cfa78b57f7944ac443c4194fe835c583aa Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 26 十一月 2018 14:06:09 +0800
Subject: [PATCH] 4715 冰晶矿脉怪物中毒死副本没结束问题
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 6 +++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 5 ++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py | 24 ++++++++++++++++--------
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
index 24fb0bf..95a161c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -325,13 +325,13 @@
return
-## 副本中召唤兽死亡(被击杀或者时间到等)
+## 副本中NPC死亡(被击杀或者时间到等)
# @param curNPC
# @return None.
-def DoFB_SummonNPCDead(curNPC):
+def DoFB_NPCDead(curNPC):
do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())
- callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_SummonNPCDead"))
+ callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_NPCDead"))
if callFunc:
callFunc(curNPC)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py
index d46382d..1527607 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py
@@ -369,7 +369,7 @@
npcCnt += totalMaxCnt
NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即出发一次标识点刷新
gameFB.SetGameFBDict(FBPlayerDict_RemainNPCCnt, npcCnt)
-
+ GameWorld.DebugLog('设置开始刷怪 remainNPCCnt=%s'%npcCnt)
# 副本开始
FBCommon.SetFBStep(FB_Step_Fighting, tick)
FBCommon.Sync_Player_TimeTick(IPY_GameWorld.tttTowerTake, stepTimeCfg[Def_FightTime] * 1000)
@@ -456,7 +456,7 @@
return False
return True
-def __OnKillNPC(attacker, curNPC, tick):
+def __OnKillNPC(curNPC, tick):
gameFB = GameWorld.GetGameFB()
npcid = curNPC.GetNPCID()
npcCfg = GetIceLodeNPCCfg()
@@ -470,23 +470,29 @@
remainNPCCnt = max(0, gameFB.GetGameFBDictByKey(FBPlayerDict_RemainNPCCnt) - 1)
gameFB.SetGameFBDict(FBPlayerDict_RemainNPCCnt, remainNPCCnt)
-
+ GameWorld.DebugLog('__OnKillNPC remainNPCCnt=%s'%remainNPCCnt)
if remainNPCCnt <=0 or npcid in IpyGameDataPY.GetFuncEvalCfg('IceLodeSpecial'):
__DoIceLodeOver(True)
return
-def DoFB_Npc_KillNPC(attacker, curNPC, tick):
- __OnKillNPC(attacker, curNPC, tick)
+def DoFB_NPCDead(curNPC):
+ __OnKillNPC(curNPC, GameWorld.GetGameWorld().GetTick())
return
+
+#def DoFB_Npc_KillNPC(attacker, curNPC, tick):
+# GameWorld.Log('__OnKillNPC 1111111111')
+# __OnKillNPC(attacker, curNPC, tick)
+# return
## 执行副本杀怪逻辑
# @param curPlayer 杀怪的人
# @param curNPC 被杀的怪
# @param tick 当前时间
# @return None
-def DoFB_Player_KillNPC(curPlayer, curNPC, tick):
- __OnKillNPC(curPlayer, curNPC, tick)
-
+#def DoFB_Player_KillNPC(curPlayer, curNPC, tick):
+# GameWorld.Log('__OnKillNPC 2222222222')
+# __OnKillNPC(curPlayer, curNPC, tick)
+#
# addPoint = GetPointByNPCID(npcid)
# if not addPoint:
@@ -635,6 +641,8 @@
GameWorld.DebugLog("冰晶矿脉扫荡仙玉不足!costGold=%s" % (costMoney))
return
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeHasSweep, 1)
+
+ SyncIceLoddInfo(curPlayer)
return True
## 扫荡结果
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 0e6c4f0..b277de7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -1986,9 +1986,8 @@
# 设置npc死亡及自身处理
SetDeadEx(summonNPC)
- if curNPC.GetGameObjType() == IPY_GameWorld.gotNPC and \
- curNPC.GetGameNPCObjType() == IPY_GameWorld.gnotSummon:
- FBLogic.DoFB_SummonNPCDead(curNPC)
+ if curNPC.GetGameObjType() == IPY_GameWorld.gotNPC:
+ FBLogic.DoFB_NPCDead(curNPC)
summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_SummonMapNPCPlayerID)
if summonPlayerID > 0:
--
Gitblit v1.8.0