this->disciplinePoint[typ] += point;
}
-DISCIPLINE_POINT Discipline::GetPoint(DISCIPLINE_TYPE typ)
+const DISCIPLINE_POINT Discipline::GetPoint(DISCIPLINE_TYPE typ)
{
return this->disciplinePoint[typ];
}
-DISCIPLINE_POINT Discipline::GetRank(DISCIPLINE_TYPE typ)
+const DISCIPLINE_POINT Discipline::GetRank(DISCIPLINE_TYPE typ)
{
return (int)(sqrt(abs(this->disciplinePoint[typ]) / 250.0f) * (this->disciplinePoint[typ] > 0 ? 1 : -1));
}
+
+Discipline Discipline::operator+(const Discipline& plus)
+{
+ this->disciplinePoint[DISCIPLINE_TYPE_GOOD] += plus.disciplinePoint[DISCIPLINE_TYPE_GOOD];
+ this->disciplinePoint[DISCIPLINE_TYPE_EVIL] += plus.disciplinePoint[DISCIPLINE_TYPE_EVIL];
+ this->disciplinePoint[DISCIPLINE_TYPE_ORDER] += plus.disciplinePoint[DISCIPLINE_TYPE_ORDER];
+ this->disciplinePoint[DISCIPLINE_TYPE_CHAOS] += plus.disciplinePoint[DISCIPLINE_TYPE_CHAOS];
+ this->disciplinePoint[DISCIPLINE_TYPE_BALANCE] += plus.disciplinePoint[DISCIPLINE_TYPE_BALANCE];
+ return *this;
+}
+
+Discipline& Discipline::operator+=(const Discipline& plus)
+{
+ this->disciplinePoint[DISCIPLINE_TYPE_GOOD] += plus.disciplinePoint[DISCIPLINE_TYPE_GOOD];
+ this->disciplinePoint[DISCIPLINE_TYPE_EVIL] += plus.disciplinePoint[DISCIPLINE_TYPE_EVIL];
+ this->disciplinePoint[DISCIPLINE_TYPE_ORDER] += plus.disciplinePoint[DISCIPLINE_TYPE_ORDER];
+ this->disciplinePoint[DISCIPLINE_TYPE_CHAOS] += plus.disciplinePoint[DISCIPLINE_TYPE_CHAOS];
+ this->disciplinePoint[DISCIPLINE_TYPE_BALANCE] += plus.disciplinePoint[DISCIPLINE_TYPE_BALANCE];
+ return *this;
+}
* @param typ \8fC\97{\92l\82Ì\8eí\95Ê
* @return \8fC\97{\92l
*/
- DISCIPLINE_POINT Discipline::GetPoint(DISCIPLINE_TYPE typ);
+ const DISCIPLINE_POINT Discipline::GetPoint(DISCIPLINE_TYPE typ);
/*!
* @brief \8fC\97{\83\89\83\93\83N\82ð\8eæ\93¾\82·\82é
* @param typ \8fC\97{\92l\82Ì\8eí\95Ê
* @return \8fC\97{\83\89\83\93\83N
*/
- DISCIPLINE_POINT Discipline::GetRank(DISCIPLINE_TYPE typ);
+ const DISCIPLINE_POINT Discipline::GetRank(DISCIPLINE_TYPE typ);
/*!
* @brief \8fC\97{\92l\82ð\90Ý\92è\82·\82é
*/
void Discipline::PlusPoint(DISCIPLINE_TYPE typ, int point);
+ /*!
+ * @brief +\89\89\8eZ\8eq\82É\82æ\82é\8fC\97{\92l\91S\89Á\8eZ
+ * @param plus \89Á\8eZ\8c³
+ */
+ Discipline Discipline::operator+(const Discipline& plus);
+
+ /*!
+ * @brief +=\89\89\8eZ\8eq\82É\82æ\82é\8fC\97{\92l\91S\89Á\8eZ
+ * @param plus \89Á\8eZ\8c³
+ */
+ Discipline& Discipline::operator+=(const Discipline& obj);
};