Пример #1
0
        public Account()
        {
            Host = new OOGHost("");

            Auth       = Host.IncludePlugin <AuthPlugin>();
            Relogin    = Host.IncludePlugin <ReloginPlugin>();
            Meditation = Host.IncludePlugin <MeditationPlugin>();
            Emu        = Host.IncludePlugin <EmuPlugin>();

            Meditation.Enabled = true;

            Host.PacketHandler <MeditationEnabledS14A>().OnReceive += (object sender, SiviliaFramework.IO.GamePacket e) => RefreshAccount();
            Host.PacketHandler <MeditationInfoS149>().OnReceive    += (object sender, SiviliaFramework.IO.GamePacket e) => RefreshAccount();
            Host.PacketHandler <RoleInfoUpdateS26>().OnReceive     += (object sender, SiviliaFramework.IO.GamePacket e) => RefreshAccount();
            Host.PacketHandler <RoleStatsInfoS32>().OnReceive      += (object sender, SiviliaFramework.IO.GamePacket e) => RefreshAccount();
            Relogin.ReloginStatusUpdate  += (object sender, EventArgs args) => RefreshAccount();
            Host.Connection.Connected    += (object sender, EventArgs e) => RefreshAccount();
            Host.Connection.Disconnected += (object sender, EventArgs e) => RefreshAccount();
            Auth.OnEnteredWorld          += (object sender, EventArgs e) => RefreshAccount();

            ConnectionStatus = Host.IncludeDataBlock <ConnectionStatus>();

            Auth.RolesListLoaded += Auth_RolesLoaded;

            ServerName    = string.Empty;
            ServerAddress = string.Empty;
            Login         = string.Empty;
            Password      = string.Empty;
            AutoMessage   = string.Empty;
        }
Пример #2
0
 internal protected override void Initialize(OOGHost oogHost)
 {
     Host = oogHost;
     Host.PacketHandler <OnlineAnnounceS04>().OnReceive += Receive_OnlineAnnounce;
     Host.PacketHandler <KeepAliveS5A>().OnReceive      += Receive_KeepAlive;
     Host.Connection.Disconnected += Connection_Disconnected;
 }
Пример #3
0
        protected internal override void Initialize(OOGHost oogHost)
        {
            ShowOnline       = false;
            SendGetInventory = true;

            Host = oogHost;

            Host.IncludePlugin <AuthPlugin>().OnEnteredWorld   += EmuPlugin_OnEnteredWorld;
            Host.PacketHandler <PrivateMessageS60>().OnReceive += EmuPlugin_PrivateMessageReceive;
        }
Пример #4
0
        internal protected override void Initialize(OOGHost oogHost)
        {
            Host = oogHost;

            MeditationInformation = oogHost.IncludeDataBlock <MeditationInformation>();
            AccountInformation    = oogHost.IncludeDataBlock <AccountInformation>();

            oogHost.PacketHandler <MeditationInfoS149>().OnReceive    += (object sender, GamePacket e) => HandleUpdate();
            oogHost.PacketHandler <MeditationEnabledS14A>().OnReceive += (object sender, GamePacket e) => HandleUpdate();
        }
Пример #5
0
        internal protected override void Initialize(OOGHost oogHost)
        {
            Host = oogHost;

            Host.IncludePlugin <KeepAlivePlugin>();
            AccountInformation = Host.IncludeDataBlock <AccountInformation>();

            Host.PacketHandler <ServerInfoS01>().OnReceive     += Receive_ServerInfo;
            Host.PacketHandler <SMKeyS02>().OnReceive          += Receive_SMKey;
            Host.PacketHandler <OnlineAnnounceS04>().OnReceive += Receive_RoleSelectionPage;
            Host.PacketHandler <RoleLogoutS45>().OnReceive     += Receive_RoleSelectionPage;
            Host.PacketHandler <RoleList_ReS53>().OnReceive    += Receive_RoleList_Re;
            Host.PacketHandler <SelectRole_ReS47>().OnReceive  += Receive_SelectRole_Re;
            Host.PacketHandler <PlayerPositionS08>().OnReceive += Receive_PlayerPosition;

            Host.Connection.Disconnected += Connection_Disconnected;
        }
Пример #6
0
        internal protected override void Initialize(OOGHost oogHost)
        {
            Enabled = true;

            NextLoginTime = new UnixTime(0);
            LastLoginTime = new UnixTime(0);
            RolePosition  = -1;

            asyncRelogin = new AsyncCallback(Relogin);

            ReloginInterval   = 10000;
            ReconnectInterval = 5000;

            Host = oogHost;
            Auth = Host.IncludePlugin <AuthPlugin>();
            AccountInformation = Host.IncludeDataBlock <AccountInformation>();

            Host.PacketHandler <ServerInfoS01>().OnReceive += ServerInfoS01_OnReceive;
            Host.Connection.Disconnected += Connection_Disconnected;

            Auth.RolesListLoaded += Auth_RolesListLoaded;
            Auth.OnEnteredWorld  += Auth_OnEnteredWorld;
        }
Пример #7
0
 internal ConnectionData(OOGHost oogHost)
 {
     Host       = oogHost;
     DataBlocks = new Dictionary <Type, DataBlock>();
 }