mirror of
https://github.com/ldmud/ldmud
synced 2026-08-12 14:26:05 -04:00
Removed query_shadowing() in favor of object_info(ob, OI_SHADOW_PREV) and the shadow(ob, 0) functionality in favor of object_info(ob, OI_SHADOW_NEXT). (Issue #596)
31 lines
720 B
C
31 lines
720 B
C
/* These sefuns are to provide a replacement for the efun query_shadowing()
|
|
* and the old semantics of the efun shadow().
|
|
* Feel free to add it to your mudlibs, if you have much code relying on that.
|
|
*/
|
|
|
|
#if ! __EFUN_DEFINED__(query_shadowing)
|
|
|
|
#include <object_info.h>
|
|
|
|
object query_shadowing(object ob)
|
|
{
|
|
return efun::object_info(ob, OI_SHADOW_PREV);
|
|
}
|
|
|
|
object shadow(object ob, int flag)
|
|
{
|
|
if(flag)
|
|
{
|
|
object shadower = efun::previous_object();
|
|
efun::set_this_object(shadower);
|
|
|
|
if (efun::shadow(ob))
|
|
return efun::object_info(shadower, OI_SHADOW_PREV);
|
|
else
|
|
return 0;
|
|
}
|
|
else
|
|
return efun::object_info(ob, OI_SHADOW_NEXT);
|
|
}
|
|
|
|
#endif
|