DRObjects.Items.Archetypes.Local.Potion.GetPossibleActions C# (CSharp) Méthode

GetPossibleActions() public méthode

public GetPossibleActions ( Actor actor ) : ActionType[]
actor Actor
Résultat ActionType[]
        public override ActionType[] GetPossibleActions(Actor actor)
        {
            List<ActionType> actions = new List<ActionType>();
            //Base does proper handling of most actions, so let's retain them
            actions.AddRange(base.GetPossibleActions(actor));

            if (this.InInventory)
            {
                //Add drink
                actions.Add(ActionType.CONSUME);
            }

            return actions.ToArray();
        }