X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FStats.h;h=f07528a2f5db86331cf9cd088eb51d9da66b8cdb;hb=4309d259becd96ead792678257e910c03a6b4a3d;hp=5210ada12850986fa5c16e73c61060ca70c2e879;hpb=1907ca03c5e865c4d398170042aa384c67ffff29;p=l2e.git diff --git a/src/common/Stats.h b/src/common/Stats.h index 5210ada..f07528a 100644 --- a/src/common/Stats.h +++ b/src/common/Stats.h @@ -1,10 +1,3 @@ -/* - * Stats.h - * - * Created on: Aug 19, 2012 - * Author: holy - */ - #ifndef COMMON_STATS_H_ #define COMMON_STATS_H_ @@ -52,6 +45,18 @@ private: }; + +inline Stats operator +(const Stats &lhs, const Stats &rhs) { + return Stats( + lhs.Attack() + rhs.Attack(), + lhs.Defense() + rhs.Defense(), + lhs.Strength() + rhs.Strength(), + lhs.Agility() + rhs.Agility(), + lhs.Intelligence() + rhs.Intelligence(), + lhs.Gut() + rhs.Gut(), + lhs.MagicResistance() + rhs.MagicResistance()); +} + } -#endif /* COMMON_STATS_H_ */ +#endif