ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/skill_util.C
(Generate patch)

Comparing deliantra/server/server/skill_util.C (file contents):
Revision 1.65 by root, Mon Sep 22 05:45:55 2008 UTC vs.
Revision 1.66 by root, Mon Sep 22 06:16:41 2008 UTC

654 * just dumped this as we found it, this would be a bit 654 * just dumped this as we found it, this would be a bit
655 * simpler. 655 * simpler.
656 */ 656 */
657//TODO: egad, do it in perl, do not suffer from the big buffer on stack, make it one single drawinfo. 657//TODO: egad, do it in perl, do not suffer from the big buffer on stack, make it one single drawinfo.
658void 658void
659show_skills (object *op, const char *search) 659show_skills (object *pl, const char *search)
660{ 660{
661 const char *cp; 661 const char *cp;
662 int i, num_skills_found = 0; 662 int i, num_skills_found = 0;
663 const char *const periods = ".............................."; // 30 663 const char *const periods = ".............................."; // 30
664 664
665 /* Need to have a pointer and use strdup for qsort to work properly */ 665 /* Need to have a pointer and use strdup for qsort to work properly */
666 char skills[NUM_SKILLS][128]; // d'oh 666 char skills[NUM_SKILLS][128]; // d'oh
667
668 object *op = pl->contr->ob;
667 669
668 for (object *tmp = op->inv; tmp; tmp = tmp->below) 670 for (object *tmp = op->inv; tmp; tmp = tmp->below)
669 { 671 {
670 if (tmp->type == SKILL) 672 if (tmp->type == SKILL)
671 { 673 {
716 718
717 msg << "Your equipped item power is " << (int)op->contr->item_power 719 msg << "Your equipped item power is " << (int)op->contr->item_power
718 << " out of " << int (op->level * settings.item_power_factor) 720 << " out of " << int (op->level * settings.item_power_factor)
719 << ".\n"; 721 << ".\n";
720 722
721 op->contr->infobox (MSG_CHANNEL ("skills"), msg); 723 pl->contr->infobox (MSG_CHANNEL ("skills"), msg);
722} 724}
723 725
724/* use_skill() - similar to invoke command, it executes the skill in the 726/* use_skill() - similar to invoke command, it executes the skill in the
725 * direction that the user is facing. Returns false if we are unable to 727 * direction that the user is facing. Returns false if we are unable to
726 * change to the requested skill, or were unable to use the skill properly. 728 * change to the requested skill, or were unable to use the skill properly.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines