Package com.threerings.stats.data

Examples of com.threerings.stats.data.Stat


        Where where = new Where(StatRecord.PLAYER_ID, playerId,
                                StatRecord.STAT_CODE, modifier.getType().code());

        for (int ii = 0; ii < MAX_UPDATE_TRIES; ii++) {
            StatRecord record = load(StatRecord.class, where); // TODO: force cache skip on ii > 0
            Stat stat = (record == null) ? modifier.getType().newStat() :
                decodeStat(record.statCode, record.statData, record.modCount);
            @SuppressWarnings("unchecked") T tstat = (T)stat;
            modifier.modify(tstat);
            if (!tstat.isModified()) {
                return null;
View Full Code Here


    public ArrayList<Stat> loadStats (int playerId)
    {
        ArrayList<Stat> stats = Lists.newArrayList();
        Where where = new Where(StatRecord.PLAYER_ID, playerId);
        for (StatRecord record : findAll(StatRecord.class, where)) {
            Stat stat = decodeStat(record.statCode, record.statData, record.modCount);
            if (stat != null) {
                stats.add(stat);
            }
        }
        return stats;
View Full Code Here

TOP

Related Classes of com.threerings.stats.data.Stat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.