Exemplo n.º 1
0
        public SummonedEntity(SummonedEntity template, int?nIdOverride = null)
        {
            UID         = template.UID;
            EntityType  = template.EntityType;
            ClassName   = template.ClassName;
            _nClassID   = template._nClassID;
            DisplayName = template.DisplayName;
            _nID        = nIdOverride ?? template._nID;

            PowersetFullName     = template.PowersetFullName.ToArray();
            _nPowerset           = template._nPowerset.ToArray();
            UpgradePowerFullName = template.UpgradePowerFullName.ToArray();
            _nUpgradePower       = template._nUpgradePower.ToArray();
        }
Exemplo n.º 2
0
        public static SummonedEntity AddEntity()
        {
            var  iEntity = new SummonedEntity();
            var  num1    = 0;
            bool stop;

            do
            {
                iEntity.UID = "NewEntity_" + num1;
                stop        = true;
                var num2 = DatabaseAPI.Database.Entities.Length - 1;
                for (var index = 0; index <= num2; ++index)
                {
                    if (DatabaseAPI.Database.Entities[index].UID.ToLower() == iEntity.UID.ToLower())
                    {
                        stop = false;
                    }
                }
                ++num1;
            } while (!stop);

            return(iEntity);
        }