예제 #1
0
 private static void CopyValueInto(ACE.Entity.Models.PropertiesEmoteAction value, ACE.Database.Models.Shard.BiotaPropertiesEmoteAction existingValue, uint order)
 {
     //existingValue.EmoteId = value.EmoteId;
     existingValue.Order           = order;
     existingValue.Type            = value.Type;
     existingValue.Delay           = value.Delay;
     existingValue.Extent          = value.Extent;
     existingValue.Motion          = (int?)value.Motion;
     existingValue.Message         = value.Message;
     existingValue.TestString      = value.TestString;
     existingValue.Min             = value.Min;
     existingValue.Max             = value.Max;
     existingValue.Min64           = value.Min64;
     existingValue.Max64           = value.Max64;
     existingValue.MinDbl          = value.MinDbl;
     existingValue.MaxDbl          = value.MaxDbl;
     existingValue.Stat            = value.Stat;
     existingValue.Display         = value.Display;
     existingValue.Amount          = value.Amount;
     existingValue.Amount64        = value.Amount64;
     existingValue.HeroXP64        = value.HeroXP64;
     existingValue.Percent         = value.Percent;
     existingValue.SpellId         = value.SpellId;
     existingValue.WealthRating    = value.WealthRating;
     existingValue.TreasureClass   = value.TreasureClass;
     existingValue.TreasureType    = value.TreasureType;
     existingValue.PScript         = (int?)value.PScript;
     existingValue.Sound           = (int?)value.Sound;
     existingValue.DestinationType = value.DestinationType;
     existingValue.WeenieClassId   = value.WeenieClassId;
     existingValue.StackSize       = value.StackSize;
     existingValue.Palette         = value.Palette;
     existingValue.Shade           = value.Shade;
     existingValue.TryToBond       = value.TryToBond;
     existingValue.ObjCellId       = value.ObjCellId;
     existingValue.OriginX         = value.OriginX;
     existingValue.OriginY         = value.OriginY;
     existingValue.OriginZ         = value.OriginZ;
     existingValue.AnglesW         = value.AnglesW;
     existingValue.AnglesX         = value.AnglesX;
     existingValue.AnglesY         = value.AnglesY;
     existingValue.AnglesZ         = value.AnglesZ;
 }
예제 #2
0
        // =====================================
        // Clone
        // =====================================

        public static Biota Clone(this Biota biota)
        {
            var result = new Biota();

            result.Id                       = biota.Id;
            result.WeenieClassId            = biota.WeenieClassId;
            result.WeenieType               = biota.WeenieType;
            result.PopulatedCollectionFlags = biota.PopulatedCollectionFlags;

            if (biota.BiotaPropertiesBook != null)
            {
                result.BiotaPropertiesBook                    = new BiotaPropertiesBook();
                result.BiotaPropertiesBook.Id                 = biota.BiotaPropertiesBook.Id;
                result.BiotaPropertiesBook.ObjectId           = biota.BiotaPropertiesBook.ObjectId;
                result.BiotaPropertiesBook.MaxNumPages        = biota.BiotaPropertiesBook.MaxNumPages;
                result.BiotaPropertiesBook.MaxNumCharsPerPage = biota.BiotaPropertiesBook.MaxNumCharsPerPage;
            }

            foreach (var value in biota.BiotaPropertiesAnimPart)
            {
                result.BiotaPropertiesAnimPart.Add(new BiotaPropertiesAnimPart
                {
                    Id          = value.Id,
                    ObjectId    = value.Id,
                    Index       = value.Index,
                    AnimationId = value.AnimationId,
                    Order       = value.Order,
                });
            }

            foreach (var value in biota.BiotaPropertiesAttribute)
            {
                result.BiotaPropertiesAttribute.Add(new BiotaPropertiesAttribute
                {
                    Id          = value.Id,
                    ObjectId    = value.ObjectId,
                    Type        = value.Type,
                    InitLevel   = value.InitLevel,
                    LevelFromCP = value.LevelFromCP,
                    CPSpent     = value.CPSpent,
                });
            }

            foreach (var value in biota.BiotaPropertiesAttribute2nd)
            {
                result.BiotaPropertiesAttribute2nd.Add(new BiotaPropertiesAttribute2nd
                {
                    Id           = value.Id,
                    ObjectId     = value.ObjectId,
                    Type         = value.Type,
                    InitLevel    = value.InitLevel,
                    LevelFromCP  = value.LevelFromCP,
                    CPSpent      = value.CPSpent,
                    CurrentLevel = value.CurrentLevel,
                });
            }

            foreach (var value in biota.BiotaPropertiesBodyPart)
            {
                result.BiotaPropertiesBodyPart.Add(new BiotaPropertiesBodyPart
                {
                    Id              = value.Id,
                    ObjectId        = value.ObjectId,
                    Key             = value.Key,
                    DType           = value.DType,
                    DVal            = value.DVal,
                    DVar            = value.DVar,
                    BaseArmor       = value.BaseArmor,
                    ArmorVsSlash    = value.ArmorVsSlash,
                    ArmorVsPierce   = value.ArmorVsPierce,
                    ArmorVsBludgeon = value.ArmorVsBludgeon,
                    ArmorVsCold     = value.ArmorVsCold,
                    ArmorVsFire     = value.ArmorVsFire,
                    ArmorVsAcid     = value.ArmorVsAcid,
                    ArmorVsElectric = value.ArmorVsElectric,
                    ArmorVsNether   = value.ArmorVsNether,
                    BH              = value.BH,
                    HLF             = value.HLF,
                    MLF             = value.MLF,
                    LLF             = value.LLF,
                    HRF             = value.HRF,
                    MRF             = value.MRF,
                    LRF             = value.LRF,
                    HLB             = value.HLB,
                    MLB             = value.MLB,
                    LLB             = value.LLB,
                    HRB             = value.HRB,
                    MRB             = value.MRB,
                    LRB             = value.LRB,
                });
            }

            foreach (var value in biota.BiotaPropertiesBookPageData)
            {
                result.BiotaPropertiesBookPageData.Add(new BiotaPropertiesBookPageData
                {
                    Id            = value.Id,
                    ObjectId      = value.ObjectId,
                    PageId        = value.PageId,
                    AuthorId      = value.AuthorId,
                    AuthorName    = value.AuthorName,
                    AuthorAccount = value.AuthorAccount,
                    IgnoreAuthor  = value.IgnoreAuthor,
                    PageText      = value.PageText,
                });
            }

            foreach (var value in biota.BiotaPropertiesBool)
            {
                result.BiotaPropertiesBool.Add(new BiotaPropertiesBool
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }

            foreach (var value in biota.BiotaPropertiesCreateList)
            {
                result.BiotaPropertiesCreateList.Add(new BiotaPropertiesCreateList
                {
                    Id              = value.Id,
                    ObjectId        = value.ObjectId,
                    DestinationType = value.DestinationType,
                    WeenieClassId   = value.WeenieClassId,
                    StackSize       = value.StackSize,
                    Palette         = value.Palette,
                    Shade           = value.Shade,
                    TryToBond       = value.TryToBond,
                });
            }

            foreach (var value in biota.BiotaPropertiesDID)
            {
                result.BiotaPropertiesDID.Add(new BiotaPropertiesDID
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }


            foreach (var value in biota.BiotaPropertiesEmote)
            {
                var emote = new BiotaPropertiesEmote
                {
                    Id            = value.Id,
                    ObjectId      = value.ObjectId,
                    Category      = value.Category,
                    Probability   = value.Probability,
                    WeenieClassId = value.WeenieClassId,
                    Style         = value.Style,
                    Substyle      = value.Substyle,
                    Quest         = value.Quest,
                    VendorType    = value.VendorType,
                    MinHealth     = value.MinHealth,
                    MaxHealth     = value.MaxHealth,
                };

                foreach (var value2 in value.BiotaPropertiesEmoteAction)
                {
                    var action = new BiotaPropertiesEmoteAction
                    {
                        Id              = value2.Id,
                        EmoteId         = value2.EmoteId,
                        Order           = value2.Order,
                        Type            = value2.Type,
                        Delay           = value2.Delay,
                        Extent          = value2.Extent,
                        Motion          = value2.Motion,
                        Message         = value2.Message,
                        TestString      = value2.TestString,
                        Min             = value2.Min,
                        Max             = value2.Max,
                        Min64           = value2.Min64,
                        Max64           = value2.Max64,
                        MinDbl          = value2.MinDbl,
                        MaxDbl          = value2.MaxDbl,
                        Stat            = value2.Stat,
                        Display         = value2.Display,
                        Amount          = value2.Amount,
                        Amount64        = value2.Amount64,
                        HeroXP64        = value2.HeroXP64,
                        Percent         = value2.Percent,
                        SpellId         = value2.SpellId,
                        WealthRating    = value2.WealthRating,
                        TreasureClass   = value2.TreasureClass,
                        TreasureType    = value2.TreasureType,
                        PScript         = value2.PScript,
                        Sound           = value2.Sound,
                        DestinationType = value2.DestinationType,
                        WeenieClassId   = value2.WeenieClassId,
                        StackSize       = value2.StackSize,
                        Palette         = value2.Palette,
                        Shade           = value2.Shade,
                        TryToBond       = value2.TryToBond,
                        ObjCellId       = value2.ObjCellId,
                        OriginX         = value2.OriginX,
                        OriginY         = value2.OriginY,
                        OriginZ         = value2.OriginZ,
                        AnglesW         = value2.AnglesW,
                        AnglesX         = value2.AnglesX,
                        AnglesY         = value2.AnglesY,
                        AnglesZ         = value2.AnglesZ,
                    };

                    emote.BiotaPropertiesEmoteAction.Add(action);
                }

                result.BiotaPropertiesEmote.Add(emote);
            }


            foreach (var value in biota.BiotaPropertiesEnchantmentRegistry)
            {
                result.BiotaPropertiesEnchantmentRegistry.Add(new BiotaPropertiesEnchantmentRegistry
                {
                    Id                  = value.Id,
                    ObjectId            = value.ObjectId,
                    EnchantmentCategory = value.EnchantmentCategory,
                    SpellId             = value.SpellId,
                    LayerId             = value.LayerId,
                    HasSpellSetId       = value.HasSpellSetId,
                    SpellCategory       = value.SpellCategory,
                    PowerLevel          = value.PowerLevel,
                    StartTime           = value.StartTime,
                    Duration            = value.Duration,
                    CasterObjectId      = value.CasterObjectId,
                    DegradeModifier     = value.DegradeModifier,
                    DegradeLimit        = value.DegradeLimit,
                    LastTimeDegraded    = value.LastTimeDegraded,
                    StatModType         = value.StatModType,
                    StatModKey          = value.StatModKey,
                    StatModValue        = value.StatModValue,
                    SpellSetId          = value.SpellSetId,
                });
            }


            foreach (var value in biota.BiotaPropertiesEventFilter)
            {
                result.BiotaPropertiesEventFilter.Add(new BiotaPropertiesEventFilter
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Event    = value.Event,
                });
            }

            foreach (var value in biota.BiotaPropertiesFloat)
            {
                result.BiotaPropertiesFloat.Add(new BiotaPropertiesFloat
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }

            foreach (var value in biota.BiotaPropertiesGenerator)
            {
                result.BiotaPropertiesGenerator.Add(new BiotaPropertiesGenerator
                {
                    Id            = value.Id,
                    ObjectId      = value.ObjectId,
                    Probability   = value.Probability,
                    WeenieClassId = value.WeenieClassId,
                    Delay         = value.Delay,
                    InitCreate    = value.InitCreate,
                    MaxCreate     = value.MaxCreate,
                    WhenCreate    = value.WhenCreate,
                    WhereCreate   = value.WhereCreate,
                    StackSize     = value.StackSize,
                    PaletteId     = value.PaletteId,
                    Shade         = value.Shade,
                    ObjCellId     = value.ObjCellId,
                    OriginX       = value.OriginX,
                    OriginY       = value.OriginY,
                    OriginZ       = value.OriginZ,
                    AnglesW       = value.AnglesW,
                    AnglesX       = value.AnglesX,
                    AnglesY       = value.AnglesY,
                    AnglesZ       = value.AnglesZ,
                });
            }

            foreach (var value in biota.BiotaPropertiesIID)
            {
                result.BiotaPropertiesIID.Add(new BiotaPropertiesIID
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }

            foreach (var value in biota.BiotaPropertiesInt)
            {
                result.BiotaPropertiesInt.Add(new BiotaPropertiesInt
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }

            foreach (var value in biota.BiotaPropertiesInt64)
            {
                result.BiotaPropertiesInt64.Add(new BiotaPropertiesInt64
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }

            foreach (var value in biota.BiotaPropertiesPalette)
            {
                result.BiotaPropertiesPalette.Add(new BiotaPropertiesPalette
                {
                    Id           = value.Id,
                    ObjectId     = value.ObjectId,
                    SubPaletteId = value.SubPaletteId,
                    Offset       = value.Offset,
                    Length       = value.Length,
                });
            }

            foreach (var value in biota.BiotaPropertiesPosition)
            {
                result.BiotaPropertiesPosition.Add(new BiotaPropertiesPosition
                {
                    Id           = value.Id,
                    ObjectId     = value.ObjectId,
                    PositionType = value.PositionType,
                    ObjCellId    = value.ObjCellId,
                    OriginX      = value.OriginX,
                    OriginY      = value.OriginY,
                    OriginZ      = value.OriginZ,
                    AnglesW      = value.AnglesW,
                    AnglesX      = value.AnglesX,
                    AnglesY      = value.AnglesY,
                    AnglesZ      = value.AnglesZ,
                });
            }

            foreach (var value in biota.BiotaPropertiesSkill)
            {
                result.BiotaPropertiesSkill.Add(new BiotaPropertiesSkill
                {
                    Id                    = value.Id,
                    ObjectId              = value.ObjectId,
                    Type                  = value.Type,
                    LevelFromPP           = value.LevelFromPP,
                    SAC                   = value.SAC,
                    PP                    = value.PP,
                    InitLevel             = value.InitLevel,
                    ResistanceAtLastCheck = value.ResistanceAtLastCheck,
                    LastUsedTime          = value.LastUsedTime,
                });
            }

            foreach (var value in biota.BiotaPropertiesSpellBook)
            {
                result.BiotaPropertiesSpellBook.Add(new BiotaPropertiesSpellBook
                {
                    Id          = value.Id,
                    ObjectId    = value.ObjectId,
                    Spell       = value.Spell,
                    Probability = value.Probability,
                });
            }

            foreach (var value in biota.BiotaPropertiesString)
            {
                result.BiotaPropertiesString.Add(new BiotaPropertiesString
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Type     = value.Type,
                    Value    = value.Value,
                });
            }

            foreach (var value in biota.BiotaPropertiesTextureMap)
            {
                result.BiotaPropertiesTextureMap.Add(new BiotaPropertiesTextureMap
                {
                    Id       = value.Id,
                    ObjectId = value.ObjectId,
                    Index    = value.Index,
                    OldId    = value.OldId,
                    NewId    = value.NewId,
                    Order    = value.Order,
                });
            }

            return(result);
        }