Example #1
0
        private static ListView <AGE.Action> PlayAgeActionShared(AreaEventTrigger.EActTiming inTiming, AreaEventTrigger.STimingAction[] inTimingActs, ActionStopDelegate inCallback, ListView <AGE.Action> outDuraActs, GameObject inSrc, GameObject inAtker)
        {
            ListView <AGE.Action> view = new ListView <AGE.Action>();

            foreach (AreaEventTrigger.STimingAction action in inTimingActs)
            {
                if (action.Timing == inTiming)
                {
                    ActionStopDelegate delegate2 = null;
                    if (inTiming == AreaEventTrigger.EActTiming.EnterDura)
                    {
                        delegate2 = inCallback;
                    }
                    AGE.Action item = PlayAgeActionShared(action.ActionName, action.HelperName, inSrc, inAtker, action.HelperIndex, inCallback);
                    if (item != null)
                    {
                        view.Add(item);
                        if (delegate2 != null)
                        {
                            outDuraActs.Add(item);
                        }
                    }
                }
            }
            return(view);
        }
Example #2
0
        public static string GetResourceName(AGE.Action _action, string _resName, bool _bUseAdvanceSkin)
        {
            uint            num;
            SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");

            if (((refParamObject == null) || (refParamObject.Originator == 0)) || ((refParamObject.Originator.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero) || (refParamObject.Originator.handle.ActorControl == null)))
            {
                return(_resName);
            }
            HeroWrapper actorControl = (HeroWrapper)refParamObject.Originator.handle.ActorControl;

            if ((actorControl == null) || !actorControl.GetSkinCfgID(out num))
            {
                return(_resName);
            }
            int           length   = _resName.LastIndexOf('/');
            StringBuilder builder  = new StringBuilder(_resName);
            StringBuilder builder2 = new StringBuilder(actorControl.GetSkinEffectPath());

            if (length < 0)
            {
                return(_resName);
            }
            builder.Remove(0, length);
            builder2.Append(builder);
            if (_bUseAdvanceSkin)
            {
                int advanceSkinIndex = actorControl.GetAdvanceSkinIndex();
                if (advanceSkinIndex > 0)
                {
                    builder2.AppendFormat("_level{0}", advanceSkinIndex);
                }
            }
            return(builder2.ToString());
        }