-
Notifications
You must be signed in to change notification settings - Fork 0
/
nw_s0_darknessb.nss
48 lines (42 loc) · 1.31 KB
/
nw_s0_darknessb.nss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//::///////////////////////////////////////////////
//:: Darkness: On Exit
//:: NW_S0_DarknessB.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a globe of darkness around those in the area
of effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Feb 28, 2002
//:://////////////////////////////////////////////
#include "X0_I0_SPELLS"
#include "sha_subr_methds"
#include "x2_inc_spellhook"
void main()
{
object oTarget = GetExitingObject();
object oCreator = GetAreaOfEffectCreator();
//Shayan's Subrace Engine
SetIsInDarkness(oTarget, FALSE);
//End
int bValid = FALSE;
effect eAOE;
//Search through the valid effects on the target.
eAOE = GetFirstEffect(oTarget);
while (GetIsEffectValid(eAOE))
{
if (GetEffectCreator(eAOE) == oCreator)
{
int nID = GetEffectSpellId(eAOE);
//If the effect was created by the spell then remove it
if( nID== SPELL_DARKNESS || nID == SPELLABILITY_AS_DARKNESS || nID == SPELL_SHADOW_CONJURATION_DARKNESS || nID == 688 )
{
RemoveEffect(oTarget, eAOE);
}
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}