CDR now adjusts the cooldown timing live instead of setting the cooldown on use. CDR formula properly applied.
This commit is contained in:
parent
6412f34dce
commit
28079609b7
Crawler
@ -57,5 +57,5 @@ Ability::Ability(std::string name,std::string shortName,std::string description,
|
||||
:name(name),shortName(shortName),description(description),cooldown(0),COOLDOWN_TIME(cooldownTime),manaCost(manaCost),input(input),icon(icon),barColor1(barColor1),barColor2(barColor2),precastInfo(precastInfo),canCancelCast(canCancelCast){}
|
||||
|
||||
const float Ability::GetCooldownTime()const{
|
||||
return COOLDOWN_TIME*std::max(0.f,(1-game->GetPlayer()->GetCooldownReductionPct()));
|
||||
return COOLDOWN_TIME;
|
||||
}
|
@ -362,11 +362,17 @@ void Player::Update(float fElapsedTime){
|
||||
animation.UpdateState(internal_animState,fElapsedTime);
|
||||
}
|
||||
}
|
||||
rightClickAbility.cooldown-=fElapsedTime;
|
||||
ability.cooldown-=fElapsedTime;
|
||||
ability2.cooldown-=fElapsedTime;
|
||||
ability3.cooldown-=fElapsedTime;
|
||||
ability4.cooldown-=fElapsedTime;
|
||||
float cooldownMultiplier;
|
||||
if(game->GetPlayer()->GetCooldownReductionPct()>=1.0f){
|
||||
cooldownMultiplier=999999;
|
||||
}else{
|
||||
cooldownMultiplier=1/(1-game->GetPlayer()->GetCooldownReductionPct());
|
||||
}
|
||||
rightClickAbility.cooldown-=fElapsedTime*cooldownMultiplier;
|
||||
ability.cooldown-=fElapsedTime*cooldownMultiplier;
|
||||
ability2.cooldown-=fElapsedTime*cooldownMultiplier;
|
||||
ability3.cooldown-=fElapsedTime*cooldownMultiplier;
|
||||
ability4.cooldown-=fElapsedTime*cooldownMultiplier;
|
||||
item1.cooldown-=fElapsedTime;
|
||||
item2.cooldown-=fElapsedTime;
|
||||
item3.cooldown-=fElapsedTime;
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION_BUILD 4854
|
||||
#define VERSION_BUILD 4857
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
@ -47,7 +47,6 @@ ItemDatabase
|
||||
ItemScript = Buff
|
||||
Description = Increase your attack by 15% for 30 seconds.
|
||||
Attack % = 15%,30
|
||||
CDR = 50%,60
|
||||
ItemCategory = Consumables
|
||||
Cooldown Time = 5.0
|
||||
Cast Time = 0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user