def selectFriends(self, name, ziduan, guize): '''查找好友 @param name: string 好友的角色的昵称(名字) @param ziduan: int 1按角色名称,0角色等级,2行会名称 3最近登录时间 @param guize: int 排序规则 1正序 0倒序 ''' result = dbFriend.selectFriend(name, ziduan, guize) from app.scense.core.PlayersManager import PlayersManager if result: for i in range(len(result)): cid = result[i].get("id", 0) if cid > 0: if PlayersManager().getPlayerByID(cid): result[i]['zx'] = True continue result[i]['zx'] = False return result return None
def selectFriends(self,name,ziduan,guize): '''查找好友 @param name: string 好友的角色的昵称(名字) @param ziduan: int 1按角色名称,0角色等级,2行会名称 3最近登录时间 @param guize: int 排序规则 1正序 0倒序 ''' result=dbFriend.selectFriend(name, ziduan, guize) from app.scense.core.PlayersManager import PlayersManager if result: for i in range(len(result)): cid=result[i].get("id",0) if cid>0: if PlayersManager().getPlayerByID(cid): result[i]['zx']=True continue result[i]['zx']=False return result return None
def selectFriends(name, ziduan, guize): '''查找好友 @param name: string 好友的角色的昵称(名字) @param ziduan: int 1按角色名称,0角色等级,2行会名称 3最近登录时间 @param guize: int 排序规则 1正序 0倒序 ''' # from utils.dbopera import dbFriend result = dbFriend.selectFriend(name, ziduan, guize) # from core.PlayersManager import PlayersManager if result: for i in range(len(result)): cid = result[i].get("id", 0) if cid > 0: if PlayersManager().getPlayerByID(cid): result[i]['zx'] = True continue result[i]['zx'] = False return {'result': True, 'message': Lg().g(74), 'friends': result} return {'result': False, 'message': Lg().g(75), 'friends': None}
def selectFriends(name,ziduan,guize): '''查找好友 @param name: string 好友的角色的昵称(名字) @param ziduan: int 1按角色名称,0角色等级,2行会名称 3最近登录时间 @param guize: int 排序规则 1正序 0倒序 ''' # from utils.dbopera import dbFriend result=dbFriend.selectFriend(name, ziduan, guize) # from core.PlayersManager import PlayersManager if result: for i in range(len(result)): cid=result[i].get("id",0) if cid>0: if PlayersManager().getPlayerByID(cid): result[i]['zx']=True continue result[i]['zx']=False return {'result':True,'message':Lg().g(74),'friends':result} return {'result':False,'message':Lg().g(75),'friends':None}