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

feature: Access to Source of Dropped/Spawned Items for Server Plugins #2390

Merged

Conversation

blinkuz
Copy link
Contributor

@blinkuz blinkuz commented Oct 21, 2024

This PR will allow access to the source of an item that is dropped/spawned on the map. The main goal is to expose this logic to the plugin system, specifically in the context of the server. It’s still a work in progress, but I would like to keep updating the draft in case they have any suggestions for the changes.

Intersect.Server.Framework/Items/EntityItemSource.cs Outdated Show resolved Hide resolved
Intersect.Server.Framework/Items/EntityItemSource.cs Outdated Show resolved Hide resolved
Intersect.Server.Framework/Items/EntityItemSource.cs Outdated Show resolved Hide resolved
Intersect.Server.Framework/Entities/IEntity.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Maps/MapInstance.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Maps/MapInstance.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Maps/MapInstance.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Maps/MapInstance.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Entities/Entity.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Entities/Entity.cs Outdated Show resolved Hide resolved
@blinkuz blinkuz requested a review from lodicolo October 25, 2024 04:17
Copy link
Member

@lodicolo lodicolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think Projectile and EventPageInstance's methods should return null, I'm ok with that but you need to change the method signature in all of the classes from EntityItemSource to EntityItemSource? so that callers know if the value is nullable or not

Intersect.Server.Framework/Items/MapItemSource.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Entities/Projectile.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Entities/Events/EventPageInstance.cs Outdated Show resolved Hide resolved
Intersect.Server.Core/Entities/Entity.cs Outdated Show resolved Hide resolved
@blinkuz blinkuz requested a review from lodicolo October 27, 2024 00:33
@blinkuz blinkuz marked this pull request as ready for review October 30, 2024 02:33
@blinkuz blinkuz requested a review from lodicolo October 30, 2024 02:33
@blinkuz
Copy link
Contributor Author

blinkuz commented Oct 30, 2024

Leaving this comment as a note to confirm that I've been testing the item source implementation in a test plugin, and everything has been working as expected.

@lodicolo lodicolo merged commit b62d99f into AscensionGameDev:main Nov 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants