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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.126 by root, Sat May 12 16:06:42 2007 UTC vs.
Revision 1.127 by root, Sat May 12 18:14:48 2007 UTC

827} 827}
828 828
829void 829void
830object::swap_stats (int a, int b) 830object::swap_stats (int a, int b)
831{ 831{
832 int tmp = get_attr_value (&contr->orig_stats, a); 832 swap (contr->orig_stats.stat (a), contr->orig_stats.stat (b));
833 set_attr_value (&contr->orig_stats, a, get_attr_value (&contr->orig_stats, b));
834 set_attr_value (&contr->orig_stats, b, tmp);
835 833
834 for (int i = 0; i < NUM_STATS; ++i)
836 stats.Str = contr->orig_stats.Str; 835 stats.stat (i) = contr->orig_stats.stat (i);
837 stats.Dex = contr->orig_stats.Dex;
838 stats.Con = contr->orig_stats.Con;
839 stats.Int = contr->orig_stats.Int;
840 stats.Wis = contr->orig_stats.Wis;
841 stats.Pow = contr->orig_stats.Pow;
842 stats.Cha = contr->orig_stats.Cha;
843 836
844 //TODO: the following code looks so borked and should, at the very least, 837 //TODO: the following code looks so borked and should, at the very least,
845 // be merged with the similar code in roll_stats 838 // be merged with the similar code in roll_stats
846 stats.ac = 0; 839 stats.ac = 0;
847 840

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines