• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Repo] Constants which can be replaced with "null".

There are some handle constants in common.j which can just be replaced with "null". For easy reference and distribution I have made this list.

Edit: On second thought, most of these should be avoided for readability reasons. However, if someone is developing an optimizer, then do a search for these constants and replace them with "null".

JASS:
constant playercolor    PLAYER_COLOR_RED
constant playergameresult PLAYER_GAME_RESULT_VICTORY
constant alliancetype   ALLIANCE_PASSIVE
constant version        VERSION_REIGN_OF_CHAOS
constant attacktype     ATTACK_TYPE_NORMAL
constant damagetype     DAMAGE_TYPE_UNKNOWN //or any damage type that ignores armor, for example DAMAGE_TYPE_UNIVERSAL essentially does the same thing.
constant weapontype     WEAPON_TYPE_WHOKNOWS
constant pathingtype    PATHING_TYPE_ANY
constant mapcontrol     MAP_CONTROL_USER
constant placement      MAP_PLACEMENT_RANDOM
constant startlocprio   MAP_LOC_PRIO_LOW
constant mapdensity     MAP_DENSITY_NONE
constant gamedifficulty MAP_DIFFICULTY_EASY
constant gamespeed      MAP_SPEED_SLOWEST
constant playerslotstate PLAYER_SLOT_STATE_EMPTY
constant volumegroup    SOUND_VOLUMEGROUP_UNITMOVEMENT
constant igamestate     GAME_STATE_DIVINE_INTERVENTION
constant playerstate    PLAYER_STATE_GAME_RESULT
constant unitstate      UNIT_STATE_LIFE
constant aidifficulty   AI_DIFFICULTY_NEWBIE
constant playerscore    PLAYER_SCORE_UNITS_TRAINED
constant gameevent      EVENT_GAME_VICTORY
constant limitop        LESS_THAN
constant unittype       UNIT_TYPE_HERO
constant itemtype       ITEM_TYPE_PERMANENT
constant camerafield    CAMERA_FIELD_TARGET_DISTANCE
constant blendmode      BLEND_MODE_NONE
constant blendmode      BLEND_MODE_DONT_CARE
constant raritycontrol  RARITY_FREQUENT
constant texmapflags    TEXMAP_FLAG_NONE
constant effecttype     EFFECT_TYPE_EFFECT
constant soundtype      SOUND_TYPE_EFFECT
 
Last edited:
Top