Here are a few random questions I always wondered about, but never placed into any particular topic.
1) Suppose a unit gets damage under the Unit Takes Damage event, and as soon as that happens, a subsequent action heals the unit by GetEventDamage() via life manipulation. Will this reduce lethal (killing) damage? And are there any disadvantages to this method?
2) Is it possible to check the level of a buff on a unit? There is a bj function called UnitHasBuffBJ; it is supposed to check if a unit has a buff, but what it really does is:
Therefore is is possible to get the exact level? I want to use it for stacking purposes.
3) Is it possible to check the type of damage received from a damage taken event? Such as ATTACK_TYPE_NORMAL, etc. What does the native ConvertDamageType do?
4) How do I use UNIT_TYPE_MELEE_ATTACKER to check for melee/ranged attackers?
5) UnitCountBuffsEx() counts buffs on a unit, is there a way to get and remove a random buff from a unit?
I know attempting to solve these myself would be possible, but my computer crashed and I don't have Warcraft available now, so I can't do anything. Just wanted to know if you guys knew anything, yeah.
1) Suppose a unit gets damage under the Unit Takes Damage event, and as soon as that happens, a subsequent action heals the unit by GetEventDamage() via life manipulation. Will this reduce lethal (killing) damage? And are there any disadvantages to this method?
2) Is it possible to check the level of a buff on a unit? There is a bj function called UnitHasBuffBJ; it is supposed to check if a unit has a buff, but what it really does is:
Code:
function UnitHasBuffBJ takes unit whichUnit, integer buffcode returns boolean
return (GetUnitAbilityLevel(whichUnit, buffcode) > 0)
endfunction
3) Is it possible to check the type of damage received from a damage taken event? Such as ATTACK_TYPE_NORMAL, etc. What does the native ConvertDamageType do?
4) How do I use UNIT_TYPE_MELEE_ATTACKER to check for melee/ranged attackers?
5) UnitCountBuffsEx() counts buffs on a unit, is there a way to get and remove a random buff from a unit?
I know attempting to solve these myself would be possible, but my computer crashed and I don't have Warcraft available now, so I can't do anything. Just wanted to know if you guys knew anything, yeah.