Closed Infiziert90 closed 1 year ago
Thank you for your feedback. Honestly this was the intended behavior whereby the player had to click the maplink before pasting it to chat, as I myself also find that troublesome, I will be looking into ways to improve it.
Mmmm,
The problem with that behavior is that you shout out your previous flag too
So someone could shout "POP (Lavender Beds X Y)"
Which I think makes it even weirder compared to your Plugin setting the right flag x3
I've added a feature whereby it automatically sets the flag whenever you click on the custom payload in chat. You can either copy to clipboard or send the shout message.
If you are able to compile, feel free to test it out, otherwise I will push this to testing soon
I would recommend not doing any calculations yourself, and just trust dalamud in doing them.
You can use
public void SetMapMarker(MapLinkPayload map) => GameGui.OpenMapWithMapLink(map);
Which will take your MapLinkPayload and automatically open the map with handling FlagMarker internally
Or:
instance->IsFlagMarkerSet = 0;
AgentMap.Instance()->SetFlagMapMarker(map.Map.TerritoryType.Row, map.Map.RowId, map.RawX / 1000.0f, map.RawY / 1000.0f);
instance->OpenMap(map.Map.RowId, map.Map.TerritoryType.Row, type: MapType.FlagMarker);
This will take the MapLinkPayload and use the internal coordinates, just divide them by 1000 as they are 654321 instead of 654.321
Ignore that, didn't see your second commit
The feature has been implemented in 0.0.0.3 and has been merged today. Will be closing this, feel free to reopen if any issues occur
Hi,
Just tried out your plugin and found an issue with it.
The Copy to Clipboard function tries to use the client internal "< flag >" for shout chat, but the issue is that a flag isn't set until you tell the client that the flag is set.
So for this to work you could a) Use the dalamud function to set flag and open map b) Set the flag directly with ffxivclientstructs