OSDN Git Service

Add discipline elements to CreatureTemplate class.
authorDeskull <deskull@users.sourceforge.jp>
Mon, 21 Apr 2014 10:58:31 +0000 (19:58 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 21 Apr 2014 10:58:31 +0000 (19:58 +0900)
Deeangband/CreatureTemplate.cpp
Deeangband/CreatureTemplate.h

index c835211..766e46f 100644 (file)
@@ -29,9 +29,14 @@ namespace Deeangband
                return;
        }
 
-       const BaseStatusTable* CreatureTemplate::GetStatusAdj(void)
+       BaseStatusTable* CreatureTemplate::GetStatusPlus(void)
        {
                return &(this->statusPlus);
        }
 
+       Discipline* CreatureTemplate::GetDisciplinePlus(void)
+       {
+               return &(this->disciplinePlus);
+       }
+
 }
\ No newline at end of file
index 60b78f9..3aa9686 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "BaseStatusTable.h"
 #include "GameElement.h"
+#include "Discipline.h"
 
 namespace Deeangband
 {
@@ -26,6 +27,7 @@ namespace Deeangband
        private:
 
                BaseStatusTable statusPlus; /*!<\83X\83e\81[\83^\83X\8fC\90³*/
+               Discipline disciplinePlus; /*!<\8fC\97{\92l\8fC\90³*/ 
 
                /*!
                * @brief \83N\83\89\83X\82Ì\83V\83\8a\83A\83\89\83C\83Y\82ð\90Ý\92è\82·\82é
@@ -35,7 +37,8 @@ namespace Deeangband
                */
                template<class Archive> void serialize(Archive &archive, const unsigned int fileVersion) 
                {
-                       archive & BOOST_SERIALIZATION_NVP(statusPlus);
+                       archive & boost::serialization::make_nvp("Status", statusPlus);
+                       archive & boost::serialization::make_nvp("Discipline", disciplinePlus);
                }
 
        public:
@@ -62,7 +65,14 @@ namespace Deeangband
                * @brief \83N\83\89\83X\82Ì\8aî\96{\83X\83e\81[\83^\83X\8fC\90³\82ð\95Ô\82·
                * @return \8aî\96{\83X\83e\81[\83^\83X\8fC\90³\8d\\91¢\91Ì\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
                */
-               const BaseStatusTable* CreatureTemplate::GetStatusAdj(void);
+               BaseStatusTable* CreatureTemplate::GetStatusPlus(void);
+
+               /*! 
+               * @brief \83N\83\89\83X\82Ì\8aî\96{\8fC\97{\92l\8fC\90³\82ð\95Ô\82·
+               * @return \8aî\96{\83X\83e\81[\83^\83X\8fC\90³\8d\\91¢\91Ì\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+               */
+               Discipline* CreatureTemplate::GetDisciplinePlus(void);
+
        };
 
 }
\ No newline at end of file