Commit 6d58e087 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro into server

parents c93d2776 312d490f
...@@ -165,13 +165,11 @@ void ClientCard::UpdateInfo(char* buf) { ...@@ -165,13 +165,11 @@ void ClientCard::UpdateInfo(char* buf) {
} }
void ClientCard::ClearTarget() { void ClientCard::ClearTarget() {
for(auto cit = cardTarget.begin(); cit != cardTarget.end(); ++cit) { for(auto cit = cardTarget.begin(); cit != cardTarget.end(); ++cit) {
if(is_showtarget) (*cit)->is_showtarget = false;
(*cit)->is_showtarget = false;
(*cit)->ownerTarget.erase(this); (*cit)->ownerTarget.erase(this);
} }
for(auto cit = ownerTarget.begin(); cit != ownerTarget.end(); ++cit) { for(auto cit = ownerTarget.begin(); cit != ownerTarget.end(); ++cit) {
if(is_showtarget) (*cit)->is_showtarget = false;
(*cit)->is_showtarget = false;
(*cit)->cardTarget.erase(this); (*cit)->cardTarget.erase(this);
} }
cardTarget.clear(); cardTarget.clear();
......
...@@ -2566,10 +2566,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2566,10 +2566,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1); ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1);
ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2); ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) {
if(pc1->equipTarget)
pc1->equipTarget->equipped.erase(pc1);
pc1->equipTarget = pc2; pc1->equipTarget = pc2;
pc2->equipped.insert(pc1); pc2->equipped.insert(pc1);
} else { } else {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
if(pc1->equipTarget) {
pc1->is_showequip = false;
pc1->equipTarget->is_showequip = false;
pc1->equipTarget->equipped.erase(pc1);
}
pc1->equipTarget = pc2; pc1->equipTarget = pc2;
pc2->equipped.insert(pc1); pc2->equipped.insert(pc1);
if (mainGame->dField.hovered_card == pc1) if (mainGame->dField.hovered_card == pc1)
......
Subproject commit 3fc1ec0d03b92245e13897d648a133531ccccc4d Subproject commit 151e5c38e9678df7d956118db3343996fc240fcf
Subproject commit a67468cdb9686639febcb206b9e880fe9e422b3c Subproject commit 2e9a71e3eca5862ae379287e497d5c4c6ca5d9af
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