From 0b52fea0c2dec053c44678d94bd66c10db1b0b91 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 06 四月 2021 17:27:57 +0800
Subject: [PATCH] 8870 【BT2】【后端】战力、伤害、玩家生命的数值调整为大数值(超21亿)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Player.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 24
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_SummonNPC.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py | 19
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTrade.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_PetHP.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_SummonNPC.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_807.py | 8
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Truck.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_104.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py | 38
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Pet.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Pet.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Pet.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameDebug.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Player.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_Offline_ViewAttribute.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py | 24
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Truck.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py | 78 ++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_XMZZ.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChNetSendPack.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py | 9
ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_SummonNPC.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4046.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py | 11
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_SummonNPC.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_4.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCAngry.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 61 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_808.py | 8
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py | 29 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_802.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PetControl.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 19
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 35 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py | 21
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_803.py | 6
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 50 ++
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py | 27
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 51 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_11.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/GetPlayerPet.py | 5
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py | 2
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_806.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py | 7
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py | 12
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_214.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 59 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Pet.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCHP.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 20
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 50 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py | 2
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 24
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Truck.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Player.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 183 +++++---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyAction.py | 13
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_33.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py | 5
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_809.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py | 4
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Player.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_13.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 11
99 files changed, 711 insertions(+), 471 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 34e45fe..f797d9d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -2554,7 +2554,7 @@
class tagCGVoiceChat(Structure):
Head = tagHead()
- ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域
+ ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域
TargetNameLen = 0 #(BYTE TargetNameLen)
TargetName = "" #(String TargetName)//size = TargetNameLen
TargetID = 0 #(DWORD TargetID)// 默认发玩家ID,没有ID才发名称
@@ -3834,8 +3834,8 @@
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
- ("ZoneID", c_ubyte), # 赛区ID
- ("SeasonID", c_ubyte), # 赛季ID
+ ("ZoneID", c_ubyte), # 赛区ID
+ ("SeasonID", c_ubyte), # 赛季ID
]
def __init__(self):
@@ -6495,7 +6495,7 @@
("SrcBackpack", c_ubyte), #源背包类型
("DesBackPack", c_ubyte), #目标背包类型
("SrcIndex", c_ushort), #转移物品索引位置;当全部转移时此值无效
- ("IsAll", c_ubyte), #是否全部转移
+ ("IsAll", c_ubyte), #是否全部转移
]
def __init__(self):
@@ -15946,6 +15946,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("LostHP", c_int),
+ ("LostHPEx", c_int),
]
def __init__(self):
@@ -15963,6 +15964,7 @@
self.Cmd = 0xB4
self.SubCmd = 0x0E
self.LostHP = 0
+ self.LostHPEx = 0
return
def GetLength(self):
@@ -15975,12 +15977,14 @@
DumpString = '''// B4 0E 玩家掉血 //tagCMRoleLostHP:
Cmd:%s,
SubCmd:%s,
- LostHP:%d
+ LostHP:%d,
+ LostHPEx:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.LostHP
+ self.LostHP,
+ self.LostHPEx
)
return DumpString
@@ -16558,6 +16562,7 @@
("ObjID", c_int),
("AttackType", c_ubyte), #爆击, miss
("HurtHP", c_int),
+ ("HurtHPEx", c_int),
]
def __init__(self):
@@ -16574,6 +16579,7 @@
self.ObjID = 0
self.AttackType = 0
self.HurtHP = 0
+ self.HurtHPEx = 0
return
def GetLength(self):
@@ -16587,13 +16593,15 @@
ObjType:%d,
ObjID:%d,
AttackType:%d,
- HurtHP:%d
+ HurtHP:%d,
+ HurtHPEx:%d
'''\
%(
self.ObjType,
self.ObjID,
self.AttackType,
- self.HurtHP
+ self.HurtHP,
+ self.HurtHPEx
)
return DumpString
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index f8fea6c..a50930a 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -2185,7 +2185,8 @@
Name = "" #(String Name)//size=NameLen
PlayerLV = 0 #(WORD PlayerLV)//玩家等级
PlayeJob = 0 #(BYTE PlayeJob)//玩家职业
- PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力
+ PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力,求余亿部分
+ PlayeFightPowerEx = 0 #(DWORD PlayeFightPowerEx)//玩家战斗力,整除亿部分,1代表1亿
RequestTime = 0 #(DWORD RequestTime)//申请时间
IsOnLine = 0 #(BYTE IsOnLine)//是否在线
data = None
@@ -2202,6 +2203,7 @@
self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.PlayeFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.PlayeFightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.RequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.IsOnLine,_pos = CommFunc.ReadBYTE(_lpData, _pos)
return _pos
@@ -2213,6 +2215,7 @@
self.PlayerLV = 0
self.PlayeJob = 0
self.PlayeFightPower = 0
+ self.PlayeFightPowerEx = 0
self.RequestTime = 0
self.IsOnLine = 0
return
@@ -2224,6 +2227,7 @@
length += len(self.Name)
length += 2
length += 1
+ length += 4
length += 4
length += 4
length += 1
@@ -2238,6 +2242,7 @@
data = CommFunc.WriteWORD(data, self.PlayerLV)
data = CommFunc.WriteBYTE(data, self.PlayeJob)
data = CommFunc.WriteDWORD(data, self.PlayeFightPower)
+ data = CommFunc.WriteDWORD(data, self.PlayeFightPowerEx)
data = CommFunc.WriteDWORD(data, self.RequestTime)
data = CommFunc.WriteBYTE(data, self.IsOnLine)
return data
@@ -2250,6 +2255,7 @@
PlayerLV:%d,
PlayeJob:%d,
PlayeFightPower:%d,
+ PlayeFightPowerEx:%d,
RequestTime:%d,
IsOnLine:%d
'''\
@@ -2260,6 +2266,7 @@
self.PlayerLV,
self.PlayeJob,
self.PlayeFightPower,
+ self.PlayeFightPowerEx,
self.RequestTime,
self.IsOnLine
)
@@ -11470,7 +11477,8 @@
PlayerName = "" #(String PlayerName)// 跨服名字
Job = 0 #(BYTE Job)
LV = 0 #(WORD LV)
- MaxHP = 0 #(DWORD MaxHP)// 默认满血
+ MaxHP = 0 #(DWORD MaxHP)// 默认满血,求余亿部分
+ MaxHPEx = 0 #(DWORD MaxHPEx)// 默认满血,整除亿部分
MaxProDef = 0 #(DWORD MaxProDef)// 最大护盾
data = None
@@ -11486,6 +11494,7 @@
self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.MaxHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.MaxHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.MaxProDef,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
@@ -11496,6 +11505,7 @@
self.Job = 0
self.LV = 0
self.MaxHP = 0
+ self.MaxHPEx = 0
self.MaxProDef = 0
return
@@ -11506,6 +11516,7 @@
length += len(self.PlayerName)
length += 1
length += 2
+ length += 4
length += 4
length += 4
@@ -11519,6 +11530,7 @@
data = CommFunc.WriteBYTE(data, self.Job)
data = CommFunc.WriteWORD(data, self.LV)
data = CommFunc.WriteDWORD(data, self.MaxHP)
+ data = CommFunc.WriteDWORD(data, self.MaxHPEx)
data = CommFunc.WriteDWORD(data, self.MaxProDef)
return data
@@ -11530,6 +11542,7 @@
Job:%d,
LV:%d,
MaxHP:%d,
+ MaxHPEx:%d,
MaxProDef:%d
'''\
%(
@@ -11539,6 +11552,7 @@
self.Job,
self.LV,
self.MaxHP,
+ self.MaxHPEx,
self.MaxProDef
)
return DumpString
@@ -12441,6 +12455,7 @@
ExAttr18 = 0 #(DWORD ExAttr18)//预留的扩展属性字段,用来存放项目特定的属性
ExAttr19 = 0 #(DWORD ExAttr19)//预留的扩展属性字段,用来存放项目特定的属性
ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性
+ HPEx = 0 #(DWORD HPEx)//当前血量 超过E的记录
data = None
def __init__(self):
@@ -12546,6 +12561,7 @@
self.ExAttr18,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ExAttr19,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.HPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -12647,6 +12663,7 @@
self.ExAttr18 = 0
self.ExAttr19 = 0
self.ExAttr20 = 0
+ self.HPEx = 0
return
def GetLength(self):
@@ -12739,6 +12756,7 @@
length += 4
length += 4
length += 15
+ length += 4
length += 4
length += 4
length += 4
@@ -12846,6 +12864,7 @@
data = CommFunc.WriteDWORD(data, self.ExAttr18)
data = CommFunc.WriteDWORD(data, self.ExAttr19)
data = CommFunc.WriteDWORD(data, self.ExAttr20)
+ data = CommFunc.WriteDWORD(data, self.HPEx)
return data
def OutputString(self):
@@ -12944,7 +12963,8 @@
ExAttr17:%d,
ExAttr18:%d,
ExAttr19:%d,
- ExAttr20:%d
+ ExAttr20:%d,
+ HPEx:%d
'''\
%(
self.Head.OutputString(),
@@ -13041,7 +13061,8 @@
self.ExAttr17,
self.ExAttr18,
self.ExAttr19,
- self.ExAttr20
+ self.ExAttr20,
+ self.HPEx
)
return DumpString
@@ -17804,7 +17825,8 @@
class tagMCModuleFightPowerInfo(Structure):
Head = tagHead()
- TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力
+ TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力,求余亿部分
+ TotalFightPoweEx = 0 #(DWORD TotalFightPoweEx)//总战斗力,整除亿部分,1代表1亿
MFPCnt = 0 #(BYTE MFPCnt)//模块战斗力总数
MFPList = list() #(vector<tagMCModuleFightPower> MFPList)
data = None
@@ -17819,6 +17841,7 @@
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
self.TotalFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.TotalFightPoweEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.MFPCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.MFPCnt):
temMFPList = tagMCModuleFightPower()
@@ -17832,6 +17855,7 @@
self.Head.Cmd = 0xA3
self.Head.SubCmd = 0xA1
self.TotalFightPower = 0
+ self.TotalFightPoweEx = 0
self.MFPCnt = 0
self.MFPList = list()
return
@@ -17839,6 +17863,7 @@
def GetLength(self):
length = 0
length += self.Head.GetLength()
+ length += 4
length += 4
length += 1
for i in range(self.MFPCnt):
@@ -17850,6 +17875,7 @@
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
data = CommFunc.WriteDWORD(data, self.TotalFightPower)
+ data = CommFunc.WriteDWORD(data, self.TotalFightPoweEx)
data = CommFunc.WriteBYTE(data, self.MFPCnt)
for i in range(self.MFPCnt):
data = CommFunc.WriteString(data, self.MFPList[i].GetLength(), self.MFPList[i].GetBuffer())
@@ -17859,12 +17885,14 @@
DumpString = '''
Head:%s,
TotalFightPower:%d,
+ TotalFightPoweEx:%d,
MFPCnt:%d,
MFPList:%s
'''\
%(
self.Head.OutputString(),
self.TotalFightPower,
+ self.TotalFightPoweEx,
self.MFPCnt,
"..."
)
@@ -23261,6 +23289,7 @@
_fields_ = [
("RefreshType", c_ubyte),
("Value", c_int),
+ ("ValueEx", c_int),
]
def __init__(self):
@@ -23275,6 +23304,7 @@
def Clear(self):
self.RefreshType = 0
self.Value = 0
+ self.ValueEx = 0
return
def GetLength(self):
@@ -23286,11 +23316,13 @@
def OutputString(self):
DumpString = '''//A7 09 周围对象刷新合并包 //tagObjInfoListRefresh:
RefreshType:%d,
- Value:%d
+ Value:%d,
+ ValueEx:%d
'''\
%(
self.RefreshType,
- self.Value
+ self.Value,
+ self.ValueEx
)
return DumpString
@@ -36899,6 +36931,7 @@
("ObjID", c_int),
("AttackType", c_ubyte), #爆击, miss
("HurtHP", c_int),
+ ("HurtHPEx", c_int),
("CurHP", c_int),
("CurHPEx", c_int),
]
@@ -36917,6 +36950,7 @@
self.ObjID = 0
self.AttackType = 0
self.HurtHP = 0
+ self.HurtHPEx = 0
self.CurHP = 0
self.CurHPEx = 0
return
@@ -36933,6 +36967,7 @@
ObjID:%d,
AttackType:%d,
HurtHP:%d,
+ HurtHPEx:%d,
CurHP:%d,
CurHPEx:%d
'''\
@@ -36941,6 +36976,7 @@
self.ObjID,
self.AttackType,
self.HurtHP,
+ self.HurtHPEx,
self.CurHP,
self.CurHPEx
)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
index a421082..0a3e162 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
@@ -65,6 +65,7 @@
import GameWorld
import datetime
import ShareDefine
+import PlayerControl
import ChConfig
#===============================================================================
##发送事件记录给EventShell
@@ -75,7 +76,7 @@
if curPlayer:
pid = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PlayerFromPID)
dataDict["pid"] = pid
- dataDict["fightPower"] = curPlayer.GetFightPower()
+ dataDict["fightPower"] = PlayerControl.GetFightPower(curPlayer)
dataDict["PlayerLV"] = curPlayer.GetLV()
dataDict["IP"] = curPlayer.GetIP()
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
index 5351038..ea529cf 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
@@ -885,7 +885,7 @@
playerLV = playerInfoDict["playerLV"] # 职业
maxHP = playerInfoDict["maxHP"] # 职业
maxProDef = playerInfoDict["maxProDef"] # 护盾
- fightPower = playerInfoDict["fightPower"] # 战斗力
+ fightPower = min(playerInfoDict["fightPower"], ChConfig.Def_UpperLimit_DWord) # 战斗力,暂无用,限制不超过20E
realmLV = playerInfoDict["realmLV"] # 境界
pkScore = playerInfoDict["pkScore"] # 当前积分
danLV = playerInfoDict["danLV"] # 当前段位
@@ -1993,7 +1993,8 @@
matchPlayer.NameLen = len(matchPlayer.PlayerName)
matchPlayer.Job = readyPlayerInfo["Job"]
matchPlayer.LV = readyPlayerInfo["LV"]
- matchPlayer.MaxHP = readyPlayerInfo["MaxHP"]
+ matchPlayer.MaxHP = readyPlayerInfo["MaxHP"] % ShareDefine.Def_PerPointValue
+ matchPlayer.MaxHPEx = readyPlayerInfo["MaxHP"] / ShareDefine.Def_PerPointValue
matchPlayer.MaxProDef = readyPlayerInfo["MaxProDef"]
break
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 7c76f53..2189b3c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -621,6 +621,7 @@
playerStatePack = IPY_GameServer.IPY_GRefreshPlayerProperty()
packValue = playerStatePack.GetValue()
+ packValueEx = playerStatePack.GetValueEx()
packType = playerStatePack.GetType()
#---特殊逻辑处理---
@@ -647,7 +648,7 @@
return
if packType == IPY_GameServer.CDBPlayerRefresh_FightPower:
- curPlayer.SetFightPower(packValue)
+ curPlayer.SetFightPower(packValue, packValueEx)
return
if packType == IPY_GameServer.CDBPlayerRefresh_ExAttr2:
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
index f604d6c..29bc77e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
@@ -20,7 +20,9 @@
import GameWorld
import ChConfig
import ShareDefine
+import PlayerControl
import ChPyNetSendPack
+import PlayerDBGSEvent
import NetPackCommon
import DataRecordPack
import PlayerFamily
@@ -74,6 +76,30 @@
return
+def __CheckFightPowerBillboard():
+ ## 由于战力修改为支持超过20E,所以需要处理下战力相关榜单,原 cmpValue 值移动到 cmpValue2
+
+ eventKey = "FightPowerBillboardMoveValue"
+ if PlayerDBGSEvent.GetDBGSTrig_ByKey(eventKey):
+ return
+ PlayerDBGSEvent.SetDBGSTrig_ByKey(eventKey, 1)
+ GameWorld.Log("处理战力榜超过20E支持!")
+
+ billboardList = [ShareDefine.Def_BT_FightPower] + ShareDefine.JobFightPowerBillboardDict.values()
+ for billboardType in billboardList:
+ billboard = GameWorld.GetBillboard().FindBillboard(billboardType)
+ if not billboard:
+ continue
+ GameWorld.Log(" billboardType=%s,count=%s" % (billboardType, billboard.GetCount()))
+ for index in xrange(billboard.GetCount()):
+ billBoardData = billboard.At(index)
+ if not billBoardData:
+ continue
+ billBoardData.SetCmpValue2(billBoardData.GetCmpValue())
+ billBoardData.SetCmpValue(0)
+
+ return
+
def SortServerBillboard():
##排序所有排行榜
billboardMgr = GameWorld.GetBillboard()
@@ -82,7 +108,8 @@
billBoard = billboardMgr.FindBillboard(index)
#排序一次排行榜
billBoard.Sort()
-
+
+ __CheckFightPowerBillboard()
return
def CopyBillboard(newBillboardIndex, oldBillboardIndex):
@@ -463,13 +490,13 @@
# 以下为榜单附加特殊处理
if bType == ShareDefine.Def_BT_FightPower:
playerID = bID
- fightPowerTotal = cmpValue
+ fightPowerTotal = cmpValue * ChConfig.Def_PerPointValue + cmpValue2
familyID = exInfo[0]
playerJob = bType2
curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
if curPlayer:
- curPlayer.SetFightPower(fightPowerTotal)
+ PlayerControl.SetFightPower(curPlayer, fightPowerTotal)
#更新战盟成员战力
PlayerFamily.UpdFamilyMemberFightPower(familyID, playerID, fightPowerTotal)
@@ -478,7 +505,7 @@
job = playerJob % 10
if job in ShareDefine.JobFightPowerBillboardDict:
jobBType = ShareDefine.JobFightPowerBillboardDict[job]
- UpdatePlayerBillboard(bID, bName, bName2, jobBType, bType2, value1, value2, cmpValue, autoSort)
+ UpdatePlayerBillboard(bID, bName, bName2, jobBType, bType2, value1, value2, cmpValue, autoSort, cmpValue2)
gameWorld.SetDict(Def_Key_BillboardNeedSort % jobBType, 1)
#__UpdateBillboardSortState(gameWorld, jobBType, autoSort, isUpd)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
index 992828b..47564b2 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
@@ -205,6 +205,11 @@
def GetPrestige(curPlayer):
return 0
+##总战斗力
+def GetFightPower(curPlayer): return curPlayer.GetFightPowerEx() * ChConfig.Def_PerPointValue + curPlayer.GetFightPower()
+def SetFightPower(curPlayer, value):
+ curPlayer.SetFightPower(value % ChConfig.Def_PerPointValue, value / ChConfig.Def_PerPointValue)
+ return
#------------------------------------------------------------------------------
## 协助目标玩家ID
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
index 923067f..a8cf796 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
@@ -23,6 +23,7 @@
import ShareDefine
import PyGameData
import GameWorld
+import ChConfig
import random
import time
@@ -165,6 +166,7 @@
def __DoPlayerFBHelpBattleCheckIn(curPlayer, msgList):
## 玩家登记
checkInCount, fightPower = msgList[1:]
+ fightPower = min(fightPower, ChConfig.Def_UpperLimit_DWord) # 登记助战战力最高暂支持20E
curTime = int(time.time())
playerID = curPlayer.GetPlayerID()
curCache = PlayerViewCache.FindViewCache(playerID)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
index 9ae4a20..ad1322e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
@@ -89,8 +89,11 @@
def GetFamilyMixServerDay(curFamily): return curFamily.GetExtra1()
def SetFamilyMixServerDay(curFamily, value): return curFamily.SetExtra1(value)
## ------------------ 成员 ----------------------
-def GetMemberFightPower(curMember): return curMember.GetExattr3()
-def SetMemberFightPower(curMember, fightPower): return curMember.SetExattr3(fightPower)
+def GetMemberFightPower(curMember): return curMember.GetExattr3() + curMember.GetExattr5() * ChConfig.Def_PerPointValue
+def SetMemberFightPower(curMember, fightPower):
+ curMember.SetExattr5(fightPower / ChConfig.Def_PerPointValue)
+ curMember.SetExattr3(fightPower % ChConfig.Def_PerPointValue)
+ return
def GetMemberJoinTime(curMember): return curMember.GetExattr4()
def SetMemberJoinTime(curMember, joinTime): return curMember.SetExattr4(joinTime)
@@ -419,7 +422,7 @@
PyDataManager.GetFamilyStoreItemManager().SyncFamilyStoreItem(jionPlayer, curFamily.GetID())
#仙盟拍品
AuctionHouse.Sync_FamilyAuctionItemInfo(jionPlayer, curFamily.GetID())
- SetMemberFightPower(familyMember, jionPlayer.GetFightPower())
+ SetMemberFightPower(familyMember, PlayerControl.GetFightPower(jionPlayer))
AddFamilyIDToFightPowerChangeList(curFamily.GetID())
#通知仙盟盛宴题目
@@ -3561,7 +3564,8 @@
requestPlayerName = curPlayer.GetName()
playerLV = curPlayer.GetLV()
#玩家Id, 等级,职业,战斗力
- actionDataList = [curPlayer.GetID(), playerLV, curPlayer.GetJob(), curPlayer.GetFightPower()]
+ fightPower = PlayerControl.GetFightPower(curPlayer)
+ actionDataList = [curPlayer.GetID(), playerLV, curPlayer.GetJob(), fightPower % ChConfig.Def_PerPointValue, fightPower / ChConfig.Def_PerPointValue]
allFamilyActionManager = GameWorld.GetFamilyActionManager()
familyManager = GameWorld.GetFamilyManager()
indexList = range(familyManager.GetCount())
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyAction.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyAction.py
index 0cf2590..356f27f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyAction.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyAction.py
@@ -182,7 +182,7 @@
def __RequestAddFamilyNote(curPlayer, actionType, actionDataList, tick):
requestAddFamilyID = actionDataList[0] # 申请进入的家族
- fightPower = actionDataList[1] if len(actionDataList) > 1 else curPlayer.GetFightPower()
+ fightPower = actionDataList[1] if len(actionDataList) > 1 else PlayerControl.GetFightPower(curPlayer)
requestPlayerName = curPlayer.GetName() # 申请的玩家名字
familyManager = GameWorld.GetFamilyManager()
@@ -226,7 +226,7 @@
return
#玩家Id, 等级,职业,战斗力
- actionDataList = [curPlayer.GetID(), curPlayer.GetLV(), curPlayer.GetJob(), fightPower]
+ actionDataList = [curPlayer.GetID(), curPlayer.GetLV(), curPlayer.GetJob(), fightPower % ChConfig.Def_PerPointValue, fightPower / ChConfig.Def_PerPointValue]
result = AddFamilyActionNote(requestPlayerName, requestAddFamilyID, actionType, actionDataList, tick, False)
if not result:
@@ -423,15 +423,15 @@
playerLV = familyActionData.GetValue2() # 等级
playerJob = familyActionData.GetValue3() # 职业
fightPower = familyActionData.GetValue4() # 战斗力
-
+ fightPower += familyActionData.GetValue5() * ChConfig.Def_PerPointValue
tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
if not tagPlayer:
isOnLine = 0
else:
isOnLine = 1
playerLV = tagPlayer.GetLV()
- if tagPlayer.GetFightPower() > fightPower:
- fightPower = tagPlayer.GetFightPower()
+ if PlayerControl.GetFightPower(tagPlayer) > fightPower:
+ fightPower = PlayerControl.GetFightPower(tagPlayer)
memberInfo = ChPyNetSendPack.tagtMemberInfo()
memberInfo.PlayerID = playerID
@@ -439,7 +439,8 @@
memberInfo.Name = requestPlayerName
memberInfo.PlayerLV = playerLV
memberInfo.PlayeJob = playerJob
- memberInfo.PlayeFightPower = fightPower
+ memberInfo.PlayeFightPower = fightPower % ChConfig.Def_PerPointValue
+ memberInfo.PlayeFightPowerEx = fightPower / ChConfig.Def_PerPointValue
memberInfo.RequestTime = requestTime
memberInfo.IsOnLine = isOnLine
packList.append(memberInfo)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py
index 83b4eb3..283e6b7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py
@@ -638,9 +638,9 @@
if isByLVPower:
worldLv = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
ipyData = IpyGameDataPY.GetIpyGameData('PlayerLV', worldLv)
- myPower = ipyData.GetReFightPower() if ipyData else curPlayer.GetFightPower()
+ myPower = ipyData.GetReFightPower() if ipyData else PlayerControl.GetFightPower(curPlayer)
else:
- myPower = curPlayer.GetFightPower()
+ myPower = PlayerControl.GetFightPower(curPlayer)
XMZZPKPowerRange = IpyGameDataPY.GetFuncEvalCfg('XMZZPKPowerRange')
minPower1, maxPower1 = myPower * (100 - XMZZPKPowerRange[0][0]) / 100, myPower * (100 + XMZZPKPowerRange[0][1]) / 100
minPower2, maxPower2 = myPower * (100 - XMZZPKPowerRange[1][0]) / 100, myPower * (100 + XMZZPKPowerRange[1][1]) / 100
@@ -719,7 +719,7 @@
#通知地图
if not pkPlayerPropData:
- GameWorld.ErrLog("仙魔之争没有匹配到对手信息!fightPower=%s" % curPlayer.GetFightPower(), myPlayerID)
+ GameWorld.ErrLog("仙魔之争没有匹配到对手信息!fightPower=%s" % PlayerControl.GetFightPower(curPlayer), myPlayerID)
vsPlayerInfo = [pkPlayerID, pkPlayerPropData]
XMZZManager.MapServer_XMZZPKInfo(curPlayer, overInfo, vsPlayerInfo)
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index 54608ba..6cec0cd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -73,25 +73,16 @@
# @param hurtList 是g_skillHurtList
def AddHurt(tagObj, hurtList, hurtType, hurtValue):
tagObjType = tagObj.GetGameObjType()
-
- #if tagObjType == IPY_GameWorld.gotPlayer:
- if not hasattr(tagObj, "GetHPEx"):
- # 目标是玩家则超过xx亿部分为0,玩家暂无开放接口
- hurtList.AddHurt(tagObjType, tagObj.GetID(), hurtType, hurtValue, tagObj.GetHP(), 0)
- else:
- hurtList.AddHurt(tagObjType, tagObj.GetID(), hurtType, hurtValue, tagObj.GetHP(), tagObj.GetHPEx())
+ hurtList.AddHurt(tagObjType, tagObj.GetID(), hurtType, hurtValue % ShareDefine.Def_PerPointValue,
+ hurtValue / ShareDefine.Def_PerPointValue, tagObj.GetHP(), tagObj.GetHPEx())
+ return
# 伤血列表累积记录,超DWORD特殊缩减处理
def AddHurtValue(defender, attackID, attackHurtType, value):
defendHurtList = defender.GetPlayerHurtList()
- if not hasattr(defender, "GetMaxHPEx"):
- defendHurtList.AddHurtValue(attackID, attackHurtType, value)
- return
-
- #总血量有超过DWORD的情况
- value = NPCCommon.FixValueByValueEx(defender.GetMaxHPEx(), value)
- defendHurtList.AddHurtValue(attackID, attackHurtType, value)
-
+ defendHurtList.AddHurtValue(attackID, attackHurtType, value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue)
+ return
+
def AddTeamPlayerHurtValue(defender, teamID, playerID, value):
# 添加队伍成员对NPC伤血累计
if not teamID:
@@ -249,7 +240,7 @@
return
#已经死亡了,不变色
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return
curPlayerNameColor = curPlayer.GetPlayerNameColor()
@@ -750,9 +741,6 @@
# @remarks 玩家角色及宠物、召唤兽之间产生的伤害都算PVP伤害;
# 另反伤及持续掉血buff也算, 但反伤及buff仅计算玩家之间
def OnPVPDamage(curPlayer, damageValue, tagPlayer, damageMsg):
- #GameWorld.DebugLog("%s curPlayerID(%sLVEX:%s)=%s,tagPlayerID(%sLVEX:%s)=%s,damageValue=%s"
- # % (damageMsg, curPlayer.GetAccID(), curPlayer.GetLVEx(), curPlayer.GetPlayerID(),
- # tagPlayer.GetAccID(), tagPlayer.GetLVEx(), tagPlayer.GetPlayerID(), damageValue))
FBLogic.OnPVPDamage(curPlayer, damageValue, tagPlayer)
return
@@ -1832,7 +1820,8 @@
#GameWorld.DebugLog("按比例更新战力值信息: fightPowerMin=%s,fightPowerMax=%s,everyFightPower=%s"
# % (fightPowerMin, fightPowerMax, everyFightPower))
- effFightPower = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPFightPower)
+ effFightPower = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPFightPower) \
+ + curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPFightPowerEx) * ChConfig.Def_PerPointValue
effPlayerCount = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCount)
refreshPlayerCountTick = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCountTick)
if not refreshPlayerCountTick or tick - refreshPlayerCountTick >= 3000:
@@ -1851,7 +1840,7 @@
effPlayerCount += 1
if fightPowerMin:
seePlayer = GameWorld.GetObj(seeObj.GetID(), seeObjType)
- fightPowerTotal += (0 if not seePlayer else seePlayer.GetFightPower())
+ fightPowerTotal += (0 if not seePlayer else PlayerControl.GetFightPower(seePlayer))
effPlayerCount = max(effPlayerCount, 1)
@@ -1862,7 +1851,8 @@
if maxPlayerCount and effPlayerCount > maxPlayerCount:
effPlayerCount = maxPlayerCount
- curNPC.SetDict(ChConfig.Def_NPC_Dict_TimeLostHPFightPower, effFightPower)
+ curNPC.SetDict(ChConfig.Def_NPC_Dict_TimeLostHPFightPower, effFightPower % ChConfig.Def_PerPointValue)
+ curNPC.SetDict(ChConfig.Def_NPC_Dict_TimeLostHPFightPowerEx, effFightPower / ChConfig.Def_PerPointValue)
curNPC.SetDict(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCount, effPlayerCount)
#GameWorld.DebugLog("刷新影响人数: effPlayerCount=%s,effFightPower=%s" % (effPlayerCount, effFightPower))
@@ -1936,7 +1926,8 @@
reducePer = PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(defObj, atkObj, None, ChConfig.TriggerType_ReduceHurtHPPer)
# 被攻击被动技能特殊减免 受到单次伤害超过生命上限10%时候,减免50%伤害,CD10秒
- defObj.SetDict(ChConfig.Def_PlayerKey_curHurtValue, hurtValue)
+ defObj.SetDict(ChConfig.Def_PlayerKey_curHurtValue, hurtValue % ShareDefine.Def_PerPointValue)
+ defObj.SetDict(ChConfig.Def_PlayerKey_curHurtValueEx, hurtValue / ShareDefine.Def_PerPointValue)
reducePer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, atkObj, None, ChConfig.TriggerType_ReduceHurtHPPer)
hurtValue = int(hurtValue*(max(ChConfig.Def_MaxRateValue - reducePer, 0))*1.0/ChConfig.Def_MaxRateValue)
@@ -1981,11 +1972,11 @@
# 血盾支持多个同时存在, 反弹也会被吸收
def CalcBloodShield(atkObj, defObj, hurtValue):
# 伤害值用于血盾抵消
- defObj.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurt, hurtValue)
+ GameObj.SetBloodShiledHurt(defObj, hurtValue)
PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(defObj, atkObj, None, ChConfig.TriggerType_BloodShield)
- return defObj.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurt)
+ return GameObj.GetBloodShiledHurt(defObj)
# 计算攻击伤害
@@ -2069,7 +2060,7 @@
suppressReMaxHP = 0 if not suppressLVIpyData else suppressLVIpyData.GetReMaxHP()
suppressNPCFightPower = NPCCommon.GetSuppressFightPower(atkObj)
if suppressNPCFightPower:
- suppressFightPower = max(0, suppressNPCFightPower - defObj.GetFightPower())
+ suppressFightPower = max(0, suppressNPCFightPower - PlayerControl.GetFightPower(defObj))
mustHit = False
helpBattleFormatKey = ""
@@ -2217,7 +2208,7 @@
aFinalHurt += PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AttackAddFinalValue)
aOnlyFinalHurt = PlayerControl.GetOnlyFinalHurt(atkObj) # 额外固定伤害
- aFightPower = atkObj.GetFightPower()
+ aFightPower = PlayerControl.GetFightPower(atkObj)
@@ -2245,7 +2236,7 @@
dDamagePerPVPReduce += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, atkObj, None, ChConfig.TriggerType_DamageReducePVP)
dFinalHurtReduce = PlayerControl.GetFinalHurtReduce(defObj) # 最终固定伤害减少
dBeHurtPer = PlayerControl.GetBeHurtPer(defObj) # 加深受到伤害百分比
- dFightPower = defObj.GetFightPower()
+ dFightPower = PlayerControl.GetFightPower(defObj)
dFinalHurtReducePer = PlayerControl.GetFinalHurtReducePer(defObj)
dFinalHurtReducePer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, atkObj, curSkill, ChConfig.TriggerType_dFinalHurtReducePer)
@@ -2333,7 +2324,7 @@
hurtValue = int(eval(FormulaControl.GetCompileFormula(hurtFormulaKey, hurtFormula)))
if isDeadlyHit:
hurtValue *= deadlyHitMultiValue
- hurtValue = min(max(hurtValue, 0), ChConfig.Def_UpperLimit_DWord)
+ #hurtValue = min(max(hurtValue, 0), ChConfig.Def_UpperLimit_DWord)
if hurtType == ChConfig.Def_HurtType_Normal and atkSkillPerYinji > 0:
return hurtValue, ChConfig.Def_HurtType_Yinji
@@ -2401,7 +2392,7 @@
if atkObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
# 记录最后一次伤害值
- atkObj.SetDict(ChConfig.Def_PlayerKey_LastHurtValue, resultHurtType.RealHurtHP)
+ GameObj.SetLastHurtValue(atkObj, resultHurtType.RealHurtHP)
if defObj.GetGameObjType() == IPY_GameWorld.gotNPC:
atkObj.SetDict(ChConfig.Def_PlayerKey_LastHurtNPCObjID, defObj.GetID())
else:
@@ -2514,7 +2505,7 @@
else:
GameObj.SetHP(atkObj, remainHP)
#广播血量
- #atkObj.Notify_HPEx()
+ #atkObj.Notify_HP()
elif atkObjType == IPY_GameWorld.gotPlayer:
GameObj.SetHP(atkObj, remainHP, False)
@@ -2969,13 +2960,13 @@
attackPrestige = PlayerControl.GetPrestige(curPlayer) # 攻击者威望
attackNotoriety = curPlayer.GetInfamyValue() # 攻击者恶名值
attackPkValue = curPlayer.GetPKValue() # 攻击者pk值
- attackFightPower = curPlayer.GetFightPower() # 攻击者战斗力
+ attackFightPower = PlayerControl.GetFightPower(curPlayer) # 攻击者战斗力
defendLV = defender.GetLV() # 防守者等级
defendPrestige = PlayerControl.GetPrestige(defender) # 防守者威望
defendNotoriety = defender.GetInfamyValue() # 防守者恶名值
defendPkValue = defender.GetPKValue() # 防守者pk值
- defendFightPower = defender.GetFightPower() # 防守者战斗力
+ defendFightPower = PlayerControl.GetFightPower(defender) # 防守者战斗力
# #今日杀人获得威望值
# prestigeByDay = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_KillPlayerAddPrestige)
@@ -3053,6 +3044,6 @@
srcID, srcType = 0, 0
if srcObj:
srcID, srcType = srcObj.GetID(), srcObj.GetGameObjType()
- HPEx = 0 if not hasattr(curObj, "GetHPEx") else curObj.GetHPEx()
- curObj.ChangeHPView(skillID, min(changeHP, ChConfig.Def_UpperLimit_DWord), changType, srcID, srcType, curObj.GetHP(), HPEx)
+ curObj.ChangeHPView(skillID, changeHP % ShareDefine.Def_PerPointValue, changeHP / ShareDefine.Def_PerPointValue,
+ changType, srcID, srcType, curObj.GetHP(), curObj.GetHPEx())
return
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Pet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Pet.py
index c1e76de..e52fc10 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Pet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Pet.py
@@ -108,12 +108,12 @@
def AttackResult(curNormalNPC, curTagPet, skill, tick):
curTagPlayer = PetControl.GetPetOwner(curTagPet) # 宠物主人
- if curTagPlayer != None and curTagPlayer.GetHP() > 0:
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
#宠物死亡
- if curTagPet.GetHP() <= 0:
+ if GameObj.GetHP(curTagPet) <= 0:
curTagPetNPCControl = NPCCommon.NPCControl(curTagPet)
curTagPetNPCControl.SetKilled()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Player.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Player.py
index ebb1910..94ad794 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Player.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Player.py
@@ -104,7 +104,7 @@
def AttackResult(curNormalNPC, curTagPlayer, skill, tick):
#玩家活着
- if curTagPlayer.GetHP() > 0:
+ if GameObj.GetHP(curTagPlayer) > 0:
#被攻击玩家进入战斗状态
AttackCommon.OnNPCHitPlayer(curNormalNPC, curTagPlayer, tick)
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_SummonNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_SummonNPC.py
index b29e03b..c8c1aee 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_SummonNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_SummonNPC.py
@@ -126,7 +126,7 @@
def AttackResult(curNormalNPC, curTagSummonNPC, skill, tick):
#获取召唤兽的主人
curTagPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curTagSummonNPC)
- if curTagPlayer != None and curTagPlayer.GetHP() > 0 :
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0 :
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Truck.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Truck.py
index 229e6fc..a915a25 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Truck.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/NormalNPC_Attack_Truck.py
@@ -105,7 +105,7 @@
def AttackResult(curNormalNPC, curTagTruck, skill, tick):
#获取镖车主人
curTagPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curTagTruck)
- if curTagPlayer != None and curTagPlayer.GetHP() > 0 :
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0 :
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Pet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Pet.py
index 850bb12..d02b0c4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Pet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Pet.py
@@ -25,6 +25,7 @@
import GameWorld
import PetControl
import SkillShell
+import GameObj
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -115,7 +116,7 @@
curTagPlayer = PetControl.GetPetOwner(curTagPet) # 宠物主人
curPlayer = PetControl.GetPetOwner(curPet) # 宠物主人
- if curTagPlayer != None and curTagPlayer.GetHP() > 0:
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
@@ -124,7 +125,7 @@
AttackCommon.OnPlayerHitPlayer(curPlayer, curTagPlayer, tick)
#宠物死亡
- if curTagPet.GetHP() <= 0:
+ if GameObj.GetHP(curTagPet) <= 0:
curTagPetNPCControl = NPCCommon.NPCControl(curTagPet)
curTagPetNPCControl.SetKilled()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Player.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Player.py
index 7644e5a..c5f5266 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Player.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_Player.py
@@ -32,6 +32,7 @@
import ChEquip
import PetControl
import SkillShell
+import GameObj
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -83,7 +84,7 @@
# @return hurtType : HurtType 伤害结构体类
# @remarks 攻击
def DoAttack(curPet, curTagPlayer, skill, skillValue, skillPercent, skillHurtList, tick):
- curTagPlayerHPBeforeAtk = curTagPlayer.GetHP()
+ curTagPlayerHPBeforeAtk = GameObj.GetHP(curTagPlayer)
hurtType = AttackCommon.GetHurtHP(curPet, curTagPlayer, skill, skillValue, skillPercent, tick)
#伤血
hurtHP = hurtType.HurtHP
@@ -120,7 +121,7 @@
def AttackResult(curPet, curTagPlayer, skill, tick):
#防守方血量
- curTagPlayerHP = curTagPlayer.GetHP()
+ curTagPlayerHP = GameObj.GetHP(curTagPlayer)
#防守方被动Buff触发
# AttackCommon.DefenderSpringBuff(curTagPlayer, tick, BaseAttack.GetIsSuperHit())
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_SummonNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_SummonNPC.py
index 4fdffdc..86bcd47 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_SummonNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_SummonNPC.py
@@ -121,7 +121,7 @@
#获取防守方召唤兽的主人
curTagPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curTagSummon)
#攻击的是玩家的召唤兽
- if curTagPlayer != None and curTagPlayer.GetHP() > 0:
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
#获取召唤兽的主人
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Pet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Pet.py
index 6ecaf15..13d8df5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Pet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Pet.py
@@ -29,6 +29,7 @@
import SkillCommon
import PetControl
import SkillShell
+import GameObj
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -94,7 +95,7 @@
def DoAttack(curPlayer, curTagPet, skill, skillValue, skillPercent, skillHurtList, tick):
#攻击前血量
- curTagPetHP = curTagPet.GetHP()
+ curTagPetHP = GameObj.GetHP(curTagPet)
#攻击成功
hurtType = AttackCommon.GetHurtHP(curPlayer, curTagPet, skill, skillValue, skillPercent, tick)
hurtHP = hurtType.HurtHP
@@ -129,14 +130,14 @@
if curTagPlayer != None:
- if curTagPlayer.GetHP() > 0:
+ if GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
AttackCommon.OnPlayerHitPlayer(curPlayer, curTagPlayer, tick)
#宠物死亡
- if curTagPet.GetHP() <= 0:
+ if GameObj.GetHP(curTagPet) <= 0:
curTagPetNPCControl = NPCCommon.NPCControl(curTagPet)
curTagPetNPCControl.SetKilled()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Player.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Player.py
index 3717b01..a877200 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Player.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Player.py
@@ -31,6 +31,7 @@
import SkillShell
import SkillCommon
import PassiveBuffEffMng
+import GameObj
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -87,7 +88,7 @@
# @remarks 攻击
def DoAttack(curPlayer, curTagPlayer, skill, skillValue, skillPercent, skillHurtList, tick):
- curTagPlayerHPBeforeAtk = curTagPlayer.GetHP()
+ curTagPlayerHPBeforeAtk = GameObj.GetHP(curTagPlayer)
#玩家攻击玩家
hurtType = AttackCommon.GetHurtHP(curPlayer, curTagPlayer, skill, skillValue, skillPercent, tick)
@@ -118,7 +119,7 @@
# @remarks 处理攻击后的结果
def AttackResult(curPlayer, curTagPlayer, skill, tick):
#防守方玩家血量
- curTagPlayerHP = curTagPlayer.GetHP()
+ curTagPlayerHP = GameObj.GetHP(curTagPlayer)
#被攻击提示,避免频繁提示
if not curTagPlayer.GetBattleState() or not curPlayer.GetBattleState():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_SummonNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_SummonNPC.py
index bda684b..4c6d6a8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_SummonNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_SummonNPC.py
@@ -136,7 +136,7 @@
#如果是玩家的召唤兽逻辑处理(NPC的召唤兽不考虑)
if curTagPlayer != None :
- if curTagPlayer.GetHP() > 0:
+ if GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Truck.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Truck.py
index 6a40749..ada6dcd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Truck.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_Truck.py
@@ -113,7 +113,7 @@
#获取镖车主人
curTagPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curTagTruck)
- if curTagPlayer != None and curTagPlayer.GetHP() > 0 :
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0 :
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Pet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Pet.py
index d55178e..7c34c5a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Pet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Pet.py
@@ -26,6 +26,7 @@
import PlayerControl
import PetControl
import SkillShell
+import GameObj
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -126,7 +127,7 @@
#获取召唤兽的主人
curPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curSummonNPC)
- if curTagPlayer != None and curTagPlayer.GetHP() > 0:
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
@@ -135,7 +136,7 @@
AttackCommon.OnPlayerHitPlayer(curPlayer, curTagPlayer, tick)
#宠物死亡
- if curTagPet.GetHP() <= 0:
+ if GameObj.GetHP(curTagPet) <= 0:
curTagPetNPCControl = NPCCommon.NPCControl(curTagPet)
curTagPetNPCControl.SetKilled()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Player.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Player.py
index 2f4abf4..2bdd44b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Player.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Player.py
@@ -32,6 +32,7 @@
import ChEquip
import SkillShell
import ChNPC
+import GameObj
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -86,7 +87,7 @@
# @remarks 攻击
def DoAttack(curSummonNPC, curTagPlayer, skill, skillValue, skillPercent, skillHurtList, tick):
- curTagPlayerHPBeforeAtk = curTagPlayer.GetHP()
+ curTagPlayerHPBeforeAtk = GameObj.GetHP(curTagPlayer)
hurtType = AttackCommon.GetHurtHP(curSummonNPC, curTagPlayer, skill,
skillValue, skillPercent, tick)
@@ -121,7 +122,7 @@
# @remarks 处理攻击后的结果
def AttackResult(curSummonNPC, curTagPlayer, skill, tick):
#防守方血量
- curTagPlayerHP = curTagPlayer.GetHP()
+ curTagPlayerHP = GameObj.GetHP(curTagPlayer)
curTagPlayerFBHP = FBLogic.OnGetFBCurHP(curTagPlayer)
#防守方被动Buff触发
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_SummonNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_SummonNPC.py
index 6994f24..f54d8b0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_SummonNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_SummonNPC.py
@@ -143,7 +143,7 @@
#获取防守方召唤兽的主人
curTagPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curTagSummon)
#攻击的是玩家的召唤兽
- if curTagPlayer != None and curTagPlayer.GetHP() > 0:
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0:
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
#获取召唤兽的主人
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Truck.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Truck.py
index 5954af4..c126955 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Truck.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_Truck.py
@@ -127,7 +127,7 @@
#获取召唤兽的主人
curPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curSummonNPC)
- if curTagPlayer != None and curTagPlayer.GetHP() > 0 :
+ if curTagPlayer != None and GameObj.GetHP(curTagPlayer) > 0 :
#进入战斗状态
AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
index 7444d9f..1002ab8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -1233,7 +1233,7 @@
#防守方不是玩家
return
- if defender.GetHP() > 0:
+ if GameObj.GetHP(defender) > 0:
#还活着
return
@@ -1373,7 +1373,7 @@
curHurt = g_skillHurtList.GetHurtAt(0)
attacker.BaseAttack(curHurt.GetObjID(), curHurt.GetObjType(),
AttackCommon.GetBattleType(attacker, curSkill),
- curHurt.GetAttackType(), curHurt.GetHurtHP(), curHurt.GetCurHP(), curHurt.GetCurHPEx())
+ curHurt.GetAttackType(), curHurt.GetHurtHP(), curHurt.GetHurtHPEx(), curHurt.GetCurHP(), curHurt.GetCurHPEx())
#//返回值无意义
return
@@ -1811,14 +1811,14 @@
#----------扣HP点
lostHPValue = curSkill.GetHP()
- curPlayerHP = curPlayer.GetHP()
+ curPlayerHP = GameObj.GetHP(curPlayer)
if curPlayerHP < lostHPValue:
GameWorld.ErrLog('释放技能 = %s异常, HP点 = %s不足 = %s' % (
curSkill.GetSkillTypeID(), curPlayerHP, lostHPValue))
if lostHPValue > 0:
- curPlayer.SetHP(curPlayer.GetHP() - lostHPValue)
+ GameObj.SetHP(curPlayer, GameObj.GetHP(curPlayer) - lostHPValue)
return
@@ -1860,7 +1860,7 @@
#设置攻击间隔
curNPC.SetAttackTick(tick)
#通知伤血反弹
- #hurtHPValueSelf = curNPCBeHP - curNPC.GetHP()
+ #hurtHPValueSelf = curNPCBeHP - GameObj.GetHP(curNPC)
#通知客户端攻击结果
__Sync_AttackResult(curNPC, target, curSkill)
@@ -1892,7 +1892,7 @@
# #获取的主人
# curPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer,curNPC)
# #如果主人是玩家
-# if curPlayer != None and curPlayer.GetHP() > 0:
+# if curPlayer != None and GameObj.GetHP(curPlayer) > 0:
# if curSkill == None or curSkill.GetSkillType() != ChConfig.Def_SkillType_Aura:
# #进入战斗状态
# AttackCommon.SetPlayerBattleState(curPlayer,tick)
@@ -1902,7 +1902,7 @@
if curNPC.GetGameNPCObjType() == IPY_GameWorld.gnotPet:
curPlayer = PetControl.GetPetOwner(curNPC)
- if curPlayer != None and curPlayer.GetHP() > 0:
+ if curPlayer != None and GameObj.GetHP(curPlayer) > 0:
if curSkill == None or curSkill.GetSkillType() not in ChConfig.Def_NoBattleState_List:
AttackCommon.SetPlayerBattleState(curPlayer, tick)
@@ -1930,7 +1930,7 @@
# @remarks 函数详细说明.
def __DoPlayerBeAttacked(attacker, curPlayer, curSkill, tick):
#玩家已经死亡
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return
#骑乘状态被攻击,则自动下马
@@ -1997,7 +1997,7 @@
g_skillHurtList.Clear()
#攻击方原有血量,用来通知反弹
- attackerHP = attacker.GetHP()
+ attackerHP = GameObj.GetHP(attacker)
attackObjName = GetObjAttackName(attacker)
@@ -2083,7 +2083,7 @@
attackTimeSum = len(skillPerList)
#攻击方原有血量,用来通知反弹
- attackerHP = attacker.GetHP()
+ attackerHP = GameObj.GetHP(attacker)
attackObjName = GetObjAttackName(attacker)
@@ -2420,7 +2420,7 @@
# if curObj == None:
# continue
#
- # curObj.ChangeHPView(curSkill.GetSkillTypeID(), hurtObj.GetHurtHP(), hurtObj.GetAttackType())
+ # curObj.ChangeHPView(curSkill.GetSkillTypeID(), hurtObj.GetHurtHP(), hurtObj.GetHurtHPEx(), hurtObj.GetAttackType())
#
# SkillCommon.NotifyNPCHP(curObj)
#===========================================================================
@@ -2517,7 +2517,7 @@
g_skillHurtList.Clear()
#攻击方原有血量,用来通知反弹
- attackerHP = attacker.GetHP()
+ attackerHP = GameObj.GetHP(attacker)
resultList = __GetAreaAtackObj(attacker, curSkill, srcPosX, srcPosY, tick, __CheckCanAttack, skillMatrix)
@@ -2744,6 +2744,7 @@
hurtList.ObjID = hurtObj.GetObjID()
hurtList.AttackType = hurtObj.GetAttackType()
hurtList.HurtHP = hurtObj.GetHurtHP()
+ hurtList.HurtHPEx = hurtObj.GetHurtHPEx()
hurtList.CurHP = hurtObj.GetCurHP()
hurtList.CurHPEx = hurtObj.GetCurHPEx()
@@ -2780,6 +2781,7 @@
hurtList.ObjID = hurtObj.GetObjID()
hurtList.AttackType = hurtObj.GetAttackType()
hurtList.HurtHP = hurtObj.GetHurtHP()
+ hurtList.HurtHPEx = hurtObj.GetHurtHPEx()
hurtList.CurHP = hurtObj.GetCurHP()
hurtList.CurHPEx = hurtObj.GetCurHPEx()
@@ -2823,6 +2825,7 @@
hurtList.ObjID = hurtObj.GetObjID()
hurtList.AttackType = hurtObj.GetAttackType()
hurtList.HurtHP = hurtObj.GetHurtHP()
+ hurtList.HurtHPEx = hurtObj.GetHurtHPEx()
hurtList.CurHP = hurtObj.GetCurHP()
hurtList.CurHPEx = hurtObj.GetCurHPEx()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 55a693d..be863ca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -239,6 +239,8 @@
TYPE_Calc_SkillReducePer7, # 受到技能伤害减少7
) = range(1, Def_Calc_AllAttrType_MAX)
+## 支持大数值属性,超过20E
+TYPE_BIGVALUE_ATTR = [TYPE_Calc_AttrHP, TYPE_Calc_AttrMaxHP]
## NPC 专属属性
TYPE_NPCAttr_Calc = [TYPE_Calc_AtkInterval]
@@ -3024,6 +3026,7 @@
Def_NPC_Dict_TimeLostHPPlayerCountTick = 'TimeLostHPPlayerCountTick ' # 上次刷新按时间掉血人数tick
Def_NPC_Dict_TimeLostHPPlayerCount = 'TimeLostHPPlayerCount' # 按时间掉血有效人数
Def_NPC_Dict_TimeLostHPFightPower = 'TimeLostHPFightPower' # 按时间掉血战力
+Def_NPC_Dict_TimeLostHPFightPowerEx = 'TimeLostHPFightPowerEx' # 按时间掉血战力
#玩家状态定义,不能超过31个,如超过,需扩展多个key支持
Def_PlayerStateList = (
@@ -3078,8 +3081,10 @@
Def_PlayerKey_LockHPSkillID = "LockHPSkillID" # 锁血功能的技能
Def_PlayerKey_GodWeaponBeforeProDef = "GWBPD" # 神兵护盾被攻击前的值
Def_PlayerKey_curHurtValue = "curHurtValue" # 计算中的临时伤害值,技能特殊用
+Def_PlayerKey_curHurtValueEx = "curHurtValueEx" # 计算中的临时伤害值,技能特殊用
Def_PlayerKey_SomersaultTime = "Somersault" # 翻滚一定时间内无敌,表现为MISS
Def_PlayerKey_CopyFuncAttr = "CopyFuncAttr%s" # 玩家属性刷新中的计算属性缓存,便于buff刷新计算
+Def_PlayerKey_CopyFuncAttrEx = "CopyFuncAttrEx%s" # 玩家属性刷新中的计算属性缓存,便于buff刷新计算
Def_Player_RefreshAttrByBuff = "PlayerAttrByBuff" # 玩家属性刷新功能属性缓存,便于buff刷新计算, 间隔刷新
Def_Player_HadRefreshAttr = "HadRefreshAttr" # 玩家在本地图是否刷新过属性
Def_PlayerKey_ClientCustomScene = "ClientCustomScene" # 客户端自定义场景状态
@@ -3092,6 +3097,7 @@
Def_PlayerKey_AttackFollowMaster = "FollowAtk" # 召唤兽跟随攻击
Def_PlayerKey_MoreHurtValue = "MoreHurtValue" # 额外的伤害值,一般用于不走公式
Def_PlayerKey_BloodShiledHurt = "BSHurt" # 伤害值用于血盾抵消
+Def_PlayerKey_BloodShiledHurtEx = "BSHurtEx" # 伤害值用于血盾抵消
Def_PlayerKey_TJGPackFullAfterEat = "TJGFullEat" # 脱机挂吞噬后背包依然满的情况
Def_PlayerKey_TJGStartTime = "TJGStartTime" # 脱机挂结算时间起点
Def_PlayerKey_EquipTime = "EquipTime" # 时效装备
@@ -3218,6 +3224,7 @@
Def_PlayerKey_SuperHitRateReduce = "SuperHitRateReduce" # 抗暴击概率
Def_PlayerKey_IgnoreDefRateReduce = "IgnoreDefRateReduce" # 抗无视防御概率
Def_PlayerKey_LastHurtValue = "LastHurtValue" # 最后一次伤害值
+Def_PlayerKey_LastHurtValueEx = "LastHurtValueEx" # 最后一次伤害值
Def_PlayerKey_LastHurtNPCObjID = "LastHurtNPCObjID" # 最后攻击的NPCObjID
Def_PlayerKey_LastAttackerObjID = "LastAttackerObjID" # 被攻击者记录的最近攻击玩家ID
Def_PlayerKey_CommMapExpRate = "CommMapExpRate" # 常规地图经验倍率加成
@@ -3887,10 +3894,12 @@
# 战斗力 Def_PDictType_FightPower
Def_PDict_FightPower_Highest = "FightPower_Highest" # 历史最高总战斗力
+Def_PDict_FightPower_HighestEx = "FightPower_HighestEx" # 历史最高总战斗力
Def_PDict_FightPower_Total = "FightPower_Total" # 总战斗力
+Def_PDict_FightPower_TotalEx = "FightPower_TotalEx" # 总战斗力
Def_PDict_FightPower_Horse = "FightPower_Horse" # 坐骑战斗力
-Def_PDict_FightPower_List = [Def_PDict_FightPower_Total, Def_PDict_FightPower_Horse]
+Def_PDict_FightPower_List = [Def_PDict_FightPower_Total, Def_PDict_FightPower_TotalEx, Def_PDict_FightPower_Horse]
# 每日活跃度
Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s" # 活跃度类型对应完成次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChNetSendPack.py
index f0b2e46..509aa40 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChNetSendPack.py
@@ -274,6 +274,7 @@
("ObjID", c_int),
("AttackType", c_ubyte), #爆击, miss
("HurtHP", c_int),
+ ("HurtHPEx", c_int),
("CurHP", c_int),
("CurHPEx", c_int),
]
@@ -292,6 +293,7 @@
self.ObjID = 0
self.AttackType = 0
self.HurtHP = 0
+ self.HurtHPEx = 0
self.CurHP = 0
self.CurHPEx = 0
return
@@ -308,6 +310,7 @@
ObjID:%d,
AttackType:%d,
HurtHP:%d,
+ HurtHPEx:%d,
CurHP:%d,
CurHPEx:%d
'''\
@@ -316,6 +319,7 @@
self.ObjID,
self.AttackType,
self.HurtHP,
+ self.HurtHPEx,
self.CurHP,
self.CurHPEx
)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 34e45fe..f797d9d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -2554,7 +2554,7 @@
class tagCGVoiceChat(Structure):
Head = tagHead()
- ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域
+ ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域
TargetNameLen = 0 #(BYTE TargetNameLen)
TargetName = "" #(String TargetName)//size = TargetNameLen
TargetID = 0 #(DWORD TargetID)// 默认发玩家ID,没有ID才发名称
@@ -3834,8 +3834,8 @@
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
- ("ZoneID", c_ubyte), # 赛区ID
- ("SeasonID", c_ubyte), # 赛季ID
+ ("ZoneID", c_ubyte), # 赛区ID
+ ("SeasonID", c_ubyte), # 赛季ID
]
def __init__(self):
@@ -6495,7 +6495,7 @@
("SrcBackpack", c_ubyte), #源背包类型
("DesBackPack", c_ubyte), #目标背包类型
("SrcIndex", c_ushort), #转移物品索引位置;当全部转移时此值无效
- ("IsAll", c_ubyte), #是否全部转移
+ ("IsAll", c_ubyte), #是否全部转移
]
def __init__(self):
@@ -15946,6 +15946,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("LostHP", c_int),
+ ("LostHPEx", c_int),
]
def __init__(self):
@@ -15963,6 +15964,7 @@
self.Cmd = 0xB4
self.SubCmd = 0x0E
self.LostHP = 0
+ self.LostHPEx = 0
return
def GetLength(self):
@@ -15975,12 +15977,14 @@
DumpString = '''// B4 0E 玩家掉血 //tagCMRoleLostHP:
Cmd:%s,
SubCmd:%s,
- LostHP:%d
+ LostHP:%d,
+ LostHPEx:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.LostHP
+ self.LostHP,
+ self.LostHPEx
)
return DumpString
@@ -16558,6 +16562,7 @@
("ObjID", c_int),
("AttackType", c_ubyte), #爆击, miss
("HurtHP", c_int),
+ ("HurtHPEx", c_int),
]
def __init__(self):
@@ -16574,6 +16579,7 @@
self.ObjID = 0
self.AttackType = 0
self.HurtHP = 0
+ self.HurtHPEx = 0
return
def GetLength(self):
@@ -16587,13 +16593,15 @@
ObjType:%d,
ObjID:%d,
AttackType:%d,
- HurtHP:%d
+ HurtHP:%d,
+ HurtHPEx:%d
'''\
%(
self.ObjType,
self.ObjID,
self.AttackType,
- self.HurtHP
+ self.HurtHP,
+ self.HurtHPEx
)
return DumpString
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index f8fea6c..a50930a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -2185,7 +2185,8 @@
Name = "" #(String Name)//size=NameLen
PlayerLV = 0 #(WORD PlayerLV)//玩家等级
PlayeJob = 0 #(BYTE PlayeJob)//玩家职业
- PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力
+ PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力,求余亿部分
+ PlayeFightPowerEx = 0 #(DWORD PlayeFightPowerEx)//玩家战斗力,整除亿部分,1代表1亿
RequestTime = 0 #(DWORD RequestTime)//申请时间
IsOnLine = 0 #(BYTE IsOnLine)//是否在线
data = None
@@ -2202,6 +2203,7 @@
self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.PlayeFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.PlayeFightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.RequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.IsOnLine,_pos = CommFunc.ReadBYTE(_lpData, _pos)
return _pos
@@ -2213,6 +2215,7 @@
self.PlayerLV = 0
self.PlayeJob = 0
self.PlayeFightPower = 0
+ self.PlayeFightPowerEx = 0
self.RequestTime = 0
self.IsOnLine = 0
return
@@ -2224,6 +2227,7 @@
length += len(self.Name)
length += 2
length += 1
+ length += 4
length += 4
length += 4
length += 1
@@ -2238,6 +2242,7 @@
data = CommFunc.WriteWORD(data, self.PlayerLV)
data = CommFunc.WriteBYTE(data, self.PlayeJob)
data = CommFunc.WriteDWORD(data, self.PlayeFightPower)
+ data = CommFunc.WriteDWORD(data, self.PlayeFightPowerEx)
data = CommFunc.WriteDWORD(data, self.RequestTime)
data = CommFunc.WriteBYTE(data, self.IsOnLine)
return data
@@ -2250,6 +2255,7 @@
PlayerLV:%d,
PlayeJob:%d,
PlayeFightPower:%d,
+ PlayeFightPowerEx:%d,
RequestTime:%d,
IsOnLine:%d
'''\
@@ -2260,6 +2266,7 @@
self.PlayerLV,
self.PlayeJob,
self.PlayeFightPower,
+ self.PlayeFightPowerEx,
self.RequestTime,
self.IsOnLine
)
@@ -11470,7 +11477,8 @@
PlayerName = "" #(String PlayerName)// 跨服名字
Job = 0 #(BYTE Job)
LV = 0 #(WORD LV)
- MaxHP = 0 #(DWORD MaxHP)// 默认满血
+ MaxHP = 0 #(DWORD MaxHP)// 默认满血,求余亿部分
+ MaxHPEx = 0 #(DWORD MaxHPEx)// 默认满血,整除亿部分
MaxProDef = 0 #(DWORD MaxProDef)// 最大护盾
data = None
@@ -11486,6 +11494,7 @@
self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.MaxHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.MaxHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.MaxProDef,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
@@ -11496,6 +11505,7 @@
self.Job = 0
self.LV = 0
self.MaxHP = 0
+ self.MaxHPEx = 0
self.MaxProDef = 0
return
@@ -11506,6 +11516,7 @@
length += len(self.PlayerName)
length += 1
length += 2
+ length += 4
length += 4
length += 4
@@ -11519,6 +11530,7 @@
data = CommFunc.WriteBYTE(data, self.Job)
data = CommFunc.WriteWORD(data, self.LV)
data = CommFunc.WriteDWORD(data, self.MaxHP)
+ data = CommFunc.WriteDWORD(data, self.MaxHPEx)
data = CommFunc.WriteDWORD(data, self.MaxProDef)
return data
@@ -11530,6 +11542,7 @@
Job:%d,
LV:%d,
MaxHP:%d,
+ MaxHPEx:%d,
MaxProDef:%d
'''\
%(
@@ -11539,6 +11552,7 @@
self.Job,
self.LV,
self.MaxHP,
+ self.MaxHPEx,
self.MaxProDef
)
return DumpString
@@ -12441,6 +12455,7 @@
ExAttr18 = 0 #(DWORD ExAttr18)//预留的扩展属性字段,用来存放项目特定的属性
ExAttr19 = 0 #(DWORD ExAttr19)//预留的扩展属性字段,用来存放项目特定的属性
ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性
+ HPEx = 0 #(DWORD HPEx)//当前血量 超过E的记录
data = None
def __init__(self):
@@ -12546,6 +12561,7 @@
self.ExAttr18,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ExAttr19,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.HPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -12647,6 +12663,7 @@
self.ExAttr18 = 0
self.ExAttr19 = 0
self.ExAttr20 = 0
+ self.HPEx = 0
return
def GetLength(self):
@@ -12739,6 +12756,7 @@
length += 4
length += 4
length += 15
+ length += 4
length += 4
length += 4
length += 4
@@ -12846,6 +12864,7 @@
data = CommFunc.WriteDWORD(data, self.ExAttr18)
data = CommFunc.WriteDWORD(data, self.ExAttr19)
data = CommFunc.WriteDWORD(data, self.ExAttr20)
+ data = CommFunc.WriteDWORD(data, self.HPEx)
return data
def OutputString(self):
@@ -12944,7 +12963,8 @@
ExAttr17:%d,
ExAttr18:%d,
ExAttr19:%d,
- ExAttr20:%d
+ ExAttr20:%d,
+ HPEx:%d
'''\
%(
self.Head.OutputString(),
@@ -13041,7 +13061,8 @@
self.ExAttr17,
self.ExAttr18,
self.ExAttr19,
- self.ExAttr20
+ self.ExAttr20,
+ self.HPEx
)
return DumpString
@@ -17804,7 +17825,8 @@
class tagMCModuleFightPowerInfo(Structure):
Head = tagHead()
- TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力
+ TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力,求余亿部分
+ TotalFightPoweEx = 0 #(DWORD TotalFightPoweEx)//总战斗力,整除亿部分,1代表1亿
MFPCnt = 0 #(BYTE MFPCnt)//模块战斗力总数
MFPList = list() #(vector<tagMCModuleFightPower> MFPList)
data = None
@@ -17819,6 +17841,7 @@
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
self.TotalFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.TotalFightPoweEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.MFPCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.MFPCnt):
temMFPList = tagMCModuleFightPower()
@@ -17832,6 +17855,7 @@
self.Head.Cmd = 0xA3
self.Head.SubCmd = 0xA1
self.TotalFightPower = 0
+ self.TotalFightPoweEx = 0
self.MFPCnt = 0
self.MFPList = list()
return
@@ -17839,6 +17863,7 @@
def GetLength(self):
length = 0
length += self.Head.GetLength()
+ length += 4
length += 4
length += 1
for i in range(self.MFPCnt):
@@ -17850,6 +17875,7 @@
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
data = CommFunc.WriteDWORD(data, self.TotalFightPower)
+ data = CommFunc.WriteDWORD(data, self.TotalFightPoweEx)
data = CommFunc.WriteBYTE(data, self.MFPCnt)
for i in range(self.MFPCnt):
data = CommFunc.WriteString(data, self.MFPList[i].GetLength(), self.MFPList[i].GetBuffer())
@@ -17859,12 +17885,14 @@
DumpString = '''
Head:%s,
TotalFightPower:%d,
+ TotalFightPoweEx:%d,
MFPCnt:%d,
MFPList:%s
'''\
%(
self.Head.OutputString(),
self.TotalFightPower,
+ self.TotalFightPoweEx,
self.MFPCnt,
"..."
)
@@ -23261,6 +23289,7 @@
_fields_ = [
("RefreshType", c_ubyte),
("Value", c_int),
+ ("ValueEx", c_int),
]
def __init__(self):
@@ -23275,6 +23304,7 @@
def Clear(self):
self.RefreshType = 0
self.Value = 0
+ self.ValueEx = 0
return
def GetLength(self):
@@ -23286,11 +23316,13 @@
def OutputString(self):
DumpString = '''//A7 09 周围对象刷新合并包 //tagObjInfoListRefresh:
RefreshType:%d,
- Value:%d
+ Value:%d,
+ ValueEx:%d
'''\
%(
self.RefreshType,
- self.Value
+ self.Value,
+ self.ValueEx
)
return DumpString
@@ -36899,6 +36931,7 @@
("ObjID", c_int),
("AttackType", c_ubyte), #爆击, miss
("HurtHP", c_int),
+ ("HurtHPEx", c_int),
("CurHP", c_int),
("CurHPEx", c_int),
]
@@ -36917,6 +36950,7 @@
self.ObjID = 0
self.AttackType = 0
self.HurtHP = 0
+ self.HurtHPEx = 0
self.CurHP = 0
self.CurHPEx = 0
return
@@ -36933,6 +36967,7 @@
ObjID:%d,
AttackType:%d,
HurtHP:%d,
+ HurtHPEx:%d,
CurHP:%d,
CurHPEx:%d
'''\
@@ -36941,6 +36976,7 @@
self.ObjID,
self.AttackType,
self.HurtHP,
+ self.HurtHPEx,
self.CurHP,
self.CurHPEx
)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index ad40b40..2013809 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -123,7 +123,7 @@
if curPlayer:
pid = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PlayerFromPID)
dataDict["pid"] = pid
- dataDict["fightPower"] = curPlayer.GetFightPower()
+ dataDict["fightPower"] = PlayerControl.GetFightPower(curPlayer)
dataDict["PlayerLV"] = curPlayer.GetLV()
dataDict["IP"] = curPlayer.GetIP()
dataDict["time"] = str(datetime.datetime.today()).split(".")[0]
@@ -467,7 +467,7 @@
def DR_PlayerMasterLVChange(curPlayer, totalMasterExp, addDataDict={}):
dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(),
- 'AccID':curPlayer.GetAccID(), 'PlayerLV':curPlayer.GetLV(), 'PlayerLVEx':curPlayer.GetLVEx(),
+ 'AccID':curPlayer.GetAccID(), 'PlayerLV':curPlayer.GetLV(),
'TotalExp':curPlayer.GetTotalExp(), 'MasterLV':curPlayer.GetLV2(),
'TotalExpMaster':totalMasterExp}
@@ -536,7 +536,6 @@
'PlayerName':curPlayer.GetPlayerName(),
'AccID':curPlayer.GetAccID(),
'LV':curPlayer.GetLV(),
- 'LVEx':curPlayer.GetLVEx(),
'CreateRoleTime':curPlayer.GetCreateRoleTime(),
'CardStr':cardStr,
'CardType':cardType,
@@ -1506,7 +1505,7 @@
def DR_RealmLVUp(curPlayer, realmlv):
dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(),
'AccID':curPlayer.GetAccID(), 'realmlv':realmlv,
- 'playerlv':curPlayer.GetLV(), 'power':curPlayer.GetFightPower()}
+ 'playerlv':curPlayer.GetLV(), 'power':PlayerControl.GetFightPower(curPlayer)}
#发送封包
SendEventPack("RealmLVUp", dataDict, curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
index 97c439b..2301297 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -106,6 +106,7 @@
import NetPackCommon
import NPCCommon
import PlayerVip
+import GameObj
import math
import random
@@ -838,7 +839,7 @@
NotifyOneMission(curPlayer, addMission)
#---补满血满魔---
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ GameObj.SetHP(curPlayer, GameObj.GetMaxHP(curPlayer))
curPlayer.SetMP(curPlayer.GetMaxMP())
#---给予玩家新手物品---
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index d57bc94..3a911a5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -65,6 +65,7 @@
import PlayerHorse
import FBCommon
import NPCCommon
+import GameObj
import math
import time
@@ -1812,8 +1813,8 @@
def ConditionType_Get_Hp_Percent(curPlayer, curMission, curConditionNode):
conditionValue = int(curConditionNode.GetAttribute("value"))
conditionType = curConditionNode.GetAttribute("type")
- curPlayerHP = curPlayer.GetHP()
- conditionHP = curPlayer.GetMaxHP() * conditionValue / 100
+ curPlayerHP = GameObj.GetHP(curPlayer)
+ conditionHP = GameObj.GetMaxHP(curPlayer) * conditionValue / 100
return QuestRunnerValue.GetEval(conditionType, curPlayerHP, conditionHP)
@@ -3862,7 +3863,7 @@
def DoType_Set_Hp_Percent(curPlayer, curMission, curActionNode):
value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"))
- maxHP = curPlayer.GetMaxHP()
+ maxHP = GameObj.GetMaxHP(curPlayer)
playerHP = maxHP * value / ShareDefine.Def_Percentage
smallHP = 1
@@ -3873,7 +3874,7 @@
#防范纠错 最少1点血,最多满血
playerHP = GameWorld.ToIntArea(playerHP, smallHP, maxHP)
- curPlayer.SetHP(playerHP)
+ GameObj.SetHP(curPlayer, playerHP)
#---------------------------------------------------------------------
##设置人物法量百分比
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
index 1edb726..3210293 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
@@ -27,6 +27,7 @@
import GameWorld
import PlayerControl
import QuestCommon
+import GameObj
#---------------------------------------------------------------------
##获取服务器任务状态, State
# @param curPlayer 玩家实例
@@ -326,8 +327,8 @@
# @return 金额
# @remarks 获得墓地医生恢复所耗金钱
def GetHealthLostMoney(curPlayer):
- curHP = curPlayer.GetHP()
- maxHP = curPlayer.GetMaxHP()
+ curHP = GameObj.GetHP(curPlayer)
+ maxHP = GameObj.GetMaxHP(curPlayer)
curMP = curPlayer.GetMP()
maxMP = curPlayer.GetMaxMP()
lv = curPlayer.GetLV()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
index c150cd4..44567ba 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
@@ -1750,6 +1750,6 @@
EventReport(ShareDefine.Def_UserAction_VIPLvUP, "VIPLevel=%s"%curPlayer.GetVIPLv(), curPlayer)
def WriteEvent_FightPower(curPlayer):
- EventReport(ShareDefine.Def_UserAction_FightPower, "FightPower=%s"%curPlayer.GetFightPower(), curPlayer)
+ EventReport(ShareDefine.Def_UserAction_FightPower, "FightPower=%s"%PlayerControl.GetFightPower(curPlayer), curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/GetPlayerPet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/GetPlayerPet.py
index cc3d02f..9f8b077 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/GetPlayerPet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/GetPlayerPet.py
@@ -18,6 +18,7 @@
"""Version = 2012-04-06 12:00"""
#---------------------------------------------------------------------
import GameWorld
+import GameObj
## GM命令执行入口
# @param curPlayer 当前玩家
# @param list 参数列表 [tagID,ExpValue]
@@ -65,8 +66,8 @@
GameWorld.DebugAnswer(curPlayer, "加上Buff后, 总力量 = %s,总真元 = %s, 总筋骨 = %s, 总体质 = %s"%(
rolePetBattleStruct.STR, rolePetBattleStruct.PNE,
rolePetBattleStruct.PHY, rolePetBattleStruct.CON))
- curHP = petObj.GetHP()
- curMaxHP = petObj.GetMaxHP()
+ curHP = GameObj.GetHP(petObj)
+ curMaxHP = GameObj.GetMaxHP(petObj)
curMaxAtk = petObj.GetMaxAtk()
curMAtkMax = petObj.GetMAtkMax()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
index e0064ba..2117141 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
@@ -110,7 +110,7 @@
GameWorld.DebugAnswer(curPlayer, "%s内部加成:%s" % (funcName, insidePerAttrDict))
return
- GameWorld.DebugAnswer(curPlayer, "===== 总战力: %s" % curPlayer.GetFightPower())
+ GameWorld.DebugAnswer(curPlayer, "===== 总战力: %s" % PlayerControl.GetFightPower(curPlayer))
for mfpType in ChConfig.MFPTypeAttrFuncIndexDict.keys():
fightPower = PlayerControl.GetMFPFightPower(curPlayer, mfpType)
mfpSkillFP = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPSkill % mfpType)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCAngry.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCAngry.py
index 69139ac..f767f4f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCAngry.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCAngry.py
@@ -14,6 +14,7 @@
#---------------------------------------------------------------------
import IPY_GameWorld
import GameWorld
+import GameObj
#---------------------------------------------------------------------
##查看点选的NPC仇恨列表
# @param curPlayer 玩家实例
@@ -48,7 +49,7 @@
return
npcAngry = curNPC.GetNPCAngry()
- GameWorld.DebugAnswer(curPlayer, "NPCID=%s, 当前仇恨数=%s" % (curNPC.GetNPCID(), npcAngry.GetAngryCount()))
+ GameWorld.DebugAnswer(curPlayer, "---NPCID=%s, 当前仇恨数=%s" % (curNPC.GetNPCID(), npcAngry.GetAngryCount()))
for i in range(0, npcAngry.GetAngryCount()):
curAngry = npcAngry.GetAngryValueTag(i)
angryObjID = curAngry.GetObjID()
@@ -57,7 +58,7 @@
continue
angryObjType = curAngry.GetObjType()
- angryObjValue = curAngry.GetAngryValue()
+ angryObjValue = GameObj.GetAngryValue(curAngry)
angryDetel = GameWorld.GetObj(angryObjID, angryObjType)
@@ -65,6 +66,6 @@
continue
#GameWorld.DebugAnswer(curPlayer, 'id = %s, name = %s, angryValue = %s'%(angryObjID, angryDetel.GetName(), angryObjValue))
- GameWorld.DebugAnswer(curPlayer, 'id = %s, angryValue = %s' % (angryObjID, angryObjValue))
+ GameWorld.DebugAnswer(curPlayer, '%s type=%s,id=%s,v=%s' % (i, angryObjType, angryObjID, angryObjValue))
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py
index 9d8bb48..4ee4e9e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py
@@ -22,6 +22,7 @@
import NPCHurtManager
import NPCHurtMgr
import PlayerTeam
+import ShareDefine
import GameObj
##查看点选的NPC仇恨列表
@@ -76,6 +77,8 @@
hurtType = hurtObj.GetValueType()
hurtID = hurtObj.GetValueID()
hurtValue = hurtObj.GetHurtValue()
+ if hasattr(hurtObj, "GetHurtValueEx"):
+ hurtValue += hurtObj.GetHurtValueEx() * ShareDefine.Def_PerPointValue
if not hurtID:
GameWorld.DebugAnswer(curPlayer, "%s 不存在!HurtType=%s,ID=%s, V=%s" % (index, hurtType, hurtID, hurtValue))
continue
@@ -84,7 +87,7 @@
hurtPlayer = GameWorld.GetObj(hurtID, IPY_GameWorld.gotPlayer)
if hurtPlayer == None:
GameWorld.DebugAnswer(curPlayer, "%s 玩家ID=%s,不存在, V=%s" % (index, hurtID, hurtValue))
- elif hurtPlayer.GetHP() <= 0 :
+ elif GameObj.GetHP(hurtPlayer) <= 0 :
GameWorld.DebugAnswer(curPlayer, "%s 玩家ID=%s,血量为0, V=%s" % (index, hurtID, hurtValue))
else:
d = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), hurtPlayer.GetPosX(), hurtPlayer.GetPosY())
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCHP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCHP.py
index b57155c..3b2d47b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCHP.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCHP.py
@@ -78,7 +78,7 @@
npcID = curNPC.GetNPCID()
isByTime = True if IpyGameDataPY.GetIpyGameDataNotLog("NPCTimeLostHP", npcID) else False
GameObj.SetHP(curNPC, setHP, isByTime=isByTime)
- curNPC.Notify_HPEx()
+ curNPC.Notify_HP()
GameWorld.DebugAnswer(curPlayer, "SetNPCHP ID=%s(%s),HP=%s" % (curNPC.GetID(), curNPC.GetNPCID(), setHP))
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
index aae6430..3ce42f3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
@@ -114,14 +114,14 @@
DR_UseGMCMD(curPlayer, inputStr)
return
- # curPlayer 的 Get、Set函数
- if hasattr(curPlayer, callFunName):
- callObj = getattr(curPlayer, callFunName)
+ # GameObj 的 Get、Set函数
+ if hasattr(GameObj, callFunName):
+ callObj = getattr(GameObj, callFunName)
argcount = callObj.func_code.co_argcount # 函数参数个数
- if argcount == 1 and callFunName.startswith("Get"): # 这个得到的参数个数竟然是1!!!暂时先这样写
- value = callObj()
- elif argcount == 1 and callFunName.startswith("Set"):
+ if argcount == 1 and callFunName.startswith("Get"):
+ value = callObj(curPlayer)
+ elif argcount >= 2 and callFunName.startswith("Set"):
if len(inputList) < 2:
GameWorld.DebugAnswer(curPlayer, "必须设定一定参数值")
return
@@ -129,12 +129,9 @@
if value == None:
GameWorld.DebugAnswer(curPlayer, "参数错误, 必须为纯数字!")
return
- if callFunName == "SetHappyPoint":
- PlayerTJG.SetTJGTime(curPlayer, value)
- else:
- callObj(value)
+ callObj(curPlayer, value)
else:
- GameWorld.DebugAnswer(curPlayer, "不支持该命令!curPlayer.%s" % callFunName)
+ GameWorld.DebugAnswer(curPlayer, "不支持该命令!GameObj.%s" % callFunName)
return
GameWorld.DebugAnswer(curPlayer, "%s : %s" % (callFunName, value))
@@ -165,14 +162,14 @@
DR_UseGMCMD(curPlayer, inputStr)
return
- # GameObj 的 Get、Set函数
- if hasattr(GameObj, callFunName):
- callObj = getattr(GameObj, callFunName)
+ # curPlayer 的 Get、Set函数
+ if hasattr(curPlayer, callFunName):
+ callObj = getattr(curPlayer, callFunName)
argcount = callObj.func_code.co_argcount # 函数参数个数
- if argcount == 1 and callFunName.startswith("Get"):
- value = callObj(curPlayer)
- elif argcount == 2 and callFunName.startswith("Set"):
+ if argcount == 1 and callFunName.startswith("Get"): # 这个得到的参数个数竟然是1!!!暂时先这样写
+ value = callObj()
+ elif argcount == 1 and callFunName.startswith("Set"):
if len(inputList) < 2:
GameWorld.DebugAnswer(curPlayer, "必须设定一定参数值")
return
@@ -180,9 +177,12 @@
if value == None:
GameWorld.DebugAnswer(curPlayer, "参数错误, 必须为纯数字!")
return
- callObj(curPlayer, value)
+ if callFunName == "SetHappyPoint":
+ PlayerTJG.SetTJGTime(curPlayer, value)
+ else:
+ callObj(value)
else:
- GameWorld.DebugAnswer(curPlayer, "不支持该命令!GameObj.%s" % callFunName)
+ GameWorld.DebugAnswer(curPlayer, "不支持该命令!curPlayer.%s" % callFunName)
return
GameWorld.DebugAnswer(curPlayer, "%s : %s" % (callFunName, value))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameDebug.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameDebug.py
index 4150dbd..0364a64 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameDebug.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameDebug.py
@@ -32,7 +32,7 @@
for i in range(0, GameWorld.GetPlayerManager().GetPlayerCount()):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(i)
GameWorld.Log("PlayerIndex = %d, PlayerID = %d, PlayerHP = %d, PlayerPos = (%d,%d)"%(i,
- curPlayer.GetPlayerID(), curPlayer.GetHP(),
+ curPlayer.GetPlayerID(), GameObj.GetHP(curPlayer),
curPlayer.GetPosX(), curPlayer.GetPosY()))
## 输出npc信息
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
index c67d95b..4d4d88d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
@@ -17,47 +17,50 @@
import IPY_GameWorld
import IpyGameDataPY
import SkillCommon
+import PlayerControl
# 关于血量的函数这里只包装最简单的超DWORD处理
def GetMaxHP(gameObj):
- if not hasattr(gameObj, "GetMaxHPEx"):
- return gameObj.GetMaxHP()
-
- else:
- return gameObj.GetMaxHPEx()*ShareDefine.Def_PerPointValue + gameObj.GetMaxHP()
-
+ return gameObj.GetMaxHPEx() * ShareDefine.Def_PerPointValue + gameObj.GetMaxHP()
def SetMaxHP(gameObj, value):
- if not hasattr(gameObj, "SetMaxHPEx"):
- gameObj.SetMaxHP(value)
-
- else:
- gameObj.SetMaxHPEx(value/ShareDefine.Def_PerPointValue)
- gameObj.SetMaxHP(value%ShareDefine.Def_PerPointValue)
-
+ gameObj.SetMaxHP(value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue)
+ return
def GetHP(gameObj):
- if not hasattr(gameObj, "GetHPEx"):
- return gameObj.GetHP()
-
- else:
- return gameObj.GetHPEx()*ShareDefine.Def_PerPointValue + gameObj.GetHP()
+ return gameObj.GetHPEx() * ShareDefine.Def_PerPointValue + gameObj.GetHP()
-
-def SetHP(gameObj, value, isNotify=True, isByTime=False):
+def SetHP(gameObj, value, isNotify=None, isByTime=False):
if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
- gameObj.SetHP(value, isNotify)
+ if isNotify == None:
+ isNotify = True
+ gameObj.SetHP(value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue, isNotify)
else:
+ if isNotify == None:
+ isNotify = False
if gameObj.GetGameObjType() == IPY_GameWorld.gotNPC:
npcID = gameObj.GetNPCID()
if IpyGameDataPY.GetIpyGameDataNotLog("NPCTimeLostHP", npcID) and not isByTime and value not in [GetMaxHP(gameObj), 0]:
#GameWorld.DebugLog("不能设置按时间掉血的怪物血量! id=%s,npciD=%s,value=%s,isByTime=%s" % (gameObj.GetID(), gameObj.GetNPCID(), value, isByTime))
return
- gameObj.SetHPEx(value/ShareDefine.Def_PerPointValue)
- gameObj.SetHP(value%ShareDefine.Def_PerPointValue)
-
-
+ gameObj.SetHP(value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue, isNotify)
+ return
+
+def SetHPFull(gameObj):
+ SetHP(gameObj, GetMaxHP(gameObj))
+ return
+
+def SetBaseMaxHP(gameObj, value):
+ gameObj.SetBaseMaxHP(value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue)
+ return
+
+def GetAngryValue(curAngry):
+ return curAngry.GetAngryValue() + curAngry.GetAngryValueEx() * ShareDefine.Def_PerPointValue
+def SetAngryValue(curAngry, value):
+ curAngry.SetAngryValue(value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue)
+ return
+
## 设置buff状态(脚本自定义枚举)
# @param pyState 状态
# @param isTrue 是否设置该状态
@@ -95,7 +98,7 @@
# # 目前当目标身上多个buff都有同一效果时(如定身),在一个buff消失时会解除该状态
# # 故该状态标记仅为一个非精确的标记,应用中请注意!!!(当且仅当多个buff有同一个效果时会提前结束该状态)
#===============================================================================
-def GetPyPlayerState(gameObj, pyState, ownerID = 0, ownerType = 0):
+def GetPyPlayerState(gameObj, pyState, ownerID=0, ownerType=0):
if not gameObj:
return False
if pyState == 0:
@@ -153,4 +156,25 @@
def SetPetDamPer(gameObj, value):
gameObj.SetDict(ChConfig.Def_PlayerKey_AttrPetDamPer, value)
if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
- gameObj.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_PetDamPer, value, False)
+ PlayerControl.SendPropertyRefresh(gameObj, ShareDefine.CDBPlayerRefresh_PetDamPer, value)
+ return
+
+def GetLastHurtValue(gameObj):
+ ## 最后一击伤害值
+ hurt = gameObj.GetDictByKey(ChConfig.Def_PlayerKey_LastHurtValue)
+ hurtEx = gameObj.GetDictByKey(ChConfig.Def_PlayerKey_LastHurtValueEx)
+ return hurtEx * ShareDefine.Def_PerPointValue + hurt
+def SetLastHurtValue(gameObj, value):
+ gameObj.SetDict(ChConfig.Def_PlayerKey_LastHurtValue, value % ShareDefine.Def_PerPointValue)
+ gameObj.SetDict(ChConfig.Def_PlayerKey_LastHurtValueEx, value / ShareDefine.Def_PerPointValue)
+ return
+
+def GetBloodShiledHurt(gameObj):
+ ## 伤害值用于血盾抵消
+ hurt = gameObj.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurt)
+ hurtEx = gameObj.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurtEx)
+ return hurtEx * ShareDefine.Def_PerPointValue + hurt
+def SetBloodShiledHurt(gameObj, value):
+ gameObj.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurt, value % ShareDefine.Def_PerPointValue)
+ gameObj.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurtEx, value / ShareDefine.Def_PerPointValue)
+ return
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 22314e3..4695ecd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -541,8 +541,8 @@
return
#进入副本默认回满血
- if curPlayer.GetHP() < curPlayer.GetMaxHP():
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ if GameObj.GetHP(curPlayer) < GameObj.GetMaxHP(curPlayer):
+ GameObj.SetHPFull(curPlayer)
#副本管理器
gameFBMgr = GameWorld.GetGameFB()
@@ -1262,7 +1262,7 @@
callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetFBCurHP"))
if not callFunc:
- return curPlayer.GetHP()
+ return GameObj.GetHP(curPlayer)
return callFunc(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 86864b5..e7d21ba 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -2475,7 +2475,7 @@
curPlayer = playerManager.GetPlayerByIndex(index)
if not curPlayer:
continue
- if needAlive and curPlayer.GetHP() <= 0:
+ if needAlive and GameObj.GetHP(curPlayer) <= 0:
continue
playerID = curPlayer.GetPlayerID()
if getCntLimit:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py
index 47196db..bbb7e4d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBHelpBattle.py
@@ -95,7 +95,7 @@
if todayIsCheckIn:
GameWorld.DebugLog("当天已登记,不需要重复登记!", curPlayer.GetPlayerID())
return
- fightPower = curPlayer.GetFightPower()
+ fightPower = PlayerControl.GetFightPower(curPlayer)
msgInfo = str(["CheckIn", checkInCount, fightPower])
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, "FBHelpBattle", msgInfo, len(msgInfo))
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
index faba8bf..8090a7b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossRealmPK.py
@@ -24,6 +24,7 @@
import SkillCommon
import FBCommon
import ChConfig
+import GameObj
(
@@ -306,8 +307,8 @@
pvpDamage = gameFB.GetPlayerGameFBDictByKey(playerID, FBPDict_PVPDamage)
pvpDamTick = gameFB.GetPlayerGameFBDictByKey(playerID, FBPDict_PVPDamUpdTick)
sortTick = tick - pvpDamTick
- curHP = 0 if not player else player.GetHP()
- curMaxHP = 0 if not player else player.GetMaxHP()
+ curHP = 0 if not player else GameObj.GetHP(player)
+ curMaxHP = 0 if not player else GameObj.GetMaxHP(player)
playerInfoList.append([pvpDamage, sortTick, curHP, curMaxHP, playerLeaveTick, playerID, player])
GameWorld.Log("PK超时: pvpDamge=%s,pvpDamTick=%s,tick=%s,sortTick=%s,HP=%s/%s,playerLeaveTick=%s"
% (pvpDamage, pvpDamTick, tick, sortTick, curHP, curMaxHP, playerLeaveTick), playerID)
@@ -409,7 +410,7 @@
playerID = player.GetPlayerID()
gameFB.SetPlayerGameFBDict(playerID, FBPDict_RoundNum, nextRoundNum)
- if player.GetPlayerAction() == IPY_GameWorld.paDie or player.GetHP() <= 0:
+ if player.GetPlayerAction() == IPY_GameWorld.paDie or GameObj.GetHP(player) <= 0:
GameWorld.DebugLog("复活玩家...", player.GetPlayerID())
ChPlayer.PlayerRebornByType(player, ChConfig.rebornType_System, tick, isAddSuperBuff=False)
__ResetPlayerState(gameFB, player, playerID)
@@ -522,8 +523,8 @@
if not resetAttr:
return
- if player.GetHP() != player.GetMaxHP():
- player.SetHP(player.GetMaxHP())
+ if GameObj.GetHP(player) != GameObj.GetMaxHP(player):
+ GameObj.SetHP(player, GameObj.GetMaxHP(player))
if PlayerControl.GetProDef(player) != PlayerControl.GetMaxProDef(player):
PlayerControl.SetProDef(player, PlayerControl.GetMaxProDef(player))
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 1a4dc19..c278e73 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
@@ -638,7 +638,7 @@
#战力判断
LVIpyData = PlayerControl.GetPlayerLVIpyData(curPlayer.GetLV())
reFightPower = 0 if not LVIpyData else LVIpyData.GetIceLodeFightPower() # 当前等级参考战力
- if curPlayer.GetFightPower() < reFightPower:
+ if PlayerControl.GetFightPower(curPlayer) < reFightPower:
GameWorld.DebugLog('冰晶矿脉扫荡 战力不足 %s'%(reFightPower))
return
#vip判断
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py
index f9f1ec9..888f48e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py
@@ -30,6 +30,7 @@
import PlayerGoldGift
import PlayerMagicWeapon
import ChPlayer
+import GameObj
#---副本配置对应key值---
(
@@ -329,10 +330,10 @@
playerManager = GameWorld.GetMapCopyPlayerManager()
if playerManager.GetPlayerCount() > 0:
curPlayer = playerManager.GetPlayerByIndex(0)
- if curPlayer.GetHP() <=0:
+ if GameObj.GetHP(curPlayer) <=0:
ChPlayer.PlayerRebornByType(curPlayer, ChConfig.rebornType_System, tick)
else:
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ GameObj.SetHP(curPlayer, GameObj.GetMaxHP(curPlayer))
DoFBHelp(curPlayer, tick)
FBCommon.SetFBStep(FB_Step_Fighting, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
index f46ae81..59059e9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
@@ -98,7 +98,7 @@
#判断战力是否满足本层要求
helpIpyData = IpyGameDataPY.GetIpyGameData("FBHelpBattle", mapID, lineId)
if helpIpyData:
- if curPlayer.GetFightPower() < helpIpyData.GetFightPowerMin():
+ if PlayerControl.GetFightPower(curPlayer) < helpIpyData.GetFightPowerMin():
GameWorld.DebugLog("战力不足%s,无法挑战本层!lineID=%s" % (helpIpyData.GetFightPowerMin(), lineId), curPlayer.GetPlayerID())
return False
return True
@@ -482,7 +482,7 @@
nextLineID = 0 if not nextLineIpyData else (lineID + 1) # 找不到想下一层数据代表通关
if nextLineID:
helpIpyData = IpyGameDataPY.GetIpyGameData("FBHelpBattle", mapID, nextLineID)
- if helpIpyData and curPlayer.GetFightPower() < helpIpyData.GetFightPowerMin():
+ if helpIpyData and PlayerControl.GetFightPower(curPlayer) < helpIpyData.GetFightPowerMin():
nextLineID = 0 #战力不足,则不可挑战下一关
@@ -660,7 +660,7 @@
#判断战力是否满足本层要求
helpIpyData = IpyGameDataPY.GetIpyGameData("FBHelpBattle", mapID, toLineID)
if helpIpyData:
- if curPlayer.GetFightPower() < helpIpyData.GetFightPowerMin():
+ if PlayerControl.GetFightPower(curPlayer) < helpIpyData.GetFightPowerMin():
GameWorld.DebugLog("战力不足%s,无法挑战下一层!toLineID=%s" % (helpIpyData.GetFightPowerMin(), toLineID), curPlayer.GetPlayerID())
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
index f335794..1342b17 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
@@ -32,6 +32,7 @@
import PlayerActivity
import PlayerBillboard
import PlayerSuccess
+import GameObj
g_runeTypeDict = {}
@@ -247,7 +248,7 @@
if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
GameWorld.DebugLog("复活玩家...", curPlayer.GetPlayerID())
ChPlayer.PlayerRebornByType(curPlayer, ChConfig.rebornType_City, tick)
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ GameObj.SetHPFull(curPlayer)
FBCommon.ClearFBNPC()
gameFB = GameWorld.GetGameFB()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py
index 4b58473..2a292a0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py
@@ -37,10 +37,11 @@
import PlayerWeekParty
import PlayerActLogin
import EventReport
+import PlayerBossReborn
+import GameObj
import random
import math
-import PlayerBossReborn
g_runeTypeDict = {}
FBDict_Level = 'FBDict_Level' # 副本关卡
@@ -243,7 +244,7 @@
if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
GameWorld.DebugLog("复活玩家...", curPlayer.GetPlayerID())
ChPlayer.PlayerRebornByType(curPlayer, ChConfig.rebornType_City, tick)
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ GameObj.SetHPFull(curPlayer)
FBCommon.ClearFBNPC()
gameFB = GameWorld.GetGameFB()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_XMZZ.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_XMZZ.py
index 931e327..b682a61 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_XMZZ.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_XMZZ.py
@@ -141,7 +141,7 @@
PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_XMZZ, 1)
msgInfo = str([1]) # 是否刚开始
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, 'XMZZStartFight', msgInfo, len(msgInfo))
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ GameObj.SetHPFull(curPlayer)
skillManager = curPlayer.GetSkillManager()
for i in range(0, skillManager.GetSkillCount()):
curSkill = skillManager.GetSkillByIndex(i)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
index b13575a..95f1db9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -52,6 +52,7 @@
import PyGameData
import NPCCommon
import FBCommon
+import GameObj
import random
import json
@@ -164,7 +165,7 @@
GameWorld.Log("使用交通工具时,无法拾取物品!mapItemID=%s,dropItemNPCID=%s" % (mapItemID, dropItemNPCID), playerID)
return
- if curPlayer.GetHP() == 0:
+ if GameObj.GetHP(curPlayer) == 0:
#玩家已经死亡
GameWorld.Log("玩家已死亡,无法拾取物品!mapItemID=%s,dropItemNPCID=%s" % (mapItemID, dropItemNPCID), playerID)
return
@@ -895,7 +896,7 @@
# @return 布尔值
# @remarks 检查使用物品的玩家属性.
def CheckUseItemSelf_Player(curPlayer):
- if curPlayer.GetHP() <= 0 :
+ if GameObj.GetHP(curPlayer) <= 0 :
return False
# #眩晕时, 不可使用物品
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py
index 1ac456e..ebdf705 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py
@@ -51,7 +51,7 @@
# @return True or False 返回值为是否使用成功(外层通知特效)
# @remarks 函数详细说明.
def UseItem(curPlayer, curRoleItem, tick):
- if curPlayer.GetHP() <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(curPlayer) <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
#死亡不回血
return
@@ -122,9 +122,9 @@
# @return 布尔值
# @remarks 一次性回血物品逻辑处理
def __DoLogic_AddHP_Once(curPlayer, curItem, effValueA, effValueB):
- curValue = curPlayer.GetHP()
- curMaxValue = curPlayer.GetMaxHP()
- setFunc = curPlayer.SetHP
+ curValue = GameObj.GetHP(curPlayer)
+ curMaxValue = GameObj.GetMaxHP(curPlayer)
+ setFunc = "SetHP"
sysMsgStr = 'GeRen_chenxin_21675'
return __Add_HPorMP_Once(curPlayer, curItem, curValue, curMaxValue, setFunc, effValueA, effValueB, sysMsgStr)
@@ -163,7 +163,10 @@
#回复效果 = 玩家当前生命(魔法) + 玩家最大生命(魔法)上限 * 效果A值 + 效果B值
addTotalValue = int(curMaxValue * addPer / ChConfig.Def_MaxRateValue + addValue)
#回复数值
- setFunc(min(curMaxValue, curValue + addTotalValue))
+ if setFunc == "SetHP":
+ GameObj.SetHP(curPlayer, min(curMaxValue, curValue + addTotalValue))
+ else:
+ setFunc(min(curMaxValue, curValue + addTotalValue))
#扣除物品
ItemCommon.DelItem(curPlayer, curItem, 1, True)
return True
@@ -179,8 +182,8 @@
# @return 布尔值
# @remarks 多次回血物品逻辑处理
def __DoLogic_AddHP_More(curPlayer, curItem, effValueA):
- curValue = curPlayer.GetHP()
- curMaxValue = curPlayer.GetMaxHP()
+ curValue = GameObj.GetHP(curPlayer)
+ curMaxValue = GameObj.GetMaxHP(curPlayer)
setFunc = curPlayer.SetHP
sysMsgStr = 'GeRen_chenxin_21675'
@@ -245,8 +248,8 @@
# PlayerControl.NotifyCode(curPlayer, "Pet_liubo_381601", [curRoleItem.GetItemTypeID()])
# return False
#
-# curValue = fightPetObj.GetHP()
-# curMaxValue = fightPetObj.GetMaxHP()
+# curValue = GameObj.GetHP(fightPetObj)
+# curMaxValue = GameObj.GetMaxHP(fightPetObj)
# #已经满值
# if curValue == curMaxValue:
# PlayerControl.NotifyCode(curPlayer, "Pet_liubo_493922")
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_PetHP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_PetHP.py
index dc8d716..d7a2ff6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_PetHP.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_PetHP.py
@@ -21,6 +21,7 @@
import PetControl
import ChConfig
import ItemCommon
+import GameObj
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -42,8 +43,8 @@
PlayerControl.NotifyCode(curPlayer, "Pet_liubo_381601", [useItemID])
return False
- fightPetHP = fightPet.GetHP()
- fightPetMaxHP = fightPet.GetMaxHP()
+ fightPetHP = GameObj.GetHP(fightPet)
+ fightPetMaxHP = GameObj.GetMaxHP(fightPet)
if fightPetHP == fightPetMaxHP:
PlayerControl.NotifyCode(curPlayer, "Pet_liubo_493922")
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py
index eaa23fa..d05a84c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py
@@ -176,7 +176,7 @@
# SetIsNeedProcess(False) 应该及时清理仇恨,回血可以不用即时
curNPC.GetNPCAngry().Clear()
-# if curNPC.GetHP() != curNPC.GetMaxHP():
+# if GameObj.GetHP(curNPC) != GameObj.GetMaxHP(curNPC):
# if curNPC.GetIsBoss() != ChConfig.Def_NPCType_Ogre_Normal:
# return
#
@@ -232,7 +232,7 @@
curPlayer = GameWorld.GetObj(hurtObjID, IPY_GameWorld.gotPlayer)
#无法查找玩家,或者已经死亡
- if curPlayer == None or curPlayer.GetHP() <= 0:
+ if curPlayer == None or GameObj.GetHP(curPlayer) <= 0:
continue
if srcPlayer and curPlayer.GetID() == srcPlayer.GetID():
@@ -415,7 +415,7 @@
continue
#仇恨值
- curAngryValue = curAngry.GetAngryValue()
+ curAngryValue = GameObj.GetAngryValue(curAngry)
if curAngryValue == 0:
continue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_104.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_104.py
index d5cb495..7456a30 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_104.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_104.py
@@ -242,8 +242,8 @@
# @return 返回值无意义
# @remarks 宠物空闲状态回血
def RestoreHP(rolePet, tick):
- curHP = rolePet.GetHP()
- maxHP = rolePet.GetMaxHP()
+ curHP = GameObj.GetHP(rolePet)
+ maxHP = GameObj.GetMaxHP(rolePet)
if curHP == maxHP:
#满血了
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_11.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_11.py
index 983ef3f..f6ab372 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_11.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_11.py
@@ -65,7 +65,7 @@
def ProcessAI(curNPC, tick):
#切换镖车状态(在GameServer中切换)
#===============================================================================
-# if curNPC.GetHP() <= 0 :
+# if GameObj.GetHP(curNPC) <= 0 :
# GameWorld.Log("正常镖车AI -> 镖车切换状态:损坏")
# return
#===============================================================================
@@ -103,7 +103,7 @@
PlayerTruck.AddTruckStateBuff(curNPC, tick)
return
- if curPlayer.GetHP() <= 0 :
+ if GameObj.GetHP(curPlayer) <= 0 :
return
#获得玩家和镖车间的距离
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_214.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_214.py
index 9d2ba4b..2e80478 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_214.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_214.py
@@ -58,7 +58,7 @@
GameObj.SetHP(curNPC, GameObj.GetHP(curNPC) - 1)
#广播一次血量
- curNPC.Notify_HPEx()
+ curNPC.Notify_HP()
#死亡
if GameObj.GetHP(curNPC) <= 0:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py
index 33d750e..d9ae837 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py
@@ -129,8 +129,8 @@
def OnDie(curNPC, hurtType, hurtID):
#死亡NPC不能攻击, 这里设置NPC血量为1
- curNPC.SetHP(1)
-
+ GameObj.SetHP(curNPC, 1)
+
#获得技能管理器
skillManager = curNPC.GetSkillManager()
curSkill = skillManager.GetSkillByIndex(0)
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 bea0c2a..37bb8af 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -228,8 +228,8 @@
# 动态刷新属性的,血量按百分比继承
aftHP = int(aftMaxHP * befHP / befMaxHP)
GameObj.SetHP(curNPC, aftHP)
- curNPC.Notify_HPEx()
- curNPC.Notify_MaxHPEx()
+ curNPC.Notify_HP()
+ curNPC.Notify_MaxHP()
#GameWorld.DebugLog(" aftHP=%s,aftMaxHP=%s" % (aftHP, aftMaxHP))
# 机器人复活初始化给技能
@@ -305,7 +305,7 @@
attrStrengthenDict = attrStrengthenInfo[NPCAttr_AttrStrengthenList] # 属性成长公式字典
playerCntCoefficient = attrStrengthenInfo[NPCAttr_PlayerCntCoefficient] # 人数系数
npcIDPlayerCntCoefficient = attrStrengthenInfo[NPCAttr_NPCPlayerCntCoefficient] # 特殊NPC人数系数
- baseMaxHP = npcData.GetHPEx() * ShareDefine.Def_PerPointValue + npcData.GetHP()
+ baseMaxHP = GameObj.GetHP(npcData) # NPCData 没有提供Max接口,对应使用GetHP
if strengthenLV:
if not strengthenIpyData:
@@ -1993,7 +1993,7 @@
# continue
#
# angryObjType = curAngry.GetObjType()
-# angryObjValue = curAngry.GetAngryValue()
+# angryObjValue = GameObj.GetAngryValue(curAngry)
#
# #删除旧的仇恨,添加新的仇恨
# if angryObjID == tagID and angryObjType == tagType:
@@ -2259,10 +2259,9 @@
summonNPC.Reborn(summonPos.GetPosX(), summonPos.GetPosY(), False)
NPCControl(summonNPC).ResetNPC_Init(isReborn=True)
if hp or hpEx:
- summonNPC.SetHP(hp)
- summonNPC.SetHPEx(hpEx)
- summonNPC.SetMaxHP(hp)
- summonNPC.SetMaxHPEx(hpEx)
+ hpTotal = hpEx * ShareDefine.Def_PerPointValue + hp
+ GameObj.SetHP(summonNPC, hpTotal)
+ GameObj.SetMaxHP(summonNPC, hpTotal)
summonNPC.NotifyAppear() # 最终统一通知NPC出现
playerPriWoodNPCList.append(summonNPC)
@@ -2717,7 +2716,7 @@
npcAngry = curNPC.GetNPCAngry()
angryValue = npcAngry.FindNPCAngry(seeObjID, seeObjType)
- if angryValue != None and angryValue.GetAngryValue() != 0 :
+ if angryValue != None and GameObj.GetAngryValue(angryValue) != 0 :
#该对象已经在仇恨列表中,不重复添加
return False
@@ -2963,9 +2962,6 @@
curPlayer = GameWorld.GetObj(curObjID, curObjType)
if curPlayer and curPlayer.GetTeamID() > 0:
addAngryTeam = GameWorld.GetTeamManager().FindTeam(curPlayer.GetTeamID())
-
- #总血量有超过DWORD的情况
- plusAngryValue = FixValueByValueEx(curNPC.GetMaxHPEx(), plusAngryValue)
#最小添加仇恨值为1
plusAngryValue = max(plusAngryValue , 1)
@@ -2997,12 +2993,13 @@
angryValue = npcAngry.FindNPCAngry(curObjID, curObjType)
#未发现,添加
- if angryValue == None or angryValue.GetAngryValue() == 0:
- npcAngry.AddAngry(curObjID, curObjType, plusAngryValue)
+ if angryValue == None or GameObj.GetAngryValue(angryValue) == 0:
+ npcAngry.AddAngry(curObjID, curObjType, plusAngryValue % ShareDefine.Def_PerPointValue, plusAngryValue / ShareDefine.Def_PerPointValue)
#如果需要,叠加
elif canPile:
- angryValue.SetAngryValue(min(angryValue.GetAngryValue() + plusAngryValue, ChConfig.Def_UpperLimit_DWord))
+ updAngryValue = GameObj.GetAngryValue(angryValue) + plusAngryValue
+ GameObj.SetAngryValue(angryValue, updAngryValue)
return
#---------------------------------------------------------------------
@@ -3219,7 +3216,7 @@
return None
#仇恨值
- curAngryValue = curAngry.GetAngryValue()
+ curAngryValue = GameObj.GetAngryValue(curAngry)
if curAngryValue == 0:
return None
@@ -3311,7 +3308,7 @@
self.RefreshNPCState(isReborn=isReborn)
#通知血量, 复活的情况不通知血量,由NPC出现包通知
if not isReborn:
- curNPC.Notify_HPEx()
+ curNPC.Notify_HP()
#这里不设置为慢速处理,因为NPC有可能未满血
#改为在空闲回血,如果满血的时候设置为慢速处理
@@ -3870,7 +3867,7 @@
self.RefreshNPCSpeed(allAttrList)
#检查血量是否变化, 暂不做血量增加上限通知,仅属性上限支持;
#客户端自己算血量上限
-# if curNPC.GetMaxHP() != curNPCMaxHP_Before:
+# if GameObj.GetMaxHP(curNPC) != curNPCMaxHP_Before:
# curNPC.Notify_MaxHP()
return
@@ -3894,8 +3891,8 @@
GameWorld.DebugLog("设置助战机器人属性: objID=%s,fightPower=%s,maxHP=%s" % (curNPC.GetID(), fightPower, maxHP))
GameObj.SetMaxHP(curNPC, maxHP)
GameObj.SetHP(curNPC, maxHP)
- curNPC.Notify_HPEx()
- curNPC.Notify_MaxHPEx()
+ curNPC.Notify_HP()
+ curNPC.Notify_MaxHP()
return
# NPC移动速度特殊处理,只处理百分比不能处理固定值
@@ -4411,7 +4408,7 @@
# for index in range(curNPC.GetAngryNPCCount()):
# angryNPC = curNPC.GetAngryNPCByIndex(index)
# #已经死亡
- # if angryNPC.GetHP() <= 0:
+ # if GameObj.GetHP(angryNPC) <= 0:
# continue
#
# angryNPCList.append(angryNPC)
@@ -4481,7 +4478,7 @@
#===============================================================================
# curNPC = self.__Instance
#
-# if curNPC.GetHP() == curNPC.GetMaxHP():
+# if GameObj.GetHP(curNPC) == GameObj.GetMaxHP(curNPC):
# #满血了
# return
#
@@ -4789,7 +4786,7 @@
return hurtObjTuple
#支持抢怪,个人杀死,但自己死亡,不算
- if curPlayer.GetHP() <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(curPlayer) <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
if isLog:
GameWorld.Log("该目标伤血玩家已死亡: npcID=%s,playerID=%s" % (npcID, maxHurtObj.GetValueID()))
return hurtObjTuple
@@ -4833,7 +4830,7 @@
GameWorld.Log(" i=%s, 无该队员!" % (i))
continue
- if curTeamPlayer.GetHP() <= 0 or curTeamPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(curTeamPlayer) <= 0 or curTeamPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
if isLog:
GameWorld.Log(" i=%s, 队员已死亡!memPlayerID=%s" % (i, curTeamPlayer.GetPlayerID()))
continue
@@ -5282,7 +5279,7 @@
GameWorld.DebugLog("竞争归属玩家不可见,移除归属!playerID=%s" % ownerID)
return
- if owner.GetHP() <= 0 or owner.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(owner) <= 0 or owner.GetPlayerAction() == IPY_GameWorld.paDie:
GameWorld.DebugLog("竞争归属玩家死亡,移除归属!playerID=%s" % ownerID)
return
@@ -5309,7 +5306,7 @@
if isDead:
GameWorld.Log(" i=%s, 队员为空!" % i)
continue
- if curTeamPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curTeamPlayer) <= 0:
if isDead:
GameWorld.Log(" i=%s, 队员血量为0!, memPlayerID=%s" % (i, curTeamPlayer.GetPlayerID()))
continue
@@ -5597,16 +5594,6 @@
callFunc(curNPC, curPlayer, skill)
#---------------------------------------------------------------------
-# 目标总值超过DWORD记录,需修正数值
-# 如:伤血和仇恨超过20E的情况,按高位记录取余, 最低1
-def FixValueByValueEx(valueEx, value):
- if valueEx == 0:
- return value
-
- # 取高位记录的数字长度,按10N次方求余
- nlen = len(str(valueEx))
- return max(value / pow(10, nlen), 1)
-
def CheckCanCollectByNPCID(curPlayer, npcID, collectNPCIpyData):
# 根据NPCID判断是否可以采集
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
index 38c2670..6147fab 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
@@ -32,6 +32,7 @@
import NPCCommon
import FBCommon
import ChConfig
+import GameObj
import time
@@ -530,7 +531,7 @@
GameWorld.DebugLog("伤血玩家不可见,不计!playerID=%s" % playerID, self.npcID, self.lineID)
return False
- if player.GetHP() <= 0 or player.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(player) <= 0 or player.GetPlayerAction() == IPY_GameWorld.paDie:
deadTime = player.NomalDictGetProperty(ChConfig.Def_Player_Dict_DeadTime)
if time.time() - deadTime >= IpyGameDataPY.GetFuncCfg("BossHurtValue", 1):
GameWorld.DebugLog("伤血玩家死亡超过伤血保护时长,不计!playerID=%s" % playerID, self.npcID, self.lineID)
@@ -650,7 +651,7 @@
if player == None:
continue
- if player.GetHP() <= 0 or player.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(player) <= 0 or player.GetPlayerAction() == IPY_GameWorld.paDie:
playerDisableReason[playerID] = "dead"
continue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
index b6503ea..fbca2a5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
@@ -29,6 +29,7 @@
import PlayerTeam
import NPCCommon
import ChConfig
+import GameObj
class HurtValueObj():
@@ -256,7 +257,7 @@
if player == None:
continue
- if player.GetHP() <= 0 or player.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(player) <= 0 or player.GetPlayerAction() == IPY_GameWorld.paDie:
playerDisableReason[playerID] = "dead"
continue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 1fe5657..eb8cffc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -129,6 +129,7 @@
import PlayerFB
import SkillShell
import PlayerYinji
+import GameObj
import datetime
import time
@@ -252,7 +253,7 @@
Sync_DBPlayer(curPlayer)
# 死亡复活
- if curPlayer.GetHP() <=0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(curPlayer) <=0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
PlayerRebornByType(curPlayer, ChConfig.rebornType_System, tick)
# 强刷一次属性,刷之前重置还没同步过所有属性
@@ -317,6 +318,7 @@
dbPlayer.RebornPosY = curPlayer.GetRebornPosY()
dbPlayer.State = curPlayer.GetState()
dbPlayer.HP = curPlayer.GetHP()
+ dbPlayer.HPEx = curPlayer.GetHPEx()
dbPlayer.XP = curPlayer.GetXP()
dbPlayer.HPRestoreSetting = curPlayer.GetHPRestoreSetting()
dbPlayer.MPRestoreSetting = curPlayer.GetMPRestoreSetting()
@@ -764,7 +766,7 @@
curPlayer.SetFacePic(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线
tjgTime = PlayerTJG.GetTJGTime(curPlayer)
if tjgTime:
- curPlayer.SendGameServerRefreshState(IPY_GameWorld.CDBPlayerRefresh_HappyPoint, tjgTime)
+ PlayerControl.SendGameServerRefreshState(curPlayer, IPY_GameWorld.CDBPlayerRefresh_HappyPoint, tjgTime)
PlayerControl.DoGMForbidenTalkOnLogin(curPlayer)
@@ -1267,7 +1269,7 @@
# #刷新NPC状态/buff
# summonControl.RefreshNPCState()
# #因当前血量先刷,最大血量后刷,有可能当前血量大于最大血量
- # curSummon.SetHP(min(curSummon.GetHP() , curSummon.GetMaxHP()))
+ # GameObj.SetHPFull(curSummon)
#===========================================================================
#初始化宠物 通知客户端
@@ -1445,7 +1447,7 @@
curPlayer.SetVisible(True)
#如果玩家hp为0,设置玩家为死亡状态
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
curPlayer.SetPlayerAction(IPY_GameWorld.paDie)
#curPlayer.SetDead()
@@ -1532,7 +1534,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IsReBorn, 0)
- if curPlayer.GetHP() <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
+ if GameObj.GetHP(curPlayer) <= 0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
#如果玩家上线后死亡,回程复活
isLogin = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_LoadMapIsLogin)
rebornType = ChConfig.rebornType_City if isLogin else ChConfig.rebornType_System
@@ -1891,7 +1893,7 @@
#无法验证目标
#===========================================================================
# curTag = GameWorld.GetObj(clientData.ObjID, IPY_GameWorld.gotNPC)
- # if not curTag or curTag.GetHP() ==0:
+ # if not curTag or GameObj.GetHP(curTag) ==0:
# return
#
# #与目标相差太远
@@ -2162,7 +2164,7 @@
return False
#玩家已经死亡
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return False
# #眩晕时,不可移动 zhengyang 2010-6-2
@@ -2326,7 +2328,7 @@
# curObj = mapObj.GetObjByIndex(i)
# #只有一种情况特殊:死亡的NPC可以让玩家走过去
# if curObj.GetGameObjType() == IPY_GameWorld.gotNPC and \
-# curObj.GetHP() <= 0 :
+# GameObj.GetHP(curObj) <= 0 :
# continue
# curPlayer.MoveFail()
# GameWorld.Log("移动失败,目标点有玩家或者NPC")
@@ -2670,7 +2672,7 @@
# #获取玩家详细信息成功
# if canGetDetail:
# extendDataDict = {}
- # extendDataDict['maxHP'] = tagObj.GetMaxHP()
+ # extendDataDict['maxHP'] = GameObj.GetMaxHP(tagObj)
# extendDataDict['maxMP'] = tagObj.GetMaxMP()
# extendDataDict['hit'] = tagObj.GetHit()
# extendDataDict['miss'] = tagObj.GetMiss()
@@ -2733,7 +2735,7 @@
#功能开启判断换成
#GameFuncComm.GetFuncCanUse(curPlayer, funcID)
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return
sendPack = IPY_GameWorld.IPY_CSit()
setType = sendPack.GetType()
@@ -3142,7 +3144,7 @@
return
curPlayer.SetHPRestoreSetting(curValue)
#玩家活着的时候调用
- if curPlayer.GetHP() > 0 :
+ if GameObj.GetHP(curPlayer) > 0 :
#调用自动回血
PlayerControl.PlayerAutoRestoreHP(curPlayer, tick)
return
@@ -3174,7 +3176,7 @@
curPlayer.SetMPRestoreSetting(curValue)
#玩家活着的时候调用
- if curPlayer.GetHP() > 0 :
+ if GameObj.GetHP(curPlayer) > 0 :
#调用自动回魔
PlayerControl.PlayerAutoRestoreMP(curPlayer, tick)
@@ -3388,7 +3390,7 @@
#游戏事件 Type = TGameEvent
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- if curPlayer.GetHP() == 0:
+ if GameObj.GetHP(curPlayer) == 0:
#GameWorld.Log("玩家死亡,没有事件")
return
@@ -3508,7 +3510,7 @@
if tick - curPlayer.GetShowFaceTick() < ChConfig.Def_ShowEventTime:
return
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return
#表情行为, 客户端限制
@@ -3548,7 +3550,7 @@
#GameWorld.Log("玩家地图读取没有成功")
return
- if curPlayer.GetHP() == 0:
+ if GameObj.GetHP(curPlayer) == 0:
#玩家已经死亡
#GameWorld.Log("玩家停止移动,玩家已经死亡")
return
@@ -3692,7 +3694,7 @@
# #找到这个召唤兽
# summonNPC = curPlayer.FindSummonByID(summonID)
# #无法查找到这个召唤兽
-# if summonNPC == None or summonNPC.GetHP() <= 0:
+# if summonNPC == None or GameObj.GetHP(summonNPC) <= 0:
# GameWorld.Log('无法查找到这个召唤兽 summonID=%d'%summonID)
# return
#
@@ -3769,7 +3771,7 @@
# #找到这个召唤兽
# summonNPC = curPlayer.FindSummonByID(summonID)
# #无法查找到这个召唤兽
-# if summonNPC == None or summonNPC.GetHP() <= 0:
+# if summonNPC == None or GameObj.GetHP(summonNPC) <= 0:
# GameWorld.Log('找不到召唤兽')
# return
#
@@ -3872,7 +3874,7 @@
# summonNPC = curPlayer.FindSummonByID(summonID)
#
# #无法查找到这个召唤兽
-# if summonNPC == None or summonNPC.GetHP() <= 0:
+# if summonNPC == None or GameObj.GetHP(summonNPC) <= 0:
# return
#
# if ChConfig.Def_ClientControlSummonNPCID.count(summonNPC.GetFunctionType()) == 0:
@@ -4110,7 +4112,7 @@
'''
# 非死亡状态下,也就是哪个服务器角色死亡由哪个服务器判断
- if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
+ if GameObj.GetHP(curPlayer) > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
return 0
# 回城复活的才需要CD
@@ -4153,7 +4155,7 @@
本函数不验证玩家死亡状态等,因为有可能前后端复活状态不一致,如果这里拦住可能导致前端躺尸复活不了
'''
- if checkHPState and curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
+ if checkHPState and GameObj.GetHP(curPlayer) > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
# 当血量大于0收到复活请求时,一般是前后端复活状态不一致的情况下导致的
# 由于前端需要根据复活状态判断复活界面相关逻辑,所以这里需要做一些特殊处理,防止某些情况下前后端复活状态不一致导致的一些异常问题
# 后端非死亡状态的情况,补同步一次复活包给前端
@@ -4255,7 +4257,7 @@
playerControl.RefreshAllState()
#设置血量
- curPlayer.SetHP(curPlayer.GetMaxHP() * resetHpPercent / ChConfig.Def_MaxRateValue)
+ GameObj.SetHP(curPlayer, GameObj.GetMaxHP(curPlayer) * resetHpPercent / ChConfig.Def_MaxRateValue)
#curPlayer.SetMP(curPlayer.GetMaxMP() * resetMpPercent / ChConfig.Def_MaxRateValue)
#护盾
PlayerControl.SetProDef(curPlayer, PlayerControl.GetMaxProDef(curPlayer))
@@ -5953,17 +5955,18 @@
#{
# tagHead Head;
# DWORD LostHP;
+# DWORD LostHPEx;
#};
def OnRoleLostHP(index, clientData, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- lostHP = clientData.LostHP
- curHP = curPlayer.GetHP()
+ lostHP = clientData.LostHP + clientData.LostHPEx * ShareDefine.Def_PerPointValue
+ curHP = GameObj.GetHP(curPlayer)
updHP = curHP - lostHP
if updHP <= 0:
#玩家已经死亡
playerControl = PlayerControl.PlayerControl(curPlayer)
playerControl.SetDead()
else:
- curPlayer.SetHP(updHP)
+ GameObj.SetHP(curPlayer, updHP)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PetControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PetControl.py
index 6b72837..f6c47cf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PetControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PetControl.py
@@ -255,8 +255,8 @@
petControl.RefreshNPCState(canSyncClient)
#加一个防御措施, 如果宠物血为0, 不可召唤出来, 默认为宠物召回时候的血量
- if rolePet.GetHP() <= 0:
- PetDead_ReStoreHP(rolePet, rolePet.GetMaxHP())
+ if GameObj.GetHP(rolePet) <= 0:
+ PetDead_ReStoreHP(rolePet, GameObj.GetMaxHP(rolePet))
GameWorld.ErrLog('宠物重生血量为0, PetID = %s' % (rolePet.GetRolePet().PetID))
return
@@ -329,7 +329,7 @@
# @return 返回值无意义
# @remarks 设置宠物HP
def SetPetHP(rolePet, value, canSyncClient=True):
- rolePet.SetHP(value)
+ GameObj.SetHP(rolePet, value, canSyncClient)
if not canSyncClient:
return
@@ -343,7 +343,7 @@
# @return 返回值无意义
# @remarks 加宠物HP
def AddPetHP(rolePet, value):
- remainValue = min(rolePet.GetHP() + value, rolePet.GetMaxHP())
+ remainValue = min(GameObj.GetHP(rolePet) + value, GameObj.GetMaxHP(rolePet))
SetPetHP(rolePet, remainValue)
return
@@ -473,7 +473,7 @@
PlayerControl.NotifyCode(curPlayer, "AvoidSink09")
return False
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
#死亡状态无法出战宠物
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
index ab6a1bb..5feff75 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
@@ -78,7 +78,7 @@
PlayerControl.NotifyCode(curPlayer , "Play_Attack_Null")
return
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
#玩家已经死亡
#GameWorld.Log("玩家普通攻击失败,玩家已经死亡")
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
index 860f197..401b8a3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -124,20 +124,25 @@
def UpdatePlayerFPTotalBillboard(curPlayer, isForceUpdate=False, isCheckRule=True):
##更新玩家总战斗力
- playerFightPower = curPlayer.GetFightPower()
- if not __CheckFightPowerCanUpdate(curPlayer, ChConfig.Def_PDict_FightPower_Total, playerFightPower, isForceUpdate, isCheckRule):
+ playerFightPower = PlayerControl.GetFightPower(curPlayer)
+ if not __CheckFightPowerCanUpdate(curPlayer, ChConfig.Def_PDict_FightPower_Total, playerFightPower,
+ isForceUpdate, isCheckRule, ChConfig.Def_PDict_FightPower_TotalEx):
return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_Total, playerFightPower,
+ fightPower = playerFightPower % ChConfig.Def_PerPointValue
+ fightPowerEx = playerFightPower / ChConfig.Def_PerPointValue
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_Total, fightPower,
+ ChConfig.Def_PDictType_FightPower)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_TotalEx, fightPowerEx,
ChConfig.Def_PDictType_FightPower)
familyID = curPlayer.GetFamilyID()
GameWorld.DebugLog("更新总战斗力:playerFightPower=%s" % (playerFightPower), curPlayer.GetPlayerID())
- UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_FightPower, playerFightPower, exInfo=[familyID])
+ UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_FightPower, fightPowerEx, fightPower, exInfo=[familyID])
EventReport.WriteEvent_FightPower(curPlayer)
return
-def __CheckFightPowerCanUpdate(curPlayer, key, fightPower, isForceUpdate=False, isCheckRule=True):
+def __CheckFightPowerCanUpdate(curPlayer, key, fightPower, isForceUpdate=False, isCheckRule=True, key2=None):
''' 检查玩家可否更新战斗力
@param curPlayer 玩家实例
@param key 战斗力类型对应key
@@ -150,7 +155,9 @@
return False
historyFightPower = curPlayer.NomalDictGetProperty(key, 0, ChConfig.Def_PDictType_FightPower)
-
+ if key2 != None:
+ historyFightPower += curPlayer.NomalDictGetProperty(key2, 0, ChConfig.Def_PDictType_FightPower) * ChConfig.Def_PerPointValue
+
if not __CanPlayerBillboardComm(curPlayer):
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 6fc4016..94a8b74 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -82,6 +82,7 @@
import GY_Query_CrossRealmReg
import PlayerCrossRealmPK
import FunctionNPCCommon
+import IPY_PlayerDefine
import CrossRealmPlayer
import CrossPlayerData
import NPCHurtManager
@@ -593,7 +594,7 @@
# @remarks 检查玩家状态是否可以传送
def CheckPlayerTransport(curPlayer):
#死亡不可使用
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return False
# if curPlayer.GetPKValue() > 0:
@@ -1615,8 +1616,8 @@
# 从副本中切图
if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
#默认回满血
- if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and curPlayer.GetHP() < curPlayer.GetMaxHP():
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ if GameObj.GetHP(curPlayer) > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and GameObj.GetHP(curPlayer) < GameObj.GetMaxHP(curPlayer):
+ GameObj.SetHPFull(curPlayer)
#2. 调用切换地图接口
curPlayer.DoResetWorldPosAndClear()
@@ -1711,7 +1712,7 @@
# #如果玩家是死亡状态,则先复活,手游策划不想复活退出
# if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
# curPlayer.Reborn(ChConfig.rebornType_System)
- # curPlayer.SetHP(curPlayer.GetMaxHP())
+ # GameObj.SetHPFull(curPlayer)
# ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
#===============================================================================================
@@ -1756,7 +1757,7 @@
NotifyCode(curPlayer, "CrossMatching18")
return
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
NotifyCode(curPlayer, "CrossMap4")
return
@@ -1945,7 +1946,7 @@
if ret != ShareDefine.EntFBAskRet_OK:
return ret
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
GameWorld.Log("玩家已经死亡, 无法进入副本!")
return ShareDefine.EntFBAskRet_Dead
@@ -2276,7 +2277,7 @@
# @remarks 玩家切换地图
def PlayerResetWorldPos(curPlayer, mapID, posX, posY, takeTruck, lineID=-1, msg='', canLock=True, exData1=0):
#更改: 死亡允许切换地图, 在副本中被怪打死, 副本时间到, 回收副本
-# if curPlayer.GetHP() <= 0 :
+# if GameObj.GetHP(curPlayer) <= 0 :
# GameWorld.Log("死亡无法切换地图")
# return
@@ -2749,7 +2750,7 @@
# GameWorld.Log(" i=%s,成员不存在!" % (i))
continue
- if curTeamPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curTeamPlayer) <= 0:
#if isLog:
# GameWorld.Log(" i=%s,成员血量为0!playerID=%s" % (i, curTeamPlayer.GetPlayerID()))
continue
@@ -2866,7 +2867,7 @@
return
if value < 0:
value = GetPlayerCurrency(curPlayer, currencyType)
- curPlayer.SendPropertyRefresh(refreshType, value, False)
+ SendPropertyRefresh(curPlayer, refreshType, value)
return
# 通知玩家所有自定义货币
@@ -2879,9 +2880,10 @@
continue
#此处根据需求若Value为0 可不通知客户端,具体功能制作者决定
+ value = GetPlayerCurrency(curPlayer, currencyType)
notifyStruct = ChPyNetSendPack.tagRefreshType()
notifyStruct.RefreshType = refreshType
- notifyStruct.Value = GetPlayerCurrency(curPlayer, currencyType)
+ notifyStruct.Value = value
notifyList.append(notifyStruct)
#属性组合包 通知自己
@@ -4087,7 +4089,7 @@
def PlayerLvUp(self, handLvUp=False):
curPlayer = self.__Player
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
#玩家死亡不可升级
return
@@ -4219,7 +4221,7 @@
#放在功能开启后面
PlayerWorldAverageLv.UpdatePlayerWorldAverageLv(curPlayer)
#将血设置为最大
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ GameObj.SetHPFull(curPlayer)
if curPlayer.GetMaxMP() > 0:
curPlayer.SetMP(curPlayer.GetMaxMP())
@@ -4356,7 +4358,11 @@
continue
notifyStruct = ChPyNetSendPack.tagRefreshType()
notifyStruct.RefreshType = attrType
- notifyStruct.Value = curPlayerState
+ if attrType in [IPY_PlayerDefine.CDBPlayerRefresh_HP, IPY_PlayerDefine.CDBPlayerRefresh_MaxHP]:
+ notifyStruct.Value = curPlayerState % ShareDefine.Def_PerPointValue
+ notifyStruct.ValueEx = curPlayerState / ShareDefine.Def_PerPointValue
+ else:
+ notifyStruct.Value = curPlayerState
if notifySelf:
notifySelfList.append(notifyStruct)
if notifyAll:
@@ -4453,7 +4459,7 @@
return
GameWorld.DebugLog("Start RefreshPlayerAttrByBuffEx!!!")
- beforeMaxHP = curPlayer.GetMaxHP()
+ beforeMaxHP = GameObj.GetMaxHP(curPlayer)
beforeMoveSpeedValue = GetSpeedValue(curPlayer)
#构建玩家刷新通知客户端字典, 缓存[索引, 数值]
playerStateDict = {}
@@ -4546,7 +4552,7 @@
GameWorld.DebugLog("Start RefreshPlayerAttrStateEx!!!")
#beforeAtkInterval = curPlayer.GetAtkInterval()
- beforeMaxHP = curPlayer.GetMaxHP()
+ beforeMaxHP = GameObj.GetMaxHP(curPlayer)
beforeMoveSpeedValue = GetSpeedValue(curPlayer)
beforeMaxProDef = GetMaxProDef(curPlayer)
#[金木水火土]
@@ -4729,7 +4735,7 @@
mfpSkill = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPSkill % mfpObj.mfpType)
mfpEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPEx % mfpObj.mfpType)
mfpTotal = mfpValue + mfpSkill + mfpEx
- mfpDict[mfpObj.mfpType] = mfpTotal
+ mfpDict[mfpObj.mfpType] = min(mfpTotal, ChConfig.Def_UpperLimit_DWord)
if mfpType == ShareDefine.Def_MFPType_Plus:
OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_Plus, mfpTotal)
@@ -4810,12 +4816,13 @@
curPlayer = self.__Player
if GetProDefHPPer(curPlayer) == 0:
return
- maxHP = curPlayer.GetMaxHP()
+ maxHP = GameObj.GetMaxHP(curPlayer)
proDefPer = GetProDefHPPer(curPlayer)
#获取策划配置的表格
GodWeapon4 = IpyGameDataPY.GetFuncCfg("GodWeapon4", 2)
maxProDef = eval(FormulaControl.GetCompileFormula("GodWeapon4", GodWeapon4))
+ maxProDef = min(maxProDef, ChConfig.Def_UpperLimit_DWord)
SetMaxProDef(curPlayer, int(maxProDef))
@@ -4962,12 +4969,11 @@
'''
curPlayer = self.__Player
#------------------------------计算完毕--------------------------------
- afterMaxHP = curPlayer.GetMaxHP()
+ afterMaxHP = GameObj.GetMaxHP(curPlayer)
addMaxHP = max(0, afterMaxHP - beforeMaxHP)
if beforeMaxHP > 0 and addMaxHP > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
# 最大血量增加时,同步增加等量的当前血量 (死亡状态下不刷当前血量)
- curPlayer.SetHP(min(curPlayer.GetHP() + addMaxHP, afterMaxHP))
-
+ GameObj.SetHP(curPlayer, min(GameObj.GetHP(curPlayer) + addMaxHP, afterMaxHP))
#self.PrintAttr(curPlayer, "最终的")
curPlayer.EndRefreshState() # 统一在刷属性结束逻辑中调用
#---------------------------------------------------------------------
@@ -5113,31 +5119,33 @@
mfpDataList.append(mfpData)
totalFightPower += fightPower # 累加总战斗力
- if totalFightPower > ShareDefine.Def_UpperLimit_DWord:
- GameWorld.ErrLog("总战力超过数值上限!totalFightPower=%s" % totalFightPower, curPlayer.GetPlayerID())
- totalFightPower = ShareDefine.Def_UpperLimit_DWord
-
# //A3 A1 各功能模块战斗力信息 #tagMCModuleFightPowerInfo
mfpInfo = ChPyNetSendPack.tagMCModuleFightPowerInfo()
mfpInfo.Clear()
- mfpInfo.TotalFightPower = totalFightPower
+ mfpInfo.TotalFightPower = totalFightPower % ChConfig.Def_PerPointValue
+ mfpInfo.TotalFightPoweEx = totalFightPower / ChConfig.Def_PerPointValue
mfpInfo.MFPCnt = len(mfpDataList)
mfpInfo.MFPList = mfpDataList
NetPackCommon.SendFakePack(curPlayer, mfpInfo)
- beforeFightPower = curPlayer.GetFightPower()
- curPlayer.SetFightPower(totalFightPower, False)
+ beforeFightPower = GetFightPower(curPlayer)
+ SetFightPower(curPlayer, totalFightPower)
if totalFightPower < beforeFightPower:
DataRecordPack.DR_FightPowerChangeInfo(curPlayer, beforeFightPower)
highestFightPower = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FightPower_Highest, 0,
ChConfig.Def_PDictType_FightPower)
+ highestFightPower += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FightPower_HighestEx, 0,
+ ChConfig.Def_PDictType_FightPower) * ChConfig.Def_PerPointValue
if totalFightPower > highestFightPower:
- NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_Highest, totalFightPower,
+ highestFightPower = totalFightPower
+ NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_Highest, highestFightPower % ChConfig.Def_PerPointValue,
+ ChConfig.Def_PDictType_FightPower)
+ NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_HighestEx, highestFightPower / ChConfig.Def_PerPointValue,
ChConfig.Def_PDictType_FightPower)
GameWorld.DebugLog("总战力: %s, 历史最高战力: %s, beforeFightPower=%s" % (totalFightPower, highestFightPower, beforeFightPower))
PlayerBillboard.UpdatePlayerFPTotalBillboard(curPlayer)
- # 记录开服活动数据
- OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_FightPower, totalFightPower)
+ # 记录开服活动数据,开服活动前X天理论上不会超过20E,暂不处理
+ OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_FightPower, min(totalFightPower, ChConfig.Def_UpperLimit_DWord))
if beforeFightPower != totalFightPower:
CrossPlayerData.OnPlayerFightPowerChange(curPlayer)
return
@@ -5227,15 +5235,15 @@
#玩家未初始化成功, 不修正血量和魔法值, 因此时有可能因为某些影响主角的物品未初始化完毕(如宠物装备)
return
- curPlayerHP = curPlayer.GetHP()
- curPlayerMaxHP = curPlayer.GetMaxHP()
+ curPlayerHP = GameObj.GetHP(curPlayer)
+ curPlayerMaxHP = GameObj.GetMaxHP(curPlayer)
#=======================================================================
# curPlayerMP = curPlayer.GetMP()
# curPlayerMaxMP = curPlayer.GetMaxMP()
#=======================================================================
if curPlayerHP > curPlayerMaxHP:
- curPlayer.SetHP(curPlayerMaxHP)
+ GameObj.SetHPFull(curPlayer)
#=======================================================================
# if curPlayerMP > curPlayerMaxMP:
@@ -5388,8 +5396,8 @@
# self.RefreshAllState()
#===============================================================================
- if curPlayer.GetHP() != 0:
- curPlayer.SetHP(0)
+ if GameObj.GetHP(curPlayer) != 0:
+ GameObj.SetHP(curPlayer, 0)
#清空移动错误距离
GameWorld.ClearPlayerPosCount(curPlayer)
@@ -5973,12 +5981,23 @@
# 同步前端及GameServer需要自己写通知,设置函数自身不带通知参数
#
# 发送0418包
-# SendPropertyRefresh(int inputType, int inputValue, bool boardCast, bool includeSelf = true)
+# SendPropertyRefresh(int inputType, int inputValue, int inputValueEx, bool boardCast, bool includeSelf = true)
# @param : boardCast-是否广播周围玩家;includeSelf-是否包含自己
#
# 通知GsmeServer;
-# SendGameServerRefreshState(int inputType, int inputValue)
+# SendGameServerRefreshState(int inputType, int inputValue, int inputValueEx)
+def SendPropertyRefresh(curPlayer, inputType, value, boardCast=False):
+ ''' 发送0418包
+ @param boardCast: 是否广播周围玩家,一定会发给自己
+ '''
+ curPlayer.SendPropertyRefresh(inputType, value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue, boardCast)
+ return
+
+def SendGameServerRefreshState(curPlayer, inputType, value):
+ ## 同步属性到GameServer IPY_GRefreshPlayerProperty
+ curPlayer.SendGameServerRefreshState(inputType, value % ShareDefine.Def_PerPointValue, value / ShareDefine.Def_PerPointValue)
+ return
# 禁言 通知gameServer
def SetGMForbidenTalk(curPlayer, value):
@@ -6014,16 +6033,16 @@
def __SetGMForbidenTalkValue(curPlayer, value):
curPlayer.SetGMForbidenTalk(value)
- curPlayer.SendGameServerRefreshState(ShareDefine.CDBPlayerRefresh_ForbidenTalk, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ForbidenTalk, value, False)
+ SendGameServerRefreshState(curPlayer, ShareDefine.CDBPlayerRefresh_ForbidenTalk, value)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ForbidenTalk, value)
GameWorld.DebugLog("__SetGMForbidenTalkValue %s" % value, curPlayer.GetPlayerID())
return
def SetPlayerAccState(curPlayer, accState):
curPlayer.SetAccState(accState)
curPlayer.SetExAttr17(accState) # 同步设置该值 0309 封包登录时需要用到
- curPlayer.SendGameServerRefreshState(ShareDefine.CDBPlayerRefresh_ExAttr17, accState)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ExAttr17, accState, False)
+ SendGameServerRefreshState(curPlayer, ShareDefine.CDBPlayerRefresh_ExAttr17, accState)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ExAttr17, accState)
GameWorld.DebugLog("SetPlayerAccState %s" % (accState), curPlayer.GetPlayerID())
return
@@ -6039,7 +6058,7 @@
GameWorld.Log("上线时角色为被禁言状态!", curPlayer.GetPlayerID())
__SetGMForbidenTalkValue(curPlayer, 1)
else:
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ForbidenTalk, 0, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ForbidenTalk, 0)
return
## 协助目标玩家ID
@@ -6138,9 +6157,15 @@
def GetPrestige(curPlayer): return 0
def SetPrestige(curPlayer, value): return
-## 设置模块战斗力
+##总战斗力,支持超过20E
+def GetFightPower(curPlayer): return curPlayer.GetFightPowerEx() * ChConfig.Def_PerPointValue + curPlayer.GetFightPower()
+def SetFightPower(curPlayer, value):
+ curPlayer.SetFightPower(value % ChConfig.Def_PerPointValue, value / ChConfig.Def_PerPointValue, False) # 不通知GameServer bNotifyGameServer False
+ return
+
+## 设置模块战斗力,最大20E
def SetMFPFightPower(curPlayer, mfpType, fightPower):
- curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPFightPower % mfpType, fightPower)
+ curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPFightPower % mfpType, min(fightPower, ChConfig.Def_UpperLimit_DWord))
return
## 获取模块战斗力
@@ -6545,7 +6570,7 @@
def GetSpeedValue(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_SpeedValue)
def SetSpeedValue(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_SpeedValue, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_SpeedValue, value, True) # 移动速度值暂定广播周围玩家
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_SpeedValue, value, True) # 移动速度值暂定广播周围玩家
##获取玩家攻击速度,用于计算攻击间隔
# @param curPlayer 玩家实例
@@ -6592,7 +6617,7 @@
def GetNPCHurtAddPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_NPCHurtAddPer)
def SetNPCHurtAddPer(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_NPCHurtAddPer, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_NPCHurtAddPer, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_NPCHurtAddPer, value)
#---职业伤害加成---
## 目标战士伤害加成
@@ -6624,7 +6649,7 @@
def GetLuckyHitReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_LuckyHitReduce)
def SetLuckyHitReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_LuckyHitReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_LuckyHitReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_LuckyHitReduce, value)
## 卓越一击伤害减免
def GetGreatHitReducePer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_GreatHitReducePer)
@@ -6633,7 +6658,7 @@
def GetSuperHitReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_SuperHitReduce)
def SetSuperHitReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_SuperHitReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_SuperHitReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_SuperHitReduce, value)
## 无视防御伤害减免
def GetIgnoreDefReducePer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_IgnoreDefReducePer)
def SetIgnoreDefReducePer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_IgnoreDefReducePer, value)
@@ -6643,7 +6668,7 @@
def GetLuckyHitRateReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_LuckyHitRateReduce)
def SetLuckyHitRateReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_LuckyHitRateReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_LuckyHitRateReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_LuckyHitRateReduce, value)
## 抗卓越一击概率
def GetGreatHitRateReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_GreatHitRateReduce)
def SetGreatHitRateReduce(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_GreatHitRateReduce, value)
@@ -6651,12 +6676,12 @@
def GetSuperHitRateReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_SuperHitRateReduce)
def SetSuperHitRateReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_SuperHitRateReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_SuperHitRateReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_SuperHitRateReduce, value)
## 抗无视防御概率
def GetIgnoreDefRateReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_IgnoreDefRateReduce)
def SetIgnoreDefRateReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_IgnoreDefRateReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_IgnoreDefRateReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_IgnoreDefRateReduce, value)
#---特殊伤害概率---
## 富豪一击概率
@@ -6667,30 +6692,30 @@
def GetBleedDamage(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_BleedDamage)
def SetBleedDamage(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_BleedDamage, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_BleedDamage, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_BleedDamage, value)
## 最终伤害百分比
def GetFinalHurtPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FinalHurtPer)
def SetFinalHurtPer(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_FinalHurtPer, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FinalHurtPer, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_FinalHurtPer, value)
## 最终伤害减免百分比
def GetFinalHurtReducePer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FinalHurtReducePer)
def SetFinalHurtReducePer(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_FinalHurtReducePer, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FinalHurtReducePer, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_FinalHurtReducePer, value)
## 最终固定伤害增加
def GetFinalHurt(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FinalHurt)
def SetFinalHurt(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_FinalHurt, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FinalHurt, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_FinalHurt, value)
## 最终固定伤害减少
def GetFinalHurtReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FinalHurtReduce)
def SetFinalHurtReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_FinalHurtReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FinalHurtReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_FinalHurtReduce, value)
## 对指定boss伤害加成固定值
def GetBossIDHurt(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_BossIDHurt)
def SetBossIDHurt(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_BossIDHurt, value)
@@ -6736,7 +6761,7 @@
def GetOnlyFinalHurt(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_OnlyFinalHurt)
def SetOnlyFinalHurt(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_OnlyFinalHurt, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_OnlyFinalHurt, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_OnlyFinalHurt, value)
return
# PVP攻击回血
@@ -6812,13 +6837,13 @@
def GetFaintRate(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrFaintRate)
def SetFaintRate(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrFaintRate, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FaintRate, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_FaintRate, value)
#---击晕抵抗----
def GetFaintDefRate(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrFaintDefRate)
def SetFaintDefRate(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrFaintDefRate, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FaintDefRate, value, False)
-
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_FaintDefRate, value)
+
#---触发定身----
def GetAtkerFreezed(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrAtkerFreezed)
def SetAtkerFreezed(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrAtkerFreezed, value)
@@ -6831,43 +6856,43 @@
def GetComboRate(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrComboRate)
def SetComboRate(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrComboRate, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ComboRate, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ComboRate, value)
#---连击伤害----
def GetComboDamPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrComboDamPer)
def SetComboDamPer(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrComboDamPer, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ComboDamPer, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ComboDamPer, value)
#---技能攻击比例减少----
def GetSkillAtkRateReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_SkillAtkRateReduce)
def SetSkillAtkRateReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_SkillAtkRateReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_SkillAtkRateReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_SkillAtkRateReduce, value)
#---PVP固定伤害----
def GetDamagePVP(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrDamagePVP)
def SetDamagePVP(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDamagePVP, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_DamagePVP, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_DamagePVP, value)
#---PVP固定伤害减少----
def GetDamagePVPReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrDamagePVPReduce)
def SetDamagePVPReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDamagePVPReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_DamagePVPReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_DamagePVPReduce, value)
#---伤害输出固定值计算对NPC附加----
def GetDamagePVE(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrDamagePVE)
def SetDamagePVE(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDamagePVE, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_DamagePVE, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_DamagePVE, value)
#---伤害输出计算百分比对玩家附加----
def GetDamagePerPVP(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrDamagePerPVP)
def SetDamagePerPVP(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDamagePerPVP, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_DamagePerPVP, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_DamagePerPVP, value)
def GetDamagePerPVPReduce(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrDamagePerPVPReduce)
def SetDamagePerPVPReduce(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDamagePerPVPReduce, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_DamagePerPVPReduce, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_DamagePerPVPReduce, value)
#---受伤计算百分比----
def GetHurtPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrHurtPer)
@@ -6885,7 +6910,7 @@
def GetDamChanceDef(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrDamChanceDef)
def SetDamChanceDef(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDamChanceDef, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_DamChanceDef, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_DamChanceDef, value)
#---当前防护值,需存DB----
def GetProDef(curPlayer): return curPlayer.GetExAttr4()
@@ -6899,17 +6924,19 @@
def GetMaxProDef(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrMaxProDef)
def SetMaxProDef(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrMaxProDef, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_MaxProDef, value, False) # 周围玩家需要通知
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_MaxProDef, value) # 周围玩家需要通知
+
#---生命上限换算为防护值的百分比----
def GetProDefHPPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrProDefHPPer)
def SetProDefHPPer(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrProDefHPPer, value)
- #curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ProDefHPPer, value, False)
+ #SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ProDefHPPer, value)
+
#---防护值吸收伤害比率----
def GetProDefAbsorb(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrProDefAbsorb)
def SetProDefAbsorb(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrProDefAbsorb, value)
- #curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ProDefAbsorb, value, False)
+ #SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ProDefAbsorb, value)
#---宠物攻击提升值----
def GetPetMinAtk(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrPetMinAtk)
@@ -6922,7 +6949,7 @@
# def GetPetDamPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AttrPetDamPer)
# def SetPetDamPer(curPlayer, value):
# curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrPetDamPer, value)
-# curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_PetDamPer, value, False)
+# SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_PetDamPer, value)
#===============================================================================
#---宠物技能伤害百分比提升----
def GetPetSkillAtkRate(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PetSkillAtkRate)
@@ -6940,8 +6967,8 @@
def SetDropEquipPer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrDropEquipPer, value)
#---功能层防御值----
-def GetFuncDef(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % (ChConfig.TYPE_Calc_AttrDEF - 1))
-def SetFuncDef(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % (ChConfig.TYPE_Calc_AttrDEF - 1), value)
+def GetFuncDef(curPlayer): return EffGetSet.GetCopyFuncAttrValue(curPlayer, ChConfig.TYPE_Calc_AttrDEF)
+def SetFuncDef(curPlayer, value): EffGetSet.SetCopyFuncAttrValue(curPlayer, ChConfig.TYPE_Calc_AttrDEF, value)
#普通攻击增伤:普通攻击附加的固定值伤害
def GetNormalHurt(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_NormalHurt)
@@ -6960,13 +6987,13 @@
def GetLostYinjiTime(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_LostYinjiTime)
def SetLostYinjiTime(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_LostYinjiTime, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_YinjiTime, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_YinjiTime, value)
# 当前印记数
def GetYinjiCnt(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_YinjiCnt)
def SetYinjiCnt(curPlayer, value):
curPlayer.SetDict(ChConfig.Def_PlayerKey_YinjiCnt, value)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_YinjiCnt, value, False)
+ SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_YinjiCnt, value)
# 减少指定技能组CD XX%
def GetTheFBSkillsCD(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TheFBSkillsCD)
@@ -7138,7 +7165,7 @@
## 设置玩家字典值, 存库
def NomalDictSetProperty(curPlayer, key, value, dType=0):
if CrossPlayerData.IsNeedProcessCrossPlayer(curPlayer) and key not in \
- [ChConfig.Def_PDict_FightPower_Total, ChConfig.Def_PlayerKey_CrossRegisterMap]:
+ [ChConfig.Def_PDict_FightPower_Total, ChConfig.Def_PDict_FightPower_TotalEx, ChConfig.Def_PlayerKey_CrossRegisterMap]:
playerID = curPlayer.GetPlayerID()
changeDict = PyGameData.g_crossPlayerDictChangeInfo.get(playerID, {})
changeDict[(key, dType)] = value
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
index 36e621f..61cd3aa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
@@ -31,6 +31,7 @@
import ItemCommon
import GameWorld
import ChConfig
+import GameObj
## 是否匹配中
def SetIsCrossPKMatching(curPlayer, isMatching):
@@ -221,7 +222,7 @@
GameWorld.DebugLog("副本中,无法进行跨服匹配!", playerID)
return
- if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie or curPlayer.GetHP() == 0:
+ if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie or GameObj.GetHP(curPlayer) == 0:
#GameWorld.DebugLog("已死亡,无法进行跨服匹配!", playerID)
return
@@ -250,9 +251,9 @@
"playerName":CrossRealmPlayer.GetCrossPlayerName(curPlayer),
"playerJob":curPlayer.GetJob(),
"playerLV":curPlayer.GetLV(),
- "maxHP":curPlayer.GetMaxHP(),
+ "maxHP":GameObj.GetMaxHP(curPlayer),
"maxProDef":PlayerControl.GetMaxProDef(curPlayer),
- "fightPower":curPlayer.GetFightPower(),
+ "fightPower":PlayerControl.GetFightPower(curPlayer),
"realmLV":curPlayer.GetOfficialRank(),
"pkScore":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TotalScore), # 当前积分
"danLV":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_DanLV), # 当前段位
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
index e1ceb25..f657a56 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
@@ -42,6 +42,7 @@
import PyGameData
import PetControl
import NPCCommon
+import GameObj
import time
import math
@@ -517,8 +518,8 @@
FBLogic.OnEnterCustomScene(curPlayer, mapID, lineID)
#默认回满血
- if curPlayer.GetHP() < curPlayer.GetMaxHP():
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ if GameObj.GetHP(curPlayer) < GameObj.GetMaxHP(curPlayer):
+ GameObj.SetHPFull(curPlayer)
#通知进入状态
StartCustomSceneResult(curPlayer, mapID, lineID, 1)
@@ -548,8 +549,8 @@
NPCCommon.ClearPriWoodPile(curPlayer)
#默认回满血
- if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and curPlayer.GetHP() < curPlayer.GetMaxHP():
- curPlayer.SetHP(curPlayer.GetMaxHP())
+ if GameObj.GetHP(curPlayer) > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and GameObj.GetHP(curPlayer) < GameObj.GetMaxHP(curPlayer):
+ GameObj.SetHPFull(curPlayer)
GameWorld.Log("玩家退出自定义场景!", curPlayer.GetPlayerID())
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
index 3ca3d38..35cff0b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -448,7 +448,7 @@
elif fdeventID == AdventuresType2:
curData = curPlayer.GetOfficialRank()
elif fdeventID == AdventuresType3:
- curData = curPlayer.GetFightPower()
+ curData = PlayerControl.GetFightPower(curPlayer)
elif fdeventID == AdventuresType4:
curData = curPlayer.GetLuckValue()
else:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
index 0ec9517..3fbf392 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -591,7 +591,7 @@
return
#请求记录申请进入家族信息
- sendMsg = cPickle.dumps([familyID, curPlayer.GetFightPower()], 2)
+ sendMsg = cPickle.dumps([familyID, PlayerControl.GetFightPower(curPlayer)], 2)
curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_AddFamilyAction,
ShareDefine.Def_ActionType_FamilyAdd, '', sendMsg, len(sendMsg))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
index aee55dc..8c8c66b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
@@ -91,7 +91,7 @@
# @param curPlayer
# @return
def Sync_GreatMasterFreeSkillPoint(curPlayer):
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_TalentPoint, GetGreatMasterFreeSkillPoint(curPlayer), False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_TalentPoint, GetGreatMasterFreeSkillPoint(curPlayer))
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py
index f32f5fa..643e9e5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py
@@ -451,8 +451,8 @@
DataRecordPack.DR_UseNewGuyCard(curPlayer, newGuyCardStr, curCardType, itemID, itemCnt)
#===========================================================================
# playerName = curPlayer.GetPlayerName()
- # eventParam = "RoleID=%s,LV=%s,LVEx=%s,CreateRoleTime=%s,CardStr=%s,CardType=%s,ItemID=%s,ItemCount=%s" \
- # % (playerName, curPlayer.GetLV(), curPlayer.GetLVEx(), curPlayer.GetCreateRoleTime(), \
+ # eventParam = "RoleID=%s,LV=%s,CreateRoleTime=%s,CardStr=%s,CardType=%s,ItemID=%s,ItemCount=%s" \
+ # % (playerName, curPlayer.GetLV(), curPlayer.GetCreateRoleTime(), \
# newGuyCardStr, curCardType, itemID, itemCnt)
# EventReport.EventReport(5015, eventParam, curPlayer)
#
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
index fa12d39..004b8d7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -44,6 +44,7 @@
import CalcLineEffect
import PlayerActivity
import PlayerHorse
+import GameObj
import random
import math
@@ -378,7 +379,7 @@
# rolePet.GetGrade(), rolePet.GetQualityLV()))
#当前血量(不通知)
- PetControl.SetPetHP(rolePet, rolePet.GetMaxHP(), False)
+ PetControl.SetPetHP(rolePet, GameObj.GetMaxHP(rolePet), False)
#---通知客户端---
#rolePet.Sync_PetInfo()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
index 73d1289..e2ed99b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
@@ -244,7 +244,7 @@
# return
#
# #没血或者不可见
-# if curObj.GetHP() <= 0 or not curObj.GetVisible():
+# if GameObj.GetHP(curObj) <= 0 or not curObj.GetVisible():
# return
#
# #根据攻速取技能
@@ -323,7 +323,7 @@
#===========================================================================
# #目标已经死亡
- # if curTag.GetHP() <= 0:
+ # if GameObj.GetHP(curTag) <= 0:
# #取消主角点选
# curPlayer.SetActionObj(None)
# #退出战斗对峙
@@ -899,7 +899,7 @@
return
#满血不处理
- if curPlayer.GetHP() == curPlayer.GetMaxHP():
+ if GameObj.GetHP(curPlayer) == GameObj.GetMaxHP(curPlayer):
return
#战斗中返回
@@ -911,9 +911,9 @@
# return False
#---回复玩家血量---
- playerHP = curPlayer.GetHP()
+ playerHP = GameObj.GetHP(curPlayer)
#playerMP = curPlayer.GetMP()
- playerMaxHP = curPlayer.GetMaxHP()
+ playerMaxHP = GameObj.GetMaxHP(curPlayer)
#playerMaxMP = curPlayer.GetMaxMP()
# 目前回复频率暂定5秒回复一次,回复数值是1秒的值,所以此处乘5
@@ -926,7 +926,7 @@
#当前不是满血, 就回血
if playerHP != playerMaxHP:
SkillCommon.SkillAddHP(curPlayer, 0, addHPValue)
- #curPlayer.SetHP(min(playerHP + addHPValue, playerMaxHP))
+ #GameObj.SetHP(curPlayer, min(playerHP + addHPValue, playerMaxHP))
#当前不是满魔, 就回魔
#if playerMP != playerMaxMP:
@@ -1484,14 +1484,14 @@
pkStateTick = curPlayer.GetDictByKey(ChConfig.Def_PDict_PKStateTick)
if pkStateTick and (tick - pkStateTick) >= validTime:
curPlayer.SetDict(ChConfig.Def_PDict_PKStateTick, 0)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_PKState, 0, False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_PKState, 0)
#GameWorld.DebugLog("退出PK状态!", curPlayer.GetPlayerID())
curPlayer.SetDict("StartProDTick", tick) # 开始恢复时间点
bossStateTick = curPlayer.GetDictByKey(ChConfig.Def_PDict_BossStateTick)
if bossStateTick and (tick - bossStateTick) >= validTime:
curPlayer.SetDict(ChConfig.Def_PDict_BossStateTick, 0)
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_BossState, 0, False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_BossState, 0)
#GameWorld.DebugLog("退出Boss状态!", curPlayer.GetPlayerID())
# 脱离PK战斗 X秒后按比例恢复
@@ -1500,10 +1500,10 @@
def Sync_PKBossState(curPlayer):
psState = 1 if curPlayer.GetDictByKey(ChConfig.Def_PDict_PKStateTick) else 0
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_PKState, psState, False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_PKState, psState)
bossState = 1 if curPlayer.GetDictByKey(ChConfig.Def_PDict_BossStateTick) else 0
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_BossState, bossState, False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_BossState, bossState)
return
# 脱离PK战斗 X秒后按比例恢复
@@ -1543,7 +1543,7 @@
def IsInPKState(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PDict_PKStateTick) > 0
def SetPKStateTick(curPlayer, tick):
if not curPlayer.GetDictByKey(ChConfig.Def_PDict_PKStateTick):
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_PKState, 1, False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_PKState, 1)
curPlayer.SetDict(ChConfig.Def_PDict_PKStateTick, tick)
#GameWorld.DebugLog("设置PK状态tick!tick=%s" % tick, curPlayer.GetPlayerID())
return
@@ -1551,7 +1551,7 @@
def IsInBossState(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PDict_BossStateTick) > 0
def SetBossStateTick(curPlayer, tick):
if not curPlayer.GetDictByKey(ChConfig.Def_PDict_BossStateTick):
- curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_BossState, 1, False)
+ PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_BossState, 1)
curPlayer.SetDict(ChConfig.Def_PDict_BossStateTick, tick)
#GameWorld.DebugLog("设置Boss状态tick!tick=%s" % tick, curPlayer.GetPlayerID())
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
index ef24519..89d3dbb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
@@ -292,7 +292,7 @@
def SetTJGTime(curPlayer, tjgTime):
tjgTime = max(tjgTime, 0)
curPlayer.SetHappyPoint(tjgTime)
- curPlayer.SendGameServerRefreshState(IPY_GameWorld.CDBPlayerRefresh_HappyPoint, tjgTime)
+ PlayerControl.SendGameServerRefreshState(curPlayer, IPY_GameWorld.CDBPlayerRefresh_HappyPoint, tjgTime)
return
def AddTJGTime(curPlayer, addTime):
maxTime = IpyGameDataPY.GetFuncCfg('TJG', 3)
@@ -323,12 +323,12 @@
aBleedDamage = PlayerControl.GetBleedDamage(curPlayer) # 流血伤害 万分率
aFinalHurt = PlayerControl.GetFinalHurt(curPlayer) # 最终固定伤害
aFinalHurtPer = PlayerControl.GetFinalHurtPer(curPlayer) # 最终伤害加成万分率
- aFightPower = curPlayer.GetFightPower() # 战力
+ aFightPower = PlayerControl.GetFightPower(curPlayer) # 战力
aReFightPower = lvIpyData.GetReFightPower() # 等级表对应的战力
aNPCHurtAddPer = PlayerControl.GetNPCHurtAddPer(curPlayer) #PVE 伤害加成万分率
npcExp = npcData.GetExp()
- npcMaxHP = npcData.GetHP() + npcData.GetHPEx()*ShareDefine.Def_PerPointValue
+ npcMaxHP = GameObj.GetHP(npcData)
npcCommendFightPower = NPCCommon.GetCommendFightPower(npcData)
petSkillLV = 1
petSkillPer = 10000
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTrade.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTrade.py
index 8a44578..0a3f153 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTrade.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTrade.py
@@ -37,6 +37,7 @@
import ReadChConfig
import ShareDefine
import EventReport
+import GameObj
#---------------------------------------------------------------------
#===============================================================================
# 交易消息提示 curPlayer.TradeMsg
@@ -969,12 +970,12 @@
return False
#任意一方死亡,无法开启交易
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
#ApplyDealingLost07 你已经死亡,交易取消!
PlayerControl.NotifyCode(curPlayer, "ApplyDealingLost07")
return False
- if curTagPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curTagPlayer) <= 0:
#ApplyDealingLost03 目标死亡,无法发出交易邀请!
PlayerControl.NotifyCode(curPlayer, "ApplyDealingLost03")
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py
index 60ffbd4..47792f0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py
@@ -555,7 +555,7 @@
GameWorld.Log("DoPlayerEnterTruck -> 无法找到镖车" , curPlayer.GetPlayerID())
return
-# if curPlayerTruck.GetHP() == 0:
+# if GameObj.GetHP(curPlayerTruck) == 0:
# GameWorld.Log("镖车已死亡, 拒绝")
# return
@@ -1157,7 +1157,7 @@
# @return: 损坏镖车最小血量
def GetTruckDestroyMinHP(curTruck):
destroyMinHPRate = ReadChConfig.GetEvalChConfig("TruckDestroyMinHPRate")
- minHP = max(0, int(curTruck.GetMaxHP() * destroyMinHPRate/float(ChConfig.Def_MaxRateValue)))
+ minHP = max(0, int(GameObj.GetMaxHP(curTruck) * destroyMinHPRate/float(ChConfig.Def_MaxRateValue)))
return minHP
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
index e529d59..53c58e6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
@@ -34,6 +34,7 @@
import PyGameData
import PlayerTJG
import SkillShell
+import GameObj
import time
import json
@@ -169,7 +170,7 @@
curPlayerPropDict["Name"] = curPlayer.GetPlayerName()
curPlayerPropDict["FamilyID"] = curPlayer.GetFamilyID()
curPlayerPropDict["FamilyName"] = curPlayer.GetFamilyName()
- curPlayerPropDict["FightPower"] = curPlayer.GetFightPower()
+ curPlayerPropDict["FightPower"] = PlayerControl.GetFightPower(curPlayer)
curPlayerPropDict["AppID"] = GameWorld.GetPlayerPlatform(curPlayer)
curPlayerPropDict["EquipShowSwitch"] = curPlayer.GetEquipShowSwitch()
curPlayerPropDict["EquipShowID"] = __GetEquipShowIDList(curPlayer)
@@ -180,7 +181,7 @@
curPlayerPropDict["MinAtk"] = curPlayer.GetMinAtk()
curPlayerPropDict["MaxAtk"] = curPlayer.GetMaxAtk()
curPlayerPropDict["Def"] = curPlayer.GetDef()
- curPlayerPropDict["MaxHP"] = curPlayer.GetMaxHP()
+ curPlayerPropDict["MaxHP"] = GameObj.GetMaxHP(curPlayer)
#推送提醒
curPlayerPropDict[ChConfig.Def_PDict_GeTuiSet] = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GeTuiSet)
curPlayerPropDict[ChConfig.Def_PDict_NoGeTuiTime] = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NoGeTuiTime)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py
index c6056ec..e83c24f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py
@@ -43,7 +43,7 @@
'Job':curPlayer.GetJob(), # 职业
'LV':curPlayer.GetLV(), #玩家等级
'OfficialRank':curPlayer.GetOfficialRank(), #境界
- 'FightPower':curPlayer.GetFightPower(), #战斗力
+ 'FightPower':PlayerControl.GetFightPower(curPlayer), #战斗力
'VIPLV':curPlayer.GetVIPLv(), # vip等级
'MapID':curPlayer.GetMapID(), #当前地图id
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_Offline_ViewAttribute.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_Offline_ViewAttribute.py
index 7bd4df3..83f6cb4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_Offline_ViewAttribute.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_Offline_ViewAttribute.py
@@ -15,6 +15,7 @@
#---------------------------------------------------------------------
#导入
import GameWorld
+import GameObj
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -37,7 +38,7 @@
resultDisc = {
'Result' : '1' ,
'DictName' : 'GY_Query_Offline_ViewAttribute' ,
- 'Hp' : '%s'%(curFindPlayer.GetHP()) ,
+ 'Hp' : '%s'%(GameObj.GetHP(curFindPlayer)) ,
'Mp' : '%s'%(curFindPlayer.GetMP()) ,
'FreePoint': '%s'%(curFindPlayer.GetFreePoint()),
'BaseSTR' : '%s'%(curFindPlayer.GetBaseSTR()) ,
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
index 3c72c38..a151b96 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
@@ -215,7 +215,8 @@
GameWorld.ErrLog("设置对象属性失败, Index = %s" % (effIndex))
return
- effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord)
+ if effIndex not in ChConfig.TYPE_BIGVALUE_ATTR:
+ effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord)
return ObjProperty_AttrByIndex[effIndex - 1][1](curObj, effectValue)
@@ -237,22 +238,32 @@
def CopyPlayerFuncAttr(curPlayer):
for i in xrange(len(ObjProperty_AttrByIndex)):
# Get
- if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
+ effIndex = i + 1
+ if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
continue
value = ObjProperty_AttrByIndex[i][0](curPlayer)
- if value == 0 and curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i) == 0:
+ if value == 0 and GetCopyFuncAttrValue(curPlayer, effIndex) == 0:
continue
- curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr%i, ObjProperty_AttrByIndex[i][0](curPlayer))
+ SetCopyFuncAttrValue(curPlayer, effIndex, value)
return
# 恢复缓存功能属性的刷新结果,用于BUFF属性单独刷新
def RestorePlayerFuncAttr(curPlayer):
for i in xrange(len(ObjProperty_AttrByIndex)):
- if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
+ effIndex = i + 1
+ if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
continue
- ObjProperty_AttrByIndex[i][1](curPlayer,
- curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i))
+ ObjProperty_AttrByIndex[i][1](curPlayer, GetCopyFuncAttrValue(curPlayer, effIndex))
return
-
-
+
+def GetCopyFuncAttrValue(curPlayer, effIndex):
+ value = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex)
+ valueEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex)
+ return valueEx * ShareDefine.Def_PerPointValue + value
+
+def SetCopyFuncAttrValue(curPlayer, effIndex, value):
+ curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex, value % ShareDefine.Def_PerPointValue)
+ curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex, value / ShareDefine.Def_PerPointValue)
+ return
+
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_802.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_802.py
index eb44167..fe15933 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_802.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_802.py
@@ -10,13 +10,15 @@
# @version 1.0
#
#---------------------------------------------------------------------
-"""Version = 2017-10-31 14:10"""
+#"""Version = 2017-10-31 14:10"""
+#---------------------------------------------------------------------
+import GameObj
import SkillCommon
def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
- if curObj.GetHP() <= 0:
+ if GameObj.GetHP(curObj) <= 0:
return
value = curBuff.GetValue()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_809.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_809.py
index d5470fe..b38a378 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_809.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_809.py
@@ -14,9 +14,10 @@
#---------------------------------------------------------------------
import SkillCommon
+import GameObj
def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
- if curObj.GetHP() <= 0:
+ if GameObj.GetHP(curObj) <= 0:
return
value = curBuff.GetValue()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 3bdb2ae..b3ae73d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -901,7 +901,7 @@
if not angryValue_ID:
continue
- summonNPCAngry.AddAngry(angryValue_ID, angryValue.GetObjType(), angryValue.GetAngryValue())
+ summonNPCAngry.AddAngry(angryValue_ID, angryValue.GetObjType(), angryValue.GetAngryValue(), angryValue.GetAngryValueEx())
summonNPC.NotifyAppear() # 最终统一通知NPC出现
#返回值,技能释放成功
@@ -939,7 +939,7 @@
#
# for i in range(0, curNPC.GetSummonCount()):
# summonNPC = curNPC.GetSummonNPCAt(i)
-# if summonNPC.GetHP() > 0:
+# if GameObj.GetHP(summonNPC) > 0:
# continue
#
# summonIsFull = False
@@ -1037,7 +1037,7 @@
#summonNPC.SetBaseAtkInterval(int(curPlayer.GetAtkInterval() * skillPer))
summonNPC.SetBaseMissRate(int(curPlayer.GetMiss() * skillPer))
summonNPC.SetBaseSuperHiteRate(int(curPlayer.GetSuperHitRate() * skillPer))
- summonNPC.SetBaseMaxHP(int(curPlayer.GetMaxHP() * skillPer))
+ GameObj.SetBaseMaxHP(summonNPC, int(GameObj.GetMaxHP(curPlayer) * skillPer))
#summonNPC.SetBaseHPRestore(int(curPlayer.GetHPRestoreSetting() * skillPer))
#summonNPC.SetOrgSpeed(int(curPlayer.GetOrgSpeed() * skillPer))
return
@@ -1068,7 +1068,7 @@
summonNPC.SetBaseAtkInterval(summonNPC.GetAtkInterval())
summonNPC.SetBaseMissRate(summonNPC.GetMiss())
summonNPC.SetBaseSuperHiteRate(summonNPC.GetSuperHitRate())
- summonNPC.SetBaseMaxHP(summonNPC.GetMaxHP())
+ GameObj.SetBaseMaxHP(summonNPC, GameObj.GetMaxHP(summonNPC))
summonNPC.SetBaseHPRestore(summonNPC.GetHPRestore())
#summonNPC.SetOrgSpeed( summonNPC.GetOrgSpeed( ))
return
@@ -1280,7 +1280,7 @@
GameObj.SetHP(curObj, remainHP)
if not isNotify:
#已广播的不重复
- curObj.Notify_HPEx()
+ curObj.Notify_HP()
#广播加血类型
if isNotify:
@@ -1347,7 +1347,7 @@
GameObj.SetHP(curObj, remainHP)
if not view : # 已广播的不重复
- curObj.Notify_HPEx()
+ curObj.Notify_HP()
#其他对象逻辑处理
else:
@@ -1443,9 +1443,9 @@
#宠物特殊处理
if curObj.GetGameNPCObjType() == IPY_GameWorld.gnotPet:
pass
- #curObj.Sync_RefreshProp(IPY_GameWorld.PetInfoRefresh_HP, curObj.GetHP(), True)
+ #curObj.Sync_RefreshProp(IPY_GameWorld.PetInfoRefresh_HP, GameObj.GetHP(curObj), True)
else:
- curObj.Notify_HPEx()
+ curObj.Notify_HP()
## 获得技能buff的拥有者
@@ -2216,7 +2216,7 @@
elif cureType == ChConfig.Def_Cure_PHY:
cureBaseValue = GameObj.GetMaxHP(userObj)
elif cureType == ChConfig.Def_Cure_HurtValue:
- cureBaseValue = userObj.GetDictByKey(ChConfig.Def_PlayerKey_LastHurtValue)
+ cureBaseValue = GameObj.GetLastHurtValue(userObj)
elif cureType == ChConfig.Def_Cure_TagMaxHP:
cureBaseValue = 0 if not tagObj else GameObj.GetMaxHP(tagObj)
@@ -2235,6 +2235,7 @@
skillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(userObj, None, curSkill, ChConfig.TriggerType_AddHP)/float(ChConfig.Def_MaxRateValue)
#公式计算治疗值
cureHP = int((cureBaseValue * skillPer + skillValue + addExValue) * curePercent)
+ cureHP = min(cureHP, ChConfig.Def_UpperLimit_DWord)
#GameWorld.DebugLog("获取治疗值(%s):cureType=%s,cureBaseValue=%s,skillPer=%s,skillValue=%s"
# % (cureHP, cureType, cureBaseValue, skillPer, skillValue))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_13.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_13.py
index f0296ee..84cad7a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_13.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_13.py
@@ -18,10 +18,10 @@
"""Version = 2011-02-25 13:30"""
#------------------------------------------------------------------------------
#导入
-import GameWorld
import BaseAttack
import NPCCommon
import IPY_GameWorld
+import GameObj
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -49,7 +49,7 @@
if angryMaxTag == None:
return
- angryMaxTag.SetAngryValue(1)
+ GameObj.SetAngryValue(angryMaxTag, 1)
#处理技能触发和攻击成功逻辑
return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_33.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_33.py
index e6490ce..58ec53a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_33.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_33.py
@@ -21,6 +21,7 @@
import ChConfig
#import GameWorld
import BaseAttack
+import GameObj
##链式攻击
# @param attacker 攻击者实例
@@ -33,13 +34,14 @@
# @return 返回值为真, 释放成功
# @remarks 链式攻击
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
- lastHurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_LastHurtValue) # 最后一击伤害值
+ lastHurtValue = GameObj.GetLastHurtValue(attacker) # 最后一击伤害值
#技能增强值
skillPer = curSkill.GetEffect(0).GetEffectValue(0)
#技能附加值
addValue = curSkill.GetEffect(0).GetEffectValue(1)
lostHP = int((lastHurtValue * skillPer / float(ChConfig.Def_MaxRateValue)) + addValue)
+ lostHP = min(lostHP, ChConfig.Def_UpperLimit_DWord)
if defender and tagRoundPosX == -1 and tagRoundPosY == -1:
#起点是攻击方,还是受害方,还是点地
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_4.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_4.py
index 79082d4..6795d66 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_4.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_4.py
@@ -20,6 +20,8 @@
import BaseAttack
import ChConfig
import IPY_GameWorld
+import ShareDefine
+import GameObj
##降低仇恨
# @param attacker 攻击者实例
@@ -58,7 +60,8 @@
#施法者,清空仇恨值
if attackerID == angryID and attackerType == angryType:
- angryTag.SetAngryValue(int(angryTag.GetAngryValue()*skillPer))
+ updAngryValue = int(GameObj.GetAngryValue(angryTag) * skillPer)
+ GameObj.SetAngryValue(angryTag, updAngryValue)
break
#处理技能触发和攻击成功逻辑
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
index f0e8fc5..bd61a4c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
@@ -16,6 +16,7 @@
import SkillCommon
import BuffSkill
import IPY_GameWorld
+import GameObj
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
if attacker.GetPlayerAction() == IPY_GameWorld.paDie:
@@ -29,7 +30,7 @@
if (passiveEffect.GetEffectValue(2) & pow(2, zhanshaState-1)) != 0:
return False
- attacker.SetHP(1)
+ GameObj.SetHP(attacker, 1)
# False 可用于多次触发不死的作用
return True if passiveEffect.GetEffectValue(1) else False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_803.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_803.py
index 6560fb0..486e6de 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_803.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_803.py
@@ -11,9 +11,9 @@
#
#---------------------------------------------------------------------
-import ChConfig
import GameWorld
import SkillCommon
+import GameObj
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
@@ -36,12 +36,12 @@
if buffValue == 0:
return False
- hurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurt)
+ hurtValue = GameObj.GetBloodShiledHurt(attacker)
if hurtValue == 0:
return False
buff.SetValue(max(buffValue - hurtValue, 0))
- attacker.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurt, max(hurtValue - buffValue, 0))
+ GameObj.SetBloodShiledHurt(attacker, max(hurtValue - buffValue, 0))
if buff.GetValue() == 0:
buff.SetRemainTime(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_806.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_806.py
index fe36b08..e5467da 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_806.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_806.py
@@ -11,9 +11,9 @@
#
#---------------------------------------------------------------------
-import ChConfig
import GameWorld
import SkillCommon
+import GameObj
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
@@ -36,12 +36,12 @@
if buffValue == 0:
return False
- hurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurt)
+ hurtValue = GameObj.GetBloodShiledHurt(attacker)
if hurtValue == 0:
return False
buff.SetValue(max(buffValue - hurtValue, 0))
- attacker.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurt, max(hurtValue - buffValue, 0))
+ GameObj.SetBloodShiledHurt(attacker, max(hurtValue - buffValue, 0))
if buff.GetValue() == 0:
buff.SetRemainTime(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_807.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_807.py
index 3db250f..f7fbd0f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_807.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_807.py
@@ -11,9 +11,9 @@
#
#---------------------------------------------------------------------
-import ChConfig
import GameWorld
import SkillCommon
+import GameObj
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
@@ -34,13 +34,13 @@
buffValue = buff.GetValue()
if buffValue == 0:
return False
-
- hurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurt)
+
+ hurtValue = GameObj.GetBloodShiledHurt(attacker)
if hurtValue == 0:
return False
buff.SetValue(max(buffValue - hurtValue, 0))
- attacker.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurt, max(hurtValue - buffValue, 0))
+ GameObj.SetBloodShiledHurt(attacker, max(hurtValue - buffValue, 0))
if buff.GetValue() == 0:
buff.SetRemainTime(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_808.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_808.py
index c05b271..924b3bc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_808.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_808.py
@@ -11,9 +11,9 @@
#
#---------------------------------------------------------------------
-import ChConfig
import GameWorld
import SkillCommon
+import GameObj
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
@@ -34,13 +34,13 @@
buffValue = buff.GetValue()
if buffValue == 0:
return False
-
- hurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_BloodShiledHurt)
+
+ hurtValue = GameObj.GetBloodShiledHurt(attacker)
if hurtValue == 0:
return False
buff.SetValue(max(buffValue - hurtValue, 0))
- attacker.SetDict(ChConfig.Def_PlayerKey_BloodShiledHurt, max(hurtValue - buffValue, 0))
+ GameObj.SetBloodShiledHurt(attacker, max(hurtValue - buffValue, 0))
if buff.GetValue() == 0:
buff.SetRemainTime(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4046.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4046.py
index 1eab9d3..41c92ab 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4046.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4046.py
@@ -12,12 +12,14 @@
#---------------------------------------------------------------------
import ChConfig
-import GameWorld
import GameObj
+import ShareDefine
def CheckCanHappen(attacker, defender, effect, curSkill):
hurtValue = attacker.GetDictByKey(ChConfig.Def_PlayerKey_curHurtValue)
+ hurtValueEx = attacker.GetDictByKey(ChConfig.Def_PlayerKey_curHurtValueEx)
+ hurtValue = hurtValueEx * ShareDefine.Def_PerPointValue + hurtValue
if hurtValue < GameObj.GetMaxHP(attacker)*effect.GetEffectValue(0)*1.0/ChConfig.Def_MaxRateValue:
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 549a3e4..dfab201 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -140,8 +140,9 @@
# mapType = GameWorld.GetMap().GetMapFBType()
# 野外小怪或者其他指定的怪为了更及时的打击感,由客户端计算
for hurobj in hurtList:
- if hurobj.HurtHP == 0:
- g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurobj.HurtHP, hurobj.AttackType]
+ hurtHP = hurobj.HurtHP + hurobj.HurtHPEx * ShareDefine.Def_PerPointValue
+ if hurtHP == 0:
+ g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurtHP, hurobj.AttackType]
continue
if hurobj.ObjType != IPY_GameWorld.gotNPC:
# 非NPC
@@ -163,7 +164,7 @@
# 重复对象
return False
- g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurobj.HurtHP, hurobj.AttackType]
+ g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurtHP, hurobj.AttackType]
g_UseSkillPlayerID = curPlayer.GetID()
return True
@@ -206,7 +207,7 @@
PlayerControl.NotifyCode(curPlayer , "Play_Attack_Null")
return
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
#玩家已经死亡
PlayerControl.NotifyCode(curPlayer, "PK_chenxin_612029")
return False
@@ -290,7 +291,7 @@
# #7:检查玩家的HP是否足够
# curSkillNeedHP = curSkill.GetHP()
#
-# if curSkillNeedHP > 0 and curPlayer.GetHP() < curSkillNeedHP:
+# if curSkillNeedHP > 0 and GameObj.GetHP(curPlayer) < curSkillNeedHP:
# curPlayer.Notify_AttackFail(0, 0, 0, 0, IPY_GameWorld.afrHP)
# PlayerControl.NotifyCode(curPlayer, "PK_jin_0")
# GameWorld.DebugLog("检查玩家的HP是否足够")
@@ -787,7 +788,7 @@
# NPC仇恨吸引,由客户端决定,适用于小怪
# '''
# curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- # if curPlayer.GetHP() <= 0:
+ # if GameObj.GetHP(curPlayer) <= 0:
# return
#
# if not curPlayer.GetVisible():
@@ -806,7 +807,7 @@
# npcAngry = npcObj.GetNPCAngry()
# angryValue = npcAngry.FindNPCAngry(playerID, IPY_GameWorld.gotPlayer)
#
- # if angryValue != None and angryValue.GetAngryValue() != 0 :
+ # if angryValue != None and GameObj.GetAngryValue(angryValue) != 0 :
# #该对象已经在仇恨列表中,不重复添加
# continue
#
@@ -970,6 +971,7 @@
# DWORD ObjID;
# BYTE AttackType; //爆击, miss
# DWORD HurtHP;
+# DWORD HurtHPEx;
# };
#
# struct tagCMSuperAtk
@@ -1380,7 +1382,7 @@
# @return 返回值真, 检查通过
# @remarks 检查客户端发送技能封包, 这里只简单检查一下
def __CheckPlayerUseSkill_ClientPack(curPlayer, posX, posY, curSkill):
- if curPlayer.GetHP() <= 0:
+ if GameObj.GetHP(curPlayer) <= 0:
return
if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
@@ -3841,7 +3843,7 @@
return False
target = petOwner
- if target.GetHP() <= 0:
+ if GameObj.GetHP(target) <= 0:
return False
if affectTag not in [ChConfig.Def_UseSkillTag_None, ChConfig.Def_UseSkillTag_Self]:
--
Gitblit v1.8.0