Skip to content

Commit

Permalink
Gets the skills via the skill command table, ability_list table not n…
Browse files Browse the repository at this point in the history
…ecessary.
  • Loading branch information
apathyboy committed Nov 8, 2011
1 parent 9fc312a commit 59d660b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
12 changes: 11 additions & 1 deletion data/sql/galaxy/procedures/sp_GetPlayerAbilities.sql
Expand Up @@ -17,7 +17,17 @@ use galaxy;
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_GetPlayerAbilities`(IN `player_id` BIGINT)
BEGIN
select a.ability from ability_list a where a.player_id = player_id;

DECLARE parent_id BIGINT(20);

SELECT object.parent_id from object where object.id = player_id INTO parent_id;

SELECT skill_command.name as ability
FROM skill_command
LEFT JOIN skills_skill_commands ON (skills_skill_commands.skill_command_id = skill_command.id)
LEFT JOIN creatures_skills ON (creatures_skills.skill_id = skills_skill_commands.skill_id)
WHERE creatures_skills.creature_id = parent_id;

END//
DELIMITER ;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
Expand Down
32 changes: 0 additions & 32 deletions data/sql/galaxy/scripts/ability_list.sql

This file was deleted.

0 comments on commit 59d660b

Please sign in to comment.