DiscoveryGC / FLHook

FLHook for Discovery Freelancer
Other
28 stars 33 forks source link

Allow TradeEvent to be TargetID of CombatEvents #134

Closed Corran-Raisu closed 4 years ago

Corran-Raisu commented 4 years ago

This allows the ID of a TradeEvent to be used as a TargetID of a CombatEvent.

Corran-Raisu commented 4 years ago

There wasn't a removal of a check on event.enabled so I'm not sure what you're referring to there.

Reusing TargetID appeared fitting in its usage of both forms of internal nicknames that are used as IDs. In addition, this should potentially allow for a CombatEvent where the only valid targets are specifically ships participating in a TradeEvent and possibly avoid confusion in how the two interact together or how they're handled.

It can be changed if necessary though.

dsyalex commented 4 years ago

You moved the wstos(HookExt::IniGetWS(iClientIDVictim, "event.eventid")) line outside the if (HookExt::IniGetB(iClientIDVictim, "event.enabled")) block. Don't we only want this behaviour to trigger if the victim has the event enabled?

Corran-Raisu commented 4 years ago

Ah, that.

Yes, I should have only moved the variable declaration out of the if block so that it could be used later in the Allowed ID vs Target ID portion of the function. New commit will have that updated.