mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* PlayerFactory initial * PlayerFactory Create275HeavyWeapons * Better check for PlayerFactory.Create failure * PlayerFactory todo notes added * Add spendallxp developer command * Improve PlayerFactory code * Add comment to AuthenticaitonHandler for spot to atuo create characters
72 lines
2.2 KiB
C#
72 lines
2.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
using ACE.Database.Models.Shard;
|
|
using ACE.Database.Models.World;
|
|
using ACE.Entity;
|
|
using ACE.Entity.Enum;
|
|
using ACE.Server.Network;
|
|
|
|
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)
|
|
{
|
|
Character.IsPlussed = true;
|
|
|
|
SetEphemeralValues();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Restore a WorldObject from the database.
|
|
/// </summary>
|
|
public Sentinel(Biota biota, IEnumerable<Biota> inventory, IEnumerable<Biota> wieldedItems, Character character, Session session) : base(biota, inventory, wieldedItems, character, session)
|
|
{
|
|
SetEphemeralValues();
|
|
}
|
|
|
|
private void SetEphemeralValues()
|
|
{
|
|
BaseDescriptionFlags |= ObjectDescriptionFlag.Admin;
|
|
|
|
switch (CloakStatus)
|
|
{
|
|
case ACE.Entity.Enum.CloakStatus.Off:
|
|
goto default;
|
|
case ACE.Entity.Enum.CloakStatus.On:
|
|
Translucency = 0.5f;
|
|
Cloaked = true;
|
|
Ethereal = true;
|
|
NoDraw = true;
|
|
Visibility = true;
|
|
break;
|
|
case ACE.Entity.Enum.CloakStatus.Player:
|
|
goto default;
|
|
case ACE.Entity.Enum.CloakStatus.Creature:
|
|
goto default;
|
|
default:
|
|
Translucency = null;
|
|
Cloaked = false;
|
|
Ethereal = false;
|
|
NoDraw = false;
|
|
Visibility = false;
|
|
break;
|
|
}
|
|
}
|
|
|
|
public override string Name
|
|
{
|
|
get
|
|
{
|
|
if ((CloakStatus ?? ACE.Entity.Enum.CloakStatus.Undef) >= ACE.Entity.Enum.CloakStatus.Player)
|
|
return base.Name;
|
|
else
|
|
return "+" + base.Name;
|
|
}
|
|
//set => SetProperty(PropertyString.Name, value);
|
|
}
|
|
}
|
|
}
|