Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复: Economics.Skill 插件拉怪位置调整失效 #137

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Economics.Skill/Economics.Skill.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@
<ProjectReference Include="..\Economics.RPG\Economics.RPG.csproj" />
<ProjectReference Include="..\EconomicsAPI\EconomicsAPI.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Extensions\" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Economics.Skill/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static void EmitGeneralSkill(TSPlayer Player, SkillContext skill)
Player.ExecRangeCommands(skill.ExecCommand.Range, skill.ExecCommand.Commands);
Player.HealAllLife(skill.HealPlayerHPOption.Range, skill.HealPlayerHPOption.HP);
Player.ClearProj(skill.ClearProjectile.Range);
Player.CollectNPC(skill.PullNpc.Range, Skill.Config.BanPullNpcs);
Player.CollectNPC(skill.PullNpc.Range, Skill.Config.BanPullNpcs, skill.PullNpc.X, skill.PullNpc.Y);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions EconomicsAPI/Extensions/TSPlayerExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ public static void ReSpawn(this TSPlayer Player)
/// <param name="Player"></param>
/// <param name="Range"></param>
/// <param name="code"></param>
public static void CollectNPC(this TSPlayer Player, int Range, HashSet<int> notNpc)
public static void CollectNPC(this TSPlayer Player, int Range, HashSet<int> notNpc, int x = 0, int y = 0)
{
Player.GetNpcInRange(Range).ForEach(npc =>
{
if (!notNpc.Contains(npc.type))
npc.Teleport(Player.TPlayer.position);
npc.Teleport(Player.TPlayer.position + new Vector2(x, y));
});
}
}
Loading