當前位置: 首頁>>代碼示例>>Python>>正文


Python PlayersManager.getDynamicId方法代碼示例

本文整理匯總了Python中app.scense.core.PlayersManager.PlayersManager.getDynamicId方法的典型用法代碼示例。如果您正苦於以下問題:Python PlayersManager.getDynamicId方法的具體用法?Python PlayersManager.getDynamicId怎麽用?Python PlayersManager.getDynamicId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app.scense.core.PlayersManager.PlayersManager的用法示例。


在下文中一共展示了PlayersManager.getDynamicId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: addPlayerFriend

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def addPlayerFriend(dynamicId,characterId,friendName,friendType,isSheildedMail=0):
    '''添加好友
    @param dynamicId: int 客戶端的動態id
    @param characterId: int 角色的id
    @param friendName: string 對方的昵稱
    @param friendType: int(1,2) 好友的類型 1:好友  2:黑名單
    @param isSheildedMail: 是否屏蔽郵件
    '''
    player = PlayersManager().getPlayerByID(characterId)
    if not player:
        return {'result':False,'message':Lg().g(18)}
        
    friendId = dbaccess.getCharacterIdByNickName(friendName)#返回好友角色id [id]
    if not friendId:
        msg =Lg().g(75)
        pushObjectNetInterface.pushOtherMessage(905,msg, [player.getDynamicId()])
        return {'result':False,'message':Lg().g(68)}
    pyid=-1 #關係好友動態id -1表示角色沒有在線   其他表示角色動態id
    py1=PlayersManager().getPlayerByID(friendId[0])
    
    if py1 and py1.friend.getTypeByid(characterId)==0:#如果好友在線
        pyid=py1.getDynamicId()
    result = player.friend.addFriend(characterId,friendId[0],friendType,pyid)
    if result:
        pushObjectNetInterface.pushOtherMessage(905, result['message'], [player.getDynamicId()])
        return {'result':True,'message':Lg().g(69)}

    return {'result':False,'message':Lg().g(70)}
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:30,代碼來源:firend.py

示例2: guyongpet

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def guyongpet(pid, petid, typeid):
    """雇用寵物
    @param pid: int 角色id
    @param petid: int 寵物模板id
    @param typeid: int #1表示金幣兌換的寵物  2表示幸運值兌換
    """
    from app.scense.utils.dbopera import dbCharacterPet

    player = PlayersManager().getPlayerByID(pid)
    if not player:
        return {"result": False, "message": Lg().g(18)}

    alls = dbCharacterPet.PET_TEMPLATE
    if alls.has_key(petid):
        pet = alls.get(petid)
        coin = pet["coin"]
        xy = pet["xy"]
        if typeid == 1:  # 扣除金幣
            pcoin = player.finance.getCoin()
            if pcoin >= coin:
                petlevel = 1  # 寵物等級
                for i in player.petShop.shop1:  # i[寵物模板id,寵物等級]
                    if i[0]["id"] == petid:
                        petlevel = i[1]

                flg = player.pet.addPet(petid, level=petlevel)  # 添加寵物並返回
                if flg == -1:
                    pushObjectNetInterface.pushOtherMessage(905, Lg().g(167), [player.getDynamicId()])
                    return {"result": True, "message": Lg().g(167)}
                elif flg == -2:
                    pushObjectNetInterface.pushOtherMessage(905, Lg().g(168), [player.getDynamicId()])
                    return {"result": True, "message": Lg().g(168)}

                player.finance.updateCoin(pcoin - coin)
                player.quest.specialTaskHandle(115)  # 特殊任務處理
                player.schedule.noticeSchedule(16, goal=1)
                return {"result": True, "message": Lg().g(166)}
            else:
                return {"result": False, "message": Lg().g(88)}
        else:  # 扣除幸運值
            pxy = player.petShop.xy
            if pxy < xy:
                pushObjectNetInterface.pushOtherMessage(905, Lg().g(169), [player.getDynamicId()])
                return {"result": True, "message": Lg().g(169)}
            if pxy >= xy:
                flg = player.pet.addPet(petid)
                if flg == -1:
                    pushObjectNetInterface.pushOtherMessage(905, Lg().g(167), [player.getDynamicId()])
                    return {"result": False, "message": Lg().g(167)}
                elif flg == -2:
                    pushObjectNetInterface.pushOtherMessage(905, Lg().g(168), [player.getDynamicId()])
                    return {"result": True, "message": Lg().g(168)}
                player.petShop.xy = pxy - xy
                player.quest.specialTaskHandle(115)  # 特殊任務處理
                player.schedule.noticeSchedule(16, goal=1)
                return {"result": True, "message": Lg().g(166)}
            else:
                return {"result": False, "message": Lg().g(169)}
    else:
        return {"result": False, "message": Lg().g(170)}
開發者ID:joyfish,項目名稱:crossapp-demo,代碼行數:62,代碼來源:pet.py

示例3: updateSpirit

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def updateSpirit(pid, contxt):
    """修改角色心情
    @param pid: int 角色id
    @param context: str 心情
    """
    player = PlayersManager().getPlayerByID(pid)
    if player.baseInfo.updateSpirit(contxt):
        pushObjectNetInterface.pushOtherMessage(905, Lg().g(175), [player.getDynamicId()])
    else:
        pushObjectNetInterface.pushOtherMessage(905, Lg().g(176), [player.getDynamicId()])
    return {"result": True, "message": u""}
開發者ID:joyfish,項目名稱:crossapp-demo,代碼行數:13,代碼來源:playerInfo.py

示例4: runingQd

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
    def runingQd(self, pid, gold):
        """祈禱邏輯
        @param gold: int 鑽石數量
        """
        from app.scense.serverconfig.chatnode import chatnoderemote
        from app.scense.core.PlayersManager import PlayersManager

        v = {1: Lg().g(564), 2: Lg().g(499), 3: Lg().g(565), 4: Lg().g(566), 0: Lg().g(564)}
        player = PlayersManager().getPlayerByID(pid)
        mygold = player.finance.getGold()
        if mygold < gold:
            pushObjectNetInterface.pushOtherMessage(905, Lg().g(567), [player.getDynamicId()])
            return False
        result = configure.qd(gold)
        lx = result[0]  # 獎勵類型    1金幣獎勵    2經驗獎勵   3聲望獎勵    4活力
        sl = result[1]  # 獎勵數量
        bs = result[2]  # 獎勵倍數
        if lx == 1:
            player.finance.addCoin(sl)
            ss = Lg().g(568) % (v.get(lx), sl)
        elif lx == 2:
            player.level.addExp(sl)
            ss = Lg().g(568) % (v.get(lx), sl)
        elif lx == 3:
            player.finance.addPrestige(sl)
            ss = Lg().g(568) % (v.get(lx), sl)
        elif lx == 4:
            player.attribute.addEnergy(sl)
            ss = Lg().g(568) % (v.get(lx), sl)
        else:
            player.finance.addCoin(sl)
        if bs > 1:
            ss += Lg().g(569) % bs
        pushObjectNetInterface.pushOtherMessage(905, ss, [player.getDynamicId()])
        #        player.finance.updateGold(mygold-gold)
        player.finance.consGold(gold, 1)

        bbs = 1  # 大於這個倍數的才會廣播
        sj = time.strftime("%w%H")
        sj = int(sj)
        if sj >= 310 and sj <= 314:
            bbs = 2

        if bs > bbs:
            pname = player.baseInfo.getName()
            tm = time.strftime("%Y-%m-%d %X")
            mg = Lg().g(570) % (pname, bs, v.get(lx), sl)
            chatnoderemote.callRemote("pushSystemToInfo", mg)

            if len(self.getGG()) == 4:
                del self.gg[0]
            self.gg.append([tm, mg])
            self.uploadGG(self.gg)
        return True
開發者ID:joyfish,項目名稱:crossapp-demo,代碼行數:56,代碼來源:PrayManage.py

示例5: ObtainReward

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def ObtainReward(pid,did):
    '''領取單個保衛獎勵
    @param pid: int 角色id
    @param did: int 保衛獎勵表主鍵id
    '''
    msg=u""
    flg=True
    player=PlayersManager().getPlayerByID(pid)#獲得角色id
    info=dbDefenceBonus.getByid(did) #根據獎勵主鍵id獲得獎勵信息
    if not info:
        pushObjectNetInterface.pushOtherMessage(905, Lg().g(61), [player.getDynamicId()])
        return False,Lg().g(61)
    reward=info['reward']
    player.finance.updatePrestige(player.finance.getPrestige()+reward)
    if not dbDefenceBonus.delByid(info['id']) : 
        msg+=Lg().g(62)
        flg=False

#    item=Item(itemTemplateId=20030061)
#    item.pack.setStack(info['reward']) #物品的數量
#    rs1=player.pack._package.canPutItem(item,info['reward']) #判斷背包中是否可以放入這些數量的物品
#    if rs1: #如果可以放進去
#        player.pack.putNewItemsInPackage(20030061,info['reward'])
#        del item
#        if not dbDefenceBonus.delByid(info['id']) : 
#            msg+=Lg().g(62)
#            flg=False
#    else: #如果一個獎勵所獲得物品不能放入背包
#        del item
#        pushObjectNetInterface.pushOtherMessage(905, Lg().g(16), [player.getDynamicId()])
#        return False,Lg().g(16)
    return flg,msg
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:34,代碼來源:defencelog_app.py

示例6: tiaozhuan

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def tiaozhuan(dynamicId,characterid,csz):
    '''場景間的跳轉或者進入副本
    '''
    player = PlayersManager().getPlayerByID(characterid)
    if not player:
        return {'result':False,'message':Lg().g(18)}
    doorinfo = dbMap.ALL_DOOR_INFO.get(csz)#獲取傳送門的信息
    lastscene = MapManager().getMapId(player.baseInfo.getTown())
    if doorinfo.get('functionType')==1:#跳轉場景
        placeId = doorinfo.get('nextmap')
        position = (doorinfo.get('init_x'),doorinfo.get('init_y'))
        player.baseInfo.setTown( placeId)
        player.baseInfo.setState(0)
        PlayersManager().addPlayer(player)
        defencelog_app.isReward(player.baseInfo.id, player.getDynamicId())
        scene = MapManager().getMapId(placeId)
        scenename = scene.getSceneName()
        chatnoderemote.callRemote('JoinRoom',characterid,placeId,scenename)
        scene.addPlayer(characterid)
        player.quest.setNpcList(scene._npclist)
        player.baseInfo.initPosition(position)
        scene.pushEnterPlace([dynamicId])
        result = {'result':True}
    else:
        instanceId = doorinfo.get('famID')
        result = instance_app.enterInstance1(player,dynamicId, characterid, instanceId,0)
    if result.get('result'):
        lastscene.dropPlayer(characterid)
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:30,代碼來源:tiaozhuan.py

示例7: isHaveQH

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def isHaveQH(characterid,itemid):
    '''判斷是否能夠強化
    @param characterid: int 角色id
    @param itemid: int 物品1(item)表主鍵id
    '''
    item1=None#物品實例1
    player=PlayersManager().getPlayerByID(characterid)
    
    if itemid>0:#如果物品1存在

        if player.pack._package._PropsPagePack.getPositionByItemId(itemid)!=-1:#背包中沒有此物品
            item1=player.pack._package._PropsPagePack.getItemInfoByItemid(itemid)#獲取物品實例
        else:
            item1=player.pack._equipmentSlot.getItemInfoByItemid(itemid)
            
        if not item1:
            return {'result':False,'message':Lg().g(189),'data':None}

    wqtype=item1.getWQtype()#武器類型 #裝備類型id   #0=衣服#1=褲子 #2=頭盔#3=手套#4=靴子#5=護肩#6=項鏈#7=戒指#8=主武器#9=副武器#10=雙手
    if wqtype<0 or wqtype>10: #裝備類型id  
        pushObjectNetInterface.pushOtherMessage(905, Lg().g(196), [player.getDynamicId()])
        return {'result':False,'message':Lg().g(197),'data':None}
   
    baseQuality=item1.baseInfo.getItemTemplateInfo().get("baseQuality",0)#基礎品質 1灰 2白 3綠 4藍 5紫 6橙 7紅
    itemlevel=item1.baseInfo.getItemTemplateInfo().get("levelRequire",0) #裝備等級
    qlevel=item1.attribute.getStrengthen() #物品當前的強化等級
    jinbi= coinCount(qlevel,baseQuality,wqtype,itemlevel)
    return qq(player, itemid,wqtype,baseQuality,jinbi,item1)
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:30,代碼來源:strengthen.py

示例8: CorpsInviteReply

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def CorpsInviteReply(dynamicId,characterId,union_id,is_ok):
    '''邀請加入行會的反饋信息
    @param dynamicId: int 客戶端的動態id
    @param characterId: int 角色的id
    @param union_id: int 行會的id(邀請者的ID)
    @param is_ok: int 是否同意 0否 1是
    '''
    player = PlayersManager().getPlayerByID(characterId)
    fplayer = PlayersManager().getPlayerByID(union_id)
    if not player or not player.CheckClient(dynamicId):
        return {'result':False,'message':Lg().g(18)}
    nowguildId = player.guild.getID()
    toguildId = dbGuild.getCharacterGuildId(union_id)
    if fplayer and not is_ok:
        msg = "%s拒絕了你的邀請"%player.baseInfo.getName()
        pushOtherMessage(905, msg, [fplayer.getDynamicId()])
        return {'result':True}
    if nowguildId:
        return {'result':False,'message':Lg().g(94)}
    guild = GuildManager().getGuildById(toguildId)
    if not guild:
        return {'result':False,'message':Lg().g(95)}
    surplushours = player.guild.getCanJoinTime()
    if surplushours:
        return {'result':False,'message':Lg().g(647)%surplushours}
    result = guild.JointGuild(characterId)
    if result.get('result',False):
        
        msg = u'成功加入%s'%guild.getGuildName()
        pushOtherMessage(905, msg, [dynamicId])
    else:
        nmsg = result.get('message','')
        pushOtherMessage(905, nmsg, [dynamicId])
    return result
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:36,代碼來源:guild.py

示例9: CorpsInviteOther

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def CorpsInviteOther(dynamicId,characterId,otherid,otername):
    '''邀請加入行會
    @param dynamicId: int 客戶端的動態id
    @param characterId: int 角色的id
    @param otherid: int 對方的Id
    @param otername: 對方的名稱
    '''
    player = PlayersManager().getPlayerByID(characterId)
    if not player or not player.CheckClient(dynamicId):
        return {'result':False,'message':Lg().g(18)}
    guildId = player.guild.getID()
    if not guildId:
        return {'result':False,'message':Lg().g(79)}
    toplayer = PlayersManager().getPlayerByID(otherid)
    if not toplayer:
        return {'result':False,'message':Lg().g(91)}
    if toplayer.level.getLevel()<LEVELREQUIRED:
        return {'result':False,'message':Lg().g(86)}
    guild = GuildManager().getGuildById(guildId)
    if guild.guildinfo.get('curMenberNum',50)>=guild.guildinfo.get('memberCount',50):
        return {'result':False,'message':Lg().g(83)}
    sendList = [toplayer.getDynamicId()]
    pushInviteOtherJoinGuild(characterId, guildId, player.baseInfo.getName(),\
                              guild.getGuildName(), sendList)
    msg = Lg().g(92)
    pushOtherMessage(905, msg, [dynamicId])
    return {'result':True}
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:29,代碼來源:guild.py

示例10: getSxzy

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def getSxzy(characterid,item1,item2):
    '''獲取屬性轉移後的效果及其花費信息
    @param item1: int 物品id (轉移後強化等級變成0的那個物品的id)
    @param item: int 物品id 
    '''
    if item1==item2:
        pushObjectNetInterface.pushOtherMessageByCharacterId(Lg().g(206), [characterid])
        return {'result':False,'message':Lg().g(206),'data':None}
    player=PlayersManager().getPlayerByID(characterid) #角色實例
    if not player:
        return {'result':False,'message':Lg().g(199),'data':None}
    if player.level.getLevel()<30:
        return {'result':False,'message':Lg().g(205),'data':None}
    items1=getItemByplayer(player, item1)
    if not items1:
        return {'result':False,'message':Lg().g(189),'data':None}
    items2=getItemByplayer(player, item2)
    if not items2:
        return {'result':False,'message':Lg().g(189),'data':None}
    
    if items1.getWQtype()!=items2.getWQtype():
        return {'qh':None,'coin':0}

    level=Sxzy(items1, items2)
    zyyh=level+items2.attribute.getStrengthen()#轉移以後裝備的強化等級
    if player.level.getLevel()<zyyh:
        pushObjectNetInterface.pushOtherMessage(905, Lg().g(207)%zyyh, [player.getDynamicId()])
    Zcion=getSxzyCoin(items1, items2)#轉移花費金幣
    
    
    return {'qh':level,'coin':Zcion}
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:33,代碼來源:strengthen.py

示例11: ObtainItem_2408

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def ObtainItem_2408(dynamicId, request_proto):
    '''放到自己背包中'''
    argument=ObtainItem2408_pb2.ObtainItemRequest()
    argument.ParseFromString(request_proto)
    response=ObtainItem2408_pb2.ObtainItemResponse()
    
    id=argument.id #角色id
    type=argument.type #0獲取所有 1獲取單個
    pos=argument.pos # 單個在背包的位置
    player=PlayersManager().getPlayerByID(id) #角色實例
    if type==0:
        data=player.instance.putAllItemsInPack()
        if not data:
            response.result=False
            response.message=Lg().g(16)
            pushObjectNetInterface.pushOtherMessage(905, Lg().g(16), [player.getDynamicId()])
            return response.SerializeToString()
    else:
        data=player.instance.getOneItemInPackByPosition(pos)
        if not data:
            response.result=False
            response.message=Lg().g(16)
            return response.SerializeToString()
    response.result=True
    response.message=u''
    return response.SerializeToString()
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:28,代碼來源:instanceColonize_net.py

示例12: StartUpGuaJi

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def StartUpGuaJi(dynamicId,characterId):
    '''角色開始掛機
    @param characterId: int 角色的ID
    '''
    from app.scense.core.campaign.FortressManager import FortressManager
    player = PlayersManager().getPlayerByID(characterId)
    if not player or not player.CheckClient(dynamicId):
        return {'result':False,'message':Lg().g(18)}
    #判斷是否有冥想加成
    if player.baseInfo.getState()==1:  #如果角色在副本
        state = 0
    else:
        guildId = player.guild.getID()
        sceneId = player.baseInfo.getTown()
        fortress=  FortressManager().getFortressBySceneId(sceneId)
        if not fortress.isOccupied:
            state = 0
        else:
            if fortress.kimori==guildId and guildId!=0:
                state=1
            else:
                state = 0
    result = player.afk.startMeditation(state=state)
    if not result.get('result'):
        msg = result.get('message')
        sendId = player.getDynamicId()
        pushOtherMessage(905, msg, [sendId])
    return result
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:30,代碼來源:meditation.py

示例13: pushSceneInfo

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
 def pushSceneInfo(self,rate):
     '''給每一個在場景中的玩家推送場景信息
     @param rate: int 移動的頻率
     '''
     if not self._canRec:
         return
     self.updateAllPlayerLocation(rate)
     if self._monsters:
         self.updateAllMonsterLocation()
     
     groupState = configure.isteamInstanceTime(20)#組隊副本時間判斷
     guildFightState = fortress.IsWarTime()#國戰時間判斷
     
     for room in self.rooms:
         sendlist = []
         sceneInfo = pushSceneMessage_pb2.pushSceneMessage()
         for playerId in room:
             player = PlayersManager().getPlayerByID(playerId)
             if not player:
                 continue
             player.icon.groupIconManager(groupState)#組隊戰圖標管理
             player.icon.guildFightManager(guildFightState)#國戰圖標管理
             PlayerPosition = sceneInfo.PlayerPosition.add()
             PlayerPosition.id = player.baseInfo.id
             PlayerPosition.name = player.baseInfo.getNickName()
             PlayerPosition.profession = player.profession.getProfessionName()
             PlayerPosition.headicon = player.profession.getFigure()
             GuildInfo = player.guild.getGuildInfo()
             if GuildInfo:
                 PlayerPosition.guildname = GuildInfo.get('name','')
             PlayerPosition.figure = player.profession.getSceneFigure()
             position = player.baseInfo.getDestination()
             PlayerPosition.x = int(position[0])
             PlayerPosition.y = int(position[1])
             PlayerPosition.level = player.level.getLevel()
             PlayerPosition.viptype = player.baseInfo.getType()
             PlayerPosition.gemlevel = player.pack._equipmentSlot.getGemLevel()
             sendlist.append(player.getDynamicId())
             ###############角色展示寵物的處理################
             petremove = player.pet.popLastRemove()
             for petId in petremove:
                 self.dropPet(petId)
             for petId in player.matrix._matrixSetting.values():
                 if petId<=0:
                     continue
                 pet = player.pet.getPet(petId)
                 figure = pet.templateInfo['resourceid']
                 position = pet.getPosition()
                 PetPosition = sceneInfo.petInfo.add()
                 PetPosition.id = petId
                 PetPosition.name = pet.baseInfo.getName()
                 PetPosition.profession = pet.baseInfo.getName()
                 PetPosition.headicon = figure
                 PetPosition.figure = figure
                 PetPosition.x = int(position[0])
                 PetPosition.y = int(position[1])
                 PetPosition.masterId = playerId
         sceneInfo.sceneId = self._id
         msg = sceneInfo.SerializeToString()
         pushApplyMessage(602,msg, sendlist)
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:62,代碼來源:scene.py

示例14: getSendList

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
 def getSendList(self,room):
     '''獲取接受場景消息的角色的客戶端ID'''
     sendlist = []
     for playerId in room:
         player = PlayersManager().getPlayerByID(playerId)
         if playerId in self._canRec and player and player.baseInfo.getStatus()!=4:
             sendlist.append(player.getDynamicId())
     return sendlist
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:10,代碼來源:scene.py

示例15: packageArrange

# 需要導入模塊: from app.scense.core.PlayersManager import PlayersManager [as 別名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import getDynamicId [as 別名]
def packageArrange(dynamicId,characterId,packageType):
    '''包裹整理'''
    player = PlayersManager().getPlayerByID(characterId)
    if not player or not player.CheckClient(dynamicId):
        return {'result':False,'message':Lg().g(18)}
    player.pack.packageArrange(packageType)
    pushPromptedMessage(Lg().g(158),[player.getDynamicId()])
    return {'result':True,'message':Lg().g(158)}
開發者ID:9miao,項目名稱:firefly_fengyan_OL,代碼行數:10,代碼來源:packageInfo.py


注:本文中的app.scense.core.PlayersManager.PlayersManager.getDynamicId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。