fixed typo

This commit is contained in:
techdragon.nguyen@gmail.com
2011-02-14 06:52:11 +00:00
parent ee71b6bf0e
commit 7047b1ccfc
+8 -8
View File
@@ -50,7 +50,7 @@ WCardFilter * WCFilterFactory::Construct(string src)
if (endp != string::npos) if (endp != string::npos)
{ {
WCFilterGROUP * g = NEW WCFilterGROUP(Construct(src.substr(i + 1, endp - 1))); WCFilterGROUP * g = NEW WCFilterGROUP(Construct(src.substr(i + 1, endp - 1)));
if ( endp < (srcLength - 1) ) if ( endp < (srcLength - 2) )
{ {
if (src[endp + 1] == '|') if (src[endp + 1] == '|')
return NEW WCFilterOR(g, Construct(src.substr(endp + 2))); return NEW WCFilterOR(g, Construct(src.substr(endp + 2)));
@@ -68,7 +68,7 @@ WCardFilter * WCFilterFactory::Construct(string src)
if (endp != string::npos) if (endp != string::npos)
{ {
WCFilterNOT * g = NEW WCFilterNOT(Construct(src.substr(i + 1, endp - 1))); WCFilterNOT * g = NEW WCFilterNOT(Construct(src.substr(i + 1, endp - 1)));
if (endp < (srcLength - 1) ) if (endp < (srcLength - 2) )
{ {
if (src[endp + 1] == '|') if (src[endp + 1] == '|')
return NEW WCFilterOR(g, Construct(src.substr(endp + 2))); return NEW WCFilterOR(g, Construct(src.substr(endp + 2)));
@@ -329,7 +329,7 @@ string WCFilterToughness::getCode()
} }
//WCFilterRarity //WCFilterRarity
float WCFilterRarity::filterFee() float WCFilterRarity::filterFee()
{
switch (rarity) switch (rarity)
{ {
case 'M': case 'M':
@@ -439,10 +439,10 @@ float WCFilterAbility::filterFee()
switch (ability) switch (ability)
{ {
case Constants::CANTLOSE: case Constants::CANTLOSE:
return 2.0f; return 2.0f;
case Constants::CANTLIFELOSE: case Constants::CANTLIFELOSE:
case Constants::CANTMILLLOSE: case Constants::CANTMILLLOSE:
return 1.5f; return 1.5f;
case Constants::SHROUD: case Constants::SHROUD:
case Constants::CONTROLLERSHROUD: case Constants::CONTROLLERSHROUD:
case Constants::PLAYERSHROUD: case Constants::PLAYERSHROUD:
@@ -497,10 +497,10 @@ float WCFilterAND::filterFee()
} }
float WCFilterOR::filterFee() float WCFilterOR::filterFee()
{ {
float lFee = lhs->filterFee(); float lFee = lhs->filterFee();
float rFee = rhs->filterFee(); float rFee = rhs->filterFee();
if (lFee > rFee) if (lFee > rFee)
return lFee; return lFee;
return rFee; return rFee;
} }
string WCFilterNOT::getCode() string WCFilterNOT::getCode()