public override void OnUpdated() { if (InventorySlot == InventorySlot.SharedStash && !Core.Player.IsInTown) { return; } Attributes.Update(CommonData); ItemProperties.Update(this); CommonProperties.Update(this); }
protected void OnUpdateSkinsClick(object sender, EventArgs e) { try { //Update skin changes Attributes.Update(); } catch (Exception exc) { Exceptions.ProcessModuleLoadException(this, exc); } finally { DataCache.ClearHostCache(false); } }
public override void OnUpdated() { Attributes.Update(CommonData); // Strange case where shrine has no attributes, try to refresh if (FastAttributeGroupId == 0 && IsValid && IsGizmo) { FullUpdate(); return; } if (DateTime.UtcNow.Subtract(LastFullUpdate).TotalSeconds > 10) { FullUpdate(); return; } FastUpdate(); }
public ActionResult Edit(EditAttribute editAttribute) { try { var attribute = Mapper.Map <Attribute>(editAttribute); attribute.LastUpdate = DateTime.Now; ViewBag.Success = true; int attributeID = attribute.ID; if (attributeID == -1) { Attributes.Insert(attribute); attributeID = attribute.ID; SaveGroups(editAttribute, attribute.ID); SaveOptions(editAttribute, attribute.ID); UserNotifications.Send(UserID, String.Format("جدید - ویژگی '{0}'", attribute.Title), "/Admin/Attributes/Edit/" + attribute.ID, NotificationType.Success); editAttribute = new EditAttribute(); } else { Attributes.Update(attribute); SaveGroups(editAttribute, attribute.ID); SaveOptions(editAttribute, attribute.ID); editAttribute.Groups = AttributeGroups.GetByAttributeID(editAttribute.ID).Select(item => item.GroupID).ToList(); editAttribute.Options = AttributeOptions.GetByAttributeID(editAttribute.ID).Select(item => new EditAttributeOption() { ID = item.ID, AttributeID = item.AttributeID, Title = item.Title }).ToList(); } } catch (Exception ex) { SetErrors(ex); } return(ClearView(editAttribute)); }
public override void OnUpdated() { Attributes.Update(CommonData); CommonProperties.Populate(this); UnitProperties.Populate(this); }
public override void OnUpdated() { Attributes.Update(CommonData); UpdateProperties(); }