| | |
| | | import PlayerViewCache
|
| | | import ChPyNetSendPack
|
| | | import PlayerFamilyEmblem
|
| | | #import PlayerFamilyZhenfa
|
| | | import PlayerFamilyZhenbaoge
|
| | | import PlayerFamilyTaofa
|
| | | import IPY_PlayerDefine
|
| | | import IpyGameDataPY
|
| | | import IPY_GameWorld
|
| | |
| | | family = familyManager.GetAt(i)
|
| | | familyID = family.GetID()
|
| | |
|
| | | #珍宝阁
|
| | | PlayerFamilyZhenbaoge.OnDay(family)
|
| | | PlayerFamilyTaofa.OnDay(family)
|
| | |
|
| | | for index in xrange(family.GetCount()):
|
| | | member = family.GetAt(index)
|
| | |
| | | return
|
| | | ResetDailyDonateCnt(curPlayer)
|
| | | PlayerFamilyZhenbaoge.PlayerOnDay(curPlayer)
|
| | | PlayerFamilyTaofa.PlayerOnDay(curPlayer)
|
| | | return
|
| | |
|
| | | def OnPlayerLogin(curPlayer, tick):
|
| | |
| | | PlayerLoginRefreshFamily(curPlayer, tick)
|
| | | Sync_RequestAddFamilyInfo(curPlayer, False)
|
| | | SyncDonateCntInfo(curPlayer)
|
| | | #PlayerFamilyZhenfa.OnPlayerLogin(curPlayer)
|
| | | PlayerFamilyZhenbaoge.OnPlayerLogin(curPlayer)
|
| | | PlayerFamilyTaofa.OnPlayerLogin(curPlayer)
|
| | | return
|
| | |
|
| | | def OnPlayerLogout(curPlayer):
|
| | |
| | | familyMgr = DBDataMgr.GetFamilyMgr()
|
| | | familyMgr.DelPlayerReqJoinFamilyIDAll(curPlayer.GetPlayerID())
|
| | | Sync_RequestAddFamilyInfo(curPlayer)
|
| | | PlayerFamilyTaofa.OnPlayerEnterFamily(curPlayer)
|
| | | return
|
| | |
|
| | | def __OnLeaveFamily(curPlayer, isVoluntarily, tick):
|
| | |
| | | delMoney = int(nowMoney * delMoneyPer / 100.0)
|
| | | GameWorld.DebugLog(" 扣除货币: delMoneyType=%s,delMoneyPer=%s,nowMoney=%s,delMoney=%s" % (delMoneyType, delMoneyPer, nowMoney, delMoney))
|
| | | PlayerControl.PayMoney(curPlayer, delMoneyType, delMoney, "LeaveFamily")
|
| | | |
| | | PlayerFamilyTaofa.OnPlayerLeaveFamily(curPlayer)
|
| | | FBLogic.OnLeaveFamily(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
| | | #XW_JZ_LeaveFamily <n color="0,190,255">{%S1%}</n><n color="255,255,0">退出了家族!</n> 25 - -
|
| | | NotifyAllFamilyMemberMsg(familyID, "XW_JZ_LeaveFamily", [curPlayer.GetName()])
|
| | |
|
| | | __DoPlayerLeaveFamilyByID(family, playerID, curPlayer)
|
| | | MapServer_FamilyRefresh(curPlayer, 0, 1)
|
| | |
|
| | | if family.GetCount() == 0:
|
| | |
| | |
|
| | | #删除玩家
|
| | | tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(tagMemberID)
|
| | | __DoPlayerLeaveFamilyByID(family, tagPlayerID, tagPlayer)
|
| | | if tagPlayer:
|
| | | MapServer_FamilyRefresh(tagPlayer, 0)
|
| | |
|
| | | Broadcast_FamilyChange(familyID, FamilyChangeType_MemLeave)
|
| | | return
|
| | |
|
| | | def __DoPlayerLeaveFamilyByID(curFamily, leavePlayerID, tagPlayer=None):
|
| | | ## 有玩家离开家族处理,主要针对家族层级的,玩家个人的在 __OnLeaveFamily 处理
|
| | | PlayerFamilyTaofa.OnFamilyMemberLeave(curFamily, leavePlayerID, tagPlayer)
|
| | | return
|
| | |
|
| | | #// A6 11 家族改名 #tagCMRenameFamily
|
| | |
| | | curMember.SetDonateCntTotal(memDonateCntTotal)
|
| | | GameWorld.DebugLog("家族捐献: donateType=%s,donateCnt=%s,%s,memDonateCntDay=%s,memDonateCntDay=%s"
|
| | | % (donateType, donateCnt, awardItemList, memDonateCntDay, memDonateCntTotal), playerID)
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList)
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["FamilyMoneyDonate", False, {}])
|
| | | return
|
| | |
|
| | | def ResetDailyDonateCnt(curPlayer):
|
| | |
| | | def SendFamilyActionInfo(curPlayer, familyID, actionType):
|
| | | ## 发送家族行为
|
| | | # @param curPlayer: 为None时通知该仙盟所有成员
|
| | | |
| | | if not familyID:
|
| | | return
|
| | | familyAction = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, actionType)
|
| | |
|
| | | clientPack = ChPyNetSendPack.tagMCFamilyActionInfo()
|