示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="character"></param>
        /// <param name="item"></param>
        /// <param name="effect"></param>
        /// <param name="targetId"></param>
        /// <param name="targetCell"></param>
        /// <returns></returns>
        public override bool ProcessItem(CharacterEntity character, ItemDAO item, GenericEffect effect, long targetId, int targetCell)
        {
            if (targetId != -1)
            {
                var entity = character.Map.GetEntity(targetId);
                character = entity as CharacterEntity;
                if (character == null)
                {
                    return(false);
                }
            }

            switch ((ItemTypeEnum)item.Template.Type)
            {
            case ItemTypeEnum.TYPE_PAIN:
                character.EmoteUse(EMOTE_EAT_REST);
                break;
            }

            return(Process(character, new Dictionary <string, string> {
                { "life", effect.RandomJet.ToString() }
            }));
        }