Commit 4fd7ba4f authored by argon.sun's avatar argon.sun

fix

parent 5b1399f4
...@@ -1828,7 +1828,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1828,7 +1828,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
if(pcard == mainGame->dField.hovered_card) if(pcard == mainGame->dField.hovered_card)
mainGame->dField.hovered_card = 0; mainGame->dField.hovered_card = 0;
} } else
mainGame->dField.RemoveCard(pc, pl, ps);
delete pcard; delete pcard;
} else { } else {
if (!(pl & 0x80) && !(cl & 0x80)) { if (!(pl & 0x80) && !(cl & 0x80)) {
......
...@@ -2008,9 +2008,9 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl ...@@ -2008,9 +2008,9 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) {
if(!((*cit)->current.position & POS_FACEDOWN)) if(!((*cit)->current.position & POS_FACEDOWN))
raise_single_event(*cit, 0, EVENT_SPSUMMON_SUCCESS, (*cit)->current.reason_effect, 0, (*cit)->current.reason_player, (*cit)->summon_player, 0); raise_single_event(*cit, 0, EVENT_SPSUMMON_SUCCESS, (*cit)->current.reason_effect, 0, (*cit)->current.reason_player, (*cit)->summon_player, 0);
int32 summontype = (*cit)->summon_type & 0x3000000; int32 summontype = (*cit)->summon_type & 0xff000000;
if(summontype && (*cit)->material_cards.size()) { if(summontype && (*cit)->material_cards.size()) {
int32 matreason = (summontype & SUMMON_TYPE_FUSION) ? REASON_FUSION : (summontype & SUMMON_TYPE_RITUAL) ? REASON_RITUAL : 0; int32 matreason = (summontype == SUMMON_TYPE_FUSION) ? REASON_FUSION : (summontype == SUMMON_TYPE_RITUAL) ? REASON_RITUAL : 0;
for(auto mit = (*cit)->material_cards.begin(); mit != (*cit)->material_cards.end(); ++mit) for(auto mit = (*cit)->material_cards.begin(); mit != (*cit)->material_cards.end(); ++mit)
raise_single_event(*mit, 0, EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0); raise_single_event(*mit, 0, EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0);
raise_event(&((*cit)->material_cards), EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0); raise_event(&((*cit)->material_cards), EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0);
......
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