public void PlayerEnterWorld() { PlayerManager.SwitchPlayerFromOfflineToOnline(this); // Save the the LoginTimestamp var lastLoginTimestamp = Time.GetUnixTime(); SetProperty(PropertyInt.LoginTimestamp, (int)lastLoginTimestamp); Character.LastLoginTimestamp = lastLoginTimestamp; Character.TotalLogins++; CharacterChangesDetected = true; Sequences.SetSequence(SequenceType.ObjectInstance, new UShortSequence((ushort)Character.TotalLogins)); // SendSelf will trigger the entrance into portal space SendSelf(); // Init the client with the chat channel ID's, and then notify the player that they've choined the associated channels. var setTurbineChatChannels = new GameEventSetTurbineChatChannels(Session, 0, 1, 2, 3, 4, 6, 7, 0, 0, 0); // TODO these are hardcoded right now var general = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "General"); var trade = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "Trade"); var lfg = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "LFG"); var roleplay = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "Roleplay"); Session.Network.EnqueueSend(setTurbineChatChannels, general, trade, lfg, roleplay); // check if vassals earned XP while offline AddCPPoolToUnload(true); HandleDBUpdates(); }
public void PlayerEnterWorld() { IsAlive = true; // seems like something that should be handled differently... IsOnline = true; // Save the the LoginTimestamp SetProperty(PropertyFloat.LoginTimestamp, Time.GetTimestamp()); var totalLogins = GetProperty(PropertyInt.TotalLogins) ?? 0; totalLogins++; SetProperty(PropertyInt.TotalLogins, totalLogins); Sequences.AddOrSetSequence(SequenceType.ObjectInstance, new UShortSequence((ushort)totalLogins)); // SendSelf will trigger the entrance into portal space SendSelf(); SendFriendStatusUpdates(); // Init the client with the chat channel ID's, and then notify the player that they've choined the associated channels. var setTurbineChatChannels = new GameEventSetTurbineChatChannels(Session, 0, 1, 2, 3, 4, 6, 7, 0, 0, 0); // TODO these are hardcoded right now var general = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "General"); var trade = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "Trade"); var lfg = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "LFG"); var roleplay = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "Roleplay"); Session.Network.EnqueueSend(setTurbineChatChannels, general, trade, lfg, roleplay); }
public void PlayerEnterWorld() { PlayerManager.SwitchPlayerFromOfflineToOnline(this); // Save the the LoginTimestamp var lastLoginTimestamp = Time.GetUnixTime(); SetProperty(PropertyInt.LoginTimestamp, (int)lastLoginTimestamp); Character.LastLoginTimestamp = lastLoginTimestamp; Character.TotalLogins++; CharacterChangesDetected = true; Sequences.SetSequence(SequenceType.ObjectInstance, new UShortSequence((ushort)Character.TotalLogins)); HandleAugsForwardCompatibility(); if (AllegianceNode != null) { AllegianceRank = (int)AllegianceNode.Rank; } else { AllegianceRank = null; } // SendSelf will trigger the entrance into portal space SendSelf(); // Init the client with the chat channel ID's, and then notify the player that they've choined the associated channels. var allegianceChannel = Allegiance != null ? Allegiance.Biota.Id : 0u; var setTurbineChatChannels = new GameEventSetTurbineChatChannels(Session, allegianceChannel); var general = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "General"); var trade = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "Trade"); var lfg = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "LFG"); var roleplay = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "Roleplay"); Session.Network.EnqueueSend(setTurbineChatChannels, general, trade, lfg, roleplay); // check if vassals earned XP while offline HandleAllegianceOnLogin(); HandleHouseOnLogin(); HandleDBUpdates(); }
public async void Load() { character = await DatabaseManager.Character.LoadCharacter(Guid.Low); Position = character.Position; IsOnline = true; SendSelf(); SendFriendStatusUpdates(); // Init the client with the chat channel ID's, and then notify the player that they've choined the associated channels. var setTurbineChatChannels = new GameEventSetTurbineChatChannels(Session, 0, 1, 2, 3, 4, 6, 7, 0, 0, 0); // TODO these arehardcoded right now var general = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "General"); var trade = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "Trade"); var lfg = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "LFG"); var roleplay = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "Roleplay"); NetworkManager.SendWorldMessages(Session, new GameMessage[] { setTurbineChatChannels, general, trade, lfg, roleplay }); }
public async Task Load(Character preloadedCharacter = null) { character = preloadedCharacter ?? await DatabaseManager.Character.LoadCharacter(Guid.Low); if (Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) { if (Session.AccessLevel == AccessLevel.Admin) { character.IsAdmin = true; } if (Session.AccessLevel == AccessLevel.Developer) { character.IsArch = true; } if (Session.AccessLevel == AccessLevel.Envoy) { character.IsEnvoy = true; } //TODO: Need to setup and account properly for IsSentinel and IsAdvocate. //if (Session.AccessLevel == AccessLevel.Sentinel) // character.IsSentinel = true; //if (Session.AccessLevel == AccessLevel.Advocate) // character.IsAdvocate= true; } Position = character.Position; IsOnline = true; // SendSelf will trigger the entrance into portal space SendSelf(); SendFriendStatusUpdates(); // Init the client with the chat channel ID's, and then notify the player that they've choined the associated channels. var setTurbineChatChannels = new GameEventSetTurbineChatChannels(Session, 0, 1, 2, 3, 4, 6, 7, 0, 0, 0); // TODO these are hardcoded right now var general = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "General"); var trade = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "Trade"); var lfg = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "LFG"); var roleplay = new GameEventDisplayParameterizedStatusMessage(Session, StatusMessageType2.YouHaveEnteredThe_Channel, "Roleplay"); Session.Network.EnqueueSend(setTurbineChatChannels, general, trade, lfg, roleplay); }
public void PlayerEnterWorld() { var player = this; var physicsObj = PhysicsObj; IsOnline = true; // Save the the LoginTimestamp SetProperty(PropertyFloat.LoginTimestamp, Time.GetTimestamp()); var totalLogins = GetProperty(PropertyInt.TotalLogins) ?? 0; totalLogins++; SetProperty(PropertyInt.TotalLogins, totalLogins); Sequences.AddOrSetSequence(SequenceType.ObjectInstance, new UShortSequence((ushort)totalLogins)); // SendSelf will trigger the entrance into portal space SendSelf(); SendFriendStatusUpdates(); // Init the client with the chat channel ID's, and then notify the player that they've choined the associated channels. var setTurbineChatChannels = new GameEventSetTurbineChatChannels(Session, 0, 1, 2, 3, 4, 6, 7, 0, 0, 0); // TODO these are hardcoded right now var general = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "General"); var trade = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "Trade"); var lfg = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "LFG"); var roleplay = new GameEventWeenieErrorWithString(Session, WeenieErrorWithString.YouHaveEnteredThe_Channel, "Roleplay"); Session.Network.EnqueueSend(setTurbineChatChannels, general, trade, lfg, roleplay); // check if vassals earned XP while offline var offlinePlayer = WorldManager.GetOfflinePlayer(Guid); if (offlinePlayer != null) { offlinePlayer.AddCPPoolToUnload(true); } }