private String readCombatLogName(int idx) { return idx == 0 ? null : combatLogNames.getNameByIndex(idx); }
private String readCombatLogName(int idx) { return idx == 0 ? null : combatLogNames.getNameByIndex(idx); }
private String readCombatLogName(int idx) { return combatLogNames.hasIndex(idx) ? combatLogNames.getNameByIndex(idx) : null; }
private String readCombatLogName(int idx) { return combatLogNames.hasIndex(idx) ? combatLogNames.getNameByIndex(idx) : null; }
protected void setSingleEntry(StringTable table, int mode, int index, String name, ByteString value) { if (name.isEmpty() && table.hasIndex(index)) { // With console recorded replays, the replay sometimes has no name entry, // and supposedly expects us to use the one that is existing // see: https://github.com/skadistats/clarity/issues/147#issuecomment-409619763 // and Slack communication with Lukas // reuse the old key, and see if that works name = table.getNameByIndex(index); } table.set(mode, index, name, value); raise(table, index, name, value); }
protected void setSingleEntry(StringTable table, int mode, int index, String name, ByteString value) { if (name.isEmpty() && table.hasIndex(index)) { // With console recorded replays, the replay sometimes has no name entry, // and supposedly expects us to use the one that is existing // see: https://github.com/skadistats/clarity/issues/147#issuecomment-409619763 // and Slack communication with Lukas // reuse the old key, and see if that works name = table.getNameByIndex(index); } table.set(mode, index, name, value); raise(table, index, name, value); }
DTClass dtClass = dtClasses.forClassId(Integer.valueOf(baselines.getNameByIndex(i))); String fileName = String.format("%s%s%s.txt", dir.getPath(), File.separator, dtClass.getDtName()); log.info("writing {}", fileName);
@OnReset public void onReset(Demo.CDemoStringTables packet, ResetPhase phase) { if (phase == ResetPhase.CLEAR) { resetStringTables.clear(); for (StringTable table : stringTables.byName.values()) { table.reset(); } } else if (phase == ResetPhase.ACCUMULATE) { for (Demo.CDemoStringTables.table_t tt : packet.getTablesList()) { if (!stringTables.byName.containsKey(tt.getTableName())) { continue; } resetStringTables.put(tt.getTableName(), tt); } } else if (phase == ResetPhase.APPLY) { for (StringTable table : stringTables.byName.values()) { Demo.CDemoStringTables.table_t tt = resetStringTables.get(table.getName()); if (tt != null) { for (int i = 0; i < tt.getItemsCount(); i++) { Demo.CDemoStringTables.items_t it = tt.getItems(i); setSingleEntry(table, 2, i, it.getStr(), it.getData()); } } else { for (int i = 0; i < table.getEntryCount(); i++) { raise(table, i, table.getNameByIndex(i), table.getValueByIndex(i)); } } } } }
@OnReset public void onReset(Demo.CDemoStringTables packet, ResetPhase phase) { if (phase == ResetPhase.CLEAR) { resetStringTables.clear(); for (StringTable table : stringTables.byName.values()) { table.reset(); } } else if (phase == ResetPhase.ACCUMULATE) { for (Demo.CDemoStringTables.table_t tt : packet.getTablesList()) { if (!stringTables.byName.containsKey(tt.getTableName())) { continue; } resetStringTables.put(tt.getTableName(), tt); } } else if (phase == ResetPhase.APPLY) { for (StringTable table : stringTables.byName.values()) { Demo.CDemoStringTables.table_t tt = resetStringTables.get(table.getName()); if (tt != null) { for (int i = 0; i < tt.getItemsCount(); i++) { Demo.CDemoStringTables.items_t it = tt.getItems(i); setSingleEntry(table, 2, i, it.getStr(), it.getData()); } } else { for (int i = 0; i < table.getEntryCount(); i++) { raise(table, i, table.getNameByIndex(i), table.getValueByIndex(i)); } } } } }
throw new UnknownItemFoundException(String.format("Can't find item by its handle (%d)", hItem)); String itemName = stEntityNames.getNameByIndex(eItem.getProperty("m_pEntity.m_nameStringableIndex")); if(itemName == null) { throw new UnknownItemFoundException("Can't get item name from EntityName string table");