mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* Step 1. Add new adapter classes and models All classes and objects added are in new namespaces. This add has 0 interraction on existing ACE code. This sets the groundwork for Step 2. Moving World DB caching to the new models * first part of the world entity usage * almost there * final part * update WeenieExtensions * fix * merge fixes and improvements * ACE.Database new code * it compiles * InitializePropertyDictionaries * WOrldDatabaseWithEntityCache cleanup * ShardDatabaseWithCaching * ShardDatabase Cleanup * todo * cache counts reported in serverstatus * House InitializePropertyDictionaries * improve ServerStatus * BiotaModel change HousePermissions to Dictionary<uint, bool> * PropertiesAllegiance to dictionary * BiotaUpdater improvements * Shard Database Cache Reporting * More code ported from Step 3 * Remove stub CharacterCache * Update WorldDatabaseWithEntityCache.cs * build fixes * code audit * Remove non-callback functions from SerializedShardDatabase * BiotaUpdater progress.. only emote left * Emotes done... now need to test * fix * Burden/Value fix for containers * fat fingered EncumbranceVal * add some safety * Don't cache player biotas for initial PlayerManager load * fix null spellbook * Add another null check This is redundant as the check is also upstream. This is to prevent an exception in the future if this function is called from another source.
82 lines
2.6 KiB
C#
82 lines
2.6 KiB
C#
using System.Collections.Generic;
|
|
|
|
using ACE.Entity;
|
|
using ACE.Entity.Enum;
|
|
using ACE.Entity.Models;
|
|
using ACE.Server.Network;
|
|
|
|
using Character = ACE.Database.Models.Shard.Character;
|
|
|
|
namespace ACE.Server.WorldObjects
|
|
{
|
|
public class Sentinel : Player
|
|
{
|
|
/// <summary>
|
|
/// A new biota be created taking all of its values from weenie.
|
|
/// </summary>
|
|
public Sentinel(Weenie weenie, ObjectGuid guid, uint accountId) : base(weenie, guid, accountId)
|
|
{
|
|
if (!Character.IsPlussed)
|
|
{
|
|
Character.IsPlussed = true;
|
|
CharacterChangesDetected = true;
|
|
}
|
|
|
|
SetEphemeralValues();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Restore a WorldObject from the database.
|
|
/// </summary>
|
|
public Sentinel(Biota biota, IEnumerable<ACE.Database.Models.Shard.Biota> inventory, IEnumerable<ACE.Database.Models.Shard.Biota> wieldedItems, Character character, Session session) : base(biota, inventory, wieldedItems, character, session)
|
|
{
|
|
if (!Character.IsPlussed)
|
|
{
|
|
Character.IsPlussed = true;
|
|
CharacterChangesDetected = true;
|
|
}
|
|
|
|
SetEphemeralValues();
|
|
}
|
|
|
|
private void SetEphemeralValues()
|
|
{
|
|
ObjectDescriptionFlags |= ObjectDescriptionFlag.Admin;
|
|
|
|
if (!ChannelsAllowed.HasValue)
|
|
ChannelsAllowed = Channel.Audit | Channel.Advocate1 | Channel.Advocate2 | Channel.Advocate3 | Channel.Sentinel | Channel.AllBroadcast;
|
|
else
|
|
ChannelsAllowed |= Channel.Audit | Channel.Advocate1 | Channel.Advocate2 | Channel.Advocate3 | Channel.Sentinel | Channel.AllBroadcast;
|
|
}
|
|
|
|
public override void InitPhysicsObj()
|
|
{
|
|
base.InitPhysicsObj();
|
|
|
|
switch (CloakStatus)
|
|
{
|
|
case CloakStatus.Off:
|
|
goto default;
|
|
case CloakStatus.On:
|
|
//Translucency = 0.5f;
|
|
Cloaked = true;
|
|
Ethereal = true;
|
|
NoDraw = true;
|
|
Visibility = true;
|
|
break;
|
|
case CloakStatus.Player:
|
|
goto default;
|
|
case CloakStatus.Creature:
|
|
Attackable = true;
|
|
goto default;
|
|
default:
|
|
Translucency = null;
|
|
Cloaked = false;
|
|
Ethereal = false;
|
|
NoDraw = false;
|
|
Visibility = false;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|