Skip to content

Instantly share code, notes, and snippets.

./alice-death-test ../../replays/725795274.dem
1302, CDOTA_Unit_Hero_Axe, Kumba~, 0, [77|152|130], [71|39]
1321, CDOTA_Unit_Hero_Jakiro, Gears Of Love, 0, [175|100|130], [121|32]
1373, CDOTA_Unit_Hero_Sniper, Steeldawg, 0, [137|129|129], [72|80]
1373, CDOTA_Unit_Hero_Sniper, Steeldawg, 0, [134|131|129], [123|66]
1410, CDOTA_Unit_Hero_Broodmother, Erudaki, 0, [127|124|127], [80|2]
1302, CDOTA_Unit_Hero_Axe, Kumba~, 0, [80|159|130], [67|82]
1321, CDOTA_Unit_Hero_Jakiro, Gears Of Love, 0, [78|136|130], [51|121]
1373, CDOTA_Unit_Hero_Sniper, Steeldawg, 0, [125|135|128], [1|127]
741, CDOTA_Unit_Hero_Legion_Commander, Eyjafjallajokull Shize, 0, [117|137|127], [59|111]
#include <iostream>
#include <exception>
#include <alice/alice.hpp>
using namespace dota;
/** This handler prints all global chat messages to the console. */
class handler_chat {
private:
// Node is either HuffmanLeaf or HuffmanNode
// Leaf = only value
// Node = left and right, both are either a leaf or a node
node := (*fp.tree).(HuffmanNode)
for fp.finished == false {
if r.readBits(1) == 1 {
switch i := node.right.(type) {
case HuffmanLeaf:
i.value.(FieldPathOpFcn)(r, fp)
// Node is either HuffmanLeaf or HuffmanNode
// Leaf = only value
// Node = left and right, both are either a leaf or a node
// This would be better
node := 'something'
for fp.finished == false {
if r.readBits(1) == 1 {
node = node.right
} else {
// This works:
i.value.(func(*reader, *fieldpath))(r, fp)
// This doesn't:
type FieldPathOpFcn func(*reader, *fieldpath)
i.value.(FieldPathOpFcn)(r, fp)
panic: interface conversion: interface is func(*manta.reader, *manta.fieldpath), not manta.FieldPathOpFcn
=== RUN TestReadProperties
manta.PlusTwo: Name: CBaseEntity
manta.(*fieldpath).walk: Reached in 4 bits, m_flSimulationTime
manta.PlusOne: Name: CBaseEntity
manta.(*fieldpath).walk: Reached in 1 bits, m_hOwnerEntity
manta.PlusOne: Name: CBaseEntity
manta.(*fieldpath).walk: Reached in 1 bits, CBodyComponent
manta.PushOneLeftDeltaZeroRightZero: Name: CBaseEntity
manta.(*fieldpath).walk: Reached in 12 bits, m_cellX
manta.PlusOne: Name: CBaseEntity
#ifndef _HANDLER_COMBATLOG_HPP_
#define _HANDLER_COMBATLOG_HPP_
#include <sstream>
#include <alice/handler.hpp>
#include <alice/dota_gcmessages_common.pb.h>
#include <alice/netmessages.pb.h>
#include <alice/networkbasetypes.pb.h>

Keybase proof

I hereby claim:

  • I am invokr on github.
  • I am invokr (https://keybase.io/invokr) on keybase.
  • I have a public key whose fingerprint is B999 CE0E 96A2 E246 95B2 D15A A70B 51F1 8BC6 B409

To claim this, I am signing this object:

/** Static fieldpath lookup */
force_inline fieldop* fieldop_lookup(uint32_t id) {
switch (id) {
case 0: // PlusOne
return &fieldpath_operations[0];
case 2: // FieldPathEncodeFinish
return &fieldpath_operations[39];
case 14: // PlusTwo
return &fieldpath_operations[1];
case 15: // PushOneLeftDeltaNRightNonZeroPack6Bits
{
"courier_deaths": [],
"evendescriptors": [],
"teams": [],
"frames": [],
"smokes": [],
"chat": [],
"teamfight": [],
"match": [],
"broadcasters": [],