WorldType

Methods
10
Fields
17

Getting one

WorldType.valueOf(…)
WorldType.MEMBERS
WorldType.PVP

Methods

MethodReturnsDescription
name()stringThe constant's name as declared.
ordinal()numberThe constant's 0-based position in values().
toString()stringname(); tostring(c) answers the same.
compareTo(WorldType)numberThis ordinal less other's.
equals(any)booleanWhether other is this constant. == answers the same.
values(){WorldType}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.
valueOf(string)WorldTypevalueOf(name): the constant named name; any other name is an error.
fromMask(number){[WorldType]: boolean}Every type whose flag bit mask sets, as a set: {[WorldType.PVP] = true}.
toMask({[WorldType]: boolean})numberThe flag bits of every type in types, a set ({[WorldType.PVP] = true}) or an array.
isPvpWorld({[WorldType]: boolean})booleanWhether any of worldTypes (a set or an array) is PVP or DEADMAN.

Fields

FieldTypeDescription
MEMBERSWorldTypeMEMBERS: ordinal 0.
PVPWorldTypePVP: ordinal 1.
BOUNTYWorldTypeBOUNTY: ordinal 2.
PVP_ARENAWorldTypePVP_ARENA: ordinal 3.
SKILL_TOTALWorldTypeSKILL_TOTAL: ordinal 4.
QUEST_SPEEDRUNNINGWorldTypeQUEST_SPEEDRUNNING: ordinal 5.
HIGH_RISKWorldTypeHIGH_RISK: ordinal 6.
HARDCORE_MAINWorldTypeHARDCORE_MAIN: ordinal 7.
LAST_MAN_STANDINGWorldTypeLAST_MAN_STANDING: ordinal 8.
BETA_WORLDWorldTypeBETA_WORLD: ordinal 9.
LEGACY_ONLYWorldTypeLEGACY_ONLY: ordinal 10.
EOC_ONLYWorldTypeEOC_ONLY: ordinal 11.
NOSAVE_MODEWorldTypeNOSAVE_MODE: ordinal 12.
TOURNAMENT_WORLDWorldTypeTOURNAMENT_WORLD: ordinal 13.
FRESH_START_WORLDWorldTypeFRESH_START_WORLD: ordinal 14.
DEADMANWorldTypeDEADMAN: ordinal 15.
SEASONALWorldTypeSEASONAL: ordinal 16.

Returned by

MethodReturnsDescription
Client.getWorldType{[WorldType]: boolean}The current world's types, as a set (WorldType.fromMask of its flags).
World.getTypes{[WorldType]: boolean}Its types.
WorldTypeClass.fromMask{[WorldType]: boolean}Every type whose flag bit mask sets, as a set: {[WorldType.PVP] = true}.
WorldTypeClass.valueOfWorldTypevalueOf(name): the constant named name; any other name is an error.
WorldTypeClass.values{WorldType}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.
WorldUtilClass.toWorldTypes{[WorldType]: boolean}The client's WorldTypes of the world list's ones (TOURNAMENT is the client's TOURNAMENT_WORLD).

Method details

ordinal

ordinal: (WorldType) -> number

The constant's 0-based position in values().

equals

equals: (WorldType, any) -> boolean

Whether other is this constant. == answers the same.

values

values: () -> {WorldType}

Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.

valueOf

valueOf: (string) -> WorldType

valueOf(name): the constant named name; any other name is an error.

fromMask

fromMask: (number) -> {[WorldType]: boolean}

Every type whose flag bit mask sets, as a set: {[WorldType.PVP] = true}.

toMask

toMask: ({[WorldType]: boolean}) -> number

The flag bits of every type in types, a set ({[WorldType.PVP] = true}) or an array.

isPvpWorld

isPvpWorld: ({[WorldType]: boolean}) -> boolean

Whether any of worldTypes (a set or an array) is PVP or DEADMAN.