No categories assigned

LUA:GetRaceType

LUA Functions: GetRaceType()

Will get the race id for the given spawn


Syntax

var = GetRaceType(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn who's race id we want

Returns

int32, the id of the spawns race

Usage

function cast(Caster, Target)
    -- do normal damage here

    if GetRaceType(Target) == 242 then
        -- do extra damage to vampires here
    end
end

This spell will do extra damage to vampire NPC's

Notes

Race id's are defined in RaceTypes.h