From 8c7c6c3dbebe83731f6cc6bff0106bd790ce0d5f Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Fri, 9 Sep 2022 16:17:40 -0700 Subject: [PATCH] Make effects that play via effect packet look slightly more accurate --- EndlessClient/Rendering/Effects/CustomEffectSpriteInfo.cs | 2 +- EndlessClient/Rendering/Effects/EffectSpriteManager.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EndlessClient/Rendering/Effects/CustomEffectSpriteInfo.cs b/EndlessClient/Rendering/Effects/CustomEffectSpriteInfo.cs index 3f82db48c..38962aad7 100644 --- a/EndlessClient/Rendering/Effects/CustomEffectSpriteInfo.cs +++ b/EndlessClient/Rendering/Effects/CustomEffectSpriteInfo.cs @@ -13,7 +13,7 @@ public CustomEffectSpriteInfo(int numberOfFrames, int repeats, bool onTopOfChara protected override Vector2 GetDrawLocation(Rectangle textureSourceRectangle, Rectangle targetActorRectangle) { var targetX = targetActorRectangle.X + (targetActorRectangle.Width - textureSourceRectangle.Width) / 2 - targetActorRectangle.Width / 2; - var targetY = targetActorRectangle.Y - textureSourceRectangle.Height; + var targetY = (int)System.Math.Floor(targetActorRectangle.Y - textureSourceRectangle.Height*(11.0/13)); return new Vector2(targetX, targetY); } diff --git a/EndlessClient/Rendering/Effects/EffectSpriteManager.cs b/EndlessClient/Rendering/Effects/EffectSpriteManager.cs index 503171bd2..6c2454609 100644 --- a/EndlessClient/Rendering/Effects/EffectSpriteManager.cs +++ b/EndlessClient/Rendering/Effects/EffectSpriteManager.cs @@ -87,9 +87,9 @@ private IList ResolveSpellEffect(HardCodedSpellGraphic effect // 4 frames assumed until proven otherwise return new List { - new CustomEffectSpriteInfo(4, 1, false, 255, GetGraphic(((int)effect - 9)*3 + 128)), - new CustomEffectSpriteInfo(4, 1, true, 255, GetGraphic(((int)effect - 9)*3 + 129)), - new CustomEffectSpriteInfo(4, 1, true, 255, GetGraphic(((int)effect - 9)*3 + 130)) + new CustomEffectSpriteInfo(4, 2, false, 255, GetGraphic(((int)effect - 9)*3 + 128)), + new CustomEffectSpriteInfo(4, 2, true, 255, GetGraphic(((int)effect - 9)*3 + 129)), + new CustomEffectSpriteInfo(4, 2, true, 255, GetGraphic(((int)effect - 9)*3 + 130)) }; }