From 2638c8b67d1dcac1c774f942ac144579c6f82ec1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 11 九月 2018 21:41:11 +0800
Subject: [PATCH] 3479 【后端】【主干】【1.0.15】助战发送喊话时新增逻辑(自动加入匹配中的队伍);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py | 69 +++++++++++++++++++++++++++++++++-
1 files changed, 66 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py
index 7bc9d53..c9c2859 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py
@@ -23,6 +23,10 @@
import PlayerActivity
import PlayerControl
import IpyGameDataPY
+import SkillCommon
+import PyGameData
+import BuffSkill
+import PlayerTJG
import NPCCommon
import ChConfig
import GameObj
@@ -81,6 +85,11 @@
if not g_familyOwnerBossHurt:
g_familyOwnerBossHurt = FamilyOwnerBossHurt()
return g_familyOwnerBossHurt
+
+def OnPlayerLogin(curPlayer):
+ if GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss):
+ __DoCheckHorsePetRobBossKillCntBuff(curPlayer, GameWorld.GetGameWorld().GetTick())
+ return
def IsHorsePetRobBoss(bossID):
## 是否骑宠争夺bossID
@@ -412,7 +421,7 @@
for clearHurtFamilyID in clearHurtFamilyIDList:
npcFamilyNowHurtDict.pop(clearHurtFamilyID, 0)
- npcFamilyPlayerIDDict.pop(clearHurtFamilyID, 0)
+ #npcFamilyPlayerIDDict.pop(clearHurtFamilyID, 0)
GameWorld.Log("清除仙盟伤血: lineID=%s,objID=%s,bossID=%s" % (lineID, objID, bossID))
# 排序
@@ -511,8 +520,8 @@
hurtMgr = GetFamilyHurtMgr()
# 同步对骑宠争夺boss有伤血的玩家ID到GameServer
- familyHurtPlayerIDListDict = hurtMgr.familyPlayerIDDict.get(key, {})
- if IsHorsePetRobBoss(bossID) and familyHurtPlayerIDListDict:
+ if IsHorsePetRobBoss(bossID):
+ familyHurtPlayerIDListDict = hurtMgr.familyPlayerIDDict.get(key, {})
syncMsg = str([bossID, familyHurtPlayerIDListDict])
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "HorsePetRobBossHurtPlayer", syncMsg, len(syncMsg))
@@ -577,4 +586,58 @@
return hurtPack
+def OnFamilyKillHorsePetRobBossCntChange(tick):
+ ## 仙盟击杀骑宠boss个数变更
+
+ playerManager = GameWorld.GetPlayerManager()
+ for i in xrange(playerManager.OnlineCount()):
+ curPlayer = playerManager.OnlineAt(i)
+ if curPlayer.IsEmpty():
+ continue
+ __DoCheckHorsePetRobBossKillCntBuff(curPlayer, tick)
+
+ return
+
+def __DoCheckHorsePetRobBossKillCntBuff(curPlayer, tick):
+ familyID = curPlayer.GetFamilyID()
+ if not familyID:
+ return
+
+ if PlayerTJG.GetIsTJG(curPlayer):
+ return
+
+ killCount = PyGameData.g_familyKillHorsePetRobBossCntDict.get(familyID, 0)
+ skillTypeID = ChConfig.Def_SkillID_HorsePetRobBossKillCntBuff
+
+ skillInfo = SkillCommon.FindBuffByID(curPlayer, skillTypeID)
+ findBuff, buffManager, buffType, findSkill = skillInfo
+ if not findSkill:
+ return
+ killLV = min(killCount, findSkill.GetSkillMaxLV())
+
+ if findBuff:
+ buffSkill = findBuff.GetSkill()
+ if not buffSkill:
+ return
+ curBuffLV = buffSkill.GetSkillLV()
+ if curBuffLV == killLV:
+ #GameWorld.DebugLog("骑宠怨念buff等级不变: familyID=%s,killLV=%s,curBuffLV=%s" % (familyID, killLV, curBuffLV), curPlayer.GetPlayerID())
+ return
+
+ elif not killLV:
+ #GameWorld.DebugLog("无骑宠怨念buff: familyID=%s,killLV=%s" % (familyID, killLV), curPlayer.GetPlayerID())
+ return
+
+ if not killLV:
+ #GameWorld.DebugLog("删除骑宠怨念buff: familyID=%s,killLV=%s" % (familyID, killLV), curPlayer.GetPlayerID())
+ BuffSkill.DelBuffBySkillID(curPlayer, skillTypeID, tick)
+ else:
+ #GameWorld.DebugLog("变更骑宠怨念buff等级: familyID=%s,killLV=%s" % (familyID, killLV), curPlayer.GetPlayerID())
+ curSkill = GameWorld.GetGameData().FindSkillByType(skillTypeID, killLV)
+ BuffSkill.AddBuffNoRefreshState(curPlayer, buffType, curSkill, tick, [], curPlayer)
+
+ return
+
+
+
--
Gitblit v1.8.0