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

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.226 by root, Wed Mar 24 17:41:48 2010 UTC vs.
Revision 1.229 by root, Fri Mar 26 20:17:48 2010 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2001 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
3512 case SKILL: 3512 case SKILL:
3513 if (player *pl = who->contr) 3513 if (player *pl = who->contr)
3514 { 3514 {
3515 if (IS_COMBAT_SKILL (op->subtype)) 3515 if (IS_COMBAT_SKILL (op->subtype))
3516 { 3516 {
3517 if (skill_flags [op->subtype] & SF_NEED_WEAPON) 3517 if (skill_flags [op->subtype] & SF_NEED_ITEM)
3518 { 3518 {
3519 for (object *item = who->inv; item; item = item->below) 3519 for (object *item = who->inv; item; item = item->below)
3520 if (item->type == WEAPON && item->flag [FLAG_APPLIED]) 3520 if (item->type == item->weapontype && item->flag [FLAG_APPLIED])
3521 { 3521 {
3522 if (item->skill == op->skill) 3522 if (item->skill == op->skill)
3523 { 3523 {
3524 who->change_weapon (pl->combat_ob = item); 3524 who->change_weapon (pl->combat_ob = item);
3525 goto found_weapon; 3525 goto found_weapon;
3538 else 3538 else
3539 who->change_weapon (pl->combat_ob = op); 3539 who->change_weapon (pl->combat_ob = op);
3540 } 3540 }
3541 else if (IS_RANGED_SKILL (op->subtype)) 3541 else if (IS_RANGED_SKILL (op->subtype))
3542 { 3542 {
3543 if (skill_flags [op->subtype] & SF_NEED_BOW) 3543 if (skill_flags [op->subtype] & SF_NEED_ITEM)
3544 { 3544 {
3545 for (object *item = who->inv; item; item = item->below) 3545 for (object *item = who->inv; item; item = item->below)
3546 if (item->type == BOW && item->flag [FLAG_APPLIED]) 3546 if (item->type == item->weapontype && item->flag [FLAG_APPLIED])
3547 { 3547 {
3548 //TODO: bows should/must all have skill missile weapon right now 3548 //TODO: bows should/must all have skill missile weapon right now
3549 who->change_weapon (pl->ranged_ob = item); 3549 who->change_weapon (pl->ranged_ob = item);
3550 goto found_bow; 3550 goto found_bow;
3551 } 3551 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines