From 000cf441771078c5bbe60ebc6173e7df5360e54e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 04 九月 2018 14:39:47 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyRedPacket.py | 36 +++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 58 ++++++-----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 41 ++++---
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py | 1
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 58 ++++++-----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 2
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py | 17 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 6 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 2
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldFamilyWar.py | 30 +++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 8 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1
15 files changed, 172 insertions(+), 95 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index fabb438..908d399 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -20484,56 +20484,64 @@
# AA 16 通知超值礼包信息 #tagMCSuperGiftInfo
class tagMCSuperGiftInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("GiftID", c_int), #商品ID
- ("RemainDay", c_ubyte), #剩余天数
- ]
+ Head = tagHead()
+ GiftID = 0 #(DWORD GiftID)//商品ID
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ data = None
def __init__(self):
self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x16
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
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.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ return _pos
def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x16
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
self.GiftID = 0
- self.RemainDay = 0
+ self.EndtDate = ""
return
def GetLength(self):
- return sizeof(tagMCSuperGiftInfo)
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 10
+
+ 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.WriteDWORD(data, self.GiftID)
+ data = CommFunc.WriteString(data, 10, self.EndtDate)
+ return data
def OutputString(self):
- DumpString = '''// AA 16 通知超值礼包信息 //tagMCSuperGiftInfo:
- Cmd:%s,
- SubCmd:%s,
+ DumpString = '''
+ Head:%s,
GiftID:%d,
- RemainDay:%d
+ EndtDate:%s
'''\
%(
- self.Cmd,
- self.SubCmd,
+ self.Head.OutputString(),
self.GiftID,
- self.RemainDay
+ self.EndtDate
)
return DumpString
m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Cmd,m_NAtagMCSuperGiftInfo.SubCmd))] = m_NAtagMCSuperGiftInfo
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Head.Cmd,m_NAtagMCSuperGiftInfo.Head.SubCmd))] = m_NAtagMCSuperGiftInfo
#------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldFamilyWar.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldFamilyWar.py
index 8e29300..3bfd634 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldFamilyWar.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldFamilyWar.py
@@ -425,20 +425,20 @@
continue
if family.GetLV() < joinFamilyLVLimit:
GameWorld.Log("仙盟等级不足,无法参与联赛!familyID=%s,LV=%s,joinFamilyLVLimit=%s" % (familyID, family.GetLV(), joinFamilyLVLimit))
- continue
- groupFamilyList.append(family)
-
- # 添加参赛仙盟及成员名单
- PyGameData.g_familyWarFamilyIDList.append(familyID)
- for index in xrange(family.GetCount()):
- curMember = family.GetAt(index)
- memPlayerID = curMember.GetPlayerID()
- memPlayer = curMember.GetPlayer()
- isAddOK = AddFamilyWarMem(memPlayerID, familyID, warMemRecList)
- lastJoinFamilyID = lastFamilyWarMemDict.get(memPlayerID, 0)
- # 重新通知玩家参与的仙盟
- if lastJoinFamilyID and isAddOK and lastJoinFamilyID != familyID and memPlayer:
- __NotifyPlayerJoinFamilyInfo(memPlayer, familyID)
+ else:
+ groupFamilyList.append(family)
+
+ # 添加参赛仙盟及成员名单
+ PyGameData.g_familyWarFamilyIDList.append(familyID)
+ for index in xrange(family.GetCount()):
+ curMember = family.GetAt(index)
+ memPlayerID = curMember.GetPlayerID()
+ memPlayer = curMember.GetPlayer()
+ isAddOK = AddFamilyWarMem(memPlayerID, familyID, warMemRecList)
+ lastJoinFamilyID = lastFamilyWarMemDict.get(memPlayerID, 0)
+ # 重新通知玩家参与的仙盟
+ if lastJoinFamilyID and isAddOK and lastJoinFamilyID != familyID and memPlayer:
+ __NotifyPlayerJoinFamilyInfo(memPlayer, familyID)
# 满一组仙盟数 or 没有仙盟了
if len(groupFamilyList) == FamilyWar_GroupFamilyCount or i == familyCount - 1:
@@ -453,6 +453,8 @@
GameWorld.Log(" PyGameData.g_familyWarFamilyIDList: %s" % PyGameData.g_familyWarFamilyIDList)
GameWorld.Log(" PyGameData.g_familyWarMemDict: %s" % PyGameData.g_familyWarMemDict)
+ GameWorld.Log(" 通用记录对战家族数: %s" % warBatRecList.Count())
+ GameWorld.Log(" 通用记录参与玩家数: %s" % warMemRecList.Count())
GameWorld.Log(" 仙盟联赛首轮比赛分组确认完毕!")
PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_FamilyWar_Round, FamilyWarRound_First) # 设置已处理过的轮次
return
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 99e2f5e..3e2f353 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -686,6 +686,8 @@
GameWorld.Log("玩家 : %s,%s,FBID=%s 切换地图" % (curPlayer.GetName(), curPlayer.GetRealMapID(), curPlayer.GetFBID()) , curPlayer.GetPlayerID())
PlayerTeam.OnPlayerChangeMap(curPlayer, tick)
GameWorldBoss.OnPlayerChangeMap(curPlayer)
+ PlayerFamily.OnPlayerChangeMap(curPlayer, tick)
+ PlayerFamilyParty.OnPlayerChangeMap(curPlayer, tick)
return
## 玩家切换真实地图
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index 095ede0..b600d6f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -41,6 +41,15 @@
NotifyFamilyPartyQuestion(curPlayer)
return
+def OnPlayerChangeMap(curPlayer, tick):
+ if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
+ return
+ playerID = curPlayer.GetID()
+ if playerID not in PyGameData.g_partyheroAnswerDict:
+ PyGameData.g_partyheroAnswerDict[playerID] = 0
+ return
+
+
def NotifyFamilyPartyQuestion(curPlayer):
#刚登录的或刚进仙盟的补发最近的题目
gameWorld = GameWorld.GetGameWorld()
@@ -104,6 +113,14 @@
PlayerCompensation.SendPersonalItemMailEx('', content, day, [topHeroID], itemList)
PlayerControl.WorldNotify(0, 'Party_TopPlayer', [topHeroName])
+
+ #给参与奖励
+ joinPlayerIDList = PyGameData.g_partyheroAnswerDict.keys()
+ if joinPlayerIDList:
+ joinReward = IpyGameDataPY.GetFuncEvalCfg('PartyReward')
+ if joinReward:
+ PlayerCompensation.SendMailByKey('FamilyParty', joinPlayerIDList, joinReward)
+
return
def __GetFamilyAnswerRankList():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py
index 14dea9b..36b3651 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py
@@ -146,6 +146,7 @@
#2011-05-12 chenxuewei 有没主人都只要通知一次即可,避免重复通知
if curPlayer != None:
FBLogic.DoFB_Player_KillNPC(curPlayer, curTagNPC, tick)
+ NPCCommon.OnPlayerAttackNPCDie(curTagNPC, curPlayer, skill)
else:
#副本
FBLogic.DoFB_Npc_KillNPC(curSummonNPC, curTagNPC, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 2d324ce..97bd58d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3737,6 +3737,7 @@
#仙盟红包
Def_PDict_FamilyRedPacketGoldLimit = "FmlRedPacketGoldLimit" # 仙盟钻石红包已发额度
+Def_PDict_FamilyRedPacketCache = "FamilyRedPacketCache%s" # 仙盟红包待发放记录参数索引
Def_PDict_OSRedPacketGrabMoney = "OSRedPacketGrabMoney" # 开服红包已抢数量
Def_PDict_OSRedPacketCanGrabCnt = "OSRedPacketCanGrabCnt" # 开服红包可抢次数
Def_PDict_OSRedPacketStartTime = "OSRedPacketStartTime" #开服红包开始倒计时时间
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index fabb438..908d399 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -20484,56 +20484,64 @@
# AA 16 通知超值礼包信息 #tagMCSuperGiftInfo
class tagMCSuperGiftInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("GiftID", c_int), #商品ID
- ("RemainDay", c_ubyte), #剩余天数
- ]
+ Head = tagHead()
+ GiftID = 0 #(DWORD GiftID)//商品ID
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ data = None
def __init__(self):
self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x16
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
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.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ return _pos
def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x16
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x16
self.GiftID = 0
- self.RemainDay = 0
+ self.EndtDate = ""
return
def GetLength(self):
- return sizeof(tagMCSuperGiftInfo)
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 10
+
+ 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.WriteDWORD(data, self.GiftID)
+ data = CommFunc.WriteString(data, 10, self.EndtDate)
+ return data
def OutputString(self):
- DumpString = '''// AA 16 通知超值礼包信息 //tagMCSuperGiftInfo:
- Cmd:%s,
- SubCmd:%s,
+ DumpString = '''
+ Head:%s,
GiftID:%d,
- RemainDay:%d
+ EndtDate:%s
'''\
%(
- self.Cmd,
- self.SubCmd,
+ self.Head.OutputString(),
self.GiftID,
- self.RemainDay
+ self.EndtDate
)
return DumpString
m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Cmd,m_NAtagMCSuperGiftInfo.SubCmd))] = m_NAtagMCSuperGiftInfo
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Head.Cmd,m_NAtagMCSuperGiftInfo.Head.SubCmd))] = m_NAtagMCSuperGiftInfo
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index 7a7355b..d4802cb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -607,10 +607,11 @@
return
giftID, day = superGiftTimeList[giftIndex-1]
openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)+1
+ remainDay = max(0, day - openServerDay+startDay)-1
packData = ChPyNetSendPack.tagMCSuperGiftInfo()
packData.GiftID = giftID
- packData.RemainDay = max(0, day - openServerDay+startDay)
+ packData.EndtDate = str(GameWorld.GetDatetimeByDiffDays(remainDay))[:10]
NetPackCommon.SendFakePack(curPlayer, packData)
return
def CheckSuperGiftBuy(curPlayer, giftID):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index b8c4cc1..27113b2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7196,6 +7196,12 @@
groupCnt +=1
return groupCnt >= needCnt
+##法宝激活个数
+# @param None
+# @return None <Mwcnt value="cnt"/>
+def ConditionType_Mwcnt(curPlayer, curMission, curActionNode):
+ totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ return PlayerMagicWeapon.GetMWActiveCntTotal(curPlayer) >= totalcnt
##激活法宝,确认与成就逻辑后使用
# @param None
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 88fe8bb..c20332f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1732,7 +1732,7 @@
return
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_BuyFbCntDay % mapID, hasBuyCnt + 1)
Sync_FBPlayerFBBuyCount(curPlayer, [mapID])
-
+ PlayerControl.NotifyCode(curPlayer, 'FBEnterTimeBuy', [mapID])
lastRegainTime= curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainStartTime % mapID)
if lastRegainTime:
maxDayTimes = ipyData.GetDayTimes()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
index d39dbf9..289e5ff 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
@@ -194,7 +194,6 @@
FBCommon.SetFBStep(FB_Step_Fighting, tick)
elif fbStep == FB_Step_Fighting:
if not FBCommon.GetFBFuncOpenState(ChConfig.Def_FBMapID_FamilyParty):
- GiveJoinPrize()
FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
PyGameData.g_familyPartyInfo = []
FBCommon.SetFBStep(FB_Step_Over, tick)
@@ -246,10 +245,22 @@
def OnFamilyPartyStateChange(state, tick):
#活动状态变更
+ GameWorld.DebugLog(' 仙盟宴会活动状态变更 state=%s'%state)
+# if state == 0:
+# playerManager = GameWorld.GetPlayerManager()
+# for i in xrange(playerManager.GetPlayerCount()):
+# curPlayer = playerManager.GetPlayerByIndex(i)
+# if not curPlayer or curPlayer.IsEmpty():
+# continue
+# #答对题或者进过图的给参与奖励
+# curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
+# if FBCommon.GetEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty) or curAnswerCnt:
+# GiveJoinPrize(curPlayer)
+
+
mapID = GameWorld.GetMap().GetMapID()
if mapID != ChConfig.Def_FBMapID_FamilyParty:
return
- GameWorld.DebugLog(' 仙盟宴会活动状态变更 state=%s'%state)
if state == 1:
GameWorld.GetGameWorld().SetGameWorldDict(Map_FamilyPartyFB_StartTick, tick)
@@ -257,21 +268,15 @@
return
-
-def GiveJoinPrize():
- #参与奖
- joinAward = IpyGameDataPY.GetFuncCfg('PartyReward')
- if not joinAward:
- return
- copyMapPlayerManager = GameWorld.GetMapCopyPlayerManager()
- for i in xrange(copyMapPlayerManager.GetPlayerCount()):
-
- curPlayer = copyMapPlayerManager.GetPlayerByIndex(i)
-
- if curPlayer == None or curPlayer.IsEmpty():
- continue
- PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, joinAward, True, ShareDefine.Def_AddFAVReason_FamilyParty)
- return
+#
+#def GiveJoinPrize(curPlayer):
+# #参与奖
+# joinAward = IpyGameDataPY.GetFuncCfg('PartyReward')
+# if not joinAward:
+# return
+#
+# PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, joinAward, True, ShareDefine.Def_AddFAVReason_FamilyParty)
+# return
@@ -321,7 +326,7 @@
expPoint = totalExp / ChConfig.Def_PerPointValue
totalPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalPoint%playerID)
- totalPoint += IpyGameDataPY.GetFuncCfg('PartyReward') #加参与奖
+ #totalPoint += IpyGameDataPY.GetFuncCfg('PartyReward') #加参与奖
totalPoint += addPoint * curAnswerCnt
hasCollect = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasCollect%playerID)
getCnt = gameWorld.GetGameWorldDictByKey(ChConfig.Map_Player_AreaReward_GetCnt%playerID)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index 23508e0..05b8c0c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -449,7 +449,7 @@
SuperHitReduce = attrDict.get(ShareDefine.Def_Effect_SuperHitReduce, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSuperHitReduceC())
SkillAtkRate = attrDict.get(ShareDefine.Def_Effect_SkillAtkRate, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAtkRateC())
SpeedPer = attrDict.get(ShareDefine.Def_Effect_SpeedPer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSpeedPerC())
- SkillAtkRateReduceC = attrDict.get(ShareDefine.Def_Effect_SkillAtkRate, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAtkRateReduceC())
+ SkillAtkRateReduce = attrDict.get(ShareDefine.Def_Effect_SkillAtkRate, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAtkRateReduceC())
# 攻速不默认乘,仅作为参数提供策划使用
AtkSpeed = attrDict.get(ShareDefine.Def_Effect_AtkSpeed, 0)
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 32ee3d2..58f3f7b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -3480,8 +3480,14 @@
return
mapID = curPlayer.GetMapID()
+
+ activityLineID = 0 # 活动线, 默认1线
+ activityMapLineDict = IpyGameDataPY.GetFuncEvalCfg("MapLine", 2, {})
+ if mapID in activityMapLineDict:
+ activityLineID = max(0, activityMapLineDict[mapID] - 1)
+
mapLineDict = IpyGameDataPY.GetFuncEvalCfg("MapLine", 1)
- if mapID in mapLineDict and changLineID >= mapLineDict[mapID]:
+ if changLineID != activityLineID and mapID in mapLineDict and changLineID >= mapLineDict[mapID]:
GameWorld.ErrLog("该地图没有开放此线路,无法手动切换!mapID=%s,changLineID=%s,maxLine=%s"
% (mapID, changLineID, mapLineDict[mapID]), curPlayer.GetID())
return
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 771b91a..1c74150 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -28,6 +28,7 @@
import GameLogic_FamilyWar
import ChMapToGamePyPack
import PlayerFamilyTech
+import PlayerFamilyRedPacket
import SkillCommon
import BuffSkill
import ItemCommon
@@ -152,6 +153,7 @@
PlayerFamilyTech.Sync_PlayerFamilyTechLV(curPlayer)
DelAddFamilyRecord(curPlayer)
GameLogic_FamilyWar.DoCheckChampionFamilyTitle(curPlayer)
+ PlayerFamilyRedPacket.CreatCacheRedPacktet(curPlayer)
return
## 退出家族触发事件
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyRedPacket.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyRedPacket.py
index 368ac60..ba856a3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyRedPacket.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyRedPacket.py
@@ -52,26 +52,44 @@
__NotifyGoldLimt(curPlayer)
return
+def CreatCacheRedPacktet(curPlayer):
+ #加入仙盟后,发放待发的红包
+ ipyMgr = IpyGameDataPY.IPY_Data()
+ for i in xrange(ipyMgr.GetFamilyRedPackCount()):
+ ipyData = ipyMgr.GetFamilyRedPackByIndex(i)
+ redPacketID = ipyData.GetID()
+ if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FamilyRedPacketCache, redPacketID):
+ CreatRedPacketByID(curPlayer, redPacketID)
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FamilyRedPacketCache, redPacketID, 0)
+ return
+
+
def CreatRedPacketByID(curPlayer, redPacketID, state=State_NoSend, data=0):
#根据红包ID生成红包
ipyData = IpyGameDataPY.GetIpyGameData('FamilyRedPack', redPacketID)
if not ipyData:
return
- DoCreatFamilyRedPacket(curPlayer, ipyData.GetGetType(), ipyData.GetMoneyType(), ipyData.GetMoneyNum(), ipyData.GetPacketCnt(), state, '', data)
- return
-
-## 生成红包
-def DoCreatFamilyRedPacket(curPlayer, getType, moneyType=2, awardNum=100, packetCnt=10, state=State_NoSend, wishInfo='', data=0):
-# if not curPlayer.GetFamilyID():
-# #没家族
-# return
-
+ getType = ipyData.GetGetType()
if getType == IpyGameDataPY.GetFuncCfg('OpenServerRedPacketType'):
oscDay = IpyGameDataPY.GetFuncCfg('OpenServerRedPacketCfg')
openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)
if openServerDay >= oscDay:
GameWorld.DebugLog(' 发开服红包,活动已过,不可发送!')
return
+ else:
+ if not curPlayer.GetFamilyID():
+ #没家族 先存起来,等进仙盟时再补发
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FamilyRedPacketCache, redPacketID, 1)
+ return
+
+ DoCreatFamilyRedPacket(curPlayer, getType, ipyData.GetMoneyType(), ipyData.GetMoneyNum(), ipyData.GetPacketCnt(), state, '', data)
+ return
+
+## 生成红包
+def DoCreatFamilyRedPacket(curPlayer, getType, moneyType=2, awardNum=100, packetCnt=10, state=State_NoSend, wishInfo='', data=0):
+
+
+
playerID = curPlayer.GetPlayerID()
packetCnt = min(packetCnt, awardNum)
--
Gitblit v1.8.0