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.100 by root, Sat Nov 7 18:30:05 2009 UTC vs.
Revision 1.102 by root, Wed Nov 11 04:45:22 2009 UTC

767 int stat_sum [NUM_STATS]; 767 int stat_sum [NUM_STATS];
768 768
769 /* First task is to clear all the values back to their original values */ 769 /* First task is to clear all the values back to their original values */
770 if (type == PLAYER) 770 if (type == PLAYER)
771 { 771 {
772 contr->delayed_update = false;
773
772 for (int i = 0; i < NUM_STATS; i++) 774 for (int i = 0; i < NUM_STATS; i++)
773 stat_sum [i] = contr->orig_stats.stat (i); 775 stat_sum [i] = contr->orig_stats.stat (i);
774 776
775 if (settings.spell_encumbrance == TRUE) 777 if (settings.spell_encumbrance == TRUE)
776 contr->encumbrance = 0; 778 contr->encumbrance = 0;
1405 move_type &= ~MOVE_WALK; 1407 move_type &= ~MOVE_WALK;
1406 1408
1407 /* It is quite possible that a player's spell costing might have changed, 1409 /* It is quite possible that a player's spell costing might have changed,
1408 * so we will check that now. 1410 * so we will check that now.
1409 */ 1411 */
1410 if (type == PLAYER) 1412 if (is_player ())
1411 { 1413 contr->update_spells ();
1412 esrv_update_stats (contr);
1413 esrv_update_spells (contr);
1414 }
1415 1414
1416 // update the mapspace, if we are on a map 1415 // update the mapspace, if we are on a map
1417 if (!flag [FLAG_REMOVED] && map) 1416 if (!flag [FLAG_REMOVED] && map)
1418 map->at (x, y).flags_ = 0; 1417 map->at (x, y).flags_ = 0;
1419} 1418}
1652 new_draw_info (NDI_UNIQUE | NDI_RED, 0, who, buf); 1651 new_draw_info (NDI_UNIQUE | NDI_RED, 0, who, buf);
1653 } 1652 }
1654 } 1653 }
1655 1654
1656 if (changed) 1655 if (changed)
1657 { 1656 who->update_stats (); // should cause esrv_update_stats and esrv_update_spells
1658 who->update_stats ();
1659 esrv_update_stats (who->contr);
1660 /* check if the spell data has changed */
1661 esrv_update_spells (who->contr);
1662 }
1663} 1657}
1664 1658
1665/* 1659/*
1666 * Returns how much experience is needed for a player to become 1660 * Returns how much experience is needed for a player to become
1667 * the given level. level should really never exceed max_level 1661 * the given level. level should really never exceed max_level

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines