GameObjectType
Returns the gameobject type of a WowGameObject
.
GameObjectType(--[[(1)]]objectReference) : number | false
- See Object Reference for more information on possible values.
Example
Check if the target is a chair. ``` lua -- [[
enum eGameObjType { GOT_Door=0, GOT_Button=1, GOT_QuestGiver=2, GOT_Chest=3, GOT_Binder=4, GOT_Generic=5, GOT_Trap=6, GOT_Chair=7, GOT_SpellFocus=8, GOT_Text=9, GOT_Goober=0xa, GOT_Transport=0xb, GOT_AreaDamage=0xc, GOT_Camera=0xd, GOT_WorldObj=0xe, GOT_MapObjTransport=0xf, GOT_DuelArbiter=0x10, GOT_FishingNode=0x11, GOT_Ritual=0x12, GOT_Mailbox=0x13, GOT_AuctionHouse=0x14, GOT_SpellCaster=0x16, GOT_MeetingStone=0x17, GOT_Unkown18=0x18, GOT_FishingPool=0x19, GOT_FORCEDWORD=0xFFFFFFFF, };
]]local type = GameObjectType('target')if type == GOT_Chair then print("OMG A chair, lets sit")end```