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.24 by pippijn, Sat Jan 6 14:42:31 2007 UTC vs.
Revision 1.25 by root, Mon Jan 8 18:18:35 2007 UTC

101 * mostly used for sending exp. 101 * mostly used for sending exp.
102 */ 102 */
103void 103void
104link_player_skills (object *op) 104link_player_skills (object *op)
105{ 105{
106 object *tmp;
107
108 for (tmp = op->inv; tmp; tmp = tmp->below) 106 for (object *tmp = op->inv; tmp; tmp = tmp->below)
109 {
110 if (tmp->type == SKILL) 107 if (tmp->type == SKILL)
111 { 108 {
112 /* This is really a warning, hence no else below */ 109 /* This is really a warning, hence no else below */
113 if (op->contr->last_skill_ob[tmp->subtype] && op->contr->last_skill_ob[tmp->subtype] != tmp) 110 if (op->contr->last_skill_ob[tmp->subtype] && op->contr->last_skill_ob[tmp->subtype] != tmp)
114 {
115 LOG (llevError, "Multiple skills with the same subtype? %s, %s\n", 111 LOG (llevError, "Multiple skills with the same subtype? %s, %s\n",
116 &op->contr->last_skill_ob[tmp->subtype]->skill, &tmp->skill); 112 &op->contr->last_skill_ob[tmp->subtype]->skill, &tmp->skill);
117 } 113
118 if (tmp->subtype >= NUM_SKILLS) 114 if (tmp->subtype >= NUM_SKILLS)
119 {
120 LOG (llevError, "Invalid subtype number %d (range 0-%d)\n", tmp->subtype, NUM_SKILLS); 115 LOG (llevError, "Invalid subtype number %d (range 0-%d)\n", tmp->subtype, NUM_SKILLS);
121 }
122 else 116 else
123 { 117 {
124 op->contr->last_skill_ob[tmp->subtype] = tmp; 118 op->contr->last_skill_ob[tmp->subtype] = tmp;
125 op->contr->last_skill_exp[tmp->subtype] = -1; 119 op->contr->ns->last_skill_exp[tmp->subtype] = -1; //TODO: this should go
126 } 120 }
127 } 121 }
128 }
129} 122}
130 123
131/* This returns the skill pointer of the given name (the 124/* This returns the skill pointer of the given name (the
132 * one that accumlates exp, has the level, etc). 125 * one that accumlates exp, has the level, etc).
133 * 126 *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines