Convert AttackType/DamageType/WeaponType to integer

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
Hi all.

There are these functions:
JASS:
ConvertAttackType()
ConvertDamageType()
ConvertWeaponType()

Which all return an integer that represents the attack/damage/weapon -type but how the hell do I reverse that same function?

How do I recieve the Integer from the type?

(Sorry if this is supposed to be in the Trigger section.)
 
First of all... if you look at how many damage types there are... I am too lazy to do that :D

But next to that. It would be something like this if I am not mistaken:
JASS:
function ConvertAttackTypeReverse takes attacktype at returns integer
    if at == ATTACK_TYPE_NORMAL then
        return integer1
    elseif at == ATTACK_TYPE_MELEE then
        return integer2
    elseif at == ATTACK_TYPE_PIERCE then
        return integer3
    elseif at == ATTACK_TYPE_SIEGE then
        return integer4
    elseif at == ATTACK_TYPE_MAGIC then
        return integer5
    elseif at == ATTACK_TYPE_CHAOS then
        return integer6
    elseif at == ATTACK_TYPE_HERO then
        return integer7
    endif
endfunction

The problem is, how do I know what the integers are?
 
Status
Not open for further replies.
Back
Top