Пример #1
0
            private static int OnDoSpotDetection(void *pCreature, void *pTarget, int bTargetInvisible)
            {
                CNWSCreature creature = CNWSCreature.FromPointer(pCreature);
                CNWSCreature target   = CNWSCreature.FromPointer(pTarget);

                if (bTargetInvisible.ToBool() || creature.GetBlind().ToBool())
                {
                    return(false.ToInt());
                }

                if (target.m_nStealthMode == 0)
                {
                    return(true.ToInt());
                }

                OnDoSpotDetection eventData = ProcessEvent(new OnDoSpotDetection
                {
                    Creature = creature.ToNwObject <NwCreature>() !,
                    Target   = target.ToNwObject <NwCreature>() !,
                });