Erwan
- fix bug eventBlocker
This commit is contained in:
@@ -521,13 +521,16 @@ int MTGCardInstance::setDefenser(MTGCardInstance * opponent){
|
||||
defenser->blockers.remove(this);
|
||||
}
|
||||
}
|
||||
WEvent * e = NEW WEventCreatureBlocker(this, defenser, opponent);
|
||||
WEvent * e = NULL;
|
||||
if (defenser != opponent){
|
||||
e = NEW WEventCreatureBlocker(this, defenser, opponent);
|
||||
}
|
||||
defenser = opponent;
|
||||
if (defenser){
|
||||
defenser->blockers.push_back(this);
|
||||
}
|
||||
g->blockersSorted = false;
|
||||
g->receiveEvent(e);
|
||||
if (e) g->receiveEvent(e);
|
||||
//delete e;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ WEventCardTap::WEventCardTap(MTGCardInstance * card, bool before, bool after) :
|
||||
|
||||
WEventCreatureAttacker::WEventCreatureAttacker(MTGCardInstance * card, Targetable * before, Targetable * after) : WEventCardUpdate(card), before(before), after(after){}
|
||||
|
||||
WEventCreatureBlocker::WEventCreatureBlocker(MTGCardInstance * card, MTGCardInstance * from,MTGCardInstance * to) : WEventCardUpdate(card), before(before), after(after){}
|
||||
WEventCreatureBlocker::WEventCreatureBlocker(MTGCardInstance * card, MTGCardInstance * from,MTGCardInstance * to) : WEventCardUpdate(card), before(from), after(to){}
|
||||
|
||||
WEventCreatureBlockerRank::WEventCreatureBlockerRank(MTGCardInstance * card, MTGCardInstance * exchangeWith, MTGCardInstance * attacker) : WEventCardUpdate(card), exchangeWith(exchangeWith), attacker(attacker){}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user