What Damaged Unit

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,763
How do i get this? how do i get wether a spell, smart command, trigger, etc. (or damage type) dealt the damage
 
If you're already using it Bribe's GUI system, then you wouldn't have to implement those.

DamageEventType == 0 -> Attack-damage
DamageEventType == 1 -> Spell-damage (Trigger-damage)

But, you're going to have paste this code somewhere:

JASS:
function DamageEngine_HookSpell takes unit source, widget target, real amount, boolean b1, boolean b2, attacktype at, damagetype dt, weapontype wt returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

function DamageEngine_HookSpellBJ takes unit c, unit t, real amt, attacktype attype, damagetype dmgtype returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

hook UnitDamageTarget DamageEngine_HookSpell
hook UnitDamageTargetBJ DamageEngine_HookSpellBJ
 
If you're already using it Bribe's GUI system, then you wouldn't have to implement those.

DamageEventType == 0 -> Attack-damage
DamageEventType == 1 -> Spell-damage (Trigger-damage)

But, you're going to have paste this code somewhere:

JASS:
function DamageEngine_HookSpell takes unit source, widget target, real amount, boolean b1, boolean b2, attacktype at, damagetype dt, weapontype wt returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

function DamageEngine_HookSpellBJ takes unit c, unit t, real amt, attacktype attype, damagetype dmgtype returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

hook UnitDamageTarget DamageEngine_HookSpell
hook UnitDamageTargetBJ DamageEngine_HookSpellBJ

that code is exactly what ive been looking for! thank you alot

e/ unable to give u rep
 
Status
Not open for further replies.
Back
Top