From 3388684ebcff99ed043e5fbc795750dbfba6c8d0 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 13 九月 2018 17:06:42 +0800
Subject: [PATCH] 3466 【主干】【1.0.15】会心时增加会心伤害
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py | 63 +++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 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 2c45b06..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
@@ -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