Esempio n. 1
0
def op_global_data(typeNo,m_data,c_data):
    if typeNo == 1:
        if c_data == None:
            return OPdata.get_playerName_data()
        else:
            OPdata.update_playerName_data(c_data)
            return c_data
    elif typeNo == 2:
        if c_data == None:
            bag = OPdata.get_bag_data()
            return bag[m_data]
        else:
            return update_bag(m_data,c_data)
    elif typeNo == 3:
        if c_data == None:
            room = OPdata.get_room_data()
            return room[m_data]
        else:
            return update_room(m_data,c_data)
    else:
        print "get_global_data() typeNO is wrong."
        exit(0)
Esempio n. 2
0
def op_player(name):
    if name == None:
        return OPdata.get_playerName_data()
    else:
        OPdata.update_playerName_data(name)
        return name
Esempio n. 3
0
def op_player(name):
    if name == None:
        return OPdata.get_playerName_data()
    else:
        OPdata.update_playerName_data(name)
        return name