Please add realm to the return structure for TargetCoordinates.
In fact I would love to see this make it into 096.1 too.
TargetCoordinates - realm
Moderator: POL Developer
Sure you can code around it, but it would be really handy if TargetCoordinates returned the realm in the structure.
And my best reason to want it is because you can then go targ.realm with confidence -
eg
var targ := MyFunction(character);
CreateItemAtLocation(targ.x, targ.y, targ.z, theItem, 1, targ.realm);
No matter where 'targ' came from inside MyFunction you could be confident it had .realm. At the moment I have to be extremely careful to work out whether something has a .realm property in each and every case like this example. MyFunction may be anything not just TargetCoordinates. Having a .realm parameter is not essential, just very nice to have.
Alright even if you're not convinced, how about putting it in as a favour, huh?
And my best reason to want it is because you can then go targ.realm with confidence -
eg
var targ := MyFunction(character);
CreateItemAtLocation(targ.x, targ.y, targ.z, theItem, 1, targ.realm);
No matter where 'targ' came from inside MyFunction you could be confident it had .realm. At the moment I have to be extremely careful to work out whether something has a .realm property in each and every case like this example. MyFunction may be anything not just TargetCoordinates. Having a .realm parameter is not essential, just very nice to have.
Alright even if you're not convinced, how about putting it in as a favour, huh?
Who says only objects can have a .realm member?
You could argue, "only objects can have an X or Y member, too... and I'd be equally as confused why you could say that, since the struct returned by TargetCoordinates() has those.
I agree that it's fairly easy to script around this one in most cases, by just taking the realm of the PC that was given the target, but I think it would also be nice for the TargetCoordinates() function itself to simply add that to the struct it returns... even if all it does is copies the .realm property from the mobile that used the target.
Code: Select all
var s := struct;
s.+realm := REALM_BRITANNIA;
I agree that it's fairly easy to script around this one in most cases, by just taking the realm of the PC that was given the target, but I think it would also be nice for the TargetCoordinates() function itself to simply add that to the struct it returns... even if all it does is copies the .realm property from the mobile that used the target.
-- POL096.1 --
06-27-06 MuadDib
Added : Realm property to return struct of TargetCoordinates() function. This
is based off the targeter's realm. Never trust information returned
by the client for stuff like this.
06-24-06 MuadDib
Changed : Offline mobiles can once again be targeted without problems.