Module: Lich::Resources

Defined in:
documented/attributes/resources.rb

Overview

Provides methods to access various resource information.

Examples:

Accessing resource information

resources = Lich::Resources.weekly

Class Method Summary collapse

Class Method Details

.check(quiet = false) ⇒ Array<Object>

Checks the current resource status.

Examples:

resources_status = Lich::Resources.check(true)

Parameters:

  • quiet (Boolean) (defaults to: false)

    If true, suppresses output.

Returns:

  • (Array<Object>)

    An array containing weekly, total, and suffused resource data.



67
68
69
70
# File 'documented/attributes/resources.rb', line 67

def self.check(quiet = false)
  Lich::Util.issue_command('resource', /^Health: \d+\/(?:<pushBold\/>)?\d+(?:<popBold\/>)?\s+Mana: \d+\/(?:<pushBold\/>)?\d+(?:<popBold\/>)?\s+Stamina: \d+\/(?:<pushBold\/>)?\d+(?:<popBold\/>)?\s+Spirit: \d+\/(?:<pushBold\/>)?\d+/, /<prompt/, silent: true, quiet: quiet)
  return [self.weekly, self.total, self.suffused]
end

.covert_arts_chargesObject

Retrieves the covert arts charges resource information.

Examples:

covert_arts_data = Lich::Resources.covert_arts_charges

Returns:

  • (Object)

    The covert arts charges data.



50
51
52
# File 'documented/attributes/resources.rb', line 50

def self.covert_arts_charges
  Lich::Gemstone::Infomon.get('resources.covert_arts_charges')
end

.shadow_essenceObject

Retrieves the shadow essence resource information.

Examples:

shadow_essence_data = Lich::Resources.shadow_essence

Returns:

  • (Object)

    The shadow essence data.



58
59
60
# File 'documented/attributes/resources.rb', line 58

def self.shadow_essence
  Lich::Gemstone::Infomon.get('resources.shadow_essence')
end

.suffusedObject

Retrieves the suffused resource information.

Examples:

suffused_data = Lich::Resources.suffused

Returns:

  • (Object)

    The suffused resource data.



26
27
28
# File 'documented/attributes/resources.rb', line 26

def self.suffused
  Lich::Gemstone::Infomon.get('resources.suffused')
end

.totalObject

Retrieves the total resource information.

Examples:

total_data = Lich::Resources.total

Returns:

  • (Object)

    The total resource data.



18
19
20
# File 'documented/attributes/resources.rb', line 18

def self.total
  Lich::Gemstone::Infomon.get('resources.total')
end

.typeObject

Retrieves the type of resources.

Examples:

type_data = Lich::Resources.type

Returns:

  • (Object)

    The resource type data.



34
35
36
# File 'documented/attributes/resources.rb', line 34

def self.type
  Lich::Gemstone::Infomon.get('resources.type')
end

.voln_favorObject

Retrieves the Voln favor resource information.

Examples:

voln_favor_data = Lich::Resources.voln_favor

Returns:

  • (Object)

    The Voln favor resource data.



42
43
44
# File 'documented/attributes/resources.rb', line 42

def self.voln_favor
  Lich::Gemstone::Infomon.get('resources.voln_favor')
end

.weeklyObject

Retrieves the weekly resource information.

Examples:

weekly_data = Lich::Resources.weekly

Returns:

  • (Object)

    The weekly resource data.



10
11
12
# File 'documented/attributes/resources.rb', line 10

def self.weekly
  Lich::Gemstone::Infomon.get('resources.weekly')
end