Difference between revisions of "LUA:GetRaceBaseType"

(Created page with "= LUA Functions: GetRaceBaseType() = Gets the race id for the base race type of the given spawn ==== Syntax ==== var = GetRaceBaseType(param1) ==== Parameters ==== ; Required...")
 
(No difference)

Latest revision as of 15:00, 1 April 2014

LUA Functions: GetRaceBaseType()

Gets the race id for the base race type of the given spawn


Syntax

var = GetRaceBaseType(param1)


Parameters

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

Returns

int32, race id of the spawns base race

Usage

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

    if GetRaceBaseType(Target) == 233 then
        -- do extra damage to undead here
    end
end

This spell will do extra damage to undead NPC's

Notes

Race id's are defined in RaceTypes.h