Recent changes Random page
GAMING
Gaming
 
WoWWiki
Halopedia
FFXIclopedia
Age of Conan
Warhammer Online
Grand Theft Wiki
See more...

Osrs oda

From NWNWiki

Jump to: navigation, search

osrs_oda is a script used by OSRS in the OnDamaged event.

/////////////////////////////////////////////////////////////////////////////
//
// file:
//      osrs_oda
//
// purpose:
//      OnDamaged
//
/////////////////////////////////////////////////////////////////////////////

// the OSRS include file
#include "osrs_inc"

/////////////////////////////////////////////////////////////////////////////
void main()
{
    // determine what type of object is calling this script
    int iCallingClass = osrs_GetCallerEventClass(OBJECT_SELF);
    switch(iCallingClass)
    {
        case I_OSRS_EVENT_CLASS_PLACEABLE:
            // Placeable::OnDamaged Pre-event
            if (!osrs_p_oda_pre())
            {
                return;
            }

            // Placeable::OnDamaged event
            if (!osrs_p_oda())
            {
                return;
            }

            // Placeable::OnDamaged post-event
            osrs_p_oda_post();

            return;

        case I_OSRS_EVENT_CLASS_CREATURE:
            // Creature::OnDamaged Pre-event
            if (!osrs_c_oda_pre())
            {
                return;
            }

            // Creature::OnDamaged event
            if (!osrs_c_oda())
            {
                return;
            }

            // Creature::OnDamaged post-event
            osrs_c_oda_post();

            return;

        case I_OSRS_EVENT_CLASS_DOOR:
            // Door::OnDamaged Pre-event
            if (!osrs_d_oda_pre())
            {
                return;
            }

            // Door::OnDamaged event
            if (!osrs_d_oda())
            {
                return;
            }

            // Door::OnDamaged post-event
            osrs_d_oda_post();

            return;

        default:
            return;
    }

}


Rate this article:
Share this article: