Beispiel #1
0
def loadPlayer(netid, uid, varname):
    RVEngine.log("Loading Player from uid " + uid)
    qo = Player().queryObject()
    p = qo.filter(Player.uid == uid).first()
    RVEngine.log("Passed filter")
    if p is None:
        RVEngine.log("Player not found, creating.")
        p = Player()
        p.uid = uid
        p.varname = varname
        p.save()
    RVEngine.log("Passed is None, got " + str(p.varname))
    p.netid = netid
    p.sync = True
    RVEngine.log("Updating player")
    # p.update()
    RVEngine.log("Loading unitdata")
    RVEngine.loadPlayer(p)
    return p
Beispiel #2
0
def loadPlayer(netid, uid, varname):
	RVEngine.log("Loading Player from uid " + uid)
	qo = Player().queryObject()
	p = qo.filter(Player.uid == uid).first()
	RVEngine.log("Passed filter")
	if p is None:
		RVEngine.log("Player not found, creating.")
		p = Player()
		p.uid = uid
		p.varname = varname
		p.save()
	RVEngine.log("Passed is None, got " + str(p.varname))
	p.netid = netid
	p.sync = True
	RVEngine.log("Updating player")
	# p.update()
	RVEngine.log("Loading unitdata")
	RVEngine.loadPlayer(p)
	return p
Beispiel #3
0
def getPlayerByVarname(varname):
	qo = Player().queryObject()
	p = qo.filter(Player.varname == varname).first()
	return p
Beispiel #4
0
def getPlayerByVarname(varname):
    qo = Player().queryObject()
    p = qo.filter(Player.varname == varname).first()
    return p