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

Comparing deliantra/server/common/living.C (file contents):
Revision 1.56 by root, Sun May 13 15:13:57 2007 UTC vs.
Revision 1.59 by root, Thu May 17 00:33:29 2007 UTC

866 && tmp->subtype == SK_PRAYING)) 866 && tmp->subtype == SK_PRAYING))
867 { 867 {
868 if (type == PLAYER) 868 if (type == PLAYER)
869 { 869 {
870 if (tmp == contr->combat_ob || tmp == contr->ranged_ob) 870 if (tmp == contr->combat_ob || tmp == contr->ranged_ob)
871 if (tmp != current_weapon
871 if (tmp != current_weapon && (tmp->type != SKILL || tmp->subtype != SK_PRAYING)) 872 && (tmp->type != SKILL || tmp->subtype != SK_PRAYING)
873 && !tmp->flag [FLAG_CURSED]
874 && !tmp->flag [FLAG_DAMNED])
872 continue; 875 continue;
873 876
874 for (i = 0; i < NUM_STATS; i++) 877 for (i = 0; i < NUM_STATS; i++)
875 change_attr_value (&stats, i, tmp->stats.stat (i)); 878 change_attr_value (&stats, i, tmp->stats.stat (i));
876 879
877 /* these are the items that currently can change digestion, regeneration, 880 /* These are the items that currently can change digestion, regeneration,
878 * spell point recovery and mana point recovery. Seems sort of an arbitary 881 * spell point recovery and mana point recovery. Seems sort of an arbitary
879 * list, but other items store other info into stats array. 882 * list, but other items store other info into stats array.
880 */ 883 */
881 if (tmp->type == WEAPON || tmp->type == BOW || 884 if (tmp->type == WEAPON || tmp->type == BOW ||
882 tmp->type == ARMOUR || tmp->type == HELMET || 885 tmp->type == ARMOUR || tmp->type == HELMET ||
883 tmp->type == SHIELD || tmp->type == RING || 886 tmp->type == SHIELD || tmp->type == RING ||
1028 if (settings.spell_encumbrance == TRUE && type == PLAYER) 1031 if (settings.spell_encumbrance == TRUE && type == PLAYER)
1029 contr->encumbrance += (int) 3 *tmp->weight / 1000; 1032 contr->encumbrance += (int) 3 *tmp->weight / 1000;
1030 1033
1031 break; 1034 break;
1032 1035
1033 case SKILL_TOOL:
1034 if (chosen_skill)
1035 LOG (llevDebug, "fix_player, op %s has multiple skills applied\n", &name);
1036
1037 chosen_skill = tmp;
1038 break;
1039
1040 case SHIELD: 1036 case SHIELD:
1041 if (settings.spell_encumbrance == TRUE && type == PLAYER) 1037 if (settings.spell_encumbrance == TRUE && type == PLAYER)
1042 contr->encumbrance += (int) tmp->weight / 2000; 1038 contr->encumbrance += (int) tmp->weight / 2000;
1043 case RING: 1039 case RING:
1044 case AMULET: 1040 case AMULET:
1578 CLEAR_FLAG (skill_obj, FLAG_CAN_USE_SKILL); 1574 CLEAR_FLAG (skill_obj, FLAG_CAN_USE_SKILL);
1579 skill_obj->stats.exp = 0; 1575 skill_obj->stats.exp = 0;
1580 skill_obj->level = 1; 1576 skill_obj->level = 1;
1581 insert_ob_in_ob (skill_obj, op); 1577 insert_ob_in_ob (skill_obj, op);
1582 1578
1583 if (op->contr) 1579 if (player *pl = op->contr)
1584 { 1580 {
1585 op->contr->last_skill_ob [skill_obj->subtype] = skill_obj; 1581 pl->last_skill_ob [skill_obj->subtype] = skill_obj;
1586 if (op->contr->ns) 1582 if (pl->ns)
1587 op->contr->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous 1583 pl->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous
1588 } 1584 }
1589 1585
1590 return skill_obj; 1586 return skill_obj;
1591} 1587}
1592 1588

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines