Cokemonkey11
Spell Reviewer
- Joined
- May 9, 2006
- Messages
- 3,575
Hey Guys,
In my spell pack for Orianna I have 4 abilities based on channel. I use the
I have an issue though. The resetting process indeed does reset the cooldown, but only for 1 of the abilities.
If I comment out this one line:
The problem is fixed - the ability no longer resets its cooldown and all behaves normally. (But now Orianna will have two command cards for protect sometimes - not what I want)
Anyone know why this problem might occur?
In my spell pack for Orianna I have 4 abilities based on channel. I use the
IncUnitAbilityLevel
native to hide the command card without resetting cooldown.I have an issue though. The resetting process indeed does reset the cooldown, but only for 1 of the abilities.
If I comment out this one line:
JASS:
// Method used to passify (disable) Orianna's abilities - occurs
// when the ball already has some action.
private method passifyAbilities takes nothing returns nothing
set this.attackRevertLevel=GetUnitAbilityLevel(ori,COMMAND_ATTACK_ID)
set this.dissonanceRevertLevel=GetUnitAbilityLevel(ori,COMMAND_DISONNANCE_ID)
set this.protectRevertLevel=GetUnitAbilityLevel(ori,COMMAND_PROTECT_ID)
set this.shockwaveRevertLevel=GetUnitAbilityLevel(ori,COMMAND_SHOCKWAVE_ID)
if GetUnitAbilityLevel(this.ori,COMMAND_ATTACK_DIS_ID)>0 then
call SetUnitAbilityLevel(this.ori,COMMAND_ATTACK_ID,5)
call IncUnitAbilityLevel(this.ori,COMMAND_ATTACK_ID)
call UnitAddAbility(this.ori,COMMAND_ATTACK_DIS_ID)
endif
if GetUnitAbilityLevel(this.ori,COMMAND_DISONNANCE_ID)>0 then
call SetUnitAbilityLevel(this.ori,COMMAND_DISONNANCE_ID,5)
call IncUnitAbilityLevel(this.ori,COMMAND_DISONNANCE_ID)
call UnitAddAbility(this.ori,COMMAND_DISSONANCE_DIS_ID)
endif
if GetUnitAbilityLevel(this.ori,COMMAND_PROTECT_ID)>0 then
call SetUnitAbilityLevel(this.ori,COMMAND_PROTECT_ID,5)
//call IncUnitAbilityLevel(this.ori,COMMAND_PROTECT_ID)
call UnitAddAbility(this.ori,COMMAND_PROTECT_DIS_ID)
endif
if GetUnitAbilityLevel(this.ori,COMMAND_SHOCKWAVE_ID)>0 then
call SetUnitAbilityLevel(this.ori,COMMAND_SHOCKWAVE_ID,3)
call IncUnitAbilityLevel(this.ori,COMMAND_SHOCKWAVE_ID)
call UnitAddAbility(this.ori,COMMAND_SHOCKWAVE_DIS_ID)
endif
endmethod
The problem is fixed - the ability no longer resets its cooldown and all behaves normally. (But now Orianna will have two command cards for protect sometimes - not what I want)
Anyone know why this problem might occur?