From 070a0dfddf2d5f85ac348a8d37a606bdbcd0ea0a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 05 十一月 2025 16:45:46 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(完善技能目标选择逻辑;支持软控魅惑、混乱、嘲讽,及反击复仇目标,buff状态细分目标,属性细分目标等优先级处理;修复反击逻辑bug;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
index f5c5daf..d351da2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
@@ -208,11 +208,12 @@
curCache.SetFace(curPlayer.GetFace())
curCache.SetFacePic(curPlayer.GetFacePic())
curCache.SetModelMark(curPlayer.GetModelMark())
+ curCache.SetEquipShowSwitch(curPlayer.GetEquipShowSwitch())
+ curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
curCache.SetFamilyID(familyID)
curCache.SetFamilyName(family.GetName() if family else "")
curCache.SetFamilyEmblemID(family.GetEmblemID() if family else 0)
curCache.SetFamilyEmblemWord(family.GetEmblemWord() if family else "")
- curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
curCache.SetFightPowerTotal(PlayerControl.GetFightPower(curPlayer))
curCache.SetServerID(GameWorld.GetPlayerServerID(curPlayer))
if isOffline:
@@ -240,7 +241,7 @@
# 其他
- plusDict= {"Equip":equipDict, "Lineup":lineupDict}
+ plusDict = {"Equip":equipDict, "Lineup":lineupDict}
curCache.SetPlusDict(plusDict)
return curCache
@@ -267,16 +268,50 @@
curCache.SetFace(dbPlayer.Face)
curCache.SetFacePic(dbPlayer.FacePic)
curCache.SetModelMark(dbPlayer.ModelMark)
+ curCache.SetEquipShowSwitch(dbPlayer.EquipShowSwitch)
+ curCache.SetTitleID(dbPlayer.ExAttr3)
curCache.SetFamilyID(familyID)
family = DBDataMgr.GetFamilyMgr().FindFamily(familyID) if familyID else None
curCache.SetFamilyName(family.GetName() if family else "")
curCache.SetFamilyEmblemID(family.GetEmblemID() if family else 0)
curCache.SetFamilyEmblemWord(family.GetEmblemWord() if family else "")
- #curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
curCache.SetFightPowerTotal(dbPlayer.FightPowerEx * ChConfig.Def_PerPointValue + dbPlayer.FightPower)
curCache.SetServerID(GameWorld.GetAccIDServerID(dbPlayer.AccID))
curCache.SetOffTime(GameWorld.ChangeTimeStrToNum(dbPlayer.LogoffTime) if dbPlayer.LogoffTime else 0)
return curCache
+
+def GetPlayerBaseViewInfo(playerID, curPlayer=None):
+ ## 获取玩家基础查看信息
+ baseInfo = {}
+ if not curPlayer:
+ curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
+ if curPlayer:
+ baseInfo = {
+ "Name":curPlayer.GetPlayerName(),
+ "LV":curPlayer.GetLV(),
+ "Job":curPlayer.GetJob(),
+ "RealmLV":curPlayer.GetOfficialRank(),
+ "Face":curPlayer.GetFace(),
+ "FacePic":curPlayer.GetFacePic(),
+ "TitleID":PlayerControl.GetTitleID(curPlayer),
+ "ServerID":GameWorld.GetPlayerServerID(curPlayer),
+ "FightPower":PlayerControl.GetFightPower(curPlayer),
+ }
+ else:
+ viewCache = FindViewCache(playerID)
+ if viewCache:
+ baseInfo = {
+ "Name":viewCache.GetPlayerName(),
+ "LV":viewCache.GetLV(),
+ "Job":viewCache.GetJob(),
+ "RealmLV":viewCache.GetRealmLV(),
+ "Face":viewCache.GetFace(),
+ "FacePic":viewCache.GetFacePic(),
+ "TitleID":viewCache.GetTitleID(),
+ "ServerID":viewCache.GetServerID(),
+ "FightPower":viewCache.GetFightPowerTotal(),
+ }
+ return baseInfo
def GetRobotByViewCache(curCache):
## 根据缓存内容获取机器人数据
@@ -289,7 +324,9 @@
"RealmLV" : curCache.GetRealmLV(),
"Face" : curCache.GetFace(),
"FacePic" : curCache.GetFacePic(),
+ "TitleID" : curCache.GetTitleID(),
"ModelMark" : curCache.GetModelMark(),
+ "EquipShowSwitch" : curCache.GetEquipShowSwitch(),
"FightPower" : curCache.GetFightPowerTotal(),
"PlusData" : curCache.GetPlusDict(),
}
@@ -317,7 +354,9 @@
curCache.SetRealmLV(robotInfo.get("RealmLV", 0))
curCache.SetFace(robotInfo.get("Face", 0))
curCache.SetFacePic(robotInfo.get("FacePic", 0))
+ curCache.SetTitleID(robotInfo.get("TitleID", 0))
curCache.SetModelMark(robotInfo.get("ModelMark", 0))
+ curCache.SetEquipShowSwitch(robotInfo.get("EquipShowSwitch", 0))
#机器人暂定没有仙盟、称号
#curCache.SetFamilyID(familyID)
#family = DBDataMgr.GetFamilyMgr().FindFamily(familyID)
@@ -369,6 +408,7 @@
clientPack.Face = curCache.GetFace()
clientPack.FacePic = curCache.GetFacePic()
clientPack.ModelMark = curCache.GetModelMark()
+ clientPack.EquipShowSwitch = curCache.GetEquipShowSwitch()
clientPack.TitleID = curCache.GetTitleID()
clientPack.ServerID = curCache.GetServerID()
clientPack.FightPower = curCache.GetFightPower()
--
Gitblit v1.8.0