xdh
2019-05-08 12839a8310f6f42980c84ddd1d2e808022a5e6f1
6687 【2.0】【后端】五行灵根界面功能优化
6个文件已修改
138 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KirinHome.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -14234,6 +14234,54 @@
#------------------------------------------------------
# B2 07 重置加点 #tagCMResetAttrPoint
class  tagCMResetAttrPoint(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x07
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xB2
        self.SubCmd = 0x07
        return
    def GetLength(self):
        return sizeof(tagCMResetAttrPoint)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 07 重置加点 //tagCMResetAttrPoint:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMResetAttrPoint=tagCMResetAttrPoint()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMResetAttrPoint.Cmd,m_NAtagCMResetAttrPoint.SubCmd))] = m_NAtagCMResetAttrPoint
#------------------------------------------------------
#B2 01 脱机挂状态 # tagCMLoginState
class  tagCMLoginState(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -367,7 +367,7 @@
Writer = hxp
Releaser = hxp
RegType = 0
RegisterPackCount = 22
RegisterPackCount = 23
PacketCMD_1 = 0xA5
PacketSubCMD_1 = 0x04
@@ -457,6 +457,10 @@
PacketSubCMD_22=0x33
PacketCallFunc_22=OnClientExitCustomScene
PacketCMD_23=0xB2
PacketSubCMD_23=0x07
PacketCallFunc_23=OnResetAttrPoint
;购买相关的
[BuySomething]
ScriptName = Event\EventSrc\Operate_PlayerBuyZhenQi.py
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -14234,6 +14234,54 @@
#------------------------------------------------------
# B2 07 重置加点 #tagCMResetAttrPoint
class  tagCMResetAttrPoint(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x07
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xB2
        self.SubCmd = 0x07
        return
    def GetLength(self):
        return sizeof(tagCMResetAttrPoint)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 07 重置加点 //tagCMResetAttrPoint:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMResetAttrPoint=tagCMResetAttrPoint()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMResetAttrPoint.Cmd,m_NAtagCMResetAttrPoint.SubCmd))] = m_NAtagCMResetAttrPoint
#------------------------------------------------------
#B2 01 脱机挂状态 # tagCMLoginState
class  tagCMLoginState(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KirinHome.py
@@ -143,7 +143,7 @@
#  @param tick
#  @return None
def DoEnterFB(curPlayer, tick):
    PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default * 2)
    PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default * 3)
    gameFB = GameWorld.GetGameFB()
    hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
    lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py
@@ -80,7 +80,7 @@
    freePoint = curPlayer.GetFreePoint()
    curPlayer.SetFreePoint(freePoint + resetPointTotal)
    ChPlayer.NotifyPlayerBasePoint(curPlayer, resetIDList)
    DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_ResetPoint, {'resetAttrID':resetID, 'resetPoint':resetPoint})
    DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_ResetPoint, {'resetIDList':resetIDList, 'resetPointTotal':resetPointTotal})
    
    #刷新人物所有状态
    playerControl = PlayerControl.PlayerControl(curPlayer)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -105,6 +105,7 @@
import PlayerNewFairyCeremony
import PlayerFeastRedPacket
import PlayerLuckyTreasure
import Item_ResetAttrPoint
import CrossRealmPlayer
import ChNetSendPack
import FamilyRobBoss
@@ -1775,6 +1776,37 @@
    playerControl.RefreshPlayerAttrState()
    return
#// B2 07 重置加点 #tagCMResetAttrPoint
#struct    tagCMResetAttrPoint
#{
#    tagHead         Head;
#};
def OnResetAttrPoint(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    canResetIDList = [ipyDataMgr.GetRolePointByIndex(index).GetAttrID() for index in xrange(ipyDataMgr.GetRolePointCount())]
    canReset = False
    for attrID in canResetIDList:
        curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AddPointValue % attrID)
        if curPoint:
            canReset = True
            break
    if not canReset:
        GameWorld.DebugLog('重置加点 没有点数需要重置')
        return
    isFree = curPlayer.GetLV() < IpyGameDataPY.GetFuncCfg('LVUPAddPoint', 4)
    if not isFree:
        needItemID = IpyGameDataPY.GetFuncCfg('LVUPAddPoint', 5)
        itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
        hasEnough, itemList = ItemCommon.GetItem_FromPack_ByID(needItemID, itemPack, 1)
        if not hasEnough:
            GameWorld.DebugLog("重置加点 item(%s) isn't enough" % (needItemID))
            return
        ItemCommon.ReduceItem(curPlayer, itemPack, itemList, 1, False, ChConfig.ItemDel_ResetAttrPoint)
    Item_ResetAttrPoint.DoResetAttrPoint(curPlayer, 0, 0, 0)
    return
def NotifyPlayerBasePoint(curPlayer, syncAttrIDList=[]):
    # 通知基础属性点,已分配的自由点数