|
|
@ -108,22 +108,22 @@ void Buff::BuffTick(AiL*game,float fElapsedTime){ |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case HP_PCT_RESTORATION:{ |
|
|
|
case HP_PCT_RESTORATION:{ |
|
|
|
if(OwnerIsPlayer())GetPlayer()->Heal(GetPlayer()->GetMaxHealth()*intensity/100.f); |
|
|
|
if(OwnerIsPlayer())GetPlayer()->Heal(GetPlayer()->GetMaxHealth()*intensity/100.f); |
|
|
|
else if(OwnerIsMonster())GetMonster()->Heal(GetMonster()->GetMaxHealth()*intensity/100.f); |
|
|
|
else if(OwnerIsMonster()){if(MonsterIsValid())GetMonster()->Heal(GetMonster()->GetMaxHealth()*intensity/100.f);} |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case MP_PCT_RESTORATION:{ |
|
|
|
case MP_PCT_RESTORATION:{ |
|
|
|
if(OwnerIsPlayer())GetPlayer()->RestoreMana(GetPlayer()->GetMaxMana()*intensity/100.f); |
|
|
|
if(OwnerIsPlayer())GetPlayer()->RestoreMana(GetPlayer()->GetMaxMana()*intensity/100.f); |
|
|
|
else if(OwnerIsMonster())ERR("WARNING! Monsters don't have mana, this functionality is not supported!") |
|
|
|
else if(OwnerIsMonster()){ERR("WARNING! Monsters don't have mana, this functionality is not supported!")} |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case HP_DAMAGE_OVER_TIME:{ |
|
|
|
case HP_DAMAGE_OVER_TIME:{ |
|
|
|
if(OwnerIsPlayer())GetPlayer()->Hurt(intensity,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT); |
|
|
|
if(OwnerIsPlayer())GetPlayer()->Hurt(intensity,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT); |
|
|
|
else if(OwnerIsMonster())GetMonster()->Hurt(intensity,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT); |
|
|
|
else if(OwnerIsMonster()){if(MonsterIsValid())GetMonster()->Hurt(intensity,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT);} |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case HP_PCT_DAMAGE_OVER_TIME:{ |
|
|
|
case HP_PCT_DAMAGE_OVER_TIME:{ |
|
|
|
if(OwnerIsPlayer())GetPlayer()->Hurt(GetPlayer()->GetMaxHealth()*intensity/100.f,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT); |
|
|
|
if(OwnerIsPlayer())GetPlayer()->Hurt(GetPlayer()->GetMaxHealth()*intensity/100.f,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT); |
|
|
|
else if(OwnerIsMonster())GetMonster()->Hurt(GetMonster()->GetMaxHealth()*intensity/100.f,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT); |
|
|
|
else if(OwnerIsMonster()){if(MonsterIsValid())GetMonster()->Hurt(GetMonster()->GetMaxHealth()*intensity/100.f,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT);} |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!") |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
} |
|
|
|
} |
|
|
|