Page 1 of 1

TargetCoordinates - realm

Posted: Mon Jun 26, 2006 3:19 pm
by OldnGrey
Please add realm to the return structure for TargetCoordinates.
In fact I would love to see this make it into 096.1 too.

Posted: Mon Jun 26, 2006 6:55 pm
by FreeSoul
but isn't enough to check the someone.realm who is targetting a location?
you can't target different realm from anotherone

Posted: Mon Jun 26, 2006 9:33 pm
by DevGIB
it would make scripts alot neater and less effort required if you could just get a realm from a target or targetcoords.

Posted: Mon Jun 26, 2006 10:37 pm
by FreeSoul
from target - no problem you have objectref as return so it has .realm
targetcoords - as above

Posted: Mon Jun 26, 2006 10:55 pm
by OldnGrey
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 -
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?

Posted: Tue Jun 27, 2006 1:07 am
by Yukiko
Returning a 'realm' reference in the TargetCoordinates function is poor logic since coordinates are not POL Class Objects and only objects can have a realm member. I agree with Freesoul. The just use the realm of 'who' in the TargetCoordinates for a realm reference.

Posted: Tue Jun 27, 2006 5:45 am
by Marilla
Who says only objects can have a .realm member?

Code: Select all

var s := struct;
s.+realm := REALM_BRITANNIA;
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.

Posted: Tue Jun 27, 2006 6:21 am
by Austin
Adam and I talked about it in IRC and yeah, we'll add a .realm property to it which is a copy of the person who did the targetting.

Posted: Tue Jun 27, 2006 1:57 pm
by MuadDib
-- 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.