changed it to modulo to please the code police....

This commit is contained in:
omegablast2002@yahoo.com
2011-04-20 21:47:02 +00:00
parent 6fe3411656
commit 2a4a01da5e
2 changed files with 2 additions and 10 deletions

View File

@@ -1253,11 +1253,7 @@ AIPlayer * AIPlayerFactory::createAIPlayer(MTGAllCards * collection, Player * op
sprintf(deckFile, JGE_GET_RES("ai/baka/deck%i.txt").c_str(), deckid);
int tempDeckId = deckid;
int avatarId = 0;
while(tempDeckId > 100)
{
tempDeckId -= 100;
}
avatarId = tempDeckId;
avatarId = tempDeckId % 100;
sprintf(avatarFile, "avatar%i.jpg", avatarId);
sprintf(deckFileSmall, "ai_baka_deck%i", deckid);
}

View File

@@ -74,11 +74,7 @@ int DeckMetaData::getAvatarId()
return mDeckId;
int tempDeckId = mDeckId;
int avatarId = 0;
while(tempDeckId > 100)
{
tempDeckId -= 100;
}
avatarId = tempDeckId;
avatarId = tempDeckId%100;
return avatarId;
}