]> ruin.nu Git - hbs.git/blobdiff - bs/unittype.cpp
Can now load the stats and race configurations..
[hbs.git] / bs / unittype.cpp
index 69b2d2d9c09b3f9b20cb2b36c7223437fc6c43ee..27b3cd4affdeb107355804dc97afb551f283db02 100644 (file)
@@ -61,30 +61,30 @@ int UnitType::Race()
 
 //////////////////////////////////////////////////////////////////////////
 //
-void UnitType::setClass(int iClass)
+void UnitType::setClass(string sClass)
 {
-       m_iClass = iClass;
+       m_sClass = sClass;
 }
 
 //////////////////////////////////////////////////////////////////////////
 //
-int UnitType::iClass()
+string UnitType::Class()
 {
-       return m_iClass;
+       return m_sClass;
 }
 
 //////////////////////////////////////////////////////////////////////////
 //
-void UnitType::setTarget(vector<int> Target)
+void UnitType::setTarget(vector<string> Target)
 {
        m_vTarget = Target;
 }
 
 //////////////////////////////////////////////////////////////////////////
 //
-void UnitType::addTarget(int iTarget)
+void UnitType::addTarget(string target)
 {
-       m_vTarget.push_back(iTarget);
+       m_vTarget.push_back(target);
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -93,33 +93,33 @@ void UnitType::addTarget(int iTarget)
  * If it finds the position it inserts the target there, if it reaches the end 
  * before it finds the correct possition it adds the target to the end. 
  */
-void UnitType::insTarget(int iTarget, int index = 0)
+void UnitType::insTarget(string target, int index = 0)
 {
 
-       vector<int>::iterator i = m_vTarget.begin();    
+       vector<string>::iterator i = m_vTarget.begin(); 
 
        for (int j = 0; j < index; j++, i++)
        {
                if (i == m_vTarget.end())
                {
-                       m_vTarget.push_back(iTarget);
+                       m_vTarget.push_back(target);
                        return;
                }
        }
 
-       m_vTarget.insert(i, iTarget);
+       m_vTarget.insert(i, target);
 }
 
 //////////////////////////////////////////////////////////////////////////
 //
-vector<int> UnitType::Target()
+vector<string> UnitType::Target()
 {
        return m_vTarget;
 }
 
 //////////////////////////////////////////////////////////////////////////
 //
-int    UnitType::Target(int index)
+string UnitType::Target(int index)
 {
        return m_vTarget[index];
 }
@@ -266,15 +266,15 @@ int  UnitType::ETA()
 
 //////////////////////////////////////////////////////////////////////////
 //
-void UnitType::setType(int iType)
+void UnitType::setType(string type)
 {
-       m_iType = iType;
+       m_sType = type;
 }
 
 //////////////////////////////////////////////////////////////////////////
 //
-int  UnitType::Type()
+string  UnitType::Type()
 {
-       return m_iType;
+       return m_sType;
 }