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(); }
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; }
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; }
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; }