skadistats.clarity.wire.common.proto.DotaUserMessages Java Examples

The following examples show how to use skadistats.clarity.wire.common.proto.DotaUserMessages. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private void logCreate(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
        int entityHandle = message.getCreateParticle().getEntityHandle();
//        int entityIndex = Handle.indexForHandle(entityHandle);
//        int entitySerial = Handle.serialForHandle(entityHandle);
        Entity parent = entities.getByHandle(entityHandle);
        log.info("{} {} [index={}, entity={}({}), effect={}, attach={}]",
            getTick(),
            "PARTICLE_CREATE",
            message.getIndex(),
            entityHandle,
            parent == null ? "NOT_FOUND" : parent.getDtClass().getDtName(),
            message.getCreateParticle().getParticleNameIndex(),
            message.getCreateParticle().getAttachType()
        );
        //log.info(message.toString());
    }
 
Example #2
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private void logUpdateOrientation(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    log.info("{} {} [index={}, controlPoint={}, forward=[{}, {}, {}], right=[{}, {}, {}], up=[{}, {}, {}]]",
        getTick(),
        "PARTICLE_UPDATE_ORIENT",
        message.getIndex(),
        message.getUpdateParticleOrient().getControlPoint(),
        message.getUpdateParticleOrient().getForward().getX(),
        message.getUpdateParticleOrient().getForward().getY(),
        message.getUpdateParticleOrient().getForward().getZ(),
        message.getUpdateParticleOrient().getRight().getX(),
        message.getUpdateParticleOrient().getRight().getY(),
        message.getUpdateParticleOrient().getRight().getZ(),
        message.getUpdateParticleOrient().getUp().getX(),
        message.getUpdateParticleOrient().getUp().getY(),
        message.getUpdateParticleOrient().getUp().getZ()
    );
    //log.info(message.toString());
}
 
Example #3
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private void logUpdateEnt(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    int entityHandle = message.getUpdateParticleEnt().getEntityHandle();
    Entity parent = entities.getByHandle(entityHandle);
    log.info("{} {} [index={}, entity={}({}), controlPoint={}, attachmentType={}, attachment={}, includeWearables={}]",
        getTick(),
        "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()
    );
    //log.info(message.toString());
}
 
Example #4
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void logUpdate(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    log.info("{} {} [index={}, controlPoint={}, position=[{}, {}, {}]]",
        getTick(),
        "PARTICLE_UPDATE",
        message.getIndex(),
        message.getUpdateParticle().getControlPoint(),
        message.getUpdateParticle().getPosition().getX(),
        message.getUpdateParticle().getPosition().getY(),
        message.getUpdateParticle().getPosition().getZ()
    );
    //log.info(message.toString());
}
 
Example #5
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void logDestroy(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    log.info("{} {} [index={}, immediately={}]",
        getTick(),
        "PARTICLE_DESTROY",
        message.getIndex(),
        message.getDestroyParticle().getDestroyImmediately()
    );
    //log.info(message.toString());
}
 
Example #6
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void logRelease(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    log.info("{} {} [index={}]",
        getTick(),
        "PARTICLE_RELEASE",
        message.getIndex()
    );
    //log.info(message.toString());
}
 
Example #7
Source File: CombatLog.java    From clarity with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@OnMessage(DotaUserMessages.CDOTAUserMsg_CombatLogBulkData.class)
public void onCombatLogBulkData(DotaUserMessages.CDOTAUserMsg_CombatLogBulkData message) {
    if (logBulkData) {
        log.warn("This replay contains a CDOTAUserMsg_CombatLogBulkData message. I need one of those replays to analyze. Please report the match id: https://github.com/skadistats/clarity/issues/58");
        logBulkData = false;
    }
}
 
Example #8
Source File: CombatLog.java    From clarity with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@OnMessage(DotaUserMessages.CMsgDOTACombatLogEntry.class)
public void onCombatLogEntry(DotaUserMessages.CMsgDOTACombatLogEntry message) {
    logEntries.add(new S2CombatLogEntry(
        stringTables.forName(STRING_TABLE_NAME),
        message
    ));
}
 
Example #9
Source File: Wards.java    From parser with MIT License 4 votes vote down vote up
private boolean isWardDeath(CombatLogEntry e) {
    return e.getType().equals(DotaUserMessages.DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_DEATH)
            && WARDS_TARGET_NAMES.contains(e.getTargetName());
}
 
Example #10
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@OnMessage(DotaUserMessages.CDOTAUserMsg_ParticleManager.class)
public void onMessage(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    switch(message.getType()) {
        case DOTA_PARTICLE_MANAGER_EVENT_CREATE:
            logCreate(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_UPDATE:
            logUpdate(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FORWARD:
            logUnhanded(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ORIENTATION:
            logUpdateOrientation(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FALLBACK:
            logUnhanded(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ENT:
            logUpdateEnt(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_UPDATE_OFFSET:
            logUnhanded(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_DESTROY:
            logDestroy(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_DESTROY_INVOLVING:
            logUnhanded(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_RELEASE:
            logRelease(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_LATENCY:
            logUnhanded(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_SHOULD_DRAW:
            logUnhanded(message);
            break;
        case DOTA_PARTICLE_MANAGER_EVENT_FROZEN:
            logUnhanded(message);
            break;
    }

}
 
Example #11
Source File: Main.java    From clarity-examples with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private void logUnhanded(DotaUserMessages.CDOTAUserMsg_ParticleManager message) {
    log.info(message.toString());
}
 
Example #12
Source File: S1CombatLogEntry.java    From clarity with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public DotaUserMessages.DOTA_COMBATLOG_TYPES getType() {
    return DotaUserMessages.DOTA_COMBATLOG_TYPES.valueOf((int) e.getProperty(indices.typeIdx));
}
 
Example #13
Source File: S2CombatLogEntry.java    From clarity with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public S2CombatLogEntry(StringTable combatLogNames, DotaUserMessages.CMsgDOTACombatLogEntry entry) {
    this.combatLogNames = combatLogNames;
    this.e = entry;
}
 
Example #14
Source File: S2CombatLogEntry.java    From clarity with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public DotaUserMessages.DOTA_COMBATLOG_TYPES getType() {
    return e.getType();
}
 
Example #15
Source File: CombatLogEntry.java    From clarity with BSD 3-Clause "New" or "Revised" License votes vote down vote up
DotaUserMessages.DOTA_COMBATLOG_TYPES getType();