From b9bef849ab19b8a3d6e889e82c687eec736cbd2a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 10 十月 2025 20:42:29 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(徽章旗帜、旗号;捐献;公会加经验、加贡献度;搜索支持公会编号;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_GiveMoney.py | 11
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py | 423 +++++--------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 28
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 254 +-------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 512 +++-------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py | 14
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Family.py | 63 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyEmblem.py | 29
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py | 66 +
/dev/null | 53 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 18
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py | 22
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 89 +--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 4
PySysDB/PySysDBPY.h | 32
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBPlayerViewCache.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py | 42 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 23
23 files changed, 582 insertions(+), 1,135 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index fba3ce2..7412315 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1144,17 +1144,6 @@
dict ExpMaterial; //翅膀代数对应精炼值
};
-//仙盟科技表
-
-struct tagFamilyTech
-{
- DWORD _TechID; //科技ID*1000+等级
- BYTE AttrType; //属性类型
- DWORD AttrValue; //属性值
- DWORD Contribution; //需要贡献度
- DWORD PowerEx; //额外战力
-};
-
//NPC掉落表
struct tagNPCDropItem
@@ -1576,17 +1565,6 @@
DWORD _NPCID; //ID
WORD PerPlayerMoneyAward; // 首杀全服玩家奖励灵石额度/人
list PersonFirstKillAward; // 个人首次击杀奖励 [[物品ID,个数,是否拍品], ...]
-};
-
-//仙盟活跃表
-
-struct tagFamilyActivity
-{
- DWORD _ID; //ID
- WORD UnLockFuncID; //解锁功能ID
- BYTE TotalActivityTime; //总次数
- WORD SingleTimes; //增加活跃需要次数
- WORD SingleActiveValue; //每轮增加活跃积分
};
//仙盟红包表
@@ -3038,6 +3016,16 @@
DWORD CustomFamilyID; //定制仙盟ID
};
+//仙盟捐献表
+struct FamilyDonate
+{
+ BYTE _DonateType; //捐献类型
+ BYTE DailyCnt; //每日次数
+ BYTE MoneyType; //消耗货币类型
+ DWORD MoneyValue; //消耗货币值
+ list AwardItemList; //获得奖励列表[[物品ID,个数], ...]
+};
+
//仙盟珍宝阁砍价表
struct FamilyZhenbaogeCut
{
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 783943d..a307f41 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -230,9 +230,9 @@
PacketSubCMD_6=0x12
PacketCallFunc_6=OnFamilyMoneyDonate
-PacketCMD_7=0xA6
-PacketSubCMD_7=0x13
-PacketCallFunc_7=OnFamilyAffairOP
+PacketCMD_7=
+PacketSubCMD_7=
+PacketCallFunc_7=
PacketCMD_8=0xA6
PacketSubCMD_8=0x20
@@ -297,18 +297,6 @@
PacketCMD_2=0xA6
PacketSubCMD_2=0x10
PacketCallFunc_2=OnFamilyStoreExchange
-
-;家族科技
-[PlayerFamilyTech]
-ScriptName = Player\PlayerFamilyTech.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 1
-
-PacketCMD_1=0xA6
-PacketSubCMD_1=0x07
-PacketCallFunc_1=OnPlayerFamilyTechLVUP
;家族阵法
[PlayerFamilyZhenfa]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 8f04968..dccc516 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -454,7 +454,6 @@
Def_ItemID_GoldMoney = 20 # 直接给仙玉
Def_ItemID_SilverMoney = 22 # 直接给铜钱
Def_ItemID_FamilyContribution = 26 # 直接给战盟贡献点
-Def_ItemID_FamilyActive = 28 # 直接给战盟活跃点
Def_ItemID_SP = 29 # 直接给sp
Def_ItemID_GoldPaper = 30 # 直接给绑玉/灵石
Def_ItemID_RealmPoint = 24 # 直接给修行点
@@ -472,7 +471,7 @@
Def_ItemID_FamilyFlagWarPoint = 540 # 直接给万界积分
Def_ItemID_TongTianPoint = 720 # 直接给通天令经验点
Def_ItemID_SuccessScore = 590 # 直接给成就积分
-Def_TransformItemIDList = [Def_ItemID_FamilyContribution, Def_ItemID_FamilyActive, Def_ItemID_SP, Def_ItemID_GoldPaper,
+Def_TransformItemIDList = [Def_ItemID_FamilyContribution, Def_ItemID_SP, Def_ItemID_GoldPaper,
Def_ItemID_RealmPoint, Def_ItemID_SilverMoney, Def_ItemID_BossReborn, Def_ItemID_Ysog,
Def_ItemID_SoulDust, Def_ItemID_SoulSplinters, Def_ItemID_SoulCore, Def_ItemID_Honor, Def_ItemID_GoldMoney,
Def_ItemID_FuncSysPrivilege, Def_ItemID_FCPartyPoint, Def_ItemID_BTGMPoint, Def_ItemID_GuShenMoney,
@@ -631,7 +630,6 @@
Def_Effect_GivePlayerMoneyGold = 203 #给人物金钱 仙玉道具效果ID
Def_Effect_AddDienstgrad = 204 #使用物品获得称号
Def_Effect_UseItemGiveZhenQi = 205 #使用道具给予真气
-Def_Effect_ItemGiveFamilyActivity = 208 #使用道具给予仙盟活跃令
Def_Effect_ItemGiveFamilyContribution = 209 #使用道具给予仙盟贡献
Def_Effect_ItemAddExp = 213 #给经验道具
Def_Effect_ItemAddLV = 214 #直接升级道具
@@ -3257,7 +3255,6 @@
Def_PlayerKey_CrossRegisterMap = "CrossRegisterMap" #跨服注册活动地图, dataMapID
-Def_Player_Dict_FamilyTechLV = "FamilyTechLV_%s" #家族科技等级, 参数(科技ID)
Def_Player_Dict_RouteServerInitOK = "RouteServerInitOK_33" #RouteServer初始化成功(仅登陆一次)
Def_Player_Dict_Wallow_LV = "GameWallowLV_34" #防沉迷等级
Def_Player_Dict_Wallow_OfflineTime = "GameWallowOfflineTime_35" #防沉迷离线累积时间
@@ -3320,16 +3317,9 @@
Def_Player_Dict_UpdatePlayerName = "UpdatePlayerName_199" # 改名锁
Def_Player_Dict_UpdateFamilyNameItemIndex = "UpdateFamilyNameItemIndex" # 改名物品在背包的位置
Def_Player_Dict_UpdateFamilyName = "UpdateFamilyName" # 改名锁
-Def_Player_Dict_FamilyDayAward = "FamilyDayAward" # 仙盟每日奖励领奖记录
-Def_Player_Dict_FamilyDonateRecord = "FamilyDonateRecord" # 仙盟今日捐献记录,按位存储每种类型今日已捐献次数
-Def_Player_Dict_FamilyEmblemID = "FamilyEmblemID" # 仙盟徽章ID
Def_Player_Dict_FamilyZhenbaogeCut = "FamilyZhenbaogeCut" #珍宝阁今日是否已砍过价
Def_Player_Dict_FamilyZhenbaogeBuy = "FamilyZhenbaogeBuy" #珍宝阁今日是否已购买过
-
-# 仙盟事务
-Def_Player_Dict_FamilyAffairRefreshFree = "FamilyAffairRefreshFree" # 今日已免费刷新事务次数
-Def_Player_Dict_FamilyAffairInfo = "FamilyAffairStar_%s" # 事务信息,星级*10+状态(0-无;1-进行中;2-已完成);参数(事务编号ID)
-Def_Player_Dict_FamilyAffairStartTime = "FamilyAffairStartTime_%s" # 事务开始时间戳,参数(事务编号ID)
+Def_Player_Dict_FamilyDonateCnt = "FamilyDonateCnt_%s" # 仙盟今日捐献次数,参数(捐献类型)
Def_Player_Dict_DelPackIndex = "DelPackIndex215" # 装备回购不重排,只记录最旧的一个物品
@@ -3380,10 +3370,6 @@
Def_PDict_FirstChargeRecord = "FirstChargeRecord_%s" # 首充领取记录,按位记录首充第x天是否已领取,参数(首充ID)
Def_PDict_FirstChargeTime = "FirstChargeTime_%s" # 首充充值时间戳,参数(首充ID)
Def_PDict_IsReBorn = "Def_PDict_IsReBorn" # 是否回城复活
-Def_PDict_FamilyWarDailyReward = "FamilyWarDailyReward" # 王者仙盟每日俸禄领取状态
-Def_PDict_Family_Contribution = "FamilyContribution" #战盟贡献度
-Def_PDict_HasChange_FamilyActiveToContribution = "HasChangeContribution" #战盟活跃度已转化过贡献度
-Def_PDict_KillPlayerAddActive = "KillPlayerAddActiveByDay" # 杀人每日获得活跃度
Def_PDict_LoginDayCnt = "PLoginDayCnt" # 累计登陆天数
Def_PDict_LoginDayAward = "PLoginDayAward" # 累计登陆领取情况
Def_PDict_CollNpcIDCollTime = "NPCIDCollTime_%s" # 采集NPCID对应每日对应采集次数,%sNPCID
@@ -3833,9 +3819,6 @@
Def_PDict_DailyActionDayBuyTimes = "DADayBuyTimes_%s" # 每日活动今日购买次数 参数每日活动ID
Def_PDict_DailyActionDayItemTimes = "DADayItemTimes_%s" # 每日活动今日物品增加次数 参数每日活动ID
Def_PDict_DailyActionWeekTimes = "DailyActionWeekTimes_%s" # 每日活动本周完成次数 参数每日活动ID
-#仙盟活跃
-Def_PDict_FamilyActivityFinishCnt = "FamilyActivityFinishCnt%s" # 已完成次数
-Def_PDict_FamilyActivityAwardRecord = "FamilyActivityAwardRecord" # 活跃度奖励领取记录,按二进制位标识
# 投资理财
Def_PDict_InvestTime = "InvestTime_%s" # 投资时的时间,参数为投资类型
@@ -4984,7 +4967,7 @@
# 游戏功能奖励定义
(
Def_RewardType_Activity, # 活跃度奖励 0
-Def_RewardType_FamilyActivity, # 仙盟活跃度奖励 1
+Def_RewardType_1, # 1
Def_RewardType_ChampionFamilyDailyReward, # 仙盟联赛冠军仙盟每日俸禄奖励 2
Def_RewardType_XMZZWinCnt, # 仙魔之争胜利场数奖励 3
Def_RewardType_FamilyDayAward, # 仙盟每日福利奖励 4
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 80e970a..4371b83 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -8453,52 +8453,64 @@
# A6 24 修改家族徽章 #tagCMChangeFamilyEmblem
class tagCMChangeFamilyEmblem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("EmblemID", c_ubyte), # 更换的徽章ID
- ]
+ Head = tagHead()
+ EmblemID = 0 #(BYTE EmblemID)// 更换的徽章ID
+ EmblemWord = "" #(char EmblemWord[3])// 徽章文字
+ data = None
def __init__(self):
self.Clear()
- self.Cmd = 0xA6
- self.SubCmd = 0x24
+ self.Head.Cmd = 0xA6
+ self.Head.SubCmd = 0x24
return
- def ReadData(self, stringData, _pos=0, _len=0):
+ def ReadData(self, _lpData, _pos=0, _Len=0):
self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.EmblemID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.EmblemWord,_pos = CommFunc.ReadString(_lpData, _pos,3)
+ return _pos
def Clear(self):
- self.Cmd = 0xA6
- self.SubCmd = 0x24
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA6
+ self.Head.SubCmd = 0x24
self.EmblemID = 0
+ self.EmblemWord = ""
return
def GetLength(self):
- return sizeof(tagCMChangeFamilyEmblem)
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 3
+
+ return length
def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.EmblemID)
+ data = CommFunc.WriteString(data, 3, self.EmblemWord)
+ return data
def OutputString(self):
- DumpString = '''// A6 24 修改家族徽章 //tagCMChangeFamilyEmblem:
- Cmd:%s,
- SubCmd:%s,
- EmblemID:%d
+ DumpString = '''
+ Head:%s,
+ EmblemID:%d,
+ EmblemWord:%s
'''\
%(
- self.Cmd,
- self.SubCmd,
- self.EmblemID
+ self.Head.OutputString(),
+ self.EmblemID,
+ self.EmblemWord
)
return DumpString
m_NAtagCMChangeFamilyEmblem=tagCMChangeFamilyEmblem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFamilyEmblem.Cmd,m_NAtagCMChangeFamilyEmblem.SubCmd))] = m_NAtagCMChangeFamilyEmblem
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFamilyEmblem.Head.Cmd,m_NAtagCMChangeFamilyEmblem.Head.SubCmd))] = m_NAtagCMChangeFamilyEmblem
#------------------------------------------------------
@@ -8751,6 +8763,7 @@
Head = tagHead()
Name = "" #(char Name[33])
EmblemID = 0 #(WORD EmblemID)//选择徽章ID,解锁仙盟等级为1级的均为可选ID
+ EmblemWord = "" #(char EmblemWord[3])//徽章文字
data = None
def __init__(self):
@@ -8764,6 +8777,7 @@
_pos = self.Head.ReadData(_lpData, _pos)
self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33)
self.EmblemID,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.EmblemWord,_pos = CommFunc.ReadString(_lpData, _pos,3)
return _pos
def Clear(self):
@@ -8773,6 +8787,7 @@
self.Head.SubCmd = 0x04
self.Name = ""
self.EmblemID = 0
+ self.EmblemWord = ""
return
def GetLength(self):
@@ -8780,6 +8795,7 @@
length += self.Head.GetLength()
length += 33
length += 2
+ length += 3
return length
@@ -8788,18 +8804,21 @@
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
data = CommFunc.WriteString(data, 33, self.Name)
data = CommFunc.WriteWORD(data, self.EmblemID)
+ data = CommFunc.WriteString(data, 3, self.EmblemWord)
return data
def OutputString(self):
DumpString = '''
Head:%s,
Name:%s,
- EmblemID:%d
+ EmblemID:%d,
+ EmblemWord:%s
'''\
%(
self.Head.OutputString(),
self.Name,
- self.EmblemID
+ self.EmblemID,
+ self.EmblemWord
)
return DumpString
@@ -8858,139 +8877,6 @@
m_NAtagCMDeleteFamilyMember=tagCMDeleteFamilyMember()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDeleteFamilyMember.Cmd,m_NAtagCMDeleteFamilyMember.SubCmd))] = m_NAtagCMDeleteFamilyMember
-
-
-#------------------------------------------------------
-# A6 06 家族兑换活跃令 #tagCMFamilyActivityExchange
-
-class tagCMFamilyActivityExchange(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)//材料所在背包索引的数量
- IndexList = list() #(vector<WORD> IndexList)//材料所在背包索引列表
- ItemIDList = list() #(vector<DWORD> ItemIDList)//材料所在背包物品ID列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA6
- self.Head.SubCmd = 0x06
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- value,_pos=CommFunc.ReadWORD(_lpData,_pos)
- self.IndexList.append(value)
- for i in range(self.Count):
- value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
- self.ItemIDList.append(value)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA6
- self.Head.SubCmd = 0x06
- self.Count = 0
- self.IndexList = list()
- self.ItemIDList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 2 * self.Count
- length += 4 * self.Count
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteWORD(data, self.IndexList[i])
- for i in range(self.Count):
- data = CommFunc.WriteDWORD(data, self.ItemIDList[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- IndexList:%s,
- ItemIDList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "...",
- "..."
- )
- return DumpString
-
-
-m_NAtagCMFamilyActivityExchange=tagCMFamilyActivityExchange()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyActivityExchange.Head.Cmd,m_NAtagCMFamilyActivityExchange.Head.SubCmd))] = m_NAtagCMFamilyActivityExchange
-
-
-#------------------------------------------------------
-# A6 13 家族事务操作 #tagCMFamilyAffairOP
-
-class tagCMFamilyAffairOP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("OPType", c_ubyte), # 操作类型:1-刷新事务;2-开始事务;3-领取事务奖励;
- ("AffairID", c_ushort), # 事务ID,可选
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA6
- self.SubCmd = 0x13
- 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 = 0xA6
- self.SubCmd = 0x13
- self.OPType = 0
- self.AffairID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFamilyAffairOP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A6 13 家族事务操作 //tagCMFamilyAffairOP:
- Cmd:%s,
- SubCmd:%s,
- OPType:%d,
- AffairID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.OPType,
- self.AffairID
- )
- return DumpString
-
-
-m_NAtagCMFamilyAffairOP=tagCMFamilyAffairOP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyAffairOP.Cmd,m_NAtagCMFamilyAffairOP.SubCmd))] = m_NAtagCMFamilyAffairOP
#------------------------------------------------------
@@ -9616,58 +9502,6 @@
m_NAtagCMSendFamilyRedPacket=tagCMSendFamilyRedPacket()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSendFamilyRedPacket.Head.Cmd,m_NAtagCMSendFamilyRedPacket.Head.SubCmd))] = m_NAtagCMSendFamilyRedPacket
-
-
-#------------------------------------------------------
-# A6 07 自身家族科技等级提升 #tagCMFamilyTechLVUP
-
-class tagCMFamilyTechLVUP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("TechID", c_int), # 科技ID
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA6
- 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 = 0xA6
- self.SubCmd = 0x07
- self.TechID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFamilyTechLVUP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A6 07 自身家族科技等级提升 //tagCMFamilyTechLVUP:
- Cmd:%s,
- SubCmd:%s,
- TechID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.TechID
- )
- return DumpString
-
-
-m_NAtagCMFamilyTechLVUP=tagCMFamilyTechLVUP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyTechLVUP.Cmd,m_NAtagCMFamilyTechLVUP.SubCmd))] = m_NAtagCMFamilyTechLVUP
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index e78ab7a..815a832 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -5090,121 +5090,6 @@
#------------------------------------------------------
-# A3 16 仙盟活跃信息通知 #tagMCFamilyActivityInfo
-
-class tagMCFamilyActionCnt(Structure):
- _pack_ = 1
- _fields_ = [
- ("ActionID", c_ubyte), # ID
- ("FinishCnt", c_ushort), # 已完成次数
- ]
-
- def __init__(self):
- self.Clear()
- 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.ActionID = 0
- self.FinishCnt = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCFamilyActionCnt)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 16 仙盟活跃信息通知 //tagMCFamilyActivityInfo:
- ActionID:%d,
- FinishCnt:%d
- '''\
- %(
- self.ActionID,
- self.FinishCnt
- )
- return DumpString
-
-
-class tagMCFamilyActivityInfo(Structure):
- Head = tagHead()
- AwardRecord = 0 #(DWORD AwardRecord)// 领奖情况记录
- Count = 0 #(BYTE Count)// 个数
- InfoList = list() #(vector<tagMCFamilyActionCnt> InfoList)// 活动信息
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x16
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temInfoList = tagMCFamilyActionCnt()
- _pos = temInfoList.ReadData(_lpData, _pos)
- self.InfoList.append(temInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x16
- self.AwardRecord = 0
- self.Count = 0
- self.InfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 1
- for i in range(self.Count):
- length += self.InfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.AwardRecord)
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- AwardRecord:%d,
- Count:%d,
- InfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.AwardRecord,
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCFamilyActivityInfo=tagMCFamilyActivityInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyActivityInfo.Head.Cmd,m_NAtagMCFamilyActivityInfo.Head.SubCmd))] = m_NAtagMCFamilyActivityInfo
-
-
-#------------------------------------------------------
# A3 54 法器信息 #tagMCFaQiInfo
class tagMCFaQiInfo(Structure):
@@ -12906,6 +12791,73 @@
#------------------------------------------------------
+# A5 02 捐献次数信息 #tagSCDonateCntInfo
+
+class tagSCDonateCntInfo(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)
+ DonateCntList = list() #(vector<BYTE> DonateCntList)// 今日已捐献次数列表 [捐献类型1次数, ...]
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA5
+ self.Head.SubCmd = 0x02
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Count):
+ value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
+ self.DonateCntList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA5
+ self.Head.SubCmd = 0x02
+ self.Count = 0
+ self.DonateCntList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1 * self.Count
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteBYTE(data, self.DonateCntList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ DonateCntList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagSCDonateCntInfo=tagSCDonateCntInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCDonateCntInfo.Head.Cmd,m_NAtagSCDonateCntInfo.Head.SubCmd))] = m_NAtagSCDonateCntInfo
+
+
+#------------------------------------------------------
# A5 13 家族行为信息 #tagMCFamilyActionInfo
class tagMCFamilyAction(Structure):
@@ -13094,181 +13046,6 @@
m_NAtagMCFamilyActionInfo=tagMCFamilyActionInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyActionInfo.Head.Cmd,m_NAtagMCFamilyActionInfo.Head.SubCmd))] = m_NAtagMCFamilyActionInfo
-
-
-#------------------------------------------------------
-# A5 02 家族活跃令兑换结果 #tagMCFamilyActivityExchangeResult
-
-class tagMCFamilyActivityExchangeResult(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("Point", c_int), # 活跃令
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x02
- 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 = 0xA5
- self.SubCmd = 0x02
- self.Point = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCFamilyActivityExchangeResult)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 02 家族活跃令兑换结果 //tagMCFamilyActivityExchangeResult:
- Cmd:%s,
- SubCmd:%s,
- Point:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.Point
- )
- return DumpString
-
-
-m_NAtagMCFamilyActivityExchangeResult=tagMCFamilyActivityExchangeResult()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyActivityExchangeResult.Cmd,m_NAtagMCFamilyActivityExchangeResult.SubCmd))] = m_NAtagMCFamilyActivityExchangeResult
-
-
-#------------------------------------------------------
-# A5 08 家族事务信息 #tagMCFamilyAffairInfo
-
-class tagMCFamilyAffair(Structure):
- _pack_ = 1
- _fields_ = [
- ("AffairID", c_ushort), # 事务ID
- ("Star", c_ubyte), # 星级
- ("State", c_ubyte), # 状态:0-无;1-进行中;2-已完成
- ("RemainDuration", c_ushort), # 剩余时长,秒,有剩余时间代表进行中
- ]
-
- def __init__(self):
- self.Clear()
- 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.AffairID = 0
- self.Star = 0
- self.State = 0
- self.RemainDuration = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCFamilyAffair)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 08 家族事务信息 //tagMCFamilyAffairInfo:
- AffairID:%d,
- Star:%d,
- State:%d,
- RemainDuration:%d
- '''\
- %(
- self.AffairID,
- self.Star,
- self.State,
- self.RemainDuration
- )
- return DumpString
-
-
-class tagMCFamilyAffairInfo(Structure):
- Head = tagHead()
- RefreshFreeCount = 0 #(BYTE RefreshFreeCount)// 今日已免费刷新次数
- Count = 0 #(BYTE Count)
- AffairInfoList = list() #(vector<tagMCFamilyAffair> AffairInfoList)// 事务列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA5
- self.Head.SubCmd = 0x08
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.RefreshFreeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- temAffairInfoList = tagMCFamilyAffair()
- _pos = temAffairInfoList.ReadData(_lpData, _pos)
- self.AffairInfoList.append(temAffairInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA5
- self.Head.SubCmd = 0x08
- self.RefreshFreeCount = 0
- self.Count = 0
- self.AffairInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- for i in range(self.Count):
- length += self.AffairInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.RefreshFreeCount)
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteString(data, self.AffairInfoList[i].GetLength(), self.AffairInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- RefreshFreeCount:%d,
- Count:%d,
- AffairInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.RefreshFreeCount,
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCFamilyAffairInfo=tagMCFamilyAffairInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyAffairInfo.Head.Cmd,m_NAtagMCFamilyAffairInfo.Head.SubCmd))] = m_NAtagMCFamilyAffairInfo
#------------------------------------------------------
@@ -13821,6 +13598,7 @@
JoinLVMin = 0 #(WORD JoinLVMin)//限制最低可加入的玩家等级
ServerID = 0 #(DWORD ServerID)//区服ID
EmblemID = 0 #(DWORD EmblemID)//徽章ID
+ EmblemWord = "" #(char EmblemWord[3])//徽章文字
FightPower = 0 #(DWORD FightPower)//总战力,求余亿部分
FightPowerEx = 0 #(DWORD FightPowerEx)//总战力,整除亿部分
MemberCount = 0 #(BYTE MemberCount)//成员人数
@@ -13843,6 +13621,7 @@
self.JoinLVMin,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.EmblemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.EmblemWord,_pos = CommFunc.ReadString(_lpData, _pos,3)
self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.MemberCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
@@ -13860,6 +13639,7 @@
self.JoinLVMin = 0
self.ServerID = 0
self.EmblemID = 0
+ self.EmblemWord = ""
self.FightPower = 0
self.FightPowerEx = 0
self.MemberCount = 0
@@ -13878,6 +13658,7 @@
length += 2
length += 4
length += 4
+ length += 3
length += 4
length += 4
length += 1
@@ -13897,6 +13678,7 @@
data = CommFunc.WriteWORD(data, self.JoinLVMin)
data = CommFunc.WriteDWORD(data, self.ServerID)
data = CommFunc.WriteDWORD(data, self.EmblemID)
+ data = CommFunc.WriteString(data, 3, self.EmblemWord)
data = CommFunc.WriteDWORD(data, self.FightPower)
data = CommFunc.WriteDWORD(data, self.FightPowerEx)
data = CommFunc.WriteBYTE(data, self.MemberCount)
@@ -13915,6 +13697,7 @@
JoinLVMin:%d,
ServerID:%d,
EmblemID:%d,
+ EmblemWord:%s,
FightPower:%d,
FightPowerEx:%d,
MemberCount:%d
@@ -13931,6 +13714,7 @@
self.JoinLVMin,
self.ServerID,
self.EmblemID,
+ self.EmblemWord,
self.FightPower,
self.FightPowerEx,
self.MemberCount
@@ -14282,114 +14066,6 @@
#------------------------------------------------------
-# A5 04 玩家战盟科技等级 #tagMCPlayerTechInfo
-
-class tagMCPlayerTech(Structure):
- _pack_ = 1
- _fields_ = [
- ("TechID", c_ushort), # 科技ID
- ("TechLV", c_ushort), # 特技等级
- ]
-
- def __init__(self):
- self.Clear()
- 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.TechID = 0
- self.TechLV = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCPlayerTech)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 04 玩家战盟科技等级 //tagMCPlayerTechInfo:
- TechID:%d,
- TechLV:%d
- '''\
- %(
- self.TechID,
- self.TechLV
- )
- return DumpString
-
-
-class tagMCPlayerTechInfo(Structure):
- Head = tagHead()
- TechCnt = 0 #(BYTE TechCnt)// 科技个数
- TechInfoList = list() #(vector<tagMCPlayerTech> TechInfoList)// 科技信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA5
- self.Head.SubCmd = 0x04
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.TechCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.TechCnt):
- temTechInfoList = tagMCPlayerTech()
- _pos = temTechInfoList.ReadData(_lpData, _pos)
- self.TechInfoList.append(temTechInfoList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA5
- self.Head.SubCmd = 0x04
- self.TechCnt = 0
- self.TechInfoList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.TechCnt):
- length += self.TechInfoList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.TechCnt)
- for i in range(self.TechCnt):
- data = CommFunc.WriteString(data, self.TechInfoList[i].GetLength(), self.TechInfoList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- TechCnt:%d,
- TechInfoList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.TechCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCPlayerTechInfo=tagMCPlayerTechInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerTechInfo.Head.Cmd,m_NAtagMCPlayerTechInfo.Head.SubCmd))] = m_NAtagMCPlayerTechInfo
-
-
-#------------------------------------------------------
# A5 20 玩家家族信息 #tagMCRoleFamilyInfo
class tagMCRoleFamilyMember(Structure):
@@ -14407,7 +14083,9 @@
FightPowerEx = 0 #(DWORD FightPowerEx)//战力,整除亿部分
ServerID = 0 #(DWORD ServerID)//所属区服ID
ContribTotal = 0 #(DWORD ContribTotal)//总贡献度
- ContribWeek = 0 #(DWORD ContribWeek)//周贡献度
+ ContribDay = 0 #(DWORD ContribDay)//日贡献度
+ DonateCntTotal = 0 #(DWORD DonateCntTotal)//总捐献次数
+ DonateCntDay = 0 #(BYTE DonateCntDay)//日捐献次数
OffTime = 0 #(DWORD OffTime)// 0-在线; >0-/离线时间戳
data = None
@@ -14431,7 +14109,9 @@
self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ContribTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.ContribWeek,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.ContribDay,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.DonateCntTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.DonateCntDay,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.OffTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
@@ -14450,7 +14130,9 @@
self.FightPowerEx = 0
self.ServerID = 0
self.ContribTotal = 0
- self.ContribWeek = 0
+ self.ContribDay = 0
+ self.DonateCntTotal = 0
+ self.DonateCntDay = 0
self.OffTime = 0
return
@@ -14472,6 +14154,8 @@
length += 4
length += 4
length += 4
+ length += 1
+ length += 4
return length
@@ -14491,7 +14175,9 @@
data = CommFunc.WriteDWORD(data, self.FightPowerEx)
data = CommFunc.WriteDWORD(data, self.ServerID)
data = CommFunc.WriteDWORD(data, self.ContribTotal)
- data = CommFunc.WriteDWORD(data, self.ContribWeek)
+ data = CommFunc.WriteDWORD(data, self.ContribDay)
+ data = CommFunc.WriteDWORD(data, self.DonateCntTotal)
+ data = CommFunc.WriteBYTE(data, self.DonateCntDay)
data = CommFunc.WriteDWORD(data, self.OffTime)
return data
@@ -14511,7 +14197,9 @@
FightPowerEx:%d,
ServerID:%d,
ContribTotal:%d,
- ContribWeek:%d,
+ ContribDay:%d,
+ DonateCntTotal:%d,
+ DonateCntDay:%d,
OffTime:%d
'''\
%(
@@ -14529,7 +14217,9 @@
self.FightPowerEx,
self.ServerID,
self.ContribTotal,
- self.ContribWeek,
+ self.ContribDay,
+ self.DonateCntTotal,
+ self.DonateCntDay,
self.OffTime
)
return DumpString
@@ -14545,6 +14235,7 @@
JoinLVMin = 0 #(WORD JoinLVMin)//限制最低可加入的玩家等级
ServerID = 0 #(DWORD ServerID)//区服ID,创建时以族长的区服ID赋值
EmblemID = 0 #(DWORD EmblemID)//徽章ID
+ EmblemWord = "" #(char EmblemWord[3])//徽章文字
FightPower = 0 #(DWORD FightPower)//总战力,求余亿部分
FightPowerEx = 0 #(DWORD FightPowerEx)//总战力,整除亿部分
BroadcastLen = 0 #(WORD BroadcastLen)//公告
@@ -14571,6 +14262,7 @@
self.JoinLVMin,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.EmblemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.EmblemWord,_pos = CommFunc.ReadString(_lpData, _pos,3)
self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.BroadcastLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
@@ -14596,6 +14288,7 @@
self.JoinLVMin = 0
self.ServerID = 0
self.EmblemID = 0
+ self.EmblemWord = ""
self.FightPower = 0
self.FightPowerEx = 0
self.BroadcastLen = 0
@@ -14616,6 +14309,7 @@
length += 2
length += 4
length += 4
+ length += 3
length += 4
length += 4
length += 2
@@ -14638,6 +14332,7 @@
data = CommFunc.WriteWORD(data, self.JoinLVMin)
data = CommFunc.WriteDWORD(data, self.ServerID)
data = CommFunc.WriteDWORD(data, self.EmblemID)
+ data = CommFunc.WriteString(data, 3, self.EmblemWord)
data = CommFunc.WriteDWORD(data, self.FightPower)
data = CommFunc.WriteDWORD(data, self.FightPowerEx)
data = CommFunc.WriteWORD(data, self.BroadcastLen)
@@ -14659,6 +14354,7 @@
JoinLVMin:%d,
ServerID:%d,
EmblemID:%d,
+ EmblemWord:%s,
FightPower:%d,
FightPowerEx:%d,
BroadcastLen:%d,
@@ -14677,6 +14373,7 @@
self.JoinLVMin,
self.ServerID,
self.EmblemID,
+ self.EmblemWord,
self.FightPower,
self.FightPowerEx,
self.BroadcastLen,
@@ -16637,6 +16334,7 @@
FamilyID = 0 #(DWORD FamilyID)
FamilyName = "" #(char FamilyName[33])
FamilyEmblemID = 0 #(DWORD FamilyEmblemID)//仙盟徽章ID
+ FamilyEmblemWord = "" #(char FamilyEmblemWord[3])//徽章文字
PlusDataSize = 0 #(DWORD PlusDataSize)
PlusData = "" #(String PlusData)//扩展记录
data = None
@@ -16665,6 +16363,7 @@
self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.FamilyName,_pos = CommFunc.ReadString(_lpData, _pos,33)
self.FamilyEmblemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.FamilyEmblemWord,_pos = CommFunc.ReadString(_lpData, _pos,3)
self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize)
return _pos
@@ -16689,6 +16388,7 @@
self.FamilyID = 0
self.FamilyName = ""
self.FamilyEmblemID = 0
+ self.FamilyEmblemWord = ""
self.PlusDataSize = 0
self.PlusData = ""
return
@@ -16711,6 +16411,7 @@
length += 4
length += 33
length += 4
+ length += 3
length += 4
length += len(self.PlusData)
@@ -16734,6 +16435,7 @@
data = CommFunc.WriteDWORD(data, self.FamilyID)
data = CommFunc.WriteString(data, 33, self.FamilyName)
data = CommFunc.WriteDWORD(data, self.FamilyEmblemID)
+ data = CommFunc.WriteString(data, 3, self.FamilyEmblemWord)
data = CommFunc.WriteDWORD(data, self.PlusDataSize)
data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData)
return data
@@ -16756,6 +16458,7 @@
FamilyID:%d,
FamilyName:%s,
FamilyEmblemID:%d,
+ FamilyEmblemWord:%s,
PlusDataSize:%d,
PlusData:%s
'''\
@@ -16776,6 +16479,7 @@
self.FamilyID,
self.FamilyName,
self.FamilyEmblemID,
+ self.FamilyEmblemWord,
self.PlusDataSize,
self.PlusData
)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py
index 771998a..21833b2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py
@@ -746,6 +746,7 @@
('FightPower', ctypes.c_ulong),
('FightPowerEx', ctypes.c_ulong),
('EmblemID', ctypes.c_ushort),
+ ('EmblemWord', ctypes.c_char * 3),
('ADOResult', ctypes.c_ulong),
]
@@ -768,6 +769,7 @@
self.FightPower = 0
self.FightPowerEx = 0
self.EmblemID = 0
+ self.EmblemWord = ''
def readData(self, buf, pos = 0, length = 0):
if not pos <= length:
@@ -790,6 +792,7 @@
self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
self.EmblemID, pos = CommFunc.ReadWORD(buf, pos)
+ self.EmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
return self.getLength()
def getBuffer(self):
@@ -808,6 +811,7 @@
buf = CommFunc.WriteDWORD(buf, self.FightPower)
buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
buf = CommFunc.WriteWORD(buf, self.EmblemID)
+ buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.EmblemWord)
return buf
def getLength(self):
@@ -826,6 +830,7 @@
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ushort)
+ length += sizeof(ctypes.c_char) * 3
return length
def outputString(self):
@@ -844,6 +849,7 @@
FightPower = %s,
FightPowerEx = %s,
EmblemID = %s,
+ EmblemWord = %s,
ADOResult = %s,
'''%(
self.ID,
@@ -860,6 +866,7 @@
self.FightPower,
self.FightPowerEx,
self.EmblemID,
+ self.EmblemWord,
self.ADOResult,
)
return output
@@ -870,6 +877,12 @@
self.Name = Str
else:
self.Name = Str[:33]
+
+ def SetEmblemWord(self,Str):
+ if len(Str)<=3:
+ self.EmblemWord = Str
+ else:
+ self.EmblemWord = Str[:3]
# 家族成员表 #tagDBFamilyMem
@@ -891,7 +904,9 @@
('OffTime', ctypes.c_ulong),
('FmLV', ctypes.c_ubyte),
('ContribTotal', ctypes.c_ulong),
- ('ContribWeek', ctypes.c_ulong),
+ ('ContribDay', ctypes.c_ulong),
+ ('DonateCntTotal', ctypes.c_ulong),
+ ('DonateCntDay', ctypes.c_ubyte),
('ADOResult', ctypes.c_ulong),
]
@@ -924,7 +939,9 @@
self.OffTime, pos = CommFunc.ReadDWORD(buf, pos)
self.FmLV, pos = CommFunc.ReadBYTE(buf, pos)
self.ContribTotal, pos = CommFunc.ReadDWORD(buf, pos)
- self.ContribWeek, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ContribDay, pos = CommFunc.ReadDWORD(buf, pos)
+ self.DonateCntTotal, pos = CommFunc.ReadDWORD(buf, pos)
+ self.DonateCntDay, pos = CommFunc.ReadBYTE(buf, pos)
return self.getLength()
@@ -953,7 +970,9 @@
OffTime = %s,
FmLV = %s,
ContribTotal = %s,
- ContribWeek = %s,
+ ContribDay = %s,
+ DonateCntTotal = %s,
+ DonateCntDay = %s,
ADOResult = %s,
'''%(
self.PlayerID,
@@ -971,7 +990,9 @@
self.OffTime,
self.FmLV,
self.ContribTotal,
- self.ContribWeek,
+ self.ContribDay,
+ self.DonateCntTotal,
+ self.DonateCntDay,
self.ADOResult,
)
return output
@@ -1130,6 +1151,7 @@
('FamilyID', ctypes.c_ulong),
('FamilyName', ctypes.c_char * 33),
('FamilyEmblemID', ctypes.c_ushort),
+ ('FamilyEmblemWord', ctypes.c_char * 3),
('TitleID', ctypes.c_ulong),
('FightPower', ctypes.c_ulong),
('FightPowerEx', ctypes.c_ulong),
@@ -1157,6 +1179,7 @@
self.FamilyID = 0
self.FamilyName = ''
self.FamilyEmblemID = 0
+ self.FamilyEmblemWord = ''
self.TitleID = 0
self.FightPower = 0
self.FightPowerEx = 0
@@ -1183,6 +1206,7 @@
self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
self.FamilyEmblemID, pos = CommFunc.ReadWORD(buf, pos)
+ self.FamilyEmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
self.TitleID, pos = CommFunc.ReadDWORD(buf, pos)
self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
@@ -1207,6 +1231,7 @@
buf = CommFunc.WriteDWORD(buf, self.FamilyID)
buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.FamilyName)
buf = CommFunc.WriteWORD(buf, self.FamilyEmblemID)
+ buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.FamilyEmblemWord)
buf = CommFunc.WriteDWORD(buf, self.TitleID)
buf = CommFunc.WriteDWORD(buf, self.FightPower)
buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
@@ -1230,6 +1255,7 @@
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_char) * 33
length += sizeof(ctypes.c_ushort)
+ length += sizeof(ctypes.c_char) * 3
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ulong)
@@ -1253,6 +1279,7 @@
FamilyID = %s,
FamilyName = %s,
FamilyEmblemID = %s,
+ FamilyEmblemWord = %s,
TitleID = %s,
FightPower = %s,
FightPowerEx = %s,
@@ -1274,6 +1301,7 @@
self.FamilyID,
self.FamilyName,
self.FamilyEmblemID,
+ self.FamilyEmblemWord,
self.TitleID,
self.FightPower,
self.FightPowerEx,
@@ -1304,6 +1332,12 @@
else:
self.FamilyName = Str[:33]
+ def SetFamilyEmblemWord(self,Str):
+ if len(Str)<=3:
+ self.FamilyEmblemWord = Str
+ else:
+ self.FamilyEmblemWord = Str[:3]
+
# 邮件个人邮件表 #tagDBMailPersonal
class tagDBMailPersonal(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
index 4f1cd61..ee25408 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
@@ -203,8 +203,12 @@
def SetFmLV(self, fmLV): self.__dbData.FmLV = fmLV
def GetContribTotal(self): return self.__dbData.ContribTotal
def SetContribTotal(self, contribTotal): self.__dbData.ContribTotal = contribTotal
- def GetContribWeek(self): return self.__dbData.ContribWeek
- def SetContribWeek(self, contribWeek): self.__dbData.ContribWeek = contribWeek
+ def GetContribDay(self): return self.__dbData.ContribDay
+ def SetContribDay(self, contribDay): self.__dbData.ContribDay = contribDay
+ def GetDonateCntTotal(self): return self.__dbData.DonateCntTotal
+ def SetDonateCntTotal(self, donateCntTotal): self.__dbData.DonateCntTotal = donateCntTotal
+ def GetDonateCntDay(self): return self.__dbData.DonateCntDay
+ def SetDonateCntDay(self, donateCntDay): self.__dbData.DonateCntDay = donateCntDay
def GetBuffer(self): return self.__dbData.getBuffer()
def RefreshMemberByID(self, playerID):
@@ -286,6 +290,8 @@
return
def GetEmblemID(self): return self.__dbData.EmblemID
def SetEmblemID(self, emblemID): self.__dbData.EmblemID = emblemID
+ def GetEmblemWord(self): return self.__dbData.EmblemWord
+ def SetEmblemWord(self, emblemWord): self.__dbData.EmblemWord = emblemWord
def GetBuffer(self): return self.__dbData.getBuffer()
## ------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBPlayerViewCache.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBPlayerViewCache.py
index f6692e5..b05164f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBPlayerViewCache.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBPlayerViewCache.py
@@ -53,6 +53,8 @@
def SetFamilyName(self, familyName): self.__dbData.FamilyName = familyName
def GetFamilyEmblemID(self): return self.__dbData.FamilyEmblemID
def SetFamilyEmblemID(self, familyEmblemID): self.__dbData.FamilyEmblemID = familyEmblemID
+ def GetFamilyEmblemWord(self): return self.__dbData.FamilyEmblemWord
+ def SetFamilyEmblemWord(self, familyEmblemWord): self.__dbData.FamilyEmblemWord = familyEmblemWord
def GetTitleID(self): return self.__dbData.TitleID
def SetTitleID(self, titleID): self.__dbData.TitleID = titleID
def GetFightPower(self): return self.__dbData.FightPower
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index 820a969..3d303c4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -725,8 +725,8 @@
SendEventPack("UseCurrency_%s" % moneyType, dataDict, curPlayer)
#战盟贡献
- elif moneyType == ShareDefine.TYPE_Price_Family_Contribution:
- SendEventPack("UseFamilyContribution", dataDict, curPlayer)
+ #elif moneyType == ShareDefine.TYPE_Price_Family_Contribution:
+ # SendEventPack("UseFamilyContribution", dataDict, curPlayer)
return
@@ -992,24 +992,6 @@
#发送封包
SendEventPack("OneTimeCoinGiveGold", dataDict, curPlayer)
return
-
-
-## 增加玩家家族活跃度
-# @param curPlayer: 玩家实例
-# @param addValue: 增加值
-# @param curValue: 增加后值
-# @param reason:增加原因
-# @return
-def DR_AddPlayerFamilyActiveValue(curPlayer, addValue, curValue, reason):
- return
-
- dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(),
- 'AccID':curPlayer.GetAccID(),
- 'addValue':addValue, 'FamilyActiveValue':curValue, 'Reason':reason}
- #发送封包
- SendEventPack("AddPlayerFamilyActiveValue", dataDict, curPlayer)
- return
-
## 宠物加点
# @param curPlayer: 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py
index ea6973a..beee8be 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py
@@ -128,7 +128,7 @@
GameWorld.DebugAnswer(curPlayer, "仙盟ID:%s,ServerID:%s" % (familyID, family.GetServerID()))
GameWorld.DebugAnswer(curPlayer, "LV:%s,Exp:%s" % (family.GetLV(), family.GetExp()))
GameWorld.DebugAnswer(curPlayer, "审核:%s,等级条件:%s,申请数:%s" % (family.GetJoinReview(), family.GetJoinLVMin(), len(family.GetReqJoinPlayerInfo())))
- GameWorld.DebugAnswer(curPlayer, "徽章:%s" % (family.GetEmblemID()))
+ GameWorld.DebugAnswer(curPlayer, "徽章:%s,%s" % (family.GetEmblemID(), GameWorld.CodeToGbk(family.GetEmblemWord())))
GameWorld.DebugAnswer(curPlayer, "总战力:%s,人数:%s" % (family.GetFightPowerTotal(), family.GetCount()))
GameWorld.DebugAnswer(curPlayer, "盟主:%s" % (family.GetLeaderID()))
for index in range(family.GetCount()):
@@ -166,6 +166,7 @@
memberCnt = gmList[4] if len(gmList) > 4 else random.randint(1, 10)
FakeFamilyName = GameWorld.GbkToCode("神秘军团")
+ FakeEmblemWord = GameWorld.GbkToCode("神")
fackFamilyID = ShareDefine.FackFamilyIDStart
fackMemID = ShareDefine.FackPlayerIDStart
@@ -197,6 +198,7 @@
fackFamily.SetLV(familyLV)
fackFamily.SetFightPowerTotal(familyFightPower)
fackFamily.SetEmblemID(1)
+ fackFamily.SetEmblemWord(FakeEmblemWord)
fackFamily.SetJoinReview(1) # 设置需要审核
fackFamily.SetJoinLVMin(random.randint(0, 1000))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Family.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Family.py
new file mode 100644
index 0000000..a90b3c5
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Family.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package GM.Commands.Family
+#
+# @todo:仙盟
+# @author hxp
+# @date 2025-10-10
+# @version 1.0
+#
+# 详细描述: 仙盟
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2025-10-10 21:00"""
+#-------------------------------------------------------------------------------
+
+import GameWorld
+import IpyGameDataPY
+import PlayerFamilyEmblem
+import PlayerFamily
+import DBDataMgr
+
+def OnExec(curPlayer, msgList):
+
+ if not msgList:
+ GameWorld.DebugAnswer(curPlayer, "设置等级: Family lv 等级 经验")
+ GameWorld.DebugAnswer(curPlayer, "设置徽章: Family e 徽章ID [剩余时间秒]")
+ GameWorld.DebugAnswer(curPlayer, "创建仙盟相关使用命令: CreateFamily")
+ return
+
+ familyID = curPlayer.GetFamilyID()
+ familyMgr = DBDataMgr.GetFamilyMgr()
+ curFamily = familyMgr.FindFamily(familyID) if familyID else None
+ if not curFamily:
+ GameWorld.DebugAnswer(curPlayer, "玩家未加入仙盟!")
+ return
+
+ value = msgList[0]
+
+ if value == "lv":
+ lv = msgList[1] if len(msgList) > 1 else 1
+ exp = msgList[2] if len(msgList) > 2 else 0
+ if not IpyGameDataPY.GetIpyGameData("Family", lv):
+ GameWorld.DebugAnswer(curPlayer, "仙盟等级不存在: %s" % (lv))
+ return
+ curFamily.SetLV(lv)
+ curFamily.SetExp(exp)
+ GameWorld.DebugAnswer(curPlayer, "设置仙盟等级:%s, exp=%s" % (lv, exp))
+
+ elif value == "e":
+ emblemID = msgList[1] if len(msgList) > 1 else 0
+ setExpireTimes = msgList[2] if len(msgList) > 2 else None
+ emblemActionObj = PlayerFamilyEmblem.AddFamilyEmblem(curFamily.GetID(), emblemID, setExpireTimes)
+ if not emblemActionObj:
+ GameWorld.DebugAnswer(curPlayer, "该徽章ID无法添加")
+ return
+ endTime = PlayerFamilyEmblem.GetActionEmblemEndTime(emblemActionObj)
+ GameWorld.DebugAnswer(curPlayer, "添加徽章(%s)到期:%s" % (emblemID, GameWorld.ChangeTimeNumToStr(endTime)))
+ return
+
+ PlayerFamily.Sync_FamilyInfo(curPlayer)
+ return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFamilyActionCnt.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFamilyActionCnt.py
deleted file mode 100644
index 25653bb..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFamilyActionCnt.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.SetFamilyActionCnt
-#
-# @todo:设置仙盟活跃完成次数
-# @author xdh
-# @date 2016-7-6
-# @version 1.0
-#
-# 详细描述: 设置仙盟活跃完成次数
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2016-7-6 16:00"""
-#-------------------------------------------------------------------------------
-import GameWorld
-import PlayerFamily
-
-
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param paramList 参数列表
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, paramList):
- if len(paramList) != 2:
- GameWorld.DebugAnswer(curPlayer, "SetFamilyActionCnt ID 完成次数")
- return
- actionID = paramList[0]
- addCnt = paramList[1]
- PlayerFamily.AddFamilyActivity(curPlayer, actionID, addCnt)
- return
-
-
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetTechLV.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetTechLV.py
deleted file mode 100644
index 6bb4b31..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetTechLV.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.SetTechLV
-#
-# @todo:设置玩家自身战盟科技
-# @author hxp
-# @date 2016-11-02
-# @version 1.0
-#
-# 详细描述: 设置玩家自身战盟科技
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2016-11-02 14:00"""
-#-------------------------------------------------------------------------------
-
-import PlayerFamilyTech
-import PlayerControl
-import IpyGameDataPY
-import ChConfig
-import GameWorld
-#---------------------------------------------------------------------
-#全局变量
-#---------------------------------------------------------------------
-
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param msgList 参数列表
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, msgList):
-
- # 输入命令格式错误
- if not msgList or len(msgList) > 2:
- GameWorld.DebugAnswer(curPlayer, "SetTechLV 等级(直接设置所有科技等级)")
- GameWorld.DebugAnswer(curPlayer, "SetTechLV 科技ID 等级(设置某个科技ID等级)")
- return
-
- techNeedLVDict = IpyGameDataPY.GetFuncEvalCfg('FamilyTechNeedLV', 1, {})
- techIDList = techNeedLVDict.keys()
-
- # 设置所有科技等级
- if len(msgList) == 1:
- techLV = msgList[0]
- for techID in techIDList:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyTechLV % techID, techLV)
- GameWorld.DebugAnswer(curPlayer, "设置战盟科技(%s)等级: %s" % (techID, techLV))
- else:
- techID = msgList[0]
- techLV = msgList[1]
- if techID not in techIDList:
- GameWorld.DebugAnswer(curPlayer, "战盟科技(%s)不存在!" % (techID))
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyTechLV % techID, techLV)
- GameWorld.DebugAnswer(curPlayer, "设置战盟科技(%s)等级: %s" % (techID, techLV))
-
- PlayerFamilyTech.Sync_PlayerFamilyTechLV(curPlayer)
- #刷新所有属性
- PlayerFamilyTech.CalcFamilyTechAttr(curPlayer)
- PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
- return
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py
index ecd028e..bbeaa36 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py
@@ -17,6 +17,7 @@
import DBDataMgr
import GameWorld
+import PlayerFamily
import IpyGameDataPY
import IPY_GameWorld
import PlayerEventCounter
@@ -265,6 +266,7 @@
#GameWorldActionControl.Dispose_OperationActionState()
#GameWorldActionControl.Dispose_DailyActionState()
#GameWorldActionControl.Dispose_FBStateTime()
+ PlayerFamily.OnMinute()
PlayerOnline.OnMinute()
BattleObj.OnMinute()
ObjPool.OnMinute()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 2efded5..e337850 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -934,14 +934,6 @@
("dict", "ExpMaterial", 0),
),
- "FamilyTech":(
- ("DWORD", "TechID", 1),
- ("BYTE", "AttrType", 0),
- ("DWORD", "AttrValue", 0),
- ("DWORD", "Contribution", 0),
- ("DWORD", "PowerEx", 0),
- ),
-
"NPCDropItem":(
("DWORD", "NPCID", 1),
("WORD", "MaxWorldLV", 0),
@@ -1281,14 +1273,6 @@
("DWORD", "NPCID", 1),
("WORD", "PerPlayerMoneyAward", 0),
("list", "PersonFirstKillAward", 0),
- ),
-
- "FamilyActivity":(
- ("DWORD", "ID", 1),
- ("WORD", "UnLockFuncID", 0),
- ("BYTE", "TotalActivityTime", 0),
- ("WORD", "SingleTimes", 0),
- ("WORD", "SingleActiveValue", 0),
),
"FamilyRedPack":(
@@ -2380,6 +2364,14 @@
("BYTE", "UnlockFamilyLV", 0),
("DWORD", "ExpireMinutes", 0),
("DWORD", "CustomFamilyID", 0),
+ ),
+
+ "FamilyDonate":(
+ ("BYTE", "DonateType", 1),
+ ("BYTE", "DailyCnt", 0),
+ ("BYTE", "MoneyType", 0),
+ ("DWORD", "MoneyValue", 0),
+ ("list", "AwardItemList", 0),
),
"FamilyZhenbaogeCut":(
@@ -3872,19 +3864,6 @@
def GetRandExpMax(self): return self.attrTuple[2] # 最大随机精炼值 DWORD
def GetExpMaterial(self): return self.attrTuple[3] # 翅膀代数对应精炼值 dict
-# 仙盟科技表
-class IPY_FamilyTech():
-
- def __init__(self):
- self.attrTuple = None
- return
-
- def GetTechID(self): return self.attrTuple[0] # 科技ID*1000+等级 DWORD
- def GetAttrType(self): return self.attrTuple[1] # 属性类型 BYTE
- def GetAttrValue(self): return self.attrTuple[2] # 属性值 DWORD
- def GetContribution(self): return self.attrTuple[3] # 需要贡献度 DWORD
- def GetPowerEx(self): return self.attrTuple[4] # 额外战力 DWORD
-
# NPC掉落表
class IPY_NPCDropItem():
@@ -4360,19 +4339,6 @@
def GetNPCID(self): return self.attrTuple[0] # ID DWORD
def GetPerPlayerMoneyAward(self): return self.attrTuple[1] # 首杀全服玩家奖励灵石额度/人 WORD
def GetPersonFirstKillAward(self): return self.attrTuple[2] # 个人首次击杀奖励 [[物品ID,个数,是否拍品], ...] list
-
-# 仙盟活跃表
-class IPY_FamilyActivity():
-
- def __init__(self):
- self.attrTuple = None
- return
-
- def GetID(self): return self.attrTuple[0] # ID DWORD
- def GetUnLockFuncID(self): return self.attrTuple[1] # 解锁功能ID WORD
- def GetTotalActivityTime(self): return self.attrTuple[2] # 总次数 BYTE
- def GetSingleTimes(self): return self.attrTuple[3] # 增加活跃需要次数 WORD
- def GetSingleActiveValue(self): return self.attrTuple[4] # 每轮增加活跃积分 WORD
# 仙盟红包表
class IPY_FamilyRedPack():
@@ -6060,6 +6026,19 @@
def GetExpireMinutes(self): return self.attrTuple[2] # 有效时长,分钟 DWORD
def GetCustomFamilyID(self): return self.attrTuple[3] # 定制仙盟ID DWORD
+# 仙盟捐献表
+class IPY_FamilyDonate():
+
+ def __init__(self):
+ self.attrTuple = None
+ return
+
+ def GetDonateType(self): return self.attrTuple[0] # 捐献类型 BYTE
+ def GetDailyCnt(self): return self.attrTuple[1] # 每日次数 BYTE
+ def GetMoneyType(self): return self.attrTuple[2] # 消耗货币类型 BYTE
+ def GetMoneyValue(self): return self.attrTuple[3] # 消耗货币值 DWORD
+ def GetAwardItemList(self): return self.attrTuple[4] # 获得奖励列表[[物品ID,个数], ...] list
+
# 仙盟珍宝阁砍价表
class IPY_FamilyZhenbaogeCut():
@@ -6239,7 +6218,7 @@
def GetAwardID(self): return self.attrTuple[0] # 奖励ID 1~n BYTE
def GetAwardItemList(self): return self.attrTuple[1] # 物品奖励[[物品ID,个数,是否拍品], ...] list
-# 战令表
+# 战令表/基金
class IPY_Zhanling():
def __init__(self):
@@ -6475,7 +6454,6 @@
self.__LoadFileData("EquipSuitAttr", onlyCheck)
self.__LoadFileData("WingRefineAttr", onlyCheck)
self.__LoadFileData("WingRefineExp", onlyCheck)
- self.__LoadFileData("FamilyTech", onlyCheck)
self.__LoadFileData("NPCDropItem", onlyCheck)
self.__LoadFileData("RuneTower", onlyCheck)
self.__LoadFileData("ChinMap", onlyCheck)
@@ -6503,7 +6481,6 @@
self.__LoadFileData("ActivityPlaceReward", onlyCheck)
self.__LoadFileData("BOSSInfo", onlyCheck)
self.__LoadFileData("BOSSFirstKill", onlyCheck)
- self.__LoadFileData("FamilyActivity", onlyCheck)
self.__LoadFileData("FamilyRedPack", onlyCheck)
self.__LoadFileData("ActFeastRedPacketSucc", onlyCheck)
self.__LoadFileData("NPCShow", onlyCheck)
@@ -6623,6 +6600,7 @@
self.__LoadFileData("EquipPlusEvolve", onlyCheck)
self.__LoadFileData("Family", onlyCheck)
self.__LoadFileData("FamilyEmblem", onlyCheck)
+ self.__LoadFileData("FamilyDonate", onlyCheck)
self.__LoadFileData("FamilyZhenbaogeCut", onlyCheck)
self.__LoadFileData("FamilyZhenbaogeItem", onlyCheck)
self.__LoadFileData("FamilyZhenfa", onlyCheck)
@@ -7466,13 +7444,6 @@
self.CheckLoadData("WingRefineExp")
return self.ipyWingRefineExpCache[index]
- def GetFamilyTechCount(self):
- self.CheckLoadData("FamilyTech")
- return self.ipyFamilyTechLen
- def GetFamilyTechByIndex(self, index):
- self.CheckLoadData("FamilyTech")
- return self.ipyFamilyTechCache[index]
-
def GetNPCDropItemCount(self):
self.CheckLoadData("NPCDropItem")
return self.ipyNPCDropItemLen
@@ -7661,13 +7632,6 @@
def GetBOSSFirstKillByIndex(self, index):
self.CheckLoadData("BOSSFirstKill")
return self.ipyBOSSFirstKillCache[index]
-
- def GetFamilyActivityCount(self):
- self.CheckLoadData("FamilyActivity")
- return self.ipyFamilyActivityLen
- def GetFamilyActivityByIndex(self, index):
- self.CheckLoadData("FamilyActivity")
- return self.ipyFamilyActivityCache[index]
def GetFamilyRedPackCount(self):
self.CheckLoadData("FamilyRedPack")
@@ -8502,6 +8466,13 @@
self.CheckLoadData("FamilyEmblem")
return self.ipyFamilyEmblemCache[index]
+ def GetFamilyDonateCount(self):
+ self.CheckLoadData("FamilyDonate")
+ return self.ipyFamilyDonateLen
+ def GetFamilyDonateByIndex(self, index):
+ self.CheckLoadData("FamilyDonate")
+ return self.ipyFamilyDonateCache[index]
+
def GetFamilyZhenbaogeCutCount(self):
self.CheckLoadData("FamilyZhenbaogeCut")
return self.ipyFamilyZhenbaogeCutLen
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index d5cd751..ed41b74 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -876,12 +876,8 @@
return True
if itemID not in ChConfig.Def_TransformItemIDList:
return False
- if itemID == ChConfig.Def_ItemID_FamilyContribution:
- PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, itemCount, True, ShareDefine.Def_AddFAVReason_UseItem, True)
- elif itemID == ChConfig.Def_ItemID_SilverMoney:
+ if itemID == ChConfig.Def_ItemID_SilverMoney:
PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, itemCount)
- elif itemID == ChConfig.Def_ItemID_FamilyActive:
- PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_FamilyActivity, itemCount)
elif itemID == ChConfig.Def_ItemID_SP:
PlayerControl.PlayerAddZhenQi(curPlayer, itemCount)
elif itemID == ChConfig.Def_ItemID_GoldPaper:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_GiveMoney.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_GiveMoney.py
index 428157f..1dba895 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_GiveMoney.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_GiveMoney.py
@@ -98,11 +98,8 @@
for moneyType, giveMoney in giveMoneyDict.items():
giveTotalMoney = giveMoney * successCnt
- if moneyType == ShareDefine.TYPE_Price_Family_Contribution:
- PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, giveTotalMoney, True, ShareDefine.Def_AddFAVReason_UseItem, True)
- else:
- addDataDict = {"UseCount":successCnt, ChConfig.Def_Give_Reason_SonKey:itemID}
- PlayerControl.GiveMoney(curPlayer, moneyType, giveTotalMoney, ChConfig.Def_GiveMoney_UseItem, addDataDict)
+ addDataDict = {"UseCount":successCnt, ChConfig.Def_Give_Reason_SonKey:itemID}
+ PlayerControl.GiveMoney(curPlayer, moneyType, giveTotalMoney, ChConfig.Def_GiveMoney_UseItem, addDataDict)
return True, successCnt
@@ -138,10 +135,6 @@
return ShareDefine.TYPE_Price_Rune
elif curEffID == ChConfig.Def_Effect_ItemGiveRuneSplinters:
return ShareDefine.TYPE_Price_RuneSplinters
- elif curEffID == ChConfig.Def_Effect_ItemGiveFamilyActivity:
- return ShareDefine.TYPE_Price_FamilyActivity
- elif curEffID == ChConfig.Def_Effect_ItemGiveFamilyContribution:
- return ShareDefine.TYPE_Price_Family_Contribution
elif curEffID == ChConfig.Def_Effect_ItemGiveRealmPoint:
return ShareDefine.TYPE_Price_RealmPoint
elif curEffID == ChConfig.Def_Effect_ItemGiveSoulDust:
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 e4451bb..1bbc5f0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -3287,8 +3287,8 @@
elif rewardType == ChConfig.Def_RewardType_DayFreeGoldGift:
PlayerDailyGiftbag.OnGetDailyFreeGiftbag(curPlayer)
# 仙盟每日福利奖励
- elif rewardType == ChConfig.Def_RewardType_FamilyDayAward:
- PlayerFamily.GetFamilyDayAward(curPlayer)
+ #elif rewardType == ChConfig.Def_RewardType_FamilyDayAward:
+ # PlayerFamily.GetFamilyDayAward(curPlayer)
# 玩家等级奖励
elif rewardType == ChConfig.Def_RewardType_LVAward:
PlayerLVAward.GetPlayerLVAward(curPlayer, dataEx)
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 4537a3c..05fe858 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -2981,6 +2981,9 @@
GameWorld.SendMsgToClientServer(ShareDefine.CrossServerMsg_GiveMoney, msgInfo, [serverGroupID])
return True
+ if priceType == ShareDefine.TYPE_Price_FamilyExp:
+ return PlayerFamily.AddFamilyExp(curPlayer, value)
+
befMoney = GetMoney(curPlayer, priceType)
if priceType == IPY_GameWorld.TYPE_Price_Gold_Money:
updPlayerGold = GetMoneyReal(curPlayer, priceType) + value
@@ -3063,6 +3066,9 @@
PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_GetMoney, value, [priceType])
+ if priceType == ShareDefine.TYPE_Price_FamilyCoin:
+ PlayerFamily.AddFamilyContrib(curPlayer, value) # 公会币同步增加公会贡献
+
if priceType not in [IPY_GameWorld.TYPE_Price_Gold_Money, IPY_GameWorld.TYPE_Price_Gold_Paper, ShareDefine.TYPE_Price_PayCoin] \
and giveType == ChConfig.Def_GiveMoney_Unknown:
#GameWorld.DebugLog("该货币没有指定来源类型不记录!priceType=%s,giveType=%s" % (priceType, giveType))
@@ -4832,10 +4838,6 @@
# 血瓶恢复效果
def GetHPCureEnhance(curPlayer): return 0
-
-# 仙盟徽章ID
-def GetFamilyEmblemID(curPlayer): return curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyEmblemID)
-def SetFamilyEmblemID(curPlayer, emblemID): NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyEmblemID, emblemID)
# 仙盟职位,使用 GetReceivedSalary,因为FamilyMemberLV没有入库
def GetFamilyMemberLV(curPlayer): return curPlayer.GetReceivedSalary()
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 5bc9315..e5b7047 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -22,17 +22,18 @@
import NetPackCommon
import PlayerViewCache
import ChPyNetSendPack
-import PlayerFamilyTech
import PlayerFamilyEmblem
-import PlayerFamilyZhenfa
+#import PlayerFamilyZhenfa
import PlayerFamilyZhenbaoge
import IPY_PlayerDefine
import IpyGameDataPY
import IPY_GameWorld
+import ItemControler
import GameFuncComm
import ItemCommon
import DBDataMgr
import DirtyList
+import ObjPool
import random
import time
@@ -53,7 +54,10 @@
FamilyChangeType_MemFmlvChange, # 成员职位变更 7
FamilyChangeType_MemLogin, # 成员上线 8
FamilyChangeType_MemLogout, # 成员离线9
-) = range(10)
+FamilyChangeType_FamilyLVExp, # 仙盟等级经验变更 10
+FamilyChangeType_MemContrib, # 成员贡献变更 11
+FamilyChangeType_OnDay, # 过天 12
+) = range(13)
#仙盟权限
(
@@ -77,18 +81,25 @@
familyManager = DBDataMgr.GetFamilyMgr()
for i in range(0, familyManager.GetCount()):
family = familyManager.GetAt(i)
+ familyID = family.GetID()
+
#珍宝阁
PlayerFamilyZhenbaoge.OnDay(family)
+
+ for index in xrange(family.GetCount()):
+ member = family.GetAt(index)
+ # 重置成员日信息
+ member.SetContribDay(0)
+ member.SetDonateCntDay(0)
+
+ Broadcast_FamilyChange(familyID, FamilyChangeType_OnDay)
return
def PlayerOnDay(curPlayer):
if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Family):
return
- #每日福利奖励
- Sync_FamilyDayRewardState(curPlayer)
- __FamilyAffair_Refresh(curPlayer, True)
-
+ ResetDailyDonateCnt(curPlayer)
PlayerFamilyZhenbaoge.PlayerOnDay(curPlayer)
return
@@ -97,10 +108,8 @@
return
PlayerLoginRefreshFamily(curPlayer, tick)
Sync_RequestAddFamilyInfo(curPlayer, False)
- Sync_FamilyDayRewardState(curPlayer)
- PlayerFamilyTech.Sync_PlayerFamilyTechLV(curPlayer)
- __FamilyAffair_CheckReset(curPlayer)
- PlayerFamilyZhenfa.OnPlayerLogin(curPlayer)
+ SyncDonateCntInfo(curPlayer)
+ #PlayerFamilyZhenfa.OnPlayerLogin(curPlayer)
PlayerFamilyZhenbaoge.OnPlayerLogin(curPlayer)
return
@@ -124,9 +133,6 @@
def OnWeekEx(curPlayer):
#重置
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyActivityAwardRecord, 0)
- for actionid in ShareDefine.FamilyActiveIDList:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyActivityFinishCnt%actionid, 0)
return
def PlayerLoginRefreshFamily(curPlayer, tick):
@@ -169,6 +175,11 @@
return
+def OnMinute():
+ #战力刷新在DBFamily.OnMinute
+ PlayerFamilyEmblem.CheckExpireEmblem()
+ return
+
#// A6 04 创建家族 #tagCMCreateFamily
#
#struct tagCMCreateFamily
@@ -176,11 +187,13 @@
# tagHead Head;
# char Name[33];
# WORD EmblemID; //选择徽章ID,解锁仙盟等级为1级的均为可选ID
+# char EmblemWord[3]; //徽章文字
#};
def OnCreateFamily(index, clientPack, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
inputName = clientPack.Name
emblemID = clientPack.EmblemID
+ emblemWord = clientPack.EmblemWord
if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Family):
return
@@ -218,6 +231,7 @@
emblemID = random.choice(emblemIDList) # 从默认徽章中随机选择一个
GameWorld.Log("创建仙盟: familyID=%s,playerID=%s,emblemID=%s" % (newFamilyID, playerID, emblemID))
curFamily.SetEmblemID(emblemID)
+ curFamily.SetEmblemWord(emblemWord)
#-设置家族成员属性
DoPlayerJionFamily(curFamily, playerID, curPlayer, IPY_PlayerDefine.fmlLeader)
@@ -366,7 +380,6 @@
playerID = curPlayer.GetPlayerID()
refreshFmLV = 0
refreshFamilyLV = 0
- refreshEmblemID = 0
refreshFamilyName = ""
if refreshFamilyID:
familyMgr = DBDataMgr.GetFamilyMgr()
@@ -374,7 +387,6 @@
if curFamily:
refreshFamilyLV = curFamily.GetLV()
refreshFamilyName = curFamily.GetName()
- refreshEmblemID = curFamily.GetEmblemID()
member = curFamily.FindMember(playerID)
if member:
refreshFmLV = member.GetFmLV()
@@ -392,9 +404,6 @@
curPlayer.SetFamilyName(refreshFamilyName)
curPlayer.Notify_FamilyNameRefresh() #//04 36 周围玩家家族名刷新#tagPlayerFamilyNameRefresh
- if PlayerControl.GetFamilyEmblemID(curPlayer) != refreshEmblemID:
- PlayerControl.SetFamilyEmblemID(curPlayer, refreshEmblemID)
-
if lastFmLV != refreshFmLV:
PlayerControl.SetFamilyMemberLV(curPlayer, refreshFmLV)
@@ -430,8 +439,6 @@
familyMgr = DBDataMgr.GetFamilyMgr()
familyMgr.DelPlayerReqJoinFamilyIDAll(curPlayer.GetPlayerID())
Sync_RequestAddFamilyInfo(curPlayer)
- __FamilyAffair_CheckReset(curPlayer)
- PlayerFamilyTech.Sync_PlayerFamilyTechLV(curPlayer)
return
def __OnLeaveFamily(curPlayer, tick):
@@ -480,6 +487,7 @@
clientPack.JoinLVMin = curFamily.GetJoinLVMin()
clientPack.ServerID = curFamily.GetServerID()
clientPack.EmblemID = curFamily.GetEmblemID()
+ clientPack.EmblemWord = curFamily.GetEmblemWord()
clientPack.FightPower = curFamily.GetFightPower()
clientPack.FightPowerEx = curFamily.GetFightPowerEx()
clientPack.Broadcast = curFamily.GetBroadcast()
@@ -503,7 +511,9 @@
memInfo.FmLV = member.GetFmLV()
memInfo.ServerID = member.GetServerID()
memInfo.ContribTotal = member.GetContribTotal()
- memInfo.ContribWeek = member.GetContribWeek()
+ memInfo.ContribDay = member.GetContribDay()
+ memInfo.DonateCntTotal = member.GetDonateCntTotal()
+ memInfo.DonateCntDay = member.GetDonateCntDay()
memInfo.OffTime = member.GetOffTime()
clientPack.MemberList.append(memInfo)
clientPack.MemberCount = len(clientPack.MemberList)
@@ -937,11 +947,13 @@
#{
# tagHead Head;
# BYTE EmblemID; // 更换的徽章ID
+# char EmblemWord[3]; // 徽章文字
#};
def OnChangeFamilyEmblem(index, clientData, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
changeEmblemID = clientData.EmblemID
- PlayerFamilyEmblem.OnChangeFamilyEmblem(curPlayer, changeEmblemID)
+ emblemWord = clientData.EmblemWord
+ PlayerFamilyEmblem.OnChangeFamilyEmblem(curPlayer, changeEmblemID, emblemWord)
return
#// A6 25 修改家族成员职位 #tagCMChangeFamilyMemLV
@@ -1305,8 +1317,11 @@
family = familyMgr.GetAt(index)
if not family:
continue
- if msg and msg not in family.GetName():
- continue
+ if msg:
+ if msg in family.GetName() or msg == str(family.GetID()):
+ pass
+ else:
+ continue
familyView = ChPyNetSendPack.tagMCFamilyView()
familyView.FamilyID = family.GetID()
familyView.FamilyName = family.GetName()
@@ -1320,6 +1335,7 @@
familyView.JoinLVMin = family.GetJoinLVMin()
familyView.ServerID = family.GetServerID()
familyView.EmblemID = family.GetEmblemID()
+ familyView.EmblemWord = family.GetEmblemWord()
familyView.FightPower = family.GetFightPower()
familyView.FightPowerEx = family.GetFightPowerEx()
familyView.MemberCount = family.GetCount()
@@ -1339,20 +1355,138 @@
# BYTE DonateType; // 捐献类型
#};
def OnFamilyMoneyDonate(index, clientData, tick):
- #curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- #DonateType = clientData.DonateType
- #playerID = curPlayer.GetPlayerID()
- # 先屏蔽,等功能定了再改
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ donateType = clientData.DonateType
+ playerID = curPlayer.GetPlayerID()
+ familyID = curPlayer.GetFamilyID()
+ if familyID <= 0:
+ return
+ familyMgr = DBDataMgr.GetFamilyMgr()
+ curFamily = familyMgr.FindFamily(familyID)
+ if not curFamily:
+ return
+ curMember = curFamily.FindMember(playerID)
+ if not curMember:
+ return
+
+ ipyData = IpyGameDataPY.GetIpyGameData("FamilyDonate", donateType)
+ if not ipyData:
+ return
+ dailyCntMax = ipyData.GetDailyCnt()
+ donateCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyDonateCnt % donateType)
+ if donateCnt >= dailyCntMax:
+ GameWorld.DebugLog("今日捐献次数已达上限! donateType=%s,donateCnt=%s >= %s" % (donateType, donateCnt, dailyCntMax), playerID)
+ return
+
+ moneyType = ipyData.GetMoneyType()
+ moneyValue = ipyData.GetMoneyValue()
+ if not moneyType or not moneyValue:
+ return
+ if not PlayerControl.PayMoney(curPlayer, moneyType, moneyValue, "FamilyMoneyDonate"):
+ return
+
+ awardItemList = ipyData.GetAwardItemList()
+ donateCnt += 1
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyDonateCnt % donateType, donateCnt)
+ SyncDonateCntInfo(curPlayer)
+ # 增加成员捐献次数记录
+ memDonateCntDay = curMember.GetDonateCntDay() + 1
+ memDonateCntTotal = min(curMember.GetDonateCntTotal() + 1, ChConfig.Def_UpperLimit_DWord)
+ curMember.SetDonateCntDay(memDonateCntDay)
+ curMember.SetDonateCntTotal(memDonateCntTotal)
+ GameWorld.DebugLog("家族捐献: donateType=%s,donateCnt=%s,%s,memDonateCntDay=%s,memDonateCntDay=%s"
+ % (donateType, donateCnt, awardItemList, memDonateCntDay, memDonateCntTotal), playerID)
+ ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList)
return
+def ResetDailyDonateCnt(curPlayer):
+ isReset = False
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in range(ipyDataMgr.GetFamilyDonateCount()):
+ ipyData = ipyDataMgr.GetFamilyDonateByIndex(index)
+ donateType = ipyData.GetDonateType()
+ donateCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyDonateCnt % donateType)
+ if donateCnt:
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyDonateCnt % donateType, 0)
+ isReset = True
+ if isReset:
+ SyncDonateCntInfo(curPlayer)
+ return
-#---------------------------------------------------------------------
-def AddPlayerFamilyActiveValue(curPlayer, addValue, sendPackGameServer = False, reason = 0, isSysMsg=False):
- # 多个地方用到,先保留,之后删除统一修改
+def SyncDonateCntInfo(curPlayer):
+ donateCntList = []
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in range(ipyDataMgr.GetFamilyDonateCount()):
+ ipyData = ipyDataMgr.GetFamilyDonateByIndex(index)
+ donateType = ipyData.GetDonateType()
+ donateCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyDonateCnt % donateType)
+ donateCntList.append(donateCnt)
+ if not donateCntList:
+ return
+ clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCDonateCntInfo)
+ clientPack.DonateCntList = donateCntList
+ clientPack.Count = len(clientPack.DonateCntList)
+ NetPackCommon.SendFakePack(curPlayer, clientPack)
+ return
+
+def AddFamilyExp(curPlayer, addExp):
+ ## 增加玩家家族经验
+ playerID = curPlayer.GetPlayerID()
+ familyID = curPlayer.GetFamilyID()
+ if familyID <= 0:
+ return
+ familyMgr = DBDataMgr.GetFamilyMgr()
+ curFamily = familyMgr.FindFamily(familyID)
+ if not curFamily:
+ return
+ curLV = curFamily.GetLV()
+ curExp = curFamily.GetExp()
+
+ updLV = curLV
+ updExp = curExp + addExp
+ GameWorld.DebugLog("增加仙盟经验: curLV=%s,curExp=%s,addExp=%s,updExp=%s" % (curLV, curExp, addExp, updExp), playerID)
+
+ ipyData = IpyGameDataPY.GetIpyGameData("Family", curLV)
+ lvUPExp = ipyData.GetNeedExp()
+ while lvUPExp and updExp >= lvUPExp:
+ ipyData = IpyGameDataPY.GetIpyGameDataNotLog("Family", updLV + 1)
+ if not ipyData:
+ break
+ updLV += 1
+ updExp -= lvUPExp
+ lvUPExp = ipyData.GetNeedExp()
+ GameWorld.DebugLog(" 仙盟升级: updLV=%s,updExp=%s,lvUPExp=%s" % (updLV, updExp, lvUPExp), playerID)
+
+ curFamily.SetLV(updLV)
+ curFamily.SetExp(updExp)
+
+ Sync_FamilyInfo(curPlayer)
+ Broadcast_FamilyChange(familyID, FamilyChangeType_FamilyLVExp, excludeIDList=[playerID])
return True
-def SendPack_GameServer_AddFamilyDetail(curPlayer, addFamilyHornor = 0, addFamilyMoney = 0, addFamilyActiveValue = 0, resion=0):
- return
-def SendPack_GameServer_AddFamilyDetailEx(curPlayer, addPlayerActiveValue, addFamilyMoney = 0, addFamilyHornor = 0, resion=0):
+
+def AddFamilyContrib(curPlayer, addContribValue):
+ ## 增加玩家累计家族贡献
+
+ playerID = curPlayer.GetPlayerID()
+ familyID = curPlayer.GetFamilyID()
+ if familyID <= 0:
+ return
+ familyMgr = DBDataMgr.GetFamilyMgr()
+ curFamily = familyMgr.FindFamily(familyID)
+ if not curFamily:
+ return
+ curMember = curFamily.FindMember(playerID)
+ if not curMember:
+ return
+
+ contribDay = curMember.GetContribDay() + addContribValue
+ contribTotal = min(curMember.GetContribTotal() + addContribValue, ChConfig.Def_UpperLimit_DWord)
+ curMember.SetContribDay(contribDay)
+ curMember.SetContribTotal(contribTotal)
+ GameWorld.DebugLog("增加成员贡献: familyID=%s,addContribValue=%s,contribDay=%s,contribTotal=%s" % (familyID, addContribValue, contribDay, contribTotal), playerID)
+
+ Sync_FamilyInfo(curPlayer)
+ Broadcast_FamilyChange(familyID, FamilyChangeType_MemContrib, excludeIDList=[playerID])
return
## ------------------------------------------------------------------------------------------------
@@ -1453,222 +1587,3 @@
Broadcast_FamilyPack(familyID, clientPack)
return
-def GetFamilyDayAward(curPlayer):
- ##领取仙盟每日奖励 2小时脱机挂时间
- return
-
-def Sync_FamilyDayRewardState(curPlayer):
- clientPack = ChPyNetSendPack.tagMCFamilyDayAward()
- clientPack.GetState = 0
- clientPack.MoneyDonateCount = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyDonateRecord)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
- return
-
-def AddFamilyActivity(curPlayer, actionid, addCnt=1):
- return
-
-
-##--------------------------------------- 仙盟事务 --------------------------------------------------
-AffairState_None = 0 # 无
-AffairState_Underway = 1 # 进行中
-AffairState_Finish = 2 # 已完成
-
-#// A6 13 家族事务操作 #tagCMFamilyAffairOP
-#
-#struct tagCMFamilyAffairOP
-#{
-# tagHead Head;
-# BYTE OPType; // 操作类型:1-刷新事务;2-开始事务;3-领取事务奖励;
-# WORD AffairID; // 事务ID,可选
-#};
-def OnFamilyAffairOP(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- opType = clientData.OPType
- affairID = clientData.AffairID
-
- if opType == 1:
- __FamilyAffair_Refresh(curPlayer)
- elif opType == 2:
- __FamilyAffair_Start(curPlayer, affairID)
- elif opType == 3:
- __FamilyAffair_GetAward(curPlayer, affairID)
- return
-
-def __FamilyAffair_CheckReset(curPlayer):
- ## 检查任务重置,登录,进入仙盟触发
- info = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyAffairInfo % 1)
- if not info:
- # 任务1还没分配,默认强制重置
- __FamilyAffair_Refresh(curPlayer, True)
- else:
- SyncFamilyAffairInfo(curPlayer)
- return
-
-def __FamilyAffair_Refresh(curPlayer, isReset=False):
- ## 刷新事务
-
- playerID = curPlayer.GetPlayerID()
- moneyType, moneyValue = 0, 0
- dayRefreshFreeCount = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyAffairRefreshFree)
- if not isReset:
- freeCountMax = IpyGameDataPY.GetFuncCfg("FamilyAffair", 2)
- if freeCountMax and dayRefreshFreeCount >= freeCountMax:
- moneyType, moneyValue = IpyGameDataPY.GetFuncEvalCfg("FamilyAffair", 3)
- if not PlayerControl.HaveMoney(curPlayer, moneyType, moneyValue):
- return
-
- sendMailAffairList = []
- refreshAffairIDList = []
- affairCountMax = IpyGameDataPY.GetFuncCfg("FamilyAffair", 1)
- affairStarDict = IpyGameDataPY.GetFuncEvalCfg("FamilyAffair", 4)
- maxStar = 0
- starWeightList = []
- for starStr, starInfo in affairStarDict.items():
- star = int(starStr)
- if star > maxStar:
- maxStar = star
- starWeightList.append([starInfo[0], star])
-
- for affairID in range(1, affairCountMax + 1):
- star, state = __GetAffairInfo(curPlayer, affairID)
- if isReset:
- # 重置时还在进行中的直接发奖励
- if state == AffairState_Underway:
- sendMailAffairList.append([affairID, star])
- refreshAffairIDList.append(affairID)
- else:
- # 非重置只处理没有状态非最高星的
- if state == AffairState_None and star < maxStar:
- refreshAffairIDList.append(affairID)
-
- GameWorld.DebugLog("刷新事务: isReset=%s,moneyType=%s,moneyValue=%s,dayRefreshFreeCount=%s"
- % (isReset, moneyType, moneyValue, dayRefreshFreeCount), playerID)
- GameWorld.DebugLog(" sendMailAffairList=%s" % sendMailAffairList, playerID)
-
- for mailInfo in sendMailAffairList:
- affairID, star = mailInfo
- if str(star) not in affairStarDict:
- continue
- paramList = [affairID, star]
- addItemList = affairStarDict[str(star)][2]
- PlayerControl.SendMailByKey("FamilyAffairAward", [playerID], addItemList, paramList)
-
- if isReset:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyAffairRefreshFree, 0)
- for affairID in range(1, affairCountMax + 1):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyAffairInfo % affairID, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyAffairStartTime % affairID, 0)
- else:
- if moneyType and moneyValue:
- PlayerControl.PayMoney(curPlayer, moneyType, moneyValue, "FamilyAffair")
- else:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyAffairRefreshFree, dayRefreshFreeCount + 1)
-
- GameWorld.DebugLog(" starWeightList=%s" % starWeightList, playerID)
- GameWorld.DebugLog(" refreshAffairIDList=%s" % refreshAffairIDList, playerID)
- for affairID in refreshAffairIDList:
- star = GameWorld.GetResultByWeightList(starWeightList, 1)
- __SetAffairInfo(curPlayer, affairID, star, AffairState_None)
- GameWorld.DebugLog(" 随机事务:affairID=%s,star=%s" % (affairID, star), playerID)
-
- SyncFamilyAffairInfo(curPlayer)
- return
-
-def __FamilyAffair_Start(curPlayer, affairID):
- ## 开始事务
- playerID = curPlayer.GetPlayerID()
- star, state = __GetAffairInfo(curPlayer, affairID)
- if not star:
- return
- if state != AffairState_None:
- GameWorld.DebugLog("仙盟事务已经进行中或已完成,无法开始: affairID=%s,star=%s,state=%s" % (affairID, star, state), playerID)
- return
- startTime = int(time.time())
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyAffairStartTime % affairID, startTime)
- __SetAffairInfo(curPlayer, affairID, star, AffairState_Underway)
- GameWorld.DebugLog("仙盟事务开始: affairID=%s,star=%s,startTime=%s" % (affairID, star, startTime), playerID)
- SyncFamilyAffairInfo(curPlayer, affairID)
- return
-
-def __FamilyAffair_GetAward(curPlayer, affairID):
- ## 领取事务奖励
- playerID = curPlayer.GetPlayerID()
- curTime = int(time.time())
- affairStarDict = IpyGameDataPY.GetFuncEvalCfg("FamilyAffair", 4)
- star, state = __GetAffairInfo(curPlayer, affairID)
- if state != AffairState_Underway:
- GameWorld.DebugLog("仙盟事务状态非进行中无法领取: affairID=%s,star=%s,state=%s" % (affairID, star, state), playerID)
- SyncFamilyAffairInfo(curPlayer, affairID)
- return
- startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyAffairStartTime % affairID)
- remainDuration = __GetAffairRemainDuration(curPlayer, affairID, star, curTime, affairStarDict)
- if remainDuration != 0:
- GameWorld.DebugLog("仙盟事务当前剩余时长未完成: affairID=%s,remainDuration=%s,startTime=%s"
- % (affairID, remainDuration, startTime), playerID)
- SyncFamilyAffairInfo(curPlayer, affairID)
- return
- if str(star) not in affairStarDict:
- return
- addItemList = affairStarDict[str(star)][2]
- if not ItemCommon.GiveAwardItem(curPlayer, addItemList):
- return
- __SetAffairInfo(curPlayer, affairID, star, AffairState_Finish)
- GameWorld.DebugLog("仙盟事务领奖: affairID=%s,star=%s" % (affairID, star), playerID)
- SyncFamilyAffairInfo(curPlayer, affairID)
- return
-
-def __GetAffairInfo(curPlayer, affairID):
- affairInfo = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyAffairInfo % affairID)
- star, state = affairInfo / 10, affairInfo % 10
- return star, state
-def __SetAffairInfo(curPlayer, affairID, star, state):
- info = star * 10 + state
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyAffairInfo % affairID, info)
- return
-def __GetAffairRemainDuration(curPlayer, affairID, star, curTime, affairStarDict):
- ## -1-未开始;>=0-剩余时长
- startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyAffairStartTime % affairID)
- if not startTime:
- return -1
- starInfo = affairStarDict.get(str(star), [])
- needDuration = starInfo[1] if len(starInfo) > 1 else 0
- # 可扩展减时长属性
- speedPer = 0#PlayerControl.GetAffairSpeedPer(curPlayer)
- if speedPer:
- needDuration = int(needDuration * max(10000 - speedPer, 0) / 10000.0)
- #GameWorld.DebugLog("事务加速: needDuration=%s,speedPer=%s" % (needDuration, speedPer), curPlayer.GetPlayerID())
-
- remainDuration = max(needDuration - (curTime - startTime), 0)
- return remainDuration
-
-def SyncFamilyAffairInfo(curPlayer, affairID=None):
- if affairID == None:
- affairIDList = []
- affairCountMax = IpyGameDataPY.GetFuncCfg("FamilyAffair", 1)
- for affairID in range(1, affairCountMax + 1):
- affairIDList.append(affairID)
- else:
- affairIDList = [affairID]
-
- curTime = int(time.time())
- affairStarDict = IpyGameDataPY.GetFuncEvalCfg("FamilyAffair", 4)
- affairInfoList = []
- for affairID in affairIDList:
- star, state = __GetAffairInfo(curPlayer, affairID)
- remainDuration = __GetAffairRemainDuration(curPlayer, affairID, star, curTime, affairStarDict)
- affairInfo = ChPyNetSendPack.tagMCFamilyAffair()
- affairInfo.AffairID = affairID
- affairInfo.Star = star
- affairInfo.State = state
- affairInfo.RemainDuration = max(0, remainDuration)
- affairInfoList.append(affairInfo)
-
- if not affairInfoList:
- return
- clientPack = ChPyNetSendPack.tagMCFamilyAffairInfo()
- clientPack.Clear()
- clientPack.RefreshFreeCount = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyAffairRefreshFree)
- clientPack.AffairInfoList = affairInfoList
- clientPack.Count = len(clientPack.AffairInfoList)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyEmblem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyEmblem.py
index d900533..b94f27e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyEmblem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyEmblem.py
@@ -68,7 +68,7 @@
updEmblemID = random.choice(defaultEmblemIDList) if defaultEmblemIDList else 0
GameWorld.Log("仙盟佩戴徽章过期恢复随机默认徽章! familyID=%s,emblemID=%s,endTime=%s,updEmblemID=%s" % (familyID, emblemID, endTime, updEmblemID))
family.SetEmblemID(updEmblemID)
- family.Broadcast_FamilyChange()
+ PlayerFamily.Broadcast_FamilyChange(familyID, PlayerFamily.FamilyChangeType_EChange)
return
def GetFamilyEmblemActionData(familyID, emblemID):
@@ -77,7 +77,7 @@
familyAction = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, actionType)
for index in range(familyAction.Count()):
familyActionObj = familyAction.At(index)
- if emblemID == familyActionObj.GetValue1():
+ if emblemID == GetActionEmblemID(familyActionObj):
return familyActionObj
return
@@ -104,9 +104,6 @@
actionType = ShareDefine.Def_ActionType_FamilyEmblem
familyAction = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, actionType)
emblemActionObj = familyAction.AddAction()
- emblemActionObj.SetTime(curTime)
- emblemActionObj.SetFamilyId(familyID)
- emblemActionObj.SetActionType(actionType)
if not emblemActionObj:
return
@@ -134,19 +131,19 @@
SetActionEmblemEndTime(emblemActionObj, updEndTime)
# 通知
- #PlayerFamilyAction.SendFamilyAction(emblemActionObj)
+ PlayerFamily.SendFamilyAction(emblemActionObj)
return emblemActionObj
-def OnChangeFamilyEmblem(curPlayer, emblemID):
+def OnChangeFamilyEmblem(curPlayer, emblemID, emblemWord=""):
## 修改仙盟徽章
playerID = curPlayer.GetPlayerID()
familyID = curPlayer.GetFamilyID()
- familyManager = PlayerFamily.GetFamilyMgr()
- curFamily = familyManager.FindFamily(familyID)
+ if familyID <= 0:
+ return
+ familyMgr = DBDataMgr.GetFamilyMgr()
+ curFamily = familyMgr.FindFamily(familyID)
if not curFamily:
return
- familyID = curFamily.GetID()
-
if curFamily.GetLeaderID() != playerID:
GameWorld.DebugLog("只有盟主可以修改徽章!", playerID)
return
@@ -178,8 +175,10 @@
GameWorld.Log("该徽章已过期! familyID=%s,emblemID=%s,endTime=%s" % (familyID, emblemID, endTime))
return
- GameWorld.DebugLog("更换仙盟徽章! familyID=%s,emblemID=%s" % (familyID, emblemID), playerID)
+ GameWorld.DebugLog("更换仙盟徽章! familyID=%s,emblemID=%s,emblemWord=%s" % (familyID, emblemID, GameWorld.CodeToGbk(emblemWord)), playerID)
curFamily.SetEmblemID(emblemID)
- #PlayerFamily.SendPack_MapServer_PlayerFamilyRefresh(curFamily)
- curFamily.Broadcast_FamilyChange()
- return
+ if emblemWord:
+ curFamily.SetEmblemWord(emblemWord)
+ PlayerFamily.Sync_FamilyInfo(curPlayer)
+ PlayerFamily.Broadcast_FamilyChange(familyID, PlayerFamily.FamilyChangeType_EChange, excludeIDList=[playerID])
+ return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTech.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTech.py
deleted file mode 100644
index 3ae6e80..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTech.py
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package PlayerFamilyTech
-# @todo: 玩家家族科技
-#
-# @author: panwei
-# @date 2011-06-16
-# @version 1.2
-#
-# @change: "2016-06-08 16:00" hxp 永恒战盟科技版本
-# @change: "2016-10-31 16:00" hxp 改为纯地图处理模式
-#---------------------------------------------------------------------
-#"""Version = 2016-10-31 16:00"""
-#---------------------------------------------------------------------
-import GameWorld
-#import ReadChConfig
-import GameFuncComm
-import ChPyNetSendPack
-import PlayerControl
-import NetPackCommon
-import ShareDefine
-import ChConfig
-import IpyGameDataPY
-import PlayerSuccess
-#---------------------------------------------------------------------
-def __GetTechIpyData(techID, lv=1):
- keyStr = techID*1000+lv
- return IpyGameDataPY.GetIpyGameData('FamilyTech', keyStr)
-
-#// A6 07 自身家族科技等级提升 #tagCMFamilyTechLVUP
-#
-#struct tagCMFamilyTechLVUP
-#{
-# tagHead Head;
-# DWORD TechID; // 科技ID
-#};
-def OnPlayerFamilyTechLVUP(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- techID = clientData.TechID
-
- familyID = curPlayer.GetFamilyID()
- if familyID <= 0:
- GameWorld.DebugLog("没有战盟, 无法升级战盟科技!")
- return
- if curPlayer.GetFamilyLV() < IpyGameDataPY.GetFuncCfg('TechFamilyLV'):
- return
- curTechLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTechLV % techID)
- tagTechLV = curTechLV + 1
- ipyData = __GetTechIpyData(techID, tagTechLV)
- if not ipyData:
- GameWorld.DebugLog("战盟科技ID不存在或已满级! techID=%s, tagTechLV=%s" % (techID, tagTechLV))
- return
-
-
- needContribution = ipyData.GetContribution()
- if not needContribution:
- GameWorld.DebugLog("找不到升级科技等级对应消耗 techID=%s,tagTechLV=%s" % (techID, tagTechLV))
- return
-
- #dataDict = {"techID":techID, "curTechLV":curTechLV, "tagTechLV":tagTechLV}
- isPayOK = PlayerControl.PayMoney(curPlayer, ShareDefine.TYPE_Price_Family_Contribution, needContribution)
-
- if not isPayOK:
- GameWorld.DebugLog("玩家当前贡献度不足,无法升级战盟科技!needContribution=%s" % (needContribution))
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyTechLV % techID, tagTechLV)
- PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FamilyTechLV, 1, [techID])
- PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_660051", [techID, tagTechLV])
- Sync_PlayerFamilyTechLV(curPlayer)
- #刷新所有属性
- CalcFamilyTechAttr(curPlayer)
- PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
- return
-
-# if curPlayer.GetDictByKey(ChConfig.Def_PDict_QueryTechLVUPState):
-# #已经在查询中
-# GameWorld.DebugLog("OnPlayerFamilyTechLVUP 已经在查询中...")
-# return
-#
-# if techID not in ReadChConfig.GetEvalChConfig("FamilyTechAttr"):
-# GameWorld.DebugLog("战盟科技ID不存在! techID=%s" % techID)
-# return
-#
-# curPlayer.SetDict(ChConfig.Def_PDict_QueryTechLVUPState, 1)
-# curTechLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTechLV % techID)
-# cmdStr = str([techID, curTechLV])
-# GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetPlayerID(), 0, 0, 'PlayerFamilyTechLVUP', cmdStr, len(cmdStr))
-# GameWorld.DebugLog("Query PlayerFamilyTechLVUP cmdStr=%s" % cmdStr)
- return
-
-## 执行玩家战盟科技升级
-def DoPlayerFamilyTechLVUP(curPlayer, resultList):
- # [techID, curPlayerTechLV, needContribution]
- if not resultList or len(resultList) < 3:
- return
-
- techID = resultList[0]
- curPlayerTechLV = resultList[1]
- needContribution = resultList[2]
-
- curTechLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTechLV % techID)
- if curTechLV != curPlayerTechLV:
- return
-
- updTechLV = curTechLV + 1
- #dataDict = {"techID":techID, "curTechLV":curTechLV, "updTechLV":updTechLV}
- isPayOK = PlayerControl.PayMoney(curPlayer, ShareDefine.TYPE_Price_Family_Contribution, needContribution)
- if not isPayOK:
- GameWorld.DebugLog("玩家当前贡献度不足,无法升级战盟科技!needContribution=%s" % (needContribution))
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyTechLV % techID, updTechLV)
- PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_660051", [techID, updTechLV])
- Sync_PlayerFamilyTechLV(curPlayer)
- #刷新所有属性
- CalcFamilyTechAttr(curPlayer)
- PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
- return
-
-## 计算战盟科技附加属性
-def CalcFamilyTechAttr(curPlayer):
-
- allAttrList = [{} for _ in range(4)]
- skillFPEx = 0 #额外战力
- if GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Family):
- techNeedLVDict = IpyGameDataPY.GetFuncEvalCfg('FamilyTechNeedLV', 1, {})
- techIDList = techNeedLVDict.keys()
-
- #GameWorld.DebugLog("CalcFamilyTechAttr...techIDList=%s" % techIDList)
-
- # 计算自身属性
- for techID in techIDList:
- techID = int(techID)
- techLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTechLV % techID)
- if not techLV:
- continue
- ipyData = __GetTechIpyData(techID, techLV)
- if not ipyData:
- continue
- attrID = ipyData.GetAttrType()
- addValue = ipyData.GetAttrValue()
- skillFPEx += ipyData.GetPowerEx()
- #GameWorld.DebugLog(" techID=%s,lv=%s,attrID=%s,addValue=%s" % (techID, techLV, attrID, addValue))
- PlayerControl.CalcAttrDict_Type(attrID, addValue, allAttrList)
-
- #GameWorld.DebugLog("仙盟心法属性: %s" % allAttrList)
- # 保存计算值
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_FamilyTech, allAttrList)
-
- PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_Other, skillFPEx)
- return
-
-
-## 同步玩家战盟科技等级
-def Sync_PlayerFamilyTechLV(curPlayer):
- techInfoPack = ChPyNetSendPack.tagMCPlayerTechInfo()
- techInfoPack.Clear()
- techInfoPack.TechInfoList = []
- techNeedLVDict = IpyGameDataPY.GetFuncEvalCfg('FamilyTechNeedLV', 1, {})
- techIDList = techNeedLVDict.keys()
- for techID in techIDList:
- techInfo = ChPyNetSendPack.tagMCPlayerTech()
- techInfo.Clear()
- techInfo.TechID = techID
- techInfo.TechLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTechLV % techID)
- techInfoPack.TechInfoList.append(techInfo)
- techInfoPack.TechCnt = len(techInfoPack.TechInfoList)
- NetPackCommon.SendFakePack(curPlayer, techInfoPack)
- return
-
-
-
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
index 1201f24..296c34e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
@@ -194,6 +194,9 @@
if not curCache:
return
+ familyID = curPlayer.GetFamilyID()
+ family = DBDataMgr.GetFamilyMgr().FindFamily(familyID) if familyID else None
+
tick = GameWorld.GetGameWorld().GetTick()
curPlayer.SetDict(Key_UpdViewCacheTick, tick)
#GameWorld.DebugLog("更新玩家查看缓存数据! isOffline=%s" % isOffline, playerID)
@@ -205,9 +208,10 @@
curCache.SetFace(curPlayer.GetFace())
curCache.SetFacePic(curPlayer.GetFacePic())
curCache.SetModelMark(curPlayer.GetModelMark())
- curCache.SetFamilyID(curPlayer.GetFamilyID())
- curCache.SetFamilyName(curPlayer.GetFamilyName())
- curCache.SetFamilyEmblemID(PlayerControl.GetFamilyEmblemID(curPlayer))
+ curCache.SetFamilyID(familyID)
+ curCache.SetFamilyName(family.GetName() if family else "")
+ curCache.SetFamilyEmblemID(family.GetEmblemID() if family else 0)
+ curCache.SetFamilyEmblemWord(family.GetEmblemWord() if family else 0)
curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
curCache.SetFightPowerTotal(PlayerControl.GetFightPower(curPlayer))
curCache.SetServerID(GameWorld.GetPlayerServerID(curPlayer))
@@ -264,9 +268,10 @@
curCache.SetFacePic(dbPlayer.FacePic)
curCache.SetModelMark(dbPlayer.ModelMark)
curCache.SetFamilyID(familyID)
- family = DBDataMgr.GetFamilyMgr().FindFamily(familyID)
+ family = DBDataMgr.GetFamilyMgr().FindFamily(familyID) if familyID else None
curCache.SetFamilyName(family.GetName() if family else "")
curCache.SetFamilyEmblemID(family.GetEmblemID() if family else 0)
+ curCache.SetFamilyEmblemWord(family.GetEmblemWord() if family else 0)
#curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
curCache.SetFightPowerTotal(dbPlayer.FightPowerEx * ChConfig.Def_PerPointValue + dbPlayer.FightPower)
curCache.SetServerID(GameWorld.GetAccIDServerID(dbPlayer.AccID))
@@ -371,6 +376,7 @@
clientPack.FamilyID = curCache.GetFamilyID()
clientPack.FamilyName = curCache.GetFamilyName()
clientPack.FamilyEmblemID = curCache.GetFamilyEmblemID()
+ clientPack.FamilyEmblemWord = curCache.GetFamilyEmblemWord()
clientPack.PlusData = curCache.GetPlusData()
clientPack.PlusDataSize = len(clientPack.PlusData)
return clientPack
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_PlayerFamilyTechLVUP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_PlayerFamilyTechLVUP.py
deleted file mode 100644
index 0176b6a..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_PlayerFamilyTechLVUP.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package Player.RemoteQuery.GY_Query_PlayerFamilyTechLVUP
-#
-# @todo:玩家战盟科技等级提升
-# @author hxp
-# @date 2016-06-08
-# @version 1.0
-#
-# 详细描述: 玩家战盟科技等级提升
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2016-06-08 16:00"""
-#-------------------------------------------------------------------------------
-import PlayerFamilyTech
-import GameWorld
-import ChConfig
-
-
-## 请求逻辑
-# @param query_Type 请求类型
-# @param query_ID 请求的玩家ID
-# @param packCMDList 发包命令 [数据库GM操作索引]
-# @param tick 当前时间
-# @return None or ""
-# @remarks 函数详细说明.
-def DoLogic(query_Type, query_ID, packCMDList, tick):
- return
-
-
-#---------------------------------------------------------------------
-## 执行结果
-# @param curPlayer 发出请求的玩家
-# @param callFunName 功能名称
-# @param funResult 查询的结果
-# @param tick 当前时间
-# @return None
-# @remarks 函数详细说明.
-def DoResult(curPlayer, callFunName, funResult, tick):
- curPlayer.SetDict(ChConfig.Def_PDict_QueryTechLVUPState, 0)
- try:
- funResultList = eval(funResult)
- except:
- GameWorld.ErrLog("GY_Query_PlayerFamilyTechLVUP %s eval Error" % funResult)
- return
-
- GameWorld.DebugLog("GY_Query_PlayerFamilyTechLVUP ResultList=%s" % str(funResultList))
- PlayerFamilyTech.DoPlayerFamilyTechLVUP(curPlayer, funResultList)
- return
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py
index a2e642b..d4b4f01 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py
@@ -25888,6 +25888,7 @@
('FamilyID', ctypes.c_ulong),
('FamilyName', ctypes.c_char * 33),
('FamilyEmblemID', ctypes.c_ushort),
+ ('FamilyEmblemWord', ctypes.c_char * 3),
('TitleID', ctypes.c_ulong),
('FightPower', ctypes.c_ulong),
('FightPowerEx', ctypes.c_ulong),
@@ -25915,6 +25916,7 @@
self.FamilyID = 0
self.FamilyName = ''
self.FamilyEmblemID = 0
+ self.FamilyEmblemWord = ''
self.TitleID = 0
self.FightPower = 0
self.FightPowerEx = 0
@@ -25944,6 +25946,7 @@
self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
self.FamilyEmblemID, pos = CommFunc.ReadWORD(buf, pos)
+ self.FamilyEmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
self.TitleID, pos = CommFunc.ReadDWORD(buf, pos)
self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
@@ -25968,6 +25971,7 @@
buf = CommFunc.WriteDWORD(buf, self.FamilyID)
buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.FamilyName)
buf = CommFunc.WriteWORD(buf, self.FamilyEmblemID)
+ buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.FamilyEmblemWord)
buf = CommFunc.WriteDWORD(buf, self.TitleID)
buf = CommFunc.WriteDWORD(buf, self.FightPower)
buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
@@ -25991,6 +25995,7 @@
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_char) * 33
length += sizeof(ctypes.c_ushort)
+ length += sizeof(ctypes.c_char) * 3
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ulong)
@@ -26015,6 +26020,7 @@
rec[u'FamilyID'] = self.FamilyID
rec[u'FamilyName'] = fix_incomingText(self.FamilyName)
rec[u'FamilyEmblemID'] = self.FamilyEmblemID
+ rec[u'FamilyEmblemWord'] = fix_incomingText(self.FamilyEmblemWord)
rec[u'TitleID'] = self.TitleID
rec[u'FightPower'] = self.FightPower
rec[u'FightPowerEx'] = self.FightPowerEx
@@ -26038,6 +26044,7 @@
self.FamilyID = rec.get(u'FamilyID', 0)
self.FamilyName = fix_outgoingText(rec.get(u'FamilyName', u''))
self.FamilyEmblemID = rec.get(u'FamilyEmblemID', 0)
+ self.FamilyEmblemWord = fix_outgoingText(rec.get(u'FamilyEmblemWord', u''))
self.TitleID = rec.get(u'TitleID', 0)
self.FightPower = rec.get(u'FightPower', 0)
self.FightPowerEx = rec.get(u'FightPowerEx', 0)
@@ -26160,6 +26167,7 @@
FamilyID = %s,
FamilyName = %s,
FamilyEmblemID = %s,
+ FamilyEmblemWord = %s,
TitleID = %s,
FightPower = %s,
FightPowerEx = %s,
@@ -26181,6 +26189,7 @@
self.FamilyID,
self.FamilyName,
self.FamilyEmblemID,
+ self.FamilyEmblemWord,
self.TitleID,
self.FightPower,
self.FightPowerEx,
@@ -26193,7 +26202,7 @@
return output
def dumpString(self):
- output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
+ output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
self.PlayerID,
self.AccID,
self.PlayerName,
@@ -26206,6 +26215,7 @@
self.FamilyID,
self.FamilyName,
self.FamilyEmblemID,
+ self.FamilyEmblemWord,
self.TitleID,
self.FightPower,
self.FightPowerEx,
@@ -26234,6 +26244,12 @@
self.FamilyName = Str
else:
self.FamilyName = Str[:33]
+
+ def SetFamilyEmblemWord(self,Str):
+ if len(Str)<=3:
+ self.FamilyEmblemWord = Str
+ else:
+ self.FamilyEmblemWord = Str[:3]
# 排行榜表 #tagDBBillboard
@@ -27247,6 +27263,7 @@
('FightPower', ctypes.c_ulong),
('FightPowerEx', ctypes.c_ulong),
('EmblemID', ctypes.c_ushort),
+ ('EmblemWord', ctypes.c_char * 3),
('ADOResult', ctypes.c_ulong),
]
@@ -27269,6 +27286,7 @@
self.FightPower = 0
self.FightPowerEx = 0
self.EmblemID = 0
+ self.EmblemWord = ''
def readData(self, buf, pos = 0, length = 0):
if not pos <= length:
@@ -27294,6 +27312,7 @@
self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
self.EmblemID, pos = CommFunc.ReadWORD(buf, pos)
+ self.EmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
return self.getLength()
def getBuffer(self):
@@ -27312,6 +27331,7 @@
buf = CommFunc.WriteDWORD(buf, self.FightPower)
buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
buf = CommFunc.WriteWORD(buf, self.EmblemID)
+ buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.EmblemWord)
return buf
def getLength(self):
@@ -27330,6 +27350,7 @@
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ulong)
length += sizeof(ctypes.c_ushort)
+ length += sizeof(ctypes.c_char) * 3
return length
def getRecord(self):
@@ -27349,6 +27370,7 @@
rec[u'FightPower'] = self.FightPower
rec[u'FightPowerEx'] = self.FightPowerEx
rec[u'EmblemID'] = self.EmblemID
+ rec[u'EmblemWord'] = fix_incomingText(self.EmblemWord)
return rec
def readRecord(self, rec):
@@ -27367,6 +27389,7 @@
self.FightPower = rec.get(u'FightPower', 0)
self.FightPowerEx = rec.get(u'FightPowerEx', 0)
self.EmblemID = rec.get(u'EmblemID', 0)
+ self.EmblemWord = fix_outgoingText(rec.get(u'EmblemWord', u''))
def adoLoad(self, collection):
'''使用KEY查找并读取'''
@@ -27532,6 +27555,7 @@
FightPower = %s,
FightPowerEx = %s,
EmblemID = %s,
+ EmblemWord = %s,
ADOResult = %s,
'''%(
self.ID,
@@ -27548,12 +27572,13 @@
self.FightPower,
self.FightPowerEx,
self.EmblemID,
+ self.EmblemWord,
self.ADOResult,
)
return output
def dumpString(self):
- output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
+ output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
self.ID,
self.Name,
self.LeaderID,
@@ -27568,6 +27593,7 @@
self.FightPower,
self.FightPowerEx,
self.EmblemID,
+ self.EmblemWord,
)
return output
@@ -27577,6 +27603,12 @@
self.Name = Str
else:
self.Name = Str[:33]
+
+ def SetEmblemWord(self,Str):
+ if len(Str)<=3:
+ self.EmblemWord = Str
+ else:
+ self.EmblemWord = Str[:3]
# 家族成员表 #tagDBFamilyMem
@@ -27598,7 +27630,9 @@
('OffTime', ctypes.c_ulong),
('FmLV', ctypes.c_ubyte),
('ContribTotal', ctypes.c_ulong),
- ('ContribWeek', ctypes.c_ulong),
+ ('ContribDay', ctypes.c_ulong),
+ ('DonateCntTotal', ctypes.c_ulong),
+ ('DonateCntDay', ctypes.c_ubyte),
('ADOResult', ctypes.c_ulong),
]
@@ -27634,7 +27668,9 @@
self.OffTime, pos = CommFunc.ReadDWORD(buf, pos)
self.FmLV, pos = CommFunc.ReadBYTE(buf, pos)
self.ContribTotal, pos = CommFunc.ReadDWORD(buf, pos)
- self.ContribWeek, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ContribDay, pos = CommFunc.ReadDWORD(buf, pos)
+ self.DonateCntTotal, pos = CommFunc.ReadDWORD(buf, pos)
+ self.DonateCntDay, pos = CommFunc.ReadBYTE(buf, pos)
return self.getLength()
@@ -27664,7 +27700,9 @@
rec[u'OffTime'] = self.OffTime
rec[u'FmLV'] = self.FmLV
rec[u'ContribTotal'] = self.ContribTotal
- rec[u'ContribWeek'] = self.ContribWeek
+ rec[u'ContribDay'] = self.ContribDay
+ rec[u'DonateCntTotal'] = self.DonateCntTotal
+ rec[u'DonateCntDay'] = self.DonateCntDay
return rec
def readRecord(self, rec):
@@ -27684,7 +27722,9 @@
self.OffTime = rec.get(u'OffTime', 0)
self.FmLV = rec.get(u'FmLV', 0)
self.ContribTotal = rec.get(u'ContribTotal', 0)
- self.ContribWeek = rec.get(u'ContribWeek', 0)
+ self.ContribDay = rec.get(u'ContribDay', 0)
+ self.DonateCntTotal = rec.get(u'DonateCntTotal', 0)
+ self.DonateCntDay = rec.get(u'DonateCntDay', 0)
def adoLoad(self, collection):
'''使用KEY查找并读取'''
@@ -27851,7 +27891,9 @@
OffTime = %s,
FmLV = %s,
ContribTotal = %s,
- ContribWeek = %s,
+ ContribDay = %s,
+ DonateCntTotal = %s,
+ DonateCntDay = %s,
ADOResult = %s,
'''%(
self.PlayerID,
@@ -27869,13 +27911,15 @@
self.OffTime,
self.FmLV,
self.ContribTotal,
- self.ContribWeek,
+ self.ContribDay,
+ self.DonateCntTotal,
+ self.DonateCntDay,
self.ADOResult,
)
return output
def dumpString(self):
- output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
+ output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
self.PlayerID,
self.FamilyID,
self.JoinTime,
@@ -27891,7 +27935,9 @@
self.OffTime,
self.FmLV,
self.ContribTotal,
- self.ContribWeek,
+ self.ContribDay,
+ self.DonateCntTotal,
+ self.DonateCntDay,
)
return output
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index b6e4298..cab0095 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -276,8 +276,6 @@
Def_Notify_WorldKey_FamilyKillHorsePetRobBossCnt = 'FamilyKillHorsePetRobBossCnt' # 仙盟击杀骑宠boss数统计
Def_Notify_WorldKey_HorsePetRobBossPlayerCount = 'HorsePetRobBossPlayerCount' # 骑宠争夺活动有效参考人数
-Def_Notify_WorldKey_FamilyActivityDayState = "FamilyActivityDayState" #战盟相关活动今日开启状态, 按位存储代表今日是否开启过
-
Def_Notify_WorldKey_RedPacketOutput = 'RedPacketOutput' # 红包产出信息
Def_Notify_WorldKey_HurtLog = 'HurtLog' # 战斗伤害日志
@@ -622,7 +620,7 @@
CDBPlayerRefresh_RuneSplinters, # 符印碎片 170
CDBPlayerRefresh_RealmPoint, # 境界修炼点
CDBPlayerRefresh_Ysog, # 魔精
-CDBPlayerRefresh_FamilyActivity, # 仙盟活跃令
+CDBPlayerRefresh_FamilyCoin, # 仙盟公会币
CDBPlayerRefresh_ParryRateDef, # 抗格挡
CDBPlayerRefresh_PKState, # 战斗状态 175
CDBPlayerRefresh_BossState, # boss状态
@@ -739,11 +737,11 @@
) = range(146, 287)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
-TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
+TYPE_Price_FamilyExp = 6 # 战盟经验
TYPE_Price_FamilyStoreScore = 10 # 战盟仓库积分
TYPE_Price_RealmPoint = 13 # 境界修炼点
TYPE_Price_Ysog = 14 # 魔精
-TYPE_Price_FamilyActivity = 15 # 仙盟活跃令
+TYPE_Price_FamilyCoin = 15 # 仙盟公会贡献币
TYPE_Price_FBHelpPoint = 16 # 副本助战积分, 废弃
TYPE_Price_Honor = 18 # 荣誉
TYPE_Price_BossActScore = 19 # boss活动积分,bt版用
@@ -783,7 +781,7 @@
#key可用于遍历所有货币,value仅GM相关会用到
MoneyNameDict = {
- 1:"金币", 41:"战锤", 42:"将星玉髓", 51:"招募积分", 52:"淘金令", 53:"挑战券",
+ 1:"金币", 15:"公会贡献币", 41:"战锤", 42:"将星玉髓", 51:"招募积分", 52:"淘金令", 53:"挑战券",
98:"代币时效", 99:"代币"
}
#MoneyNameDict = {
@@ -800,7 +798,6 @@
# 自定义积分及通知字典 {货币类型:通知客户端刷新类型, ...} , 如果不通知的话刷新类型则配置 None
TYPE_Price_CurrencyDict = {
- TYPE_Price_Family_Contribution:CDBPlayerRefresh_FamilyContribution,
TYPE_Price_FamilyStoreScore:CDBPlayerRefresh_FamilyStoreScore,
TYPE_Price_Rune:CDBPlayerRefresh_Rune,
TYPE_Price_RuneSplinters:CDBPlayerRefresh_RuneSplinters,
@@ -808,7 +805,7 @@
TYPE_Price_BourseMoney:None,
TYPE_Price_RealmPoint:CDBPlayerRefresh_RealmPoint,
TYPE_Price_Ysog:CDBPlayerRefresh_Ysog,
- TYPE_Price_FamilyActivity:CDBPlayerRefresh_FamilyActivity,
+ TYPE_Price_FamilyCoin:CDBPlayerRefresh_FamilyCoin,
TYPE_Price_Danjing:CDBPlayerRefresh_Danjing,
TYPE_Price_SoulDust:CDBPlayerRefresh_SoulDust,
TYPE_Price_SoulSplinters:CDBPlayerRefresh_SoulSplinters,
@@ -1624,7 +1621,7 @@
SuccType_XXX97, # 废弃97
SuccType_XXX98, # 废弃98
SuccType_XXX99, # 废弃99
-SuccType_FamilyTechLV, # 仙盟X技能X级100
+SuccType_100, # 100
SuccType_XXX101, # 废弃101
SuccType_XXX102, # 废弃102
SuccType_XXX103, # 废弃103
@@ -1724,7 +1721,6 @@
SuccType_Pray,SuccType_PetClassLV,
SuccType_QueenRelics,SuccType_XMZZConWin,
SuccType_Collect,SuccType_DogzBattle,
- SuccType_UseItem,SuccType_FamilyTechLV,
SuccType_GetSpecialItem,SuccType_GetMagicWeapon,SuccType_XBXZ,
SuccType_FeastRedPack_KillSpecificNPC,SuccType_FeastRedPack_KillBoss,
SuccType_FeastRedPack_EnterMap, SuccType_FeastRedPack_FBSweep,
@@ -1840,18 +1836,6 @@
EntFBAskRet_Other, # xx 其他限制
EntFBAskRet_Max,
) = range(18)
-
-
-#增加仙盟活跃的活动类型
-FamilyActiveIDList = (
-FamilyActive_Task, #仙盟任务
-FamilyActive_Party, #仙盟宴会
-FamilyActive_BOSS, #仙盟BOSS
-FamilyActive_War, #仙盟联赛
-FamilyActive_HelpDujie, #同盟护法
-FamilyActive_SWRH, #守卫人皇
-) = range(1,6+1)
-
# BOSS 功能标识区分 对应KillBossCntLimit,主要根据击杀类型不同区分
(
--
Gitblit v1.8.0