1 | /* |
1 | /* |
2 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
3 | |
3 | |
|
|
4 | Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | Copyright (C) 1992 Frank Tore Johansen |
6 | Copyright (C) 1992 Frank Tore Johansen |
6 | |
7 | |
7 | This program is free software; you can redistribute it and/or modify |
8 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | it under the terms of the GNU General Public License as published by |
… | |
… | |
1678 | */ |
1679 | */ |
1679 | CLEAR_FLAG (skill_obj, FLAG_CAN_USE_SKILL); |
1680 | CLEAR_FLAG (skill_obj, FLAG_CAN_USE_SKILL); |
1680 | skill_obj->stats.exp = 0; |
1681 | skill_obj->stats.exp = 0; |
1681 | skill_obj->level = 1; |
1682 | skill_obj->level = 1; |
1682 | insert_ob_in_ob (skill_obj, op); |
1683 | insert_ob_in_ob (skill_obj, op); |
|
|
1684 | |
1683 | if (op->contr) |
1685 | if (op->contr) |
1684 | { |
1686 | { |
1685 | op->contr->last_skill_ob[skill_obj->subtype] = skill_obj; |
1687 | op->contr->last_skill_ob [skill_obj->subtype] = skill_obj; |
1686 | op->contr->last_skill_exp[skill_obj->subtype] = -1; |
1688 | if (op->contr->ns) |
|
|
1689 | op->contr->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous |
1687 | } |
1690 | } |
|
|
1691 | |
1688 | return skill_obj; |
1692 | return skill_obj; |
1689 | } |
1693 | } |
1690 | |
1694 | |
1691 | |
1695 | |
1692 | /* player_lvl_adj() - for the new exp system. we are concerned with |
1696 | /* player_lvl_adj() - for the new exp system. we are concerned with |