NWN2Toolset.NWN2.Data.Blueprints.NWN2ItemBlueprint addClassRestrictions(NWN2Toolset.NWN2.Data.Blueprints.NWN2ItemBlueprint item, int bardLevel, int clericLevel, int druidLevel, int paladinLevel, int rangerLevel, int wizardLevel)
        {
            if (wizardLevel != 255)
            {
                item.Properties.Add(ALFAItemProperty.WizardOnlyItemProperty());
                item.Properties.Add(ALFAItemProperty.SorcererOnlyItemProperty());
            }
            if (bardLevel != 255)
                item.Properties.Add(ALFAItemProperty.BardOnlyItemProperty());
            if (clericLevel != 255)
            {
                item.Properties.Add(ALFAItemProperty.ClericOnlyItemProperty());
                item.Properties.Add(ALFAItemProperty.FavoredSoulOnlyItemProperty());
            }
            if (druidLevel != 255)
            {
                item.Properties.Add(ALFAItemProperty.DruidOnlyItemProperty());
                item.Properties.Add(ALFAItemProperty.SpiritShamanOnlyItemProperty());
            }
            if (rangerLevel != 255)
                item.Properties.Add(ALFAItemProperty.RangerOnlyItemProperty());
            if (paladinLevel != 255)
                item.Properties.Add(ALFAItemProperty.PaladinOnlyItemProperty());

            return item;
        }
        private string GetSpellName(NWN2Toolset.NWN2.Rules.CNWSpell spell)
        {
            string spellName;
            uint spellNameId = (uint)spell.GetSpellName();
            if (spellNameId >= OEIShared.IO.TalkTable.TalkTable.nCustomMask)
                spellName = Globals.customTlk[spellNameId].String;
            else spellName = spell.GetSpellNameText().CStr();

            return spellName;
        }
    public void loadTerrian(NWN2Toolset.NWN2.Views.NWN2TerrainEditorForm TE)
    {
        float grassSize = TE.GrassSize;
            float grassVariation = TE.GrassVariation;
            float innerRadius = TE.InnerRadius;
            float outerRadius = TE.OuterRadius;
            float refractBias = TE.RefractBias;
            float refractPower = TE.RefractPower;
            float rippleX =  TE.RippleX;
            float rippleY = TE.RippleY;
            float scrollAngle1 = TE.ScrollAngle1;
            float scrollAngle2 = TE.ScrollAngle2;
            float scrollAngle3 = TE.ScrollAngle3;

            float smoothness = TE.Smoothness;
            int terrainBrushColor = TE.TerrainBrushColor;
            string terrainBrushTexture = TE.TerrainBrushTexture;
            OEIShared.NetDisplay.TerrainModificationType = TE.TerrainMode;
            float terrainValue = TE.TerrainValue;

        float terrainValue;
            float terrainValue2 =         TE.TerrainValue2;;
            float textureMode;

        float scrollRate3;
            float scrollRate2;
        float scrollRate1;

            float scrollDirY3;
            float scrollDirY2;
        float scrollDirY1;

            float scrollDirX3;
            float scrollDirX2;
            float scrollDirX1;

            TE.TerrainValue2;
            TE.TextureMode;
            TE.ScrollRate3;
            TE.ScrollRate2;
            TE.ScrollRate1;
            TE.ScrollDirY3;
            TE.ScrollDirY2;
            TE.ScrollDirY1;
            TE.ScrollDirX3;
            TE.ScrollDirX2;
            TE.ScrollDirX1;
    }
Example #4
0
        private TRN ApplyLine(NWN2Toolset.NWN2.Data.NWN2GameArea area, TRN trn, Pair<double, double> upper, Pair<double, double> lower)
        {
            if (data.colourOption == colourOption.Colour) {
                trn = ApplyColourLine(trn, upper, lower);
            }

            //texturemaps
            trn = ApplyTextureLine(trn, upper, lower);

            return trn;
        }
Example #5
0
        /// <summary>
        /// The method that calls the colour and texture methods
        /// </summary>
        /// <param name="area">The area we want to change</param>
        /// <param name="trn">The TRN data that we is going to modify</param>
        /// <param name="triangle">The Triangle we want to paint inside</param>
        /// <param name="upper">The left upper point of the rectangle that contains triangle</param>
        /// <param name="lower">The right lower point of the rectangle that contains triangle</param>
        /// <returns></returns>
        public TRN ApplyTriangle(NWN2Toolset.NWN2.Data.NWN2GameArea area, TRN trn, Triangle triangle, Pair<double, double> upper, Pair<double, double> lower, Random ran)
        {
            if (data.colourOption == colourOption.Colour) {
                trn = ApplyColourTriangle(trn, triangle, upper, lower, ran);
            }

            //texturemaps
            trn = ApplyTextureTriangle(trn, triangle, upper, lower, ran);

            return trn;
        }
 void AddBlueprint(NWN2Toolset.NWN2.Data.Blueprints.NWN2DoorBlueprint dbp) {
     dbp.BlueprintLocation = mod.BlueprintLocation;
     dbp.Resource = mod.Repository.CreateResource(new OEIShared.Utils.OEIResRef(dbp.TemplateResRef.Value), dbp.ResourceType);
     mod.GetBlueprintCollectionForType(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Door).Add(dbp);
 }
 public ALFAItemBlueprint(NWN2Toolset.NWN2.Data.Blueprints.NWN2ItemBlueprint itemBlueprint)
 {
     itemGFFStruct = new ALFAGFFStruct();
     itemBlueprint.SaveEverythingIntoGFFStruct(itemGFFStruct, true);
 }
Example #8
0
 /// <summary>
 /// Creates an actor from an instance
 /// </summary>
 /// <param name="actor">The instance that the actor is created from</param>
 /// <param name="type">The type of the instance</param>
 public Actor(NWN2Toolset.NWN2.Data.Instances.INWN2Instance actor, EnumTypes.actorType type)
 {
     instance = actor;
     this.type = type;
     boolInstance = true;
 }
Example #9
0
 /// <summary>
 /// Creates an actor from a blueprint
 /// </summary>
 /// <param name="actor">The blueprint that the actor will contain</param>
 /// <param name="type">The type of the blueprint</param>
 public Actor(NWN2Toolset.NWN2.Data.Blueprints.INWN2Blueprint actor, EnumTypes.actorType type)
 {
     blueprint = actor;
     this.type = type;
     boolInstance = false;
 }
Example #10
0
 public TRN( NWN2Toolset.NWN2.Data.NWN2GameArea area )
 {
     System.IO.BinaryReader reader = new System.IO.BinaryReader( area.TerrainResource.GetStream( false ) );
     this._name = area.Name;
     this.Load( reader );
 }