| | |
| | | ''' 召唤私有专属木桩怪
|
| | | '''
|
| | |
|
| | | if not curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | GameWorld.DebugLog("玩家当前不是在自定义场景中,不允许招木桩!")
|
| | | return
|
| | | |
| | | mapID = PlayerControl.GetCustomMapID(curPlayer)
|
| | | lineID = PlayerControl.GetCustomLineID(curPlayer)
|
| | | if mapID:
|
| | |
| | | if playerID not in PyGameData.g_playerPriWoodPileNPCDict:
|
| | | PyGameData.g_playerPriWoodPileNPCDict[playerID] = []
|
| | | playerPriWoodNPCList = PyGameData.g_playerPriWoodPileNPCDict[playerID]
|
| | | maxCount = 10
|
| | | maxCount = 3
|
| | | nowCount = len(playerPriWoodNPCList)
|
| | | summonCount = min(count, maxCount - nowCount)
|
| | | #GameWorld.DebugLog("召唤: count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%s"
|
| | |
| | | def __NPCDropItem(self, dropPlayer, hurtType, hurtID, ownerPlayerList=[]):
|
| | | if not dropPlayer:
|
| | | return
|
| | | if dropPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | GameWorld.DebugLog("前端自定义场景中,不掉落物品!")
|
| | | return
|
| | | curNPC = self.__Instance
|
| | | if curNPC.GetType() in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
|
| | | GameWorld.DebugLog("木桩怪,不掉落物品!")
|
| | | return
|
| | | npcID = curNPC.GetNPCID()
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | mapID = FBCommon.GetRecordMapID(mapID)
|