Commit b24212a9 authored by nanahira's avatar nanahira Committed by GitHub

fix weird destroy sound effect

Fix this: targeting a card which was destroyed to GY via a card effect will cause the destroy sound effect playing.
parent 58020204
...@@ -2349,7 +2349,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2349,7 +2349,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int cs = BufferIO::ReadInt8(pbuf); int cs = BufferIO::ReadInt8(pbuf);
int cp = BufferIO::ReadInt8(pbuf); int cp = BufferIO::ReadInt8(pbuf);
int reason = BufferIO::ReadInt32(pbuf); int reason = BufferIO::ReadInt32(pbuf);
if (reason &= REASON_DESTROY) { if (!mainGame->dInfo.isReplaySkiping && reason & REASON_DESTROY && pl != cl) {
mainGame->soundEffectPlayer->doDestroyEffect(); mainGame->soundEffectPlayer->doDestroyEffect();
} }
if (pl == 0) { if (pl == 0) {
...@@ -3353,13 +3353,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3353,13 +3353,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
list<IGUIElement*> children = mainGame->wANRace->getChildren(); list<IGUIElement*> children = mainGame->wANRace->getChildren();
int count = children.size(); int count = children.size();
int i = 0; int i = 0;
int filter = 0x1;//属性种族宣言fixme int filter = 0x1;//属性种族宣言fixme
list<IGUIElement*>::Iterator current = children.begin(); list<IGUIElement*>::Iterator current = children.begin();
contents = (char **) malloc(count * sizeof(char *)); contents = (char **) malloc(count * sizeof(char *));
do { do {
if ((*current)->getType() == EGUIET_CHECK_BOX) { if ((*current)->getType() == EGUIET_CHECK_BOX) {
content = (char *) malloc(256 * 4); content = (char *) malloc(256 * 4);
if (filter & available) {//属性种族宣言fixme if (filter & available) {//属性种族宣言fixme
BufferIO::EncodeUTF8(((IGUICheckBox*) (*current))->getText(), BufferIO::EncodeUTF8(((IGUICheckBox*) (*current))->getText(),
content); content);
} }
...@@ -3406,13 +3406,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3406,13 +3406,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
list<IGUIElement*> children = mainGame->wANAttribute->getChildren(); list<IGUIElement*> children = mainGame->wANAttribute->getChildren();
int count = children.size(); int count = children.size();
int i = 0; int i = 0;
int filter = 0x1;//属性种族宣言fixme int filter = 0x1;//属性种族宣言fixme
list<IGUIElement*>::Iterator current = children.begin(); list<IGUIElement*>::Iterator current = children.begin();
contents = (char **) malloc(count * sizeof(char *)); contents = (char **) malloc(count * sizeof(char *));
do { do {
if ((*current)->getType() == EGUIET_CHECK_BOX) { if ((*current)->getType() == EGUIET_CHECK_BOX) {
content = (char *) malloc(256 * 4); content = (char *) malloc(256 * 4);
if (filter & available) {//属性种族宣言fixme if (filter & available) {//属性种族宣言fixme
BufferIO::EncodeUTF8(((IGUICheckBox*) (*current))->getText(), BufferIO::EncodeUTF8(((IGUICheckBox*) (*current))->getText(),
content); content);
} }
......
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