]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Stats.h
removed useless comments
[l2e.git] / src / common / Stats.h
index 620fc1d1cf4d537db99c45d3dd4db4aaa3020dc1..f07528a2f5db86331cf9cd088eb51d9da66b8cdb 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * Stats.h
- *
- *  Created on: Aug 19, 2012
- *      Author: holy
- */
-
 #ifndef COMMON_STATS_H_
 #define COMMON_STATS_H_
 
@@ -14,6 +7,9 @@ namespace common {
 
 class Stats {
 
+public:
+       static const int TYPE_ID = 305;
+
 public:
        Stats();
        Stats(Uint16 attack, Uint16 defense, Uint16 strength, Uint16 agility, Uint16 intelligence, Uint8 gut, Uint16 magicResistance);
@@ -49,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