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.35 by root, Tue May 1 05:48:20 2007 UTC vs.
Revision 1.36 by root, Thu May 3 04:50:27 2007 UTC

237/* This changes the objects skill to new_skill. 237/* This changes the objects skill to new_skill.
238 * note that this function doesn't always need to get used - 238 * note that this function doesn't always need to get used -
239 * you can now add skill exp to the player without the chosen_skill being 239 * you can now add skill exp to the player without the chosen_skill being
240 * set. This function is of most interest to players to update 240 * set. This function is of most interest to players to update
241 * the various range information. 241 * the various range information.
242 * if new_skill is null, this just unapplies the skill.
243 * flag has the current meaning:
244 * 0x1: If set, don't update the range pointer. This is useful when we
245 * need to ready a new skill, but don't want to clobber range.
246 * return 1 on success, 0 on error 242 * return 1 on success, 0 on error
247 */ 243 */
248int 244int
249change_skill (object *who, object *new_skill, int flag) 245change_skill (object *who, object *new_skill, int flag)
250{ 246{
278{ 274{
279 who->chosen_skill = 0; 275 who->chosen_skill = 0;
280 CLEAR_FLAG (who, FLAG_READY_SKILL); 276 CLEAR_FLAG (who, FLAG_READY_SKILL);
281 277
282 if (who->type == PLAYER) 278 if (who->type == PLAYER)
283 {
284 if (who->contr->ranged_ob && who->contr->ranged_ob->type == SKILL) 279 if (who->contr->ranged_ob && who->contr->ranged_ob->type == SKILL)
285 who->contr->ranged_ob = 0; 280 who->contr->ranged_ob = 0;
286 }
287} 281}
288 282
289/* do_skill() - Main skills use function-similar in scope to cast_spell(). 283/* do_skill() - Main skills use function-similar in scope to cast_spell().
290 * We handle all requests for skill use outside of some combat here. 284 * We handle all requests for skill use outside of some combat here.
291 * We require a separate routine outside of fire() so as to allow monsters 285 * We require a separate routine outside of fire() so as to allow monsters

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines