public ContainerGump(Entity containerItem, int gumpID) : base(containerItem.Serial, 0) { _data = Data.ContainerData.GetData(gumpID); _item = (Container)containerItem; IsMovable = true; AddControl(new GumpPicContainer(this, 0, 0, 0, _data.GumpID, 0, _item)); LastControl.MakeDragger(this); LastControl.MakeCloseTarget(this); _tickerText = (HtmlGump)AddControl(new HtmlGump(this, 0, 50, 50, 0, 0, 0, 0, string.Empty)); }
public MapObjectItem(int itemID, Position3D position, int direction, Entity ownerEntity, int hue) : base(position) { ItemID = itemID; OwnerEntity = ownerEntity; Facing = direction; Hue = hue; // set up draw data _draw_texture = Data.Art.GetStaticTexture(ItemID); _draw_width = _draw_texture.Width; _draw_height = _draw_texture.Height; _draw_X = (_draw_width >> 1) - 22; _draw_Y = (int)(Z * 4) + _draw_height - 44; _draw_hue = Utility.GetHueVector(Hue); _pickType = PickTypes.PickObjects; _draw_flip = false; }
public MapObjectCorpse(Position3D position, int direction, Entity ownerEntity, int nHue, int bodyID, float frame) : base(0x2006, position, direction, ownerEntity, nHue) { BodyID = bodyID; FrameIndex = (int)(frame * Data.BodyConverter.DeathAnimationFrameCount(bodyID)); Data.FrameXNA iFrame = getFrame(); if (iFrame == null) { _noDraw = true; return; } _draw_texture = iFrame.Texture; _draw_width = _draw_texture.Width; _draw_height = _draw_texture.Height; _draw_X = iFrame.Center.X - 22; _draw_Y = iFrame.Center.Y + (int)(Z * 4) + _draw_height - 22; _draw_hue = Utility.GetHueVector(Hue); _pickType = PickTypes.PickObjects; _draw_flip = false; }
public void SaveLastParent() { if (Parent != null) { _lastParent = Parent; _lastParent_X = X; _lastParent_Y = Y; } else { _lastParent = null; } }
public static void DoubleClick(Entity item) { UltimaClient.Send(new DoubleClickPacket(item.Serial)); }