void _ApplyImpactDamageAndEffects(struct EventSpellScriptImpactStruct stEvent)
{
// make sure location is valid
if (IsObjectValid(stEvent.oTarget) == TRUE)
{
stEvent.lTarget = GetLocation(stEvent.oTarget);
}
// spell-specific AoE
int nAoE = -1;
int nAoEVFX = 0;
float fAoEDuration = 0.0f;
int bHostile = FALSE;
switch (stEvent.nAbility)
{
case ABI_S_WEB:
{
nAoE = WEB_AOE;
nAoEVFX = WEB_AOE_VFX;
fAoEDuration = (WEB_AOE_DURATION_BASE + GetCreatureSpellPower(stEvent.oCaster)) * WEB_AOE_DURATION_FACTOR;
bHostile = TRUE;
effect eVFX = EffectVisualEffect(WEB_AOE_VFX);
Engine_ApplyEffectAtLocation(EFFECT_DURATION_TYPE_TEMPORARY, eVFX, stEvent.lTarget, fAoEDuration, stEvent.oCaster, stEvent.nAbility); //this apparently isn't working
break;
}
}
if (nAoE > 0)
{
effect eAoE = EffectAreaOfEffect(nAoE, SCRIPT_SPELL_EVOC_AOE_DURATION, nAoEVFX);
Engine_ApplyEffectAtLocation(EFFECT_DURATION_TYPE_TEMPORARY, eAoE, stEvent.lTarget, fAoEDuration, stEvent.oCaster, stEvent.nAbility); //this works but i dont see the VFX
This is probably a problem with the VFX itself but I'm not sure. The AOE effect works but I don't see the VFX.






Retour en haut






