You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> What is the expected output? What do you see instead?
I expected the objeval() line to return #-1 (unfindable). I see # 10 instead (the actual location *SomeWiz is in).
'help objeval' states: Allows you to evaluate <expression> from the viewpoint of <object>.
This does not seem to be true.
The culprit is either "the help file needs to be written more precisely" or:
$ grep locatable functions.cpp
else if (locatable(executor, it, enactor))
else if (locatable(executor, it, enactor))
else if (locatable(executor, it, enactor))
else if (locatable(executor, it, enactor))
else if (!locatable(executor, it, enactor))
else if (!locatable(executor, victim, enactor))
And note from predicates.cpp:
bool locatable(dbref player, dbref it, dbref enactor)
{
if (!Good_obj(it))
{
return false;
}
dbref loc_it = where_is(it);
// Succeed if we can examine the target, if we are the target, if we can
// examine the location, if a wizard caused the lookup, or if the target
// caused the lookup.
//
if ( Examinable(player, it)
|| Find_Unfindable(player)
|| loc_it == player
|| ( loc_it != NOTHING
&& ( Examinable(player, loc_it)
|| loc_it == where_is(player)))
|| Wizard(enactor)
|| it == enactor)
{
return true;
}
Specifically "Wizard(enactor)".
Is this logic correct? Is the documentation correct?
The text was updated successfully, but these errors were encountered:
Original issue 685 created by brazilofmux on 2015-02-18T00:43:34.000Z:
Reported by Thenomain@BrazilMUX
> What steps will reproduce the problem?
@@ Assume we're a wizard for this demonstration.
@name me=SomeWiz
@pcreate SomePlayer=blah
@tel *SomePlayer=# 0
@tel # 10
@@ Now we're in different rooms.
@set %!=unfindable
th objeval(_SomePlayer,loc(_SomeWiz))
(returns # 10)
LOGOUT
connect SomePlayer blah
th loc(*SomeWiz)
(returns #-1)
> What is the expected output? What do you see instead?
I expected the objeval() line to return #-1 (unfindable). I see # 10 instead (the actual location *SomeWiz is in).
'help objeval' states: Allows you to evaluate <expression> from the viewpoint of <object>.
This does not seem to be true.
The culprit is either "the help file needs to be written more precisely" or:
$ grep locatable functions.cpp
else if (locatable(executor, it, enactor))
else if (locatable(executor, it, enactor))
else if (locatable(executor, it, enactor))
else if (locatable(executor, it, enactor))
else if (!locatable(executor, it, enactor))
else if (!locatable(executor, victim, enactor))
And note from predicates.cpp:
bool locatable(dbref player, dbref it, dbref enactor)
{
if (!Good_obj(it))
{
return false;
}
Specifically "Wizard(enactor)".
Is this logic correct? Is the documentation correct?
The text was updated successfully, but these errors were encountered: