예제 #1
0
        public NewBimDesc(SimOutfit defaultOutfit)
        {
            if (dontCall)
            {
                return;
            }

            var _this = (SimDescription)(object)this;

            Create.AddNiecSimDescription(_this);
            NiecException.NewSendTextExceptionToDebugger();

            _this.mSkinToneKey = default(ResourceKey);
            _this.mSecondaryNormalMapWeights = new float[2];
            _this.mFlags                           = SimDescription.FlagField.Marryable | SimDescription.FlagField.CanBeKilledOnJob | SimDescription.FlagField.ShowSocialsOnSim | SimDescription.FlagField.Contactable | SimDescription.FlagField.CanStartFires | SimDescription.FlagField.WasCasCreated;
            _this.mAlmaMaterName                   = string.Empty;
            _this.UserDaysInCurrentAge             = int.MaxValue;
            _this.CharismaStats                    = default(SimDescription.Charisma);
            _this.mShapeDeltaMultiplier            = 1f;
            _this.mPreferredVehicleGuid            = ObjectGuid.InvalidObjectGuid;
            _this.mPreferredBoatGuid               = ObjectGuid.InvalidObjectGuid;
            _this.LastMakeoverReceivedUserDirected = SimClock.CurrentTime() - new DateAndTime(4, DaysOfTheWeek.Sunday, 0, 0, 0);
            _this.mStoredSlot                      = PASSPORTSLOT.PASSPORTSLOT_NUM;
            _this.mReturnSimAlarm                  = AlarmHandle.kInvalidHandle;

            if (defaultOutfit != null && defaultOutfit.IsValid)
            {
                _this.mIsValidDescription = true;
                _this.Init(defaultOutfit);
                _this.InitHairColors(defaultOutfit);
            }
        }
예제 #2
0
        //public static void Break()
        //{
        //    Break(TypeBreak.GameScriptFreeze, true);
        //}
        //public static void Break(TypeBreak type)
        //{
        //    Break(type, false);
        //}

        public static void Break(TypeBreak type = TypeBreak.GameScriptFreeze, bool force = true)
        {
            if (!IsAttached && !force)
            {
                return;
            }

            niec_native_func.OutputDebugString("Script Debugger Break!");
            NiecException.NewSendTextExceptionToDebugger();

            switch (type)
            {
            case TypeBreak.MessageBox:
                niec_native_func.MessageBox(0, "NDBreak ST:\n" + GetCurrentStackLite(), "NiecMod", 0);
                break;

            case TypeBreak.GameScriptFreeze:
                try
                {
                    while (true)
                    {
                        // Do nothing
                    }
                }
                catch (Exception)
                { return; }

            case TypeBreak.NativeBreak:
                niec_native_func.DebuggerBreak();
                break;

            default:
                throw new NotSupportedException();
            }
        }
예제 #3
0
        public NewBimDesc(SimDescriptionCore sdCore)
        {
            if (dontCall)
            {
                return;
            }

            var _this = (SimDescription)(object)this;

            if (!NStackTrace.IsCallingMyMethedLite("CreateSimHead", true, 3))
            {
                Create.AddNiecSimDescription(_this);
                NiecException.NewSendTextExceptionToDebugger();
            }

            _this.mSkinToneKey = default(ResourceKey);
            _this.mSecondaryNormalMapWeights = new float[2];
            _this.mFlags                           = SimDescription.FlagField.Marryable | SimDescription.FlagField.CanBeKilledOnJob | SimDescription.FlagField.ShowSocialsOnSim | SimDescription.FlagField.Contactable | SimDescription.FlagField.CanStartFires | SimDescription.FlagField.WasCasCreated;
            _this.mAlmaMaterName                   = string.Empty;
            _this.UserDaysInCurrentAge             = int.MaxValue;
            _this.CharismaStats                    = default(SimDescription.Charisma);
            _this.mShapeDeltaMultiplier            = 1f;
            _this.mPreferredVehicleGuid            = ObjectGuid.InvalidObjectGuid;
            _this.mPreferredBoatGuid               = ObjectGuid.InvalidObjectGuid;
            _this.LastMakeoverReceivedUserDirected = SimClock.CurrentTime() - new DateAndTime(4, DaysOfTheWeek.Sunday, 0, 0, 0);
            _this.mStoredSlot                      = PASSPORTSLOT.PASSPORTSLOT_NUM;
            _this.mReturnSimAlarm                  = AlarmHandle.kInvalidHandle;

            _this.mIsValidDescription = true;

            if (SimDescription.sLoadedSimDescriptions != null)
            {
                SimDescription.sLoadedSimDescriptions.Add(_this);
            }
            try
            {
                _this.TraitManager = new TraitManager(sdCore.TraitManager);
                _this.TraitManager.SetSimDescription(_this);
                _this.CopyAllOutfits(sdCore);
                _this.CopyCoreFileds(sdCore);
                SimOutfit outfit = sdCore.GetOutfit(OutfitCategories.Everyday, 0);
                _this.Init(outfit);
                _this.CopyPetFields(sdCore);
            }
            catch (Exception)
            { }
        }