NWNWiki
NWNWiki
3,718
pages
(// add a few more links)
mNo edit summary
Line 43: Line 43:
 
}
 
}
 
}
 
}
 
   
   

Revision as of 02:47, 28 January 2006

osrs_oacti is a script used by OSRS when handling the OnActivateItem event.

/////////////////////////////////////////////////////////////////////////////
//
// file:
//      osrs_oacti
//
// purpose:
//      OnActivateItem event script.
//
/////////////////////////////////////////////////////////////////////////////

// the include file for Open Source Rule Set events
#include "osrs_inc"

/////////////////////////////////////////////////////////////////////////////
void main()
{
    // determine what type of object is calling this script
    int iCallingClass = osrs_GetCallerEventClass(OBJECT_SELF);
    switch(iCallingClass)
    {
        /////////////////////////////////  module
        case I_OSRS_EVENT_CLASS_MODULE:
            // Module::OnActivateItem Pre-event
            if (!osrs_mo_oacti_pre())
            {
                return;
            }

            // Module::OnActivateItem event
            if (!osrs_mo_oacti())
            {
                return;
            }

            // Module::OnActivateItem post-event
            osrs_mo_oacti_post();

            break;


    }
}