Class: Lich::Gemstone::Bounty
- Inherits:
-
Object
- Object
- Lich::Gemstone::Bounty
- Defined in:
- documented/gemstone/bounty.rb,
documented/gemstone/bounty/task.rb,
documented/gemstone/bounty/parser.rb
Overview
Represents a bounty in the Lich Gemstone module. This class is responsible for parsing bounty descriptions.
Defined Under Namespace
Constant Summary collapse
- KNOWN_TASKS =
A list of known task matchers for bounties.
Parser::TASK_MATCHERS.keys
Class Method Summary collapse
-
.current ⇒ Task
Retrieves the current bounty task.
-
.lnet(person) ⇒ Task?
Retrieves bounty information for a specified person from LNet.
-
.task ⇒ Task
Alias for the current bounty task.
Class Method Details
.current ⇒ Task
Retrieves the current bounty task.
18 19 20 |
# File 'documented/gemstone/bounty.rb', line 18 def self.current Task.new(Parser.parse(checkbounty)) end |
.lnet(person) ⇒ Task?
Retrieves bounty information for a specified person from LNet.
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'documented/gemstone/bounty.rb', line 36 def self.lnet(person) if (target_info = LNet.get_data(person.dup, 'bounty')) Task.new(Parser.parse(target_info)) else if target_info == false text = "No one on LNet with a name like #{person}" else text = "Empty response from LNet for bounty from #{person}\n" end Lich::Messaging.msg("warn", text) nil end end |
.task ⇒ Task
Alias for the current bounty task.
26 27 28 |
# File 'documented/gemstone/bounty.rb', line 26 def self.task current end |