private void SetEphemeralValues() { ObjectDescriptionFlags |= ObjectDescriptionFlag.Player; // This is the default send upon log in and the most common. Anything with a velocity will need to add that flag. // This should be handled automatically... //PositionFlags |= PositionFlags.OrientationHasNoX | PositionFlags.OrientationHasNoY | PositionFlags.IsGrounded | PositionFlags.HasPlacementID; SetStance(MotionStance.NonCombat, false); // radius for object updates ListeningRadius = 5f; if (Session != null && Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) { if (Session.AccessLevel == AccessLevel.Admin) { IsAdmin = true; } if (Session.AccessLevel == AccessLevel.Developer) { IsArch = true; } if (Session.AccessLevel == AccessLevel.Envoy || Session.AccessLevel == AccessLevel.Sentinel) { IsSentinel = true; } if (Session.AccessLevel == AccessLevel.Advocate) { IsAdvocate = true; } } ContainerCapacity = (byte)(7 + AugmentationExtraPackSlot); if (Session != null && AdvocateQuest && IsAdvocate) // Advocate permissions are per character regardless of override { if (Session.AccessLevel == AccessLevel.Player) { Session.SetAccessLevel(AccessLevel.Advocate); // Elevate to Advocate permissions } if (AdvocateLevel > 4) { IsPsr = true; // Enable AdvocateTeleport via MapClick } } QuestManager = new QuestManager(this); ContractManager = new ContractManager(this); ConfirmationManager = new ConfirmationManager(this); LootPermission = new Dictionary <ObjectGuid, DateTime>(); Squelches = new SquelchDB(); return; // todo // ======================================= // This code was taken from the old Load() // ======================================= /*AceCharacter character; * * 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; * }*/ // FirstEnterWorldDone = false; // IsAlive = true; }
public GameEventSetSquelchDB(Session session, SquelchDB db) : base(GameEventType.SetSquelchDB, GameMessageGroup.UIQueue, session) { Writer.Write(db); }
private void SetEphemeralValues() { BaseDescriptionFlags |= ObjectDescriptionFlag.Player; // This is the default send upon log in and the most common. Anything with a velocity will need to add that flag. // This should be handled automatically... //PositionFlags |= PositionFlags.OrientationHasNoX | PositionFlags.OrientationHasNoY | PositionFlags.IsGrounded | PositionFlags.HasPlacementID; SetStance(MotionStance.NonCombat, false); // radius for object updates ListeningRadius = 5f; if (Session != null && Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) { if (Session.AccessLevel == AccessLevel.Admin) { IsAdmin = true; } if (Session.AccessLevel == AccessLevel.Developer) { IsArch = true; } if (Session.AccessLevel == AccessLevel.Envoy) { 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; } ContainerCapacity = 7; if (Session != null && AdvocateQuest && IsAdvocate) // Advocate permissions are per character regardless of override { if (Session.AccessLevel == AccessLevel.Player) { Session.SetAccessLevel(AccessLevel.Advocate); // Elevate to Advocate permissions } if (AdvocateLevel > 4) { IsPsr = true; // Enable AdvocateTeleport via MapClick } } QuestManager = new QuestManager(this); LastUseTracker = new Dictionary <int, DateTime>(); LootPermission = new Dictionary <ObjectGuid, DateTime>(); Squelches = new SquelchDB(); return; // todo /* todo fix for new EF model * TrackedContracts = new Dictionary<uint, ContractTracker>(); * // Load the persisted tracked contracts into the working dictionary on player object. * foreach (var trackedContract in AceObject.TrackedContracts) * { * ContractTracker loadContract = new ContractTracker(trackedContract.Value.ContractId, Guid.Full) * { * DeleteContract = trackedContract.Value.DeleteContract, * SetAsDisplayContract = trackedContract.Value.SetAsDisplayContract, * Stage = trackedContract.Value.Stage, * TimeWhenDone = trackedContract.Value.TimeWhenDone, * TimeWhenRepeats = trackedContract.Value.TimeWhenRepeats * }; * * TrackedContracts.Add(trackedContract.Key, loadContract); * }*/ // ======================================= // This code was taken from the old Load() // ======================================= /*AceCharacter character; * * 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; * }*/ // FirstEnterWorldDone = false; // IsAlive = true; }
/// <summary> /// Builds the SquelchDB for network sending /// </summary> /// <returns></returns> public void UpdateSquelchDB() { Squelches = new SquelchDB(Player.Character.GetSquelches(Player.CharacterDatabaseLock), Player.SquelchGlobal); }