With the help of Zcoretri last night we figured out my problem was the struct, after he showed me how to fix it every thing started working great. I am attaching a .rar with the files and a patch to show my current progress, wich isn't to much just populates the list. I only created 1 table, spell_traits
Code: Select all
CREATE TABLE `spell_traits` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`spell_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`level` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`class_req` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
`race_req` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
`isInate` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
INDEX `FK_spell_traits` (`spell_id`),
CONSTRAINT `FK_spell_traits` FOREIGN KEY (`spell_id`) REFERENCES `spells` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COLLATE='latin1_general_ci'
ENGINE=InnoDB
ROW_FORMAT=DEFAULT
AUTO_INCREMENT=1
Here is the data I used to test this
Code: Select all
INSERT INTO `spells` (`id`, `type`, `cast_type`, `name`, `description`, `icon`, `icon2`, `icontype`, `class_skill`, `mastery_skill`, `min_class_skill_req`, `duration_until_cancel`, `target_type`, `success_message`, `fade_message`, `interruptable`, `lua_script`, `spell_visual`, `effect_message`, `spell_book_type`, `can_effect_raid`, `affect_only_group_members`, `display_spell_tier`, `friendly_spell`, `group_spell`, `is_active`) VALUES (1000000, 1, 0, 'Brawny', 'Increace Str', 89, 65535, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `spells` (`id`, `type`, `cast_type`, `name`, `description`, `icon`, `icon2`, `icontype`, `class_skill`, `mastery_skill`, `min_class_skill_req`, `duration_until_cancel`, `target_type`, `success_message`, `fade_message`, `interruptable`, `lua_script`, `spell_visual`, `effect_message`, `spell_book_type`, `can_effect_raid`, `affect_only_group_members`, `display_spell_tier`, `friendly_spell`, `group_spell`, `is_active`) VALUES (1000001, 1, 0, 'Nimble', 'Increace Agi', 90, 65535, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `spells` (`id`, `type`, `cast_type`, `name`, `description`, `icon`, `icon2`, `icontype`, `class_skill`, `mastery_skill`, `min_class_skill_req`, `duration_until_cancel`, `target_type`, `success_message`, `fade_message`, `interruptable`, `lua_script`, `spell_visual`, `effect_message`, `spell_book_type`, `can_effect_raid`, `affect_only_group_members`, `display_spell_tier`, `friendly_spell`, `group_spell`, `is_active`) VALUES (1000002, 1, 0, 'Muscular', 'Increace Sta', 89, 65535, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `spells` (`id`, `type`, `cast_type`, `name`, `description`, `icon`, `icon2`, `icontype`, `class_skill`, `mastery_skill`, `min_class_skill_req`, `duration_until_cancel`, `target_type`, `success_message`, `fade_message`, `interruptable`, `lua_script`, `spell_visual`, `effect_message`, `spell_book_type`, `can_effect_raid`, `affect_only_group_members`, `display_spell_tier`, `friendly_spell`, `group_spell`, `is_active`) VALUES (1000003, 1, 0, 'Hardy', 'Increace Physical Resist', 147, 65535, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 0);
Code: Select all
INSERT INTO `spell_classes` (`id`, `spell_id`, `adventure_class_id`, `tradeskill_class_id`, `level`) VALUES (40798, 1000000, 255, 255, 8);
INSERT INTO `spell_classes` (`id`, `spell_id`, `adventure_class_id`, `tradeskill_class_id`, `level`) VALUES (40799, 1000001, 255, 255, 8);
INSERT INTO `spell_classes` (`id`, `spell_id`, `adventure_class_id`, `tradeskill_class_id`, `level`) VALUES (40800, 1000002, 255, 255, 28);
INSERT INTO `spell_classes` (`id`, `spell_id`, `adventure_class_id`, `tradeskill_class_id`, `level`) VALUES (40801, 1000003, 255, 255, 15);
Code: Select all
INSERT INTO `spell_data` (`id`, `spell_id`, `tier`, `index_field`, `value_type`, `value`, `value2`) VALUES (1263, 1000000, 0, 0, 'INT', '5', '0');
INSERT INTO `spell_data` (`id`, `spell_id`, `tier`, `index_field`, `value_type`, `value`, `value2`) VALUES (1264, 1000001, 0, 0, 'INT', '5', '0');
INSERT INTO `spell_data` (`id`, `spell_id`, `tier`, `index_field`, `value_type`, `value`, `value2`) VALUES (1265, 1000002, 0, 0, 'INT', '5', '0');
INSERT INTO `spell_data` (`id`, `spell_id`, `tier`, `index_field`, `value_type`, `value`, `value2`) VALUES (1266, 1000003, 0, 0, 'INT', '5', '0');
Code: Select all
INSERT INTO `spell_display_effects` (`id`, `spell_id`, `tier`, `percentage`, `description`, `bullet`, `index`) VALUES (1683, 1000000, 0, 100, 'Increases Str', 0, 0);
INSERT INTO `spell_display_effects` (`id`, `spell_id`, `tier`, `percentage`, `description`, `bullet`, `index`) VALUES (1684, 1000001, 0, 100, 'Increases Agi', 0, 0);
INSERT INTO `spell_display_effects` (`id`, `spell_id`, `tier`, `percentage`, `description`, `bullet`, `index`) VALUES (1685, 1000002, 0, 100, 'Increases Str', 0, 0);
INSERT INTO `spell_display_effects` (`id`, `spell_id`, `tier`, `percentage`, `description`, `bullet`, `index`) VALUES (1686, 1000003, 0, 100, 'Increases Physical Resist', 0, 0);
Code: Select all
INSERT INTO `spell_tiers` (`id`, `spell_id`, `tier`, `hp_req`, `hp_req_percent`, `hp_upkeep`, `power_req`, `power_req_percent`, `power_upkeep`, `req_concentration`, `cast_time`, `recovery`, `recast`, `radius`, `max_aoe_targets`, `min_range`, `range`, `duration1`, `duration2`, `resistibility`, `hit_bonus`, `call_frequency`, `unknown9`) VALUES (8827, 1000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `spell_tiers` (`id`, `spell_id`, `tier`, `hp_req`, `hp_req_percent`, `hp_upkeep`, `power_req`, `power_req_percent`, `power_upkeep`, `req_concentration`, `cast_time`, `recovery`, `recast`, `radius`, `max_aoe_targets`, `min_range`, `range`, `duration1`, `duration2`, `resistibility`, `hit_bonus`, `call_frequency`, `unknown9`) VALUES (8828, 1000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `spell_tiers` (`id`, `spell_id`, `tier`, `hp_req`, `hp_req_percent`, `hp_upkeep`, `power_req`, `power_req_percent`, `power_upkeep`, `req_concentration`, `cast_time`, `recovery`, `recast`, `radius`, `max_aoe_targets`, `min_range`, `range`, `duration1`, `duration2`, `resistibility`, `hit_bonus`, `call_frequency`, `unknown9`) VALUES (8829, 1000002, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `spell_tiers` (`id`, `spell_id`, `tier`, `hp_req`, `hp_req_percent`, `hp_upkeep`, `power_req`, `power_req_percent`, `power_upkeep`, `req_concentration`, `cast_time`, `recovery`, `recast`, `radius`, `max_aoe_targets`, `min_range`, `range`, `duration1`, `duration2`, `resistibility`, `hit_bonus`, `call_frequency`, `unknown9`) VALUES (8830, 1000003, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Code: Select all
INSERT INTO `spell_traits` (`id`, `spell_id`, `level`, `class_req`, `race_req`, `isInate`) VALUES (1, 1000000, 8, 255, 255, 0);
INSERT INTO `spell_traits` (`id`, `spell_id`, `level`, `class_req`, `race_req`, `isInate`) VALUES (2, 1000001, 8, 255, 255, 0);
INSERT INTO `spell_traits` (`id`, `spell_id`, `level`, `class_req`, `race_req`, `isInate`) VALUES (3, 1000002, 28, 255, 255, 0);
INSERT INTO `spell_traits` (`id`, `spell_id`, `level`, `class_req`, `race_req`, `isInate`) VALUES (4, 1000003, 15, 255, 255, 0);
This is the most complicated thing I have done with programming in a long time so please comment and let me know what I can improve. (This only populates the list right now)
You do not have the required permissions to view the files attached to this post.