Package skadistats.clarity.model

Examples of skadistats.clarity.model.Entity


   
    private void logCreate(CDOTAUserMsg_ParticleManager message, Match match) {
        int entityHandle = message.getCreateParticle().getEntityHandle();
//        int entityIndex = Handle.indexForHandle(entityHandle);
//        int entitySerial = Handle.serialForHandle(entityHandle);
        Entity parent = match.getEntities().getByHandle(entityHandle);
        String name = match.getStringTables().forName("ParticleEffectNames").getNameByIndex(message.getCreateParticle().getParticleNameIndex());
        log.debug("{} {} [index={}, entity={}({}), effect={}, attach={}]",
            match.getReplayTimeAsString(),
            "PARTICLE_CREATE",
            message.getIndex(),
            entityHandle,
            parent == null ? "NOT_FOUND" : parent.getDtClass().getDtName(),
            name == null ? "NOT_FOUND" : name,
            message.getCreateParticle().getAttachType()
        );
        //log.debug(message.toString());
    }
View Full Code Here


        //log.debug(message.toString());
    }
   
    private void logUpdateEnt(CDOTAUserMsg_ParticleManager message, Match match) {
        int entityHandle = message.getUpdateParticleEnt().getEntityHandle();
        Entity parent = match.getEntities().getByHandle(entityHandle);
        log.debug("{} {} [index={}, entity={}({}), controlPoint={}, attachmentType={}, attachment={}, includeWearables={}]",
            match.getReplayTimeAsString(),
            "PARTICLE_UPDATE_ENT",
            message.getIndex(),
            entityHandle,
            parent == null ? "NOT_FOUND" : parent.getDtClass().getDtName(),
            message.getUpdateParticleEnt().getControlPoint(),
            ParticleAttachmentType.forId(message.getUpdateParticleEnt().getAttachType()),
            message.getUpdateParticleEnt().getAttachment(),
            message.getUpdateParticleEnt().getIncludeWearables()
        );
View Full Code Here

        PVS pvs = stream.readEntityPVS();
        DTClass cls = null;
        Integer serial = null;
        Object[] state = null;
        List<Integer> propList = null;
        Entity entity = null;
        switch (pvs) {
        case ENTER:
            cls = dtClasses.forClassId(stream.readNumericBits(classBits));
            serial = stream.readNumericBits(10);
            propList = stream.readEntityPropList();
            state = decodeBaseProperties(cls);
            decodeProperties(state, cls, propList);
            entities.add(index, serial, cls, pvs, state);
            log.debug("          {} [index={}, serial={}, handle={}, type={}]",
                pvs,
                index,
                serial,
                Handle.forIndexAndSerial(index, serial),
                cls.getDtName()
            );
            break;
        case PRESERVE:
            entity = entities.getByIndex(index);
            entity.setPvs(pvs);
            cls = entity.getDtClass();
            serial = entity.getSerial();
            propList = stream.readEntityPropList();
            decodeProperties(entity.getState(), cls, propList);
            break;
        case LEAVE:
            entity = entities.getByIndex(index);
            entity.setPvs(pvs);
            log.debug("          {} [index={}, serial={}, handle={}, type={}]",
                pvs,
                index,
                entity.getSerial(),
                Handle.forIndexAndSerial(index, entity.getSerial()),
                entity.getDtClass().getDtName()
            );
            break;
        case LEAVE_AND_DELETE:
            entities.remove(index);
            break;
View Full Code Here

    private static final Cloner CLONER = new Cloner();
   
    private final List<Entity> tempEntities = new ArrayList<Entity>();

    public void add(DTClass dtClass, Object[] state) {
        tempEntities.add(new Entity(0, 0, dtClass, null, state));
    }
View Full Code Here

    private static final Cloner CLONER = new Cloner();

    private final Entity[] entities = new Entity[1 << Handle.INDEX_BITS];

    public void add(int index, int serial, DTClass dtClass, PVS pvs, Object[] state) {
        entities[index] = new Entity(index, serial, dtClass, pvs, state);
    }
View Full Code Here

    public Entity getByIndex(int index) {
        return entities[index];
    }

    public Entity getByHandle(int handle) {
        Entity e = entities[Handle.indexForHandle(handle)];
        return e == null || e.getSerial() != Handle.serialForHandle(handle) ? null : e;
    }
View Full Code Here

    public String getReplayTimeAsString() {
        return GAMETIME_FORMATTER.print(Duration.millis((int)(1000.0f * getReplayTime())).toPeriod());
    }
   
    public float getGameTime() {
        Entity e = getGameRulesProxy();
        return e != null ? (float)e.getProperty("dota_gamerules_data.m_fGameTime") : 0.0f;
    }
View Full Code Here

TOP

Related Classes of skadistats.clarity.model.Entity

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.