| | |
| | | import GameLogic_FamilyWar
|
| | | import ChMapToGamePyPack
|
| | | import PlayerFamilyTech
|
| | | import PlayerFamilyRedPacket
|
| | | import SkillCommon
|
| | | import BuffSkill
|
| | | import ItemCommon
|
| | |
| | | if curPlayer.GetFamilyMemberLV() != refreshPack.GetFamilyMemberLV():
|
| | | curPlayer.SetFamilyMemberLV(refreshPack.GetFamilyMemberLV())
|
| | | #通知周围玩家家族职位刷新
|
| | | curPlayer.Notify_FamilyMemberLVRefresh()
|
| | | #curPlayer.Notify_FamilyMemberLVRefresh()
|
| | | GameLogic_FamilyWar.DoCheckChampionFamilyTitle(curPlayer)
|
| | |
|
| | | if curPlayer.GetFamilyMoney() != refreshPack.GetFamilyMoney():
|
| | |
| | | PlayerFamilyTech.Sync_PlayerFamilyTechLV(curPlayer)
|
| | | DelAddFamilyRecord(curPlayer)
|
| | | GameLogic_FamilyWar.DoCheckChampionFamilyTitle(curPlayer)
|
| | | PlayerFamilyRedPacket.CreatCacheRedPacktet(curPlayer)
|
| | | return
|
| | |
|
| | | ## 退出家族触发事件
|
| | |
| | | def __OnFamilyLVBuffChange(curPlayer, tick):
|
| | | return
|
| | | # 跨服服务器不处理,防止登录跨服服务器后无战盟导致战力下降
|
| | | if GameWorld.IsMergeServer():
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | |
|
| | | familyLVBuffSkillTypeID = ReadChConfig.GetEvalChConfig("FamilyLVBuff")
|
| | |
| | | if item.GetType() != ChConfig.Def_ItemType_FamilyBossFood:
|
| | | continue
|
| | | addActiveValue = item.GetEffectByIndex(0).GetEffectValue(0)
|
| | | if not addActiveValue:
|
| | | continue
|
| | | # if not addActiveValue:
|
| | | # continue
|
| | | itemCnt = item.GetCount()
|
| | | totalAddActiveValue += addActiveValue * itemCnt
|
| | | delItemList.append(item, itemCnt)
|
| | | delItemList.append([item, itemCnt])
|
| | | totalCnt += itemCnt
|
| | | if not totalAddActiveValue:
|
| | | if not totalCnt:
|
| | | GameWorld.DebugLog('背包里没有可捐献的物品')
|
| | | return
|
| | | for eatItem, delCnt in delItemList:
|
| | | ItemCommon.DelItem(curPlayer, eatItem, delCnt, False)
|
| | |
|
| | | #累加个人活跃度/贡献度
|
| | | AddPlayerFamilyActiveValue(curPlayer, totalAddActiveValue, True, ShareDefine.Def_AddFAVReason_FamilyDonateItem)
|
| | | if totalAddActiveValue:
|
| | | AddPlayerFamilyActiveValue(curPlayer, totalAddActiveValue, True, ShareDefine.Def_AddFAVReason_FamilyDonateItem)
|
| | | AddFamilyBossFood(curPlayer, totalCnt, ShareDefine.Def_AddFAVReason_FamilyDonateItem)
|
| | | GameWorld.DebugLog(' 捐献仙盟兽粮 totalCnt=%s,totalAddActiveValue=%s'%(totalCnt,totalAddActiveValue))
|
| | | return
|
| | |
| | | # @param awardIndex
|
| | | # @return None
|
| | | def GetFamilyActivityAward(curPlayer, awardIndex):
|
| | | return
|
| | | familyActiveList = IpyGameDataPY.GetFuncEvalCfg('FamilyActive')
|
| | | familyActiveAwardList = IpyGameDataPY.GetFuncEvalCfg('FamilyActive', 2)
|
| | | if awardIndex < 0 or awardIndex >= len(familyActiveList):
|
| | |
| | | return
|
| | |
|
| | | def AddFamilyActivity(curPlayer, actionid, addCnt=1):
|
| | | return
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('FamilyActivity', actionid)
|
| | | if not ipyData:
|
| | | return
|
| | |
| | | return totalPoint
|
| | |
|
| | | def SyncFamilyActivityInfo(curPlayer, syncActionid=-1):
|
| | | return
|
| | | #通知活跃领取情况
|
| | | syncActionIDList = ShareDefine.FamilyActiveIDList if syncActionid==-1 else [syncActionid]
|
| | | sendPack = ChPyNetSendPack.tagMCFamilyActivityInfo()
|
| | |
| | | def UpdateFamilyName(index, clientData, tick):
|
| | |
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | if GameWorld.IsMergeServer():
|
| | | if GameWorld.IsCrossServer():
|
| | | #itemuse_lzxkoy_0:不可在跨服环境下使用改名功能。
|
| | | PlayerControl.NotifyCode(curPlayer, "itemuse_lzxkoy_0")
|
| | | return
|