Closed jpcsupplies closed 8 years ago
made placeholder for use later..
might downgrade this to ENH so we can focus on getting an Alpha release out.. looks like it needs either some fiddly math functions, or some game api function, and players seem to be impatient for the player to player sell command atm
gone hunting and listed useful sounding api bits in #65 which i may be able to use for a distance check.. probably going to need help here
looks like this is implemented now
Need to add the bool to check players distance from requested player/faction prior to allowing trade with them.. At the moment it is just a placeholder, but the sub should at least be created.
Desired Logic: Get current player location. Get target location (player or faction trade territory or central market) target distance = target location - player location (using xyz logic..) If ((target.distance >= max trade range) || (target location is within broadcast rage of player)) return true. else return false.
Notes: x=10 y=10 z=10 ta=20 ty=10 tz=11
20-10=10 10-10=0 11-10=1
10+1 = 11 ? probably need some sqr root formula.. gah Point 1 at (x1, y1, z1) and Point 2 at (x2, y2, z2).
yuk.. c# have a sqr function?
these may be also usable.. ? GetPlayerRelayedBroadcasters.
Vector3D player; bool success = remote.GetNearestPlayer(out player); if (success) { player = remote.GetFreeDestination(player, 200, 15.0f);
}