added card equipped event
This commit is contained in:
@@ -5611,6 +5611,8 @@ int AEquip::equip(MTGCardInstance * equipped)
|
||||
//we equip...
|
||||
a->addToGame();
|
||||
}
|
||||
WEvent * e = NEW WEventCardEquipped(source);
|
||||
game->receiveEvent(e);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -412,6 +412,8 @@ int GuiPlay::receiveEventPlus(WEvent * e)
|
||||
Replace();
|
||||
else if (dynamic_cast<WEventCardUnattached*> (e))
|
||||
Replace();
|
||||
else if (dynamic_cast<WEventCardEquipped*> (e))
|
||||
Replace();
|
||||
else if (dynamic_cast<WEventCardControllerChange*> (e))
|
||||
Replace();
|
||||
Replace();
|
||||
|
||||
@@ -165,6 +165,11 @@ WEventCardUnattached::WEventCardUnattached(MTGCardInstance * card) :
|
||||
{
|
||||
}
|
||||
|
||||
WEventCardEquipped::WEventCardEquipped(MTGCardInstance * card) :
|
||||
WEventCardUpdate(card)
|
||||
{
|
||||
}
|
||||
|
||||
WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) :
|
||||
WEventCardUpdate(card)
|
||||
{
|
||||
@@ -324,6 +329,12 @@ Targetable * WEventCardUnattached::getTarget(int target)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardEquipped::getTarget(int target)
|
||||
{
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardControllerChange::getTarget(int target)
|
||||
{
|
||||
if (target) return card;
|
||||
|
||||
Reference in New Issue
Block a user