Skip to content

Commit

Permalink
Make effects that play via effect packet look slightly more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Sep 9, 2022
1 parent 84f6b94 commit 8c7c6c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion EndlessClient/Rendering/Effects/CustomEffectSpriteInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions EndlessClient/Rendering/Effects/EffectSpriteManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ private IList<IEffectSpriteInfo> ResolveSpellEffect(HardCodedSpellGraphic effect
// 4 frames assumed until proven otherwise
return new List<IEffectSpriteInfo>
{
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))
};
}

Expand Down

0 comments on commit 8c7c6c3

Please sign in to comment.