• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[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