ItemUpgraded
Tracking Issue: #289
Tags: events
This is an event that allows mods to perform non-standard handling to item states when they are upgraded to a new tier. It is fired up to four times during upgrading: * When upgrading the infinite item, if any. * When upgrading utility items, like grenades and medkits. * When upgrading unequipped items that have attachments * When upgrading equipped items that have attachments
Note: EventSource (BaseItem) will be none
when the event is triggered by upgrading an infinite item.
This is because infinite items are created rather than upgraded.
ItemUpgraded event
Param | Value |
---|---|
EventID | ItemUpgraded |
EventData | XComGameState_Item |
EventSource | XComGameState_Item |
NewGameState | yes |
Listener template
static function EventListenerReturn OnItemUpgraded(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_Item BaseItem;
local XComGameState_Item UpgradedItem;
BaseItem = XComGameState_Item(EventSource);
UpgradedItem = XComGameState_Item(EventData);
// Your code here
return ELR_NoInterrupt;
}