DB/Spell/TargetCreatureType: Difference between revisions

From wowdev
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
It seems to be decimal versions of hex codes? They're clearly hex masks but by default the code is all decimal numbers. By putting or adding these numbers together, the spell can and will only target creatures of the given type, these correspond with their type in the database. [[User:Crow|Crow]] 30th October 2021
It seems to be decimal versions of hex codes? They're clearly hex masks but by default the code is all decimal numbers. By putting or adding these numbers together, the spell can and will only target creatures of the given type, these correspond with their type in the database. [[User:Crow|Crow]] 30th October 2021


TYPE_NONE          = 0,<br>
* "by default" depends on your editor/source code. Just because someone writes something as decimal doesn't mean they are meant as non-hex-masks. Edited to use hex values for clarity. --[[User:Schlumpf|Schlumpf]] ([[User talk:Schlumpf|talk]]) 10:28, 1 November 2021 (CET)
TYPE_BEAST        = 1,<br>
 
TYPE_DRAGONKIN    = 2,<br>
TYPE_NONE          = 0x0000,
TYPE_DEMON        = 4,<br>
TYPE_BEAST        = 0x0001,
TYPE_ELEMENTAL    = 8,<br>
TYPE_DRAGONKIN    = 0x0002,
TYPE_GIANT       = 16, <br>
TYPE_DEMON        = 0x0004,
TYPE_UNDEAD       = 32,<br>
TYPE_ELEMENTAL    = 0x0008,
TYPE_HUMANOID     = 64,<br>
TYPE_GIANT         = 0x0010,
TYPE_CRITTER     = 128,<br>
TYPE_UNDEAD       = 0x0020,
TYPE_MECHANICAL   = 256,<br>
TYPE_HUMANOID     = 0x0040,
TYPE_NOTSPECIFIED = 512<br>
TYPE_CRITTER       = 0x0080,
TYPE_TOTEM       = 1024,<br>
TYPE_MECHANICAL   = 0x0100,
TYPE_NONCOMBATPET = 2048,<br>
TYPE_NOTSPECIFIED = 0x0200,
TYPE_GASCLOUD     = 4096,<br>
TYPE_TOTEM         = 0x0400,
TYPE_WILDPET     = 8192,<br>
TYPE_NONCOMBATPET = 0x0800,
TYPE_ABBERATION   = 16384<br>
TYPE_GASCLOUD     = 0x1000,
TYPE_WILDPET       = 0x2000,
TYPE_ABBERATION   = 0x4000,

Revision as of 11:28, 1 November 2021

It seems to be decimal versions of hex codes? They're clearly hex masks but by default the code is all decimal numbers. By putting or adding these numbers together, the spell can and will only target creatures of the given type, these correspond with their type in the database. Crow 30th October 2021

  • "by default" depends on your editor/source code. Just because someone writes something as decimal doesn't mean they are meant as non-hex-masks. Edited to use hex values for clarity. --Schlumpf (talk) 10:28, 1 November 2021 (CET)
TYPE_NONE          = 0x0000,
TYPE_BEAST         = 0x0001,
TYPE_DRAGONKIN     = 0x0002,
TYPE_DEMON         = 0x0004,
TYPE_ELEMENTAL     = 0x0008,
TYPE_GIANT         = 0x0010,
TYPE_UNDEAD        = 0x0020,
TYPE_HUMANOID      = 0x0040,
TYPE_CRITTER       = 0x0080,
TYPE_MECHANICAL    = 0x0100,
TYPE_NOTSPECIFIED  = 0x0200,
TYPE_TOTEM         = 0x0400,
TYPE_NONCOMBATPET  = 0x0800,
TYPE_GASCLOUD      = 0x1000,
TYPE_WILDPET       = 0x2000,
TYPE_ABBERATION    = 0x4000,