public Player(uint id, DotaGameState state) : base(id, state) { const string t = "DT_DOTAPlayer"; PlayerId = bind <uint>(t, "m_iPlayerID"); Hero = handle(t, "m_hAssignedHero"); }
public Player(uint id, DotaGameState state) : base(id, state) { const string t = "DT_DOTAPlayer"; PlayerId = bind<uint>(t, "m_iPlayerID"); Hero = handle(t, "m_hAssignedHero"); }
public DotaGame(DotaGameState state, DotaGameConnection connection) { this.state = state; this.connection = connection; entityUpdater = new EntityUpdater(state); stringTableUpdater = new StringTableUpdater(); }
public Handle(Property property, DotaGameState state) { this.property = property; this.state = state; this.value = 0; this.ReadAt = null; }
/// <summary> /// Initialize the signon handler. /// </summary> /// <param name="state"></param> /// <param name="connection"></param> public DotaSignon(DotaGameState state, DotaGameConnection connection, DOTAConnectDetails details) { this.state = state; this.details = details; this.connection = connection; entityUpdater = new EntityUpdater(state); sendTableFlattener = new SendTableFlattener(); stringTableUpdater = new StringTableUpdater(); }
/// <summary> /// Init a new game connect session. /// </summary> /// <param name="deets"></param> /// <param name="toArray"></param> /// <param name="poolBuilder">Pool builder</param> internal DotaGameSession(DOTAConnectDetails deets, IDotaGameController[] controllers, DotaEntityPool.Builder poolBuilder) { _details = deets; Running = false; _gameState = new DotaGameState(deets); _gameState.EntityPool = poolBuilder.Build(_gameState); _connection = null; Controllers = controllers; }
public Ability(uint id, DotaGameState state) : base(id, state) { const string t = "DT_DOTABaseAbility"; Level = bind <uint>(t, "m_iLevel"); Cooldown = bind <float>(t, "m_fCooldown"); CooldownLength = bind <float>(t, "m_flCooldownLength"); ManaCost = bind <uint>(t, "m_iManaCost"); CastRange = bind <uint>(t, "m_iCastRange"); }
public DotaHandshake( DOTAConnectDetails details, DotaGameState state, DotaGameConnection connection) { this.details = details; this.connection = connection; this.state = state; client_challenge = (uint)new Random().Next(); }
public Ability(uint id, DotaGameState state) : base(id, state) { const string t = "DT_DOTABaseAbility"; Level = bind<uint>(t, "m_iLevel"); Cooldown = bind<float>(t, "m_fCooldown"); CooldownLength = bind<float>(t, "m_flCooldownLength"); ManaCost = bind<uint>(t, "m_iManaCost"); CastRange = bind<uint>(t, "m_iCastRange"); }
public UserCmdGenerator(DotaGameState state, DotaGameConnection connection) { this.state = state; this.connection = connection; backup = new List <UserCmd>(); next = new List <UserCmd>(); commandNumber = 0; orderNumber = 0; }
private DotaEntityPool(DotaGameState state, Dictionary <string, Constructor> constructors) { _state = state; _pendingMappings = constructors; Entities = new Dictionary <uint, MappedEntityClass>(); EntitiesByType = new Dictionary <Type, HashSet <uint> >(); foreach (var con in constructors.Values) { EntitiesByType[con.type] = new HashSet <uint>(); } }
/// <summary> /// Banned heros /// </summary> //todo: public RangeValue<uint> BannedHeros; /// <summary> /// Selected heros /// </summary> //todo: public RangeValue<uint> SelectedHeros; #endregion public GameRules(uint id, DotaGameState state) : base(id, state) { const string t = "DT_DOTAGamerules"; GameState = bindE <DOTA_GameState>(t, "m_nGameState"); GameTime = bind <float>(t, "m_fGameTime"); GameStartTime = bind <float>(t, "m_flGameStartTime"); GameEndTime = bind <float>(t, "m_flGameEndTime"); PreGameStartTime = bind <float>(t, "m_flPreGameStartTime"); //MatchID = bind<ulong>(t, "m_unMatchID"); broken GameMode = bindE <DOTA_GameMode>(t, "m_nGameState"); PauseTeam = bindE <DOTA_ServerTeam>(t, "m_iPauseTeam"); GameWinner = bindE <DOTA_ServerTeam>(t, "m_nGameWinner"); NetTimeOfDay = bind <ulong>(t, "m_iNetTimeOfDay"); DraftStartingTeam = bindE <DOTA_ServerTeam>(t, "m_iStartingTeam"); DraftActiveTeam = bindE <DOTA_ServerTeam>(t, "m_iActiveTeam"); HeroPickState = bindE <DOTA_HeroPickState>(t, "m_nHeroPickState"); //ExtraTimeRemaining = bind<float>(t, "m_fExtraTimeRemaining"); broken //todo: BannedHeros = range<uint>("m_BannedHeroes", ) //todo: handle m_nGGTeam and m_flGGEndsAtTime }
internal PlayerResource(uint id, DotaGameState state) : base(id, state) { Names = range<string>("m_iszPlayerNames", 32); SteamIds = range<ulong>("m_iPlayerSteamIDs", 32); }
/// <summary> /// Banned heros /// </summary> //todo: public RangeValue<uint> BannedHeros; /// <summary> /// Selected heros /// </summary> //todo: public RangeValue<uint> SelectedHeros; #endregion public GameRules(uint id, DotaGameState state) : base(id, state) { const string t = "DT_DOTAGamerules"; GameState = bindE<DOTA_GameState>(t, "m_nGameState"); GameTime = bind<float>(t, "m_fGameTime"); GameStartTime = bind<float>(t, "m_flGameStartTime"); GameEndTime = bind<float>(t, "m_flGameEndTime"); PreGameStartTime = bind<float>(t, "m_flPreGameStartTime"); //MatchID = bind<ulong>(t, "m_unMatchID"); broken GameMode = bindE<DOTA_GameMode>(t, "m_nGameState"); PauseTeam = bindE<DOTA_ServerTeam>(t, "m_iPauseTeam"); GameWinner = bindE<DOTA_ServerTeam>(t, "m_nGameWinner"); NetTimeOfDay = bind<ulong>(t, "m_iNetTimeOfDay"); DraftStartingTeam = bindE<DOTA_ServerTeam>(t, "m_iStartingTeam"); DraftActiveTeam = bindE<DOTA_ServerTeam>(t, "m_iActiveTeam"); HeroPickState = bindE<DOTA_HeroPickState>(t, "m_nHeroPickState"); //ExtraTimeRemaining = bind<float>(t, "m_fExtraTimeRemaining"); broken //todo: BannedHeros = range<uint>("m_BannedHeroes", ) //todo: handle m_nGGTeam and m_flGGEndsAtTime }
protected MappedEntityClass(uint id, DotaGameState state) { this.Id = id; this.state = state; }
internal PlayerResource(uint id, DotaGameState state) : base(id, state) { Names = range <string>("m_iszPlayerNames", 32); SteamIds = range <ulong>("m_iPlayerSteamIDs", 32); }
/// <summary> /// Finalize the entity mappings. /// </summary> /// <returns></returns> public DotaEntityPool Build(DotaGameState state) { return(new DotaEntityPool(state, _constructors)); }
public EntityUpdater(DotaGameState state) { this.state = state; unpacker = new PropertyValueUnpacker(); }