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

request: a proper ipc #84

Open
Jaksuhn opened this issue Jun 22, 2024 · 4 comments
Open

request: a proper ipc #84

Jaksuhn opened this issue Jun 22, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jaksuhn
Copy link

Jaksuhn commented Jun 22, 2024

would be very help if IVL had a public ipc to get info from

I would really rather not have to reflect the plugin for the third time

@Nukoooo Nukoooo added the enhancement New feature or request label Jun 27, 2024
@Nukoooo Nukoooo self-assigned this Jun 27, 2024
@Nukoooo
Copy link
Collaborator

Nukoooo commented Jun 27, 2024

I can try adding it in the future, I'm not really good at designing APIS for users, do you think the pseudocode below is good for your usage?

public List<(uint, (float, float))> GetVendorInfo(uint itemId)
{
    var result = new List<(uint, (float, float))>(); // NPCId, (coordX, coordY)
    var info = GetInfo(itemId);
    return info == null ? result : info.GetVendors();
}

@Jaksuhn
Copy link
Author

Jaksuhn commented Jun 27, 2024

  1. more of a personal style thing but I'd just return null instead of a default if info is null
  2. Please add territorytype to the return as well
  3. I don't know if you built your vendor db to support going the opposite way but a function to pass the npc id and get the location (and if possible, maybe in a third function, the items you have associated with it) would be very useful.
  4. Another function to open your window via passing an itemID (the same as if you clicked a context menu entry)

@Nukoooo
Copy link
Collaborator

Nukoooo commented Jun 27, 2024

Thank you for the feedback, as of the opposite way I had a thought of doing so but I didn't bother spending time on it because I didn't think about IPC stuff until you made this issue, I will see what I can do once dalamud is stable enough for plugin devs

@Nukoooo
Copy link
Collaborator

Nukoooo commented Jul 8, 2024

Just added GetVendorInfo and OpenVendorResults, please give it a try when you have time #87

To search what items a NPC provide will require a little rework which I don't feel like doing right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants