public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList) { if (GameObject.IsDisposed) { return(false); } AnimatedItemEffect effect = (AnimatedItemEffect)GameObject; if (effect.AnimationGraphic != _displayedGraphic || Texture == null || Texture.IsDisposed) { _displayedGraphic = effect.AnimationGraphic; Texture = Art.GetStaticTexture(effect.AnimationGraphic); Bounds = new Rectangle((Texture.Width >> 1) - 22, Texture.Height - 44, Texture.Width, Texture.Height); } Bounds.X = (Texture.Width >> 1) - 22 - (int)effect.Offset.X; Bounds.Y = Texture.Height - 44 + (int)(effect.Offset.Z - effect.Offset.Y); ulong flags = TileData.StaticData[_displayedGraphic].Flags; bool isPartial = TileData.IsPartialHue(flags); bool isTransparent = TileData.IsTransparent(flags); HueVector = ShaderHuesTraslator.GetHueVector(effect.Hue, isPartial, isTransparent ? .5f : 0, false); switch (effect.Blend) { case GraphicEffectBlendMode.Multiply: spriteBatch.SetBlendState(_multiplyBlendState.Value); base.Draw(spriteBatch, position, objectList); spriteBatch.SetBlendState(null); break; case GraphicEffectBlendMode.Screen: case GraphicEffectBlendMode.ScreenMore: spriteBatch.SetBlendState(_screenBlendState.Value); base.Draw(spriteBatch, position, objectList); spriteBatch.SetBlendState(null); break; case GraphicEffectBlendMode.ScreenLess: spriteBatch.SetBlendState(_screenLessBlendState.Value); base.Draw(spriteBatch, position, objectList); spriteBatch.SetBlendState(null); break; case GraphicEffectBlendMode.NormalHalfTransparent: spriteBatch.SetBlendState(_normalHalfBlendState.Value); base.Draw(spriteBatch, position, objectList); spriteBatch.SetBlendState(null); break; case GraphicEffectBlendMode.ShadowBlue: spriteBatch.SetBlendState(_shadowBlueBlendState.Value); base.Draw(spriteBatch, position, objectList); spriteBatch.SetBlendState(null); break; default: base.Draw(spriteBatch, position, objectList); break; } return(true); }