Commit e6932bef authored by DailyShana's avatar DailyShana

tweek

parent 275dda45
......@@ -303,7 +303,6 @@ void ClientField::UpdateCard(int controler, int location, int sequence, char* da
}
void ClientField::UpdateFieldCard(int controler, int location, char* data) {
std::vector<ClientCard*>* lst = 0;
std::vector<ClientCard*>::iterator cit;
switch(location) {
case LOCATION_DECK:
lst = &deck[controler];
......@@ -330,7 +329,7 @@ void ClientField::UpdateFieldCard(int controler, int location, char* data) {
if(!lst)
return;
int len;
for(cit = lst->begin(); cit != lst->end(); ++cit) {
for(auto cit = lst->begin(); cit != lst->end(); ++cit) {
len = BufferIO::ReadInt32(data);
if(len > 8)
(*cit)->UpdateInfo(data);
......@@ -338,20 +337,19 @@ void ClientField::UpdateFieldCard(int controler, int location, char* data) {
}
}
void ClientField::ClearCommandFlag() {
std::vector<ClientCard*>::iterator cit;
for(cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit)
for(auto cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
for(cit = summonable_cards.begin(); cit != summonable_cards.end(); ++cit)
for(auto cit = summonable_cards.begin(); cit != summonable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
for(cit = spsummonable_cards.begin(); cit != spsummonable_cards.end(); ++cit)
for(auto cit = spsummonable_cards.begin(); cit != spsummonable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
for(cit = msetable_cards.begin(); cit != msetable_cards.end(); ++cit)
for(auto cit = msetable_cards.begin(); cit != msetable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
for(cit = ssetable_cards.begin(); cit != ssetable_cards.end(); ++cit)
for(auto cit = ssetable_cards.begin(); cit != ssetable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
for(cit = reposable_cards.begin(); cit != reposable_cards.end(); ++cit)
for(auto cit = reposable_cards.begin(); cit != reposable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
for(cit = attackable_cards.begin(); cit != attackable_cards.end(); ++cit)
for(auto cit = attackable_cards.begin(); cit != attackable_cards.end(); ++cit)
(*cit)->cmdFlag = 0;
conti_cards.clear();
deck_act = false;
......@@ -363,15 +361,13 @@ void ClientField::ClearCommandFlag() {
conti_act = false;
}
void ClientField::ClearSelect() {
std::vector<ClientCard*>::iterator cit;
for(cit = selectable_cards.begin(); cit != selectable_cards.end(); ++cit) {
for(auto cit = selectable_cards.begin(); cit != selectable_cards.end(); ++cit) {
(*cit)->is_selectable = false;
(*cit)->is_selected = false;
}
}
void ClientField::ClearChainSelect() {
std::vector<ClientCard*>::iterator cit;
for(cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) {
for(auto cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) {
(*cit)->cmdFlag = 0;
(*cit)->chain_code = 0;
(*cit)->is_selectable = false;
......
......@@ -681,8 +681,7 @@ void Game::DrawStatus(ClientCard* pcard, int x1, int y1, int x2, int y2) {
}
void Game::DrawGUI() {
if(imageLoading.size()) {
std::map<irr::gui::CGUIImageButton*, int>::iterator mit;
for(mit = imageLoading.begin(); mit != imageLoading.end(); ++mit)
for(auto mit = imageLoading.begin(); mit != imageLoading.end(); ++mit)
mit->first->setImage(imageManager.GetTexture(mit->second));
imageLoading.clear();
}
......
......@@ -2206,7 +2206,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true;
}
case MSG_SHUFFLE_SET_CARD: {
std::vector<ClientCard*>::iterator cit;
std::vector<ClientCard*>* lst = 0;
int loc = BufferIO::ReadInt8(pbuf);
int count = BufferIO::ReadInt8(pbuf);
......@@ -2251,7 +2250,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
soundManager.PlaySoundEffect(SOUND_SHUFFLE);
for (int i = 0; i < count; ++i) {
mainGame->dField.MoveCard(mc[i], 10);
for (cit = mc[i]->overlayed.begin(); cit != mc[i]->overlayed.end(); ++cit)
for (auto cit = mc[i]->overlayed.begin(); cit != mc[i]->overlayed.end(); ++cit)
mainGame->dField.MoveCard(*cit, 10);
}
mainGame->WaitFrameSignal(11);
......
......@@ -1534,7 +1534,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str.append(formatBuffer);
}
}
for(std::map<int, int>::iterator ctit = mcard->counters.begin(); ctit != mcard->counters.end(); ++ctit) {
for(auto ctit = mcard->counters.begin(); ctit != mcard->counters.end(); ++ctit) {
myswprintf(formatBuffer, L"\n[%ls]: %d", dataManager.GetCounterName(ctit->first), ctit->second);
str.append(formatBuffer);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment