Module: Lich::Resources

Defined in:
documented/attributes/resources.rb

Class Method Summary collapse

Class Method Details

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

Checks the current resources and returns the weekly, total, and suffused resources.

Parameters:

  • quiet (Boolean) (defaults to: false)

    whether to suppress output.

Returns:

  • (Array<String>)

    an array containing the weekly, total, and suffused resources.



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

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_chargesString

Retrieves the covert arts charges resources.

Returns:

  • (String)

    the covert arts charges data.



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

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

.shadow_essenceString

Retrieves the shadow essence resources.

Returns:

  • (String)

    the shadow essence resources data.



48
49
50
# File 'documented/attributes/resources.rb', line 48

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

.suffusedString

Retrieves the suffused resources.

Returns:

  • (String)

    the suffused resources data.



20
21
22
# File 'documented/attributes/resources.rb', line 20

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

.totalString

Retrieves the total resources.

Returns:

  • (String)

    the total resources data.



13
14
15
# File 'documented/attributes/resources.rb', line 13

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

.typeString

Retrieves the type of resources.

Returns:

  • (String)

    the type of resources data.



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

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

.voln_favorString

Retrieves the Voln favor resources.

Returns:

  • (String)

    the Voln favor resources data.



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

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

.weeklyString

Retrieves the weekly resources.

Returns:

  • (String)

    the weekly resources data.



6
7
8
# File 'documented/attributes/resources.rb', line 6

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