예제 #1
0
        public CreateItem(EmoteScriptLib.Emote emote)
        {
            wcid        = emote.WeenieClassId;
            palette     = (uint?)emote.Palette;
            shade       = emote.Shade;
            destination = (uint?)emote.DestinationType;
            stack_size  = emote.StackSize;

            if (emote.TryToBond != null)
            {
                try_to_bond = Convert.ToByte(emote.TryToBond.Value);
            }
        }
예제 #2
0
        public Emote(EmoteScriptLib.Emote emote)
        {
            type     = (uint)emote.Type;
            delay    = emote.Delay ?? 0.0f;
            extent   = emote.Extent ?? 1.0f;
            amount   = (uint?)emote.Amount;
            motion   = (uint?)emote.Motion;
            msg      = emote.Message;
            amount64 = emote.Amount64;
            heroxp64 = (uint?)emote.HeroXP64;

            if (emote.WeenieClassId != null || emote.Palette != null || emote.Shade != null || emote.DestinationType != null || emote.StackSize != null || emote.TryToBond != null)
            {
                cprof = new CreateItem(emote);
            }

            min64   = emote.Min64;
            max64   = emote.Max64;
            percent = (float?)emote.Percent;

            if (emote.Display != null)
            {
                display = Convert.ToByte(emote.Display.Value);
            }

            max     = (uint?)emote.Max;
            min     = (uint?)emote.Min;
            fmax    = emote.MaxFloat;
            fmin    = emote.MinFloat;
            stat    = (uint?)emote.Stat;
            pscript = (uint?)emote.PScript;
            sound   = (uint?)emote.Sound;

            if (emote.ObjCellId != null || emote.OriginX != null || emote.OriginY != null || emote.OriginZ != null)
            {
                mPosition = new Position(emote);
            }
            else if (emote.AnglesW != null || emote.AnglesX != null | emote.AnglesY != null || emote.AnglesZ != null)
            {
                frame = new Frame(emote);
            }

            spellid        = (uint?)emote.SpellId;
            teststring     = emote.TestString;
            wealth_rating  = (uint?)emote.WealthRating;
            treasure_class = (uint?)emote.TreasureClass;
            treasure_type  = (uint?)emote.TreasureType;
        }
예제 #3
0
        public Position(EmoteScriptLib.Emote emote)
        {
            objcell_id = emote.ObjCellId ?? 0;

            frame = new Frame(emote);
        }
예제 #4
0
        public Frame(EmoteScriptLib.Emote emote)
        {
            origin = new Vector3(emote.OriginX ?? 0, emote.OriginY ?? 0, emote.OriginZ ?? 0);

            angles = new Quaternion(emote.AnglesX ?? 0, emote.AnglesY ?? 0, emote.AnglesZ ?? 0, emote.AnglesW ?? 1);
        }