Esempio n. 1
0
    def remote_getCharacter(self, name):
        try:
            row = Characters.byName(name)
        except:
            failure.Failure(AvatarNoFound('Avatar not found'))
            return

        ret = {
            name: row.name,
            race: row.race,
            frac: row.fraction,
            gen: row.gender,
            ownername: row.ownername,
            exp: row.exp,
            world: row.world,
            zone: row.zone,
            x: row.posX,
            y: row.posY,
            z: row.posZ,
            w: row.rotZ,
            face: row.face,
            #helm: row.helm,
            uarm: row.upperArmor,
            larm: row.lowerArmor,
            str: row.strength,
            dex: row.dexterity,
            con: row.constitution,
            int: row.intelligence,
        }
        row.isUse = True
        return ret
Esempio n. 2
0
 def remote_getCharacter(self, name):
     try:
         row = Characters.byName(name)
     except:
         failure.Failure(AvatarNoFound('Avatar not found'))
         return
     
     ret = {
         name: row.name,
         race: row.race,
         frac: row.fraction,
         gen: row.gender,
         ownername: row.ownername,
         exp: row.exp,
         world: row.world,
         zone: row.zone,
         x: row.posX,
         y: row.posY,
         z: row.posZ,
         w: row.rotZ,
         face: row.face,
         #helm: row.helm,
         uarm: row.upperArmor,
         larm: row.lowerArmor,
         str: row.strength,
         dex: row.dexterity,
         con: row.constitution,
         int: row.intelligence,
     }
     row.isUse = True
     return ret
Esempio n. 3
0
    def remote_updateCharacter(self, **props):
        try:
            row = Characters.byName(props['name'])
        except:
            failure.Failure(AvatarNoFound('Avatar not found'))
            return

        if 'name' in props: row.name = props['name']
        if 'race' in props: row.race = props['race']
        if 'frac' in props: row.fraction = props['frac']
        if 'gen' in props: row.gender = props['gen']
        if 'own' in props: row.ownername = props['own']
        if 'exp' in props: row.exp = props['exp']
        if 'world' in props: row.world = props['world']
        if 'zone' in props: row.zone = props['zone']
        if 'x' in props: row.posX = props['x']
        if 'y' in props: row.posY = props['y']
        if 'z' in props: row.posZ = props['z']
        if 'w' in props: row.rotZ = props['w']
        if 'face' in props: row.face = props['face']
        if 'uarm' in props: row.upperArmor = props['uarm']
        if 'larm' in props: row.name = props['larm']
        if 'str' in props: row.strength = props['str']
        if 'dex' in props: row.dexterity = props['dex']
        if 'con' in props: row.constitution = props['con']
        if 'int' in props: row.intelligence = props['int']
        row.modifiedDate = datetime.now
        row.isUse = False
Esempio n. 4
0
 def remote_updateCharacter(self, **props):
     try:
         row = Characters.byName(props['name'])
     except:
         failure.Failure(AvatarNoFound('Avatar not found'))
         return
     
     if 'name' in props: row.name = props['name']
     if 'race' in props: row.race = props['race']
     if 'frac' in props: row.fraction = props['frac']
     if 'gen' in props: row.gender = props['gen']
     if 'own' in props: row.ownername = props['own']
     if 'exp' in props: row.exp = props['exp']
     if 'world' in props: row.world = props['world']
     if 'zone' in props: row.zone = props['zone']
     if 'x' in props: row.posX = props['x']
     if 'y' in props: row.posY = props['y']
     if 'z' in props: row.posZ = props['z']
     if 'w' in props: row.rotZ = props['w']
     if 'face' in props: row.face = props['face']
     if 'uarm' in props: row.upperArmor = props['uarm']
     if 'larm' in props: row.name = props['larm']
     if 'str' in props: row.strength = props['str']
     if 'dex' in props: row.dexterity = props['dex']
     if 'con' in props: row.constitution = props['con']
     if 'int' in props: row.intelligence = props['int']
     row.modifiedDate = datetime.now
     row.isUse = False
Esempio n. 5
0
 def remote_newCharacter(self, **props):
     char = Characters(
         name=props['name'],
         race=props['race'],
         fraction=props['frac'],
         gender=props['gen'],
         ownername=props['own'],
         exp=0,
         world='Primary World',
         zone='Primary World',
         posX=10.0,
         posY=10.0,
         posZ=11.0,
         rotZ=0.0,
         face=props['face'],
         #helm = props['helm'],
         weapon=props['weap'],
         upperArmor=props['uarm'],
         lowerArmor=props['larm'],
         strength=props['str'],
         dexterity=props['dex'],
         constitution=props['con'],
         intelligence=props['int'],
         isUse=True)