private bool onPurchaseComplete(IglooServiceEvents.DecorationUpdated evt) { Service.Get <EventDispatcher>().RemoveListener <IglooServiceEvents.DecorationUpdated>(onPurchaseComplete); setState(ConfirmationState.Complete); hidePurchaseModal(); PersistentBreadcrumbTypeDefinitionKey type = null; StaticBreadcrumbDefinitionKey breadcrumbKey = null; string id = ""; if (evt.DecorationId.type == DecorationType.Decoration) { type = decorationTypeBreadcrumb; id = evt.DecorationId.definitionId.ToString(); breadcrumbKey = decorationBreadcrumb; } else if (evt.DecorationId.type == DecorationType.Structure) { type = structureTypeBreadcrumb; id = evt.DecorationId.definitionId.ToString(); breadcrumbKey = structureBreadcrumb; } if (notificationBreadcrumbController.GetPersistentBreadcrumbCount(type, id) == 0) { notificationBreadcrumbController.AddPersistentBreadcrumb(type, id); } notificationBreadcrumbController.AddBreadcrumb(breadcrumbKey); return(false); }
private bool onDecorationUpdated(IglooServiceEvents.DecorationUpdated evt) { if (evt.DecorationId.type == DecorationType.Decoration) { if (decorationInventory != null) { decorationInventory.AddDecoration(evt.DecorationId.definitionId, evt.Count); } } else if (evt.DecorationId.type == DecorationType.Structure && structureInventory != null) { structureInventory.AddStructure(evt.DecorationId.definitionId, evt.Count); } this.InventoryUpdated.InvokeSafe(); return(false); }