4860 【后端】【1.3.100】新增退出仙盟,需要12小时才能再退出仙盟
| | |
| | | # @param tagFamilyLV: 被踢者职位
|
| | | # @return:
|
| | | def DR_PlayerLeaveFamily(curPlayer, familyID, familyName, familyCnt, familyLV,
|
| | | tagPlayerID, tagPlayerName, tagFamilyLV):
|
| | | |
| | | tagPlayerID, tagPlayerName, tagFamilyLV, leaveFamilyTime=0):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'AccID':curPlayer.GetAccID(),
|
| | | "PlayerName":curPlayer.GetName(),
|
| | | "FamilyID":familyID, "FamilyName":familyName, "Count":familyCnt, "FamilyJob":familyLV,
|
| | | "tagPlayerID":tagPlayerID, "tagPlayerName":tagPlayerName, "tagFamilyJob":tagFamilyLV}
|
| | | |
| | | if leaveFamilyTime:
|
| | | dataDict['leaveFamilyTime'] = leaveFamilyTime
|
| | | #发送封包
|
| | | SendEventPack("PlayerLeaveFamily", dataDict, curPlayer)
|
| | | return
|
| | |
| | | def GetTodayXianyuanCoin(curPlayer): return curPlayer.GetExAttr11()
|
| | | def SetTodayXianyuanCoin(curPlayer, value): return curPlayer.SetExAttr11(value)
|
| | |
|
| | | ##玩家主动退出仙盟时间(<100代表退出次数)
|
| | | def SetLeaveFamilyTime(curPlayer, value): return curPlayer.SetExAttr12(value)
|
| | | def GetLeaveFamilyTime(curPlayer):return curPlayer.GetExAttr12()
|
| | |
|
| | | ## 是否脱机挂机状态
|
| | | def GetIsTJG(curPlayer):
|
| | | if curPlayer.GetDictByKey(ChConfig.Def_OnlineType):
|
| | |
| | | if GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss):
|
| | | PlayerControl.NotifyCode(curPlayer, "FairyGrabBossExitError")
|
| | | return
|
| | | #判断退出时间间隔
|
| | | curTime = int(time.time())
|
| | | lastLeaveFamilyTime = PlayerControl.GetLeaveFamilyTime(curPlayer)
|
| | | if lastLeaveFamilyTime > 100:
|
| | | remainTime = IpyGameDataPY.GetFuncCfg('ExitFairyTime', 2) - (curTime - lastLeaveFamilyTime)
|
| | | if remainTime > 0:
|
| | | PlayerControl.NotifyCode(curPlayer, "ExitFairyTime", [remainTime*1000])
|
| | | return
|
| | | updTime = 1 if IpyGameDataPY.GetFuncCfg('ExitFairyTime') > 1 else curTime
|
| | | elif lastLeaveFamilyTime >= IpyGameDataPY.GetFuncCfg('ExitFairyTime')-1:
|
| | | updTime = curTime
|
| | | else:
|
| | | updTime = lastLeaveFamilyTime+1
|
| | | PlayerControl.SetLeaveFamilyTime(curPlayer, updTime)
|
| | |
|
| | | #XW_JZ_LeaveFamily <n color="0,190,255">{%S1%}</n><n color="255,255,0">退出了家族!</n> 25 - -
|
| | | NotifyAllFamilyMemberMsg(curFamily, curPlayer, "XW_JZ_LeaveFamily", [curPlayer.GetName()])
|
| | |
| | | __DoPlayerLeaveFamilyByID(curFamily, curPlayerID)
|
| | |
|
| | | DataRecordPack.DR_PlayerLeaveFamily(curPlayer, curFamily.GetID(), curFamily.GetName(), curFamily.GetCount(),
|
| | | familyLV, curPlayer.GetPlayerID(), curPlayer.GetName(), familyLV)
|
| | | familyLV, curPlayer.GetPlayerID(), curPlayer.GetName(), familyLV, updTime)
|
| | |
|
| | | if curFamily.GetCount() == 0:
|
| | | #玩家离开后, 家族没有人了 , 删除这个家族
|