Esempio n. 1
0
 public GamePacketManager(ILogger logger, IPlayerManager playerManager)
 {
     this.logger        = logger;
     this.playerManager = playerManager;
     Default            = new UnsupportedPacketHandler(logger);
     packetHandlers["update_character_state"] = new UpdateCharacterStatePacketHandler(playerManager);
 }
Esempio n. 2
0
        public GamePacketManager(ILogger <GamePacketManager> logger, ISessionManager sessionManager, IPlayerManager playerManager)
        {
            this.logger        = logger;
            this.playerManager = playerManager;
            Default            = new UnsupportedPacketHandler(logger);

            packetHandlers["sync_client"]               = new SyncClientPacketHandler(sessionManager);
            packetHandlers["sync_time"]                 = new SyncTimePacketHandler(sessionManager);
            packetHandlers["update_character_state"]    = new UpdateCharacterStatePacketHandler(logger, playerManager);
            packetHandlers["update_character_skills"]   = new UpdateCharacterSkillPacketHandler(logger, playerManager);
            packetHandlers["update_character_exp"]      = new UpdateCharacterExperiencePacketHandler(logger, playerManager);
            packetHandlers["update_user_session_stats"] = new UpdateUserSessionStatsPacketHandler(playerManager);
            packetHandlers["update_user_loyalty"]       = new UpdateUserLoyaltyPacketHandler(playerManager);
        }