예제 #1
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("slot_def", "slot_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Slot [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Slot [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Slot loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text         = dataRow["system_name"].ToString();
            txtDisplayName.Text        = dataRow["display_name"].ToString();
            txtDisplayDescription.Text = dataRow["display_description"].ToString();
            numValue.Value             = (int)dataRow["slot_value"];
            ComboUtils.fillCombo(cboSlotType, "ref_slot_type", "name", "ref_slot_type_id", (int)dataRow["ref_slot_type_id"]);

            dt.Dispose();
            ControlName = txtSystemName.Text;
        }
예제 #2
0
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_trap_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_trap_map_id"];

            EditorFactory.setupLink(linkDisarmSkill, EditorSystemType.Statistic, (int)dataRow["disarm_statistic_def_id"]);
            ComboUtils.fillCombo(cboDifficulty, "ref_difficulty", "name", "ref_difficulty_id", (int)dataRow["ref_difficulty_id"]);
            ComboUtils.fillCombo(cboTargetClass, "ref_target_class", "name", "ref_target_class_id", (int)dataRow["ref_target_class_id"]);

            int flags = (int)dataRow["flags"];

            chkIsDestroyedOnUse.Checked = ((flags & Globals.TRAP_FLAG_DestroyedOnUse) != 0) ? true : false;
            chkIsAreaNotifier.Checked   = ((flags & Globals.TRAP_FLAG_AreaNotifier) != 0) ? true : false;

            if (dataRow["notify_radius"] != DBNull.Value)
            {
                numNotifyRadius.Value = (int)dataRow["notify_radius"];
            }

            EditorFactory.setupLink(linkSpaceEffect, EditorSystemType.SpaceEffect, Database.getNullableId(dataRow, "space_effect_def_id"));
            EditorFactory.setupLink(linkEffect, EditorSystemType.Effect, Database.getNullableId(dataRow, "effect_def_id"));
            dt.Dispose();
        }
예제 #3
0
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_light_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_light_map_id"];

            //TagUtils.fillComboBox(cboFuelType, "FuelTypeTags", (int)dataRow["fuel_type_tag_def_id"], string.Empty);
            ComboUtils.fillCombo(cboFuelType, "ref_fuel_type", "name", "ref_fuel_type_id", (int)dataRow["ref_fuel_type_id"]);

            numBurnTime.Value = Database.getNullableId(dataRow, "solid_fuel_burn_time");
            EditorFactory.setupLink(linkLiquidFuel, EditorSystemType.Liquid, Database.getNullableId(dataRow, "liquid_fuel_def_id"));
            numMaxCharges.Value = Database.getNullableId(dataRow, "liquid_fuel_max_charges");
            numBurnRate.Value   = Database.getNullableId(dataRow, "liquid_fuel_burn_rate");
            dt.Dispose();
        }
예제 #4
0
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_weapon_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_weapon_map_id"];

            EditorFactory.setupLink(linkEffect, EditorSystemType.Effect, Database.getNullableId(dataRow, "effect_def_id"));
            ComboUtils.fillCombo(cboWeaponType, "ref_weapon_type", "name", "ref_weapon_type_id", Database.getNullableId(dataRow, "ref_weapon_type_id"));
            ComboUtils.fillCombo(cboWeaponSpeed, "ref_speed_class", "name", "ref_speed_class_id", Database.getNullableId(dataRow, "ref_speed_class_id"));

            int flags = (int)dataRow["flags"];

            chkIsThrowable.Checked = ((flags & Globals.WEAPON_FLAG_Throwable) != 0) ? true : false;
            dt.Dispose();
        }
예제 #5
0
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_lock_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_lock_map_id"];

            EditorFactory.setupLink(linkPickSkill, EditorSystemType.Statistic, (int)dataRow["pick_statistic_def_id"]);
            ComboUtils.fillCombo(cboDifficulty, "ref_difficulty", "name", "ref_difficulty_id", (int)dataRow["pick_difficulty_id"]);

            int flags = (int)dataRow["flags"];

            chkIsRelockable.Checked = ((flags & Globals.LOCK_FLAG_Relockable) != 0) ? true : false;

            EditorFactory.setupLink(linkKey, EditorSystemType.Item, Database.getNullableId(dataRow, "key_item_def_id"));
            dt.Dispose();
        }
예제 #6
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("spawn_def", "spawn_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Spawn [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Spawn [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Spawn loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text     = dataRow["system_name"].ToString();
            numMinQty.Value        = (int)dataRow["min_quantity"];
            numMaxQty.Value        = (int)dataRow["max_quantity"];
            numPctChance.Value     = (int)dataRow["chance"];
            numRespawnPeriod.Value = (int)dataRow["respawn_period"];

            ComboUtils.fillCombo(cboSpawnType, "ref_spawn_type", "name", "ref_spawn_type_id", (int)dataRow["ref_spawn_type_id"]);

            dt.Dispose();
            ControlName = txtSystemName.Text;

            loadNpcGrid(aId);
            loadItemGrid(aId);
            loadSpaceGrid(aId);
            loadAccessGrid(aId);
        }
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_container_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_container_map_id"];

            numVolume.Value = (int)dataRow["volume_allowance"];
            numWeight.Value = (int)dataRow["weight_allowance"];

            ComboUtils.fillCombo(cboSize, "ref_size", "name", "ref_size_id", (int)dataRow["ref_size_id"]);

            int flags = (int)dataRow["flags"];

            chkIsCloseable.Checked = ((flags & Globals.CONTAINER_FLAG_Closeable) != 0) ? true : false;
            chkIsLockable.Checked  = ((flags & Globals.CONTAINER_FLAG_Lockable) != 0) ? true : false;
            chkIsLocked.Checked    = ((flags & Globals.CONTAINER_FLAG_Locked) != 0) ? true : false;

            if (chkIsLockable.Checked)
            {
                EditorFactory.setupLink(linkLock, EditorSystemType.Item, Database.getNullableId(dataRow, "lock_item_def_id"));
            }
            dt.Dispose();

            loadItemsGrid(aDefId);
        }
예제 #8
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("channel_def", "channel_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Channel [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Channel [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Channel loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text  = dataRow["system_name"].ToString();
            txtDisplayName.Text = dataRow["display_name"].ToString();

            int flags = Database.getNullableId(dataRow, "flags");

            chkReadOnly.Checked = ((flags & Globals.CHANNEL_FLAG_ReadOnly) != 0) ? true : false;
            chkAdmin.Checked    = ((flags & Globals.CHANNEL_FLAG_Admin) != 0) ? true : false;

            ComboUtils.fillCombo(cboType, "ref_channel_type", "name", "ref_channel_type_id", (int)dataRow["ref_channel_type_id"]);

            dt.Dispose();
            ControlName = txtSystemName.Text;
        }
예제 #9
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("liquid_def", "liquid_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Liquid [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Liquid [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Liquid loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text         = dataRow["system_name"].ToString();
            txtDisplayName.Text        = dataRow["display_name"].ToString();
            txtDisplayDescription.Text = dataRow["display_description"].ToString();
            numThirstPoints.Value      = (int)dataRow["thirst_points"];
            numDrunkPoints.Value       = (int)dataRow["drunk_points"];
            numCostPerCharge.Value     = Convert.ToDecimal(dataRow["cost_per_charge"]);

            ComboUtils.fillCombo(cboFlammability, "ref_flammability", "name", "ref_flammability_id", (int)dataRow["ref_flammability_id"]);
            ComboUtils.fillCombo(cboColor, "ref_color", "name", "ref_color_id", (int)dataRow["ref_color_id"]);

            dt.Dispose();
            ControlName = txtSystemName.Text;
        }
 public EffectHealthChangeControl()
 {
     InitializeComponent();
     linkResistStat.SystemType = EditorSystemType.Statistic;
     linkOnFail.SystemType     = EditorSystemType.Effect;
     linkOnResist.SystemType   = EditorSystemType.Effect;
     ComboUtils.fillCombo(cboDamage, "ref_damage_type", "name", "ref_damage_type_id", 0);
 }
예제 #11
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("effect_def", "effect_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Effect [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Effect [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Effect loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text         = dataRow["system_name"].ToString();
            txtDisplayName.Text        = dataRow["display_name"].ToString();
            txtDisplayDescription.Text = dataRow["display_description"].ToString();

            int flags = (int)dataRow["flags"];

            chkIsFriendly.Checked = ((flags & Globals.EFFECT_FLAG_Friendly) != 0) ? true : false;
            ComboUtils.fillCombo(cboEffectType, "ref_effect_type", "name", "ref_effect_type_id", Database.getNullableId(dataRow, "ref_effect_type_id"));

            int duration = (int)dataRow["duration"];

            if (duration <= 0)
            {
                radInstant.Checked  = true;
                numDuration.Enabled = false;
            }
            else
            {
                radDuration.Checked = true;
                numDuration.Enabled = true;
                numDuration.Value   = duration;
            }

            dt.Dispose();
            ControlName = txtSystemName.Text;

            // Choose the proper sub-item type, load the data into all controls
            EffectTypes effectType = (EffectTypes)Database.getNullableId(dataRow, "ref_effect_type_id");

            switchEffectType(EffectTypes.HealthChange);
            switchEffectType(effectType);

            {
                mHealthChangeControl.loadEffectData(Id);
                mStatModControl.loadEffectData(Id);
                mGiveObjectControl.loadEffectData(Id);
                mSpaceEffectControl.loadEffectData(Id);
                mChangePositionControl.loadEffectData(Id);
            }
        }
예제 #12
0
        private void initControls()
        {
            TextBoxUtils.initTextBox(txtSystemName, "effect_def", "system_name");
            TextBoxUtils.initTextBox(txtDisplayName, "effect_def", "display_name");
            TextBoxUtils.initTextBox(txtDisplayDescription, "effect_def", "display_description");
            radInstant.Checked = true;

            ComboUtils.fillCombo(cboEffectType, "ref_effect_type", "name", "ref_effect_type_id", 0);
            cboEffectType.SelectedText = "Health Change";
        }
예제 #13
0
        private void initControls()
        {
            TextBoxUtils.initTextBox(txtSystemName, "spawn_def", "system_name");
            ComboUtils.fillCombo(cboSpawnType, "ref_spawn_type", "name", "ref_spawn_type_id", 0);

            initNpcsGrid();
            initItemsGrid();
            initSpacesGrid();
            initAccessGrid();
        }
예제 #14
0
 public override void initNewImpl()
 {
     ComboUtils.fillCombo(cboEffectType, "ref_effect_type", "name", "ref_effect_type_id", 0);
     {
         mHealthChangeControl.initNewImpl();
         mStatModControl.initNewImpl();
         mGiveObjectControl.initNewImpl();
         mSpaceEffectControl.initNewImpl();
         mChangePositionControl.initNewImpl();
     }
 }
예제 #15
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("npc_def", "npc_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load NPC [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load NPC [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("NPC loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text         = dataRow["system_name"].ToString();
            txtDisplayName.Text        = dataRow["display_name"].ToString();
            txtDisplayDescription.Text = dataRow["display_description"].ToString();

            numAccessLevel.Value = (int)dataRow["access_level"];

            ComboUtils.fillCombo(cboGender, "ref_gender", "name", "ref_gender_id", (int)dataRow["ref_gender_id"]);
            EditorFactory.setupLink(linkRace, EditorSystemType.Race, Database.getNullableId(dataRow, "race_def_id"));
            EditorFactory.setupLink(linkShop, EditorSystemType.Shop, Database.getNullableId(dataRow, "shop_def_id"));
            if (linkShop.Text != "")
            {
                chkIsShop.Checked = true;
            }

            EditorFactory.setupLink(linkFaction, EditorSystemType.Faction, Database.getNullableId(dataRow, "faction_def_id"));
            EditorFactory.setupLink(linkTreasure, EditorSystemType.Treasure, Database.getNullableId(dataRow, "treasure_def_id"));
            if (linkTreasure.Text != "")
            {
                chkHasTreasure.Checked = true;
            }
            numLevel.Value = Database.getNullableId(dataRow, "npc_level");

            dt.Dispose();
            ControlName = txtSystemName.Text;

            loadStatisticsGrid(aId);
            loadAbilitiesGrid(aId);
            loadItemsGrid(aId);
            loadNodesGrid(aId);
            loadConversationsGrid(aId);
        }
예제 #16
0
        private void initControls()
        {
            TextBoxUtils.initTextBox(txtSystemName, "statistic_def", "system_name");
            TextBoxUtils.initTextBox(txtDisplayName, "statistic_def", "display_name");
            TextBoxUtils.initTextBox(txtDisplayDescription, "statistic_def", "display_description");

            TagUtils.fillCheckedList(lstStatTags, "StatisticGroupTags");
            ComboUtils.fillCombo(cboStatType, "ref_stat_type", "name", "ref_stat_type_id", 0);

            lblAmalgam.Visible       = false;
            gridAmalgamStats.Visible = false;

            initAmalgamStatGrid();
            initRequiredStatGrid();
        }
        public override void loadEffectData(int aEffectDefId)
        {
            DataTable dt = Database.getData("effect_healthchange_map", "effect_def_id", aEffectDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mEffectMapId = (int)dataRow["effect_healthchange_map_id"];

            int healthChangeType = (int)dataRow["health_change_type_id"];

            if (healthChangeType == Globals.HEALTH_CHANGE_TYPE_Damage)
            {
                rdoDamage.Checked = true;
            }
            else if (healthChangeType == Globals.HEALTH_CHANGE_TYPE_Heal)
            {
                rdoHeal.Checked = true;
            }
            else if (healthChangeType == Globals.HEALTH_CHANGE_TYPE_Steal)
            {
                rdoSteal.Checked = true;
            }
            else
            {
                rdoResurrect.Checked = true;
            }

            numHealthMin.Value   = Database.getNullableId(dataRow, "health_change_min");
            numHealthMax.Value   = Database.getNullableId(dataRow, "health_change_max");
            numHealthBonus.Value = Database.getNullableId(dataRow, "health_change_bonus");

            EditorFactory.setupLink(linkResistStat, EditorSystemType.Statistic, Database.getNullableId(dataRow, "resist_statistic_def_id"));
            EditorFactory.setupLink(linkOnFail, EditorSystemType.Effect, Database.getNullableId(dataRow, "onfail_effect_def_id"));
            EditorFactory.setupLink(linkOnResist, EditorSystemType.Effect, Database.getNullableId(dataRow, "onresist_effect_def_id"));

            ComboUtils.fillCombo(cboDamage, "ref_damage_type", "name", "ref_damage_type_id", Database.getNullableId(dataRow, "ref_damage_type_id"));
            dt.Dispose();
        }
예제 #18
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("statistic_def", "statistic_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Statistic [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Statistic [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Statistic loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text         = dataRow["system_name"].ToString();
            txtDisplayName.Text        = dataRow["display_name"].ToString();
            txtDisplayDescription.Text = dataRow["display_description"].ToString();

            ComboUtils.fillCombo(cboStatType, "ref_stat_type", "name", "ref_stat_type_id", (int)dataRow["ref_stat_type_id"]);
            numMinLevel.Value = Database.getNullableId(dataRow, "prerequisite_level");
            if (dataRow["is_skill"] != DBNull.Value)
            {
                chkIsSkill.Checked = (bool)dataRow["is_skill"];
            }

            // Fill the Unit tags
            mStatTagSetId = Database.getNullableId(dataRow, "stat_tag_set_def_id");
            if (mStatTagSetId > 0)
            {
                TagUtils.fillCheckedList(lstStatTags, "StatisticGroupTags", mStatTagSetId);
            }
            else
            {
                TagUtils.fillCheckedList(lstStatTags, "StatisticGroupTags");
            }

            dt.Dispose();
            ControlName = txtSystemName.Text;

            loadAmalgamStatGrid(aId);
            loadRequiredStatGrid(aId);
        }
        public override void loadEffectData(int aEffectDefId)
        {
            DataTable dt = Database.getData("effect_position_map", "effect_def_id", aEffectDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mEffectMapId = (int)dataRow["effect_position_map_id"];
            ComboUtils.fillCombo(cboPosition, "ref_position", "name", "ref_position_id", (int)dataRow["ref_position_id"]);
            dt.Dispose();
        }
예제 #20
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("barrier_def", "barrier_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Barrier [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Barrier [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Barrier loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text = dataRow["system_name"].ToString();
            ComboUtils.fillCombo(cboMaterialTypes, "ref_material", "name", "ref_material_id", (int)dataRow["ref_material_id"]);
            EditorFactory.setupLink(linkLock, EditorSystemType.Item, Database.getNullableId(dataRow, "lock_item_def_id"));
            EditorFactory.setupLink(linkTrap, EditorSystemType.Item, Database.getNullableId(dataRow, "trap_item_def_id"));
            ComboUtils.fillCombo(cboCondition, "ref_condition", "name", "ref_condition_id", (int)dataRow["ref_condition_id"]);
            EditorFactory.setupLink(linkKey, EditorSystemType.Item, Database.getNullableId(dataRow, "key_item_def_id"));

            int flags = (int)dataRow["flags"];

            chkCloseable.Checked   = ((flags & Globals.BARRIER_FLAG_Closeable) != 0) ? true : false;
            chkClosed.Checked      = ((flags & Globals.BARRIER_FLAG_Closed) != 0) ? true : false;
            chkOneWay.Checked      = ((flags & Globals.BARRIER_FLAG_OneWay) != 0) ? true : false;
            chkTransparent.Checked = ((flags & Globals.BARRIER_FLAG_Transparent) != 0) ? true : false;
            chkDestroyable.Checked = ((flags & Globals.BARRIER_FLAG_Destroyable) != 0) ? true : false;
            chkDestroyed.Checked   = ((flags & Globals.BARRIER_FLAG_Destroyed) != 0) ? true : false;
            chkDispellable.Checked = ((flags & Globals.BARRIER_FLAG_Dispellable) != 0) ? true : false;
            chkLockable.Checked    = ((flags & Globals.BARRIER_FLAG_Lockable) != 0) ? true : false;
            chkTrapable.Checked    = ((flags & Globals.BARRIER_FLAG_Trapable) != 0) ? true : false;
            chkJumpable.Checked    = ((flags & Globals.BARRIER_FLAG_Jumpable) != 0) ? true : false;
            chkClimbable.Checked   = ((flags & Globals.BARRIER_FLAG_Climbable) != 0) ? true : false;
            chkSwimable.Checked    = ((flags & Globals.BARRIER_FLAG_Swimmable) != 0) ? true : false;

            dt.Dispose();
            ControlName = txtSystemName.Text;
        }
예제 #21
0
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_tool_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_tool_map_id"];

            ComboUtils.fillCombo(cboToolType, "ref_tool_type", "name", "ref_tool_type_id", (int)dataRow["ref_tool_type_id"]);
            dt.Dispose();
        }
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_machine_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_machine_map_id"];

            //TagUtils.fillComboBox(cboMachineType, "MachineTypeTags", (int)dataRow["machine_tag_def_id"], string.Empty);
            ComboUtils.fillCombo(cboMachineType, "ref_machine_type", "name", "ref_machine_type_id", (int)dataRow["ref_machine_type_id"]);
            dt.Dispose();
        }
예제 #23
0
        public override void loadItemData(int aDefId)
        {
            DataTable dt = Database.getData("item_armor_map", "item_def_id", aDefId, null);

            if (dt == null)
            {
                return;
            }
            if (dt.Rows.Count == 0)
            {
                return;
            }
            DataRow dataRow = dt.Rows[0];

            mItemMapId = (int)dataRow["item_armor_map_id"];
            ComboUtils.fillCombo(cboArmorType, "ref_armor_type", "name", "ref_armor_type_id", (int)dataRow["ref_armor_type_id"]);
            ComboUtils.fillCombo(cboArmorClass, "ref_armor_class", "name", "ref_armor_class_id", (int)dataRow["ref_armor_class_id"]);

            loadDefensiveStatGrid(aDefId);
        }
예제 #24
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("space_def", "space_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Space [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Space [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Space loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text  = dataRow["system_name"].ToString();
            txtDisplayName.Text = dataRow["display_name"].ToString();
            txtDescription.Text = dataRow["display_description"].ToString();

            ComboUtils.fillCombo(cboTerrain, "terrain_def", "system_name", "terrain_def_id", (int)dataRow["terrain_def_id"]);
            EditorFactory.setupLink(linkAccessLevel, EditorSystemType.AccessLevel, Database.getNullableId(dataRow, "access_def_id"));

            int flags = (int)dataRow["flags"];

            chkNoMob.Checked    = ((flags & Globals.SPACE_FLAG_NoMob) != 0) ? true : false;
            chkNoRecall.Checked = ((flags & Globals.SPACE_FLAG_NoRecall) != 0) ? true : false;
            chkNoSummon.Checked = ((flags & Globals.SPACE_FLAG_NoSummon) != 0) ? true : false;
            chkNoCombat.Checked = ((flags & Globals.SPACE_FLAG_Safe) != 0) ? true : false;
            chkNoMagic.Checked  = ((flags & Globals.SPACE_FLAG_NoMagic) != 0) ? true : false;
            chkIsShrine.Checked = ((flags & Globals.SPACE_FLAG_Shrine) != 0) ? true : false;

            dt.Dispose();
            ControlName = txtSystemName.Text;
            loadExitGrid(aId);
            loadNpcGrid(aId);
            loadItemGrid(aId);
            loadEffectsGrid(aId);
        }
예제 #25
0
 public override void initNewImpl()
 {
     ComboUtils.fillCombo(cboWeaponType, "ref_weapon_type", "name", "ref_weapon_type_id", 0);
     ComboUtils.fillCombo(cboWeaponSpeed, "ref_speed_class", "name", "ref_speed_class_id", 0);
 }
예제 #26
0
 public override void initNewImpl()
 {
     ComboUtils.fillCombo(cboTargetClass, "ref_target_clas", "name", "ref_target_class_id", 0);
     ComboUtils.fillCombo(cboDifficulty, "ref_difficulty", "name", "ref_difficulty_id", 0);
 }
 public override void initNewImpl()
 {
     ComboUtils.fillCombo(cboPosition, "ref_position", "name", "ref_position_id", 0);
 }
예제 #28
0
 public override void initNewImpl()
 {
     ComboUtils.fillCombo(cboTerrain, "terrain_def", "system_name", "terrain_def_id", 0);
 }
예제 #29
0
 public override void initNewImpl()
 {
     ComboUtils.fillCombo(cboGender, "ref_gender", "name", "ref_gender_id", 0);
 }
 public override void initNewImpl()
 {
     //TagUtils.fillComboBox(cboMachineType, "MachineTypeTags", 0, String.Empty);
     ComboUtils.fillCombo(cboMachineType, "ref_machine_type", "name", "ref_machine_type_id", 0);
 }