I've come across a different usage of War3_DamageModPercent and wanted to know if this is correct.
I usually use War3_DamageModPercent within a OnW3TakeDmgAllPre function, my assumption being that it modifies the damage for that one instance only (eg, War3_DamageModPercent( 0.0 ) will mean that that one hit will do no damage).
However I've just come across this code:
Code:
public OnUltimateCommand(client,race,bool:pressed)
{
if(War3_GetRace(client)==thisRaceID && IsPlayerAlive(client) && pressed)
{
if(!Silenced(client))
{
if(War3_SkillNotInCooldown(client,thisRaceID,ULT_INTER,true))
{
new ult_inter=War3_GetSkillLevel(client,thisRaceID,ULT_INTER);
if(ult_inter>0)
{
War3_CooldownMGR(client,InterCD[ult_inter],thisRaceID,ULT_INTER,true,true);
War3_DamageModPercent(0.0);
CreateTimer(InterDur[ult_inter], UltOff, client);
}
else
{
PrintHintText(client, "Level your ultimate first");
}
}
}
}
}
public Action:UltOff(Handle:timer,any:client)
{
if(ValidPlayer(client)){
War3_DamageModPercent(1.0);
}
}
This seems to suggest that if you set War3_DamageModPercent OUTSIDE of a damage function, it will modify ALL damage until it's changed... Is this correct? The downside that I can see is that you can't use a necklace (for example) or any other immunity to negate the damage reduction.





Logged


DarkEnergy