From 6b367739c74c7b3ec1725357c86188f3c1c5af7f Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 15 十月 2018 17:03:21 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
index 7231a85..9a12a1d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
@@ -28,6 +28,7 @@
import PassiveBuffEffMng
import SkillCommon
import SkillShell
+import PlayerSuccess
import time
@@ -146,9 +147,8 @@
# 助战状态换装需要刷属性
if GetDogzIsHelpFight(curPlayer, dogzID):
- RefreshDogzAttr(curPlayer)
+ RefreshDogzAttr(curPlayer, True)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
-
return
@@ -223,7 +223,7 @@
# 助战状态换装需要刷属性
if GetDogzIsHelpFight(curPlayer, dogzID):
SetDogzIsHelpFight(curPlayer, dogzID, False) # 因为脱下了状态,所以必须设置为非助战状态
- RefreshDogzAttr(curPlayer)
+ RefreshDogzAttr(curPlayer, True)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
return
@@ -283,19 +283,21 @@
if curItem.IsEmpty():
GameWorld.DebugLog("神兽有装备未穿戴,无法助战!dogzID=%s,packIndex=%s" % (dogzID, i), playerID)
return
-
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DogzBattle, 1, [dogzID])
+
isFight = True if batteState else False
GameWorld.DebugLog("神兽助战状态变更!dogzID=%s,isFight=%s" % (dogzID, isFight), playerID)
SetDogzIsHelpFight(curPlayer, dogzID, isFight)
- RefreshDogzAttr(curPlayer)
+ RefreshDogzAttr(curPlayer, True)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
if isFight and ipyData.GetHelpBattleNotify():
curTime = int(time.time())
+ playerName = curPlayer.GetPlayerName()
notifyKey, notifyParamList, notifyCD = ipyData.GetHelpBattleNotify()
lastNotifyTime = g_helpBattleNotifyTimeDict.get(dogzID, 0)
if curTime - lastNotifyTime >= notifyCD * 60:
- PlayerControl.WorldNotify(0, notifyKey, notifyParamList)
+ PlayerControl.WorldNotify(0, notifyKey, [playerName] + notifyParamList)
g_helpBattleNotifyTimeDict[dogzID] = curTime
return
@@ -334,6 +336,7 @@
GameWorld.DebugLog("购买神兽助战位! updBuyCount=%s" % updBuyCount, playerID)
Sync_DogzInfo(curPlayer)
+ PlayerControl.WorldNotify(0, "DogzNumberUp", [curPlayer.GetPlayerName(), needItemID, curHelpFightCount + 1])
return
@@ -474,7 +477,7 @@
% (curPlusLV, curPlusExpTotal, addExpTotal, updPlusLV, updPlusExpTotal), playerID)
if isRefreshAtrr:
- RefreshDogzAttr(curPlayer)
+ RefreshDogzAttr(curPlayer, True)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitDogzEquipPlus, 1)
@@ -502,9 +505,9 @@
return retLV, retExp
-def RefreshDogzAttr(curPlayer):
+def RefreshDogzAttr(curPlayer, isUpdateSucc=False):
## 刷新神兽属性
-
+ totalPlusLv = 0 #出战神兽装备总强化等级
fightPowerEx = 0
allAttrList = [{} for _ in range(4)]
@@ -552,6 +555,7 @@
# 强化属性
curPlusLV = curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetDogzEquipPlus, 0)
+ totalPlusLv += curPlusLV
plusIpyData = IpyGameDataPY.GetIpyGameData("DogzEquipPlus", curEquip.GetEquipPlace(), curPlusLV)
if plusIpyData:
plusAttrTypeList = plusIpyData.GetPlusAttrTypes()
@@ -576,6 +580,10 @@
# 技能属性,从Def_CalcAttrFunc_Dogz获取
skillAttrList = CalcDogzBattleSkillAttr(curPlayer)
PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_DogzBattleSkill, skillAttrList)
+ #成就
+ if isUpdateSucc:
+ PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_DogzEquipPlus)
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DogzEquipPlus, totalPlusLv)
return
--
Gitblit v1.8.0