| | |
| | | import IPY_GameWorld
|
| | | import ItemControler
|
| | | import GameFuncComm
|
| | | import PlayerTask
|
| | | import DBDataMgr
|
| | | import DirtyList
|
| | | import ObjPool
|
| | |
|
| | | import random
|
| | | import time
|
| | |
| | | familyMgr.DelPlayerReqJoinFamilyIDAll(curPlayer.GetPlayerID())
|
| | | Sync_RequestAddFamilyInfo(curPlayer)
|
| | | PlayerFamilyTaofa.OnPlayerEnterFamily(curPlayer)
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_ReqOrJoinFamily)
|
| | | return
|
| | |
|
| | | def __OnLeaveFamily(curPlayer, isVoluntarily, tick):
|
| | |
| | |
|
| | | # 申请加入
|
| | | if requestType == 0:
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_ReqOrJoinFamily, 1)
|
| | | if not tagFamilyID:
|
| | | AutoJoinFamily(curPlayer)
|
| | | else:
|
| | |
| | | family = familyMgr.GetAt(index)
|
| | | if not family:
|
| | | continue
|
| | | familyID = family.GetID()
|
| | | #familyID = family.GetID()
|
| | | lvMin = family.GetJoinLVMin()
|
| | | if lvMin and realmLV < lvMin:
|
| | | GameWorld.DebugLog(" 官职不足的不处理! familyID=%s,lvMin=%s" % (familyID, lvMin), playerID)
|
| | | #GameWorld.DebugLog(" 官职不足的不处理! familyID=%s,lvMin=%s" % (familyID, lvMin), playerID)
|
| | | continue
|
| | | if family.GetJoinReview():
|
| | | GameWorld.DebugLog(" 需要审核的不处理! familyID=%s" % familyID, playerID)
|
| | | #GameWorld.DebugLog(" 需要审核的不处理! familyID=%s" % familyID, playerID)
|
| | | continue
|
| | | MemberMax = GetFamilySetting(family.GetLV(), "MemberMax")
|
| | | if family.GetCount() >= MemberMax:
|
| | | GameWorld.DebugLog(" 成员已满的不处理! familyID=%s" % familyID, playerID)
|
| | | #GameWorld.DebugLog(" 成员已满的不处理! familyID=%s" % familyID, playerID)
|
| | | continue
|
| | |
|
| | | #直接加入
|
| | |
| | | donateCntList.append(donateCnt)
|
| | | if not donateCntList:
|
| | | return
|
| | | clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCDonateCntInfo)
|
| | | clientPack = ChPyNetSendPack.tagSCDonateCntInfo()
|
| | | clientPack.DonateCntList = donateCntList
|
| | | clientPack.Count = len(clientPack.DonateCntList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|