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

Comparing deliantra/server/server/spell_util.C (file contents):
Revision 1.58 by root, Mon Aug 27 03:56:17 2007 UTC vs.
Revision 1.59 by root, Mon Aug 27 05:10:51 2007 UTC

131/* Dumps all the spells - now also dumps skill associated with the spell. 131/* Dumps all the spells - now also dumps skill associated with the spell.
132 * not sure what this would be used for, as the data seems pretty 132 * not sure what this would be used for, as the data seems pretty
133 * minimal, but easy enough to keep around. 133 * minimal, but easy enough to keep around.
134 */ 134 */
135void 135void
136dump_spells (void) 136dump_spells ()
137{ 137{
138 archetype *at;
139
140 for_all_archetypes (at) 138 for_all_archetypes (at)
141 {
142 if (at->type == SPELL) 139 if (at->type == SPELL)
143 {
144 fprintf (stderr, "%s:%s:%s:%s:%d\n", &at->object::name, 140 fprintf (stderr, "%s:%s:%s:%s:%d\n", &at->object::name,
145 &at->archname, at->other_arch ? &at->other_arch->archname : "<nil>", &at->skill, at->level); 141 &at->archname, at->other_arch ? &at->other_arch->archname : "<nil>", &at->skill, at->level);
146 }
147 }
148} 142}
149 143
150/* pretty basic function - basically just takes 144/* pretty basic function - basically just takes
151 * an object, sets the x,y, and calls insert_ob_in_map 145 * an object, sets the x,y, and calls insert_ob_in_map
152 */ 146 */
1230 1224
1231 /* We want to try to find the skill to properly credit exp. 1225 /* We want to try to find the skill to properly credit exp.
1232 * for spell casting objects, the exp goes to the skill the casting 1226 * for spell casting objects, the exp goes to the skill the casting
1233 * object requires. 1227 * object requires.
1234 */ 1228 */
1235 fprintf (stderr, "op %p caster %p skill %p cs %s\n", (long)op, (long)caster,(long) skill, &caster->skill);//D
1236 if (op != caster && !skill && caster->skill) 1229 if (op != caster && !skill && caster->skill)
1237 { 1230 {
1238 skill = find_skill_by_name (op, caster->skill); 1231 skill = find_skill_by_name (op, caster->skill);
1239 if (!skill) 1232 if (!skill)
1240 { 1233 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines