X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Funittype.cpp;h=27b3cd4affdeb107355804dc97afb551f283db02;hp=69b2d2d9c09b3f9b20cb2b36c7223437fc6c43ee;hb=dc90594097a886eee49e9bfe45da6d4f9765179a;hpb=f1e79e13d76a63700e6345503e338afaa93c102d diff --git a/bs/unittype.cpp b/bs/unittype.cpp index 69b2d2d..27b3cd4 100644 --- a/bs/unittype.cpp +++ b/bs/unittype.cpp @@ -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 Target) +void UnitType::setTarget(vector 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::iterator i = m_vTarget.begin(); + vector::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 UnitType::Target() +vector 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; }