Interface IPluginLootClassifier
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
A plugin-supplied set of loot rules that other plugins can ask for verdicts. Implement it to publish your own rule set; register it through Register(string, string, IPluginLootClassifier).
public interface IPluginLootClassifier
Methods
Classify(in PluginLootClassificationContext)
Judges one item against the classifier's current rules.
PluginLootClassification Classify(in PluginLootClassificationContext context)
Parameters
contextPluginLootClassificationContext
Returns
NeedsIdentification(in PluginLootClassificationContext)
True when the item cannot yet be classified with confidence because it lacks appraisal data and at least one active rule needs an appraised property to evaluate.
bool NeedsIdentification(in PluginLootClassificationContext context)
Parameters
contextPluginLootClassificationContext
Returns
OnItemRemoved(uint)
Tells the classifier that an item it was tracking is gone from the player's possession. Does nothing unless overridden.
void OnItemRemoved(uint objectId)
Parameters
objectIduint
OnLooted(in PluginLootedItem)
Tells the classifier that an item it judged was actually taken, so it can keep its own running counts. Does nothing unless overridden.
void OnLooted(in PluginLootedItem item)
Parameters
itemPluginLootedItem
TryClassifyWithProfile(string, in PluginLootClassificationContext, out PluginLootClassification)
Classifies context against a named, stored profile
rather than the classifier's live one -- a separate saved rule list,
such as one kept for vendor trips. Returns false when the named
profile does not exist, and for any classifier that has no notion of
named profiles.
bool TryClassifyWithProfile(string profileName, in PluginLootClassificationContext context, out PluginLootClassification classification)
Parameters
profileNamestringcontextPluginLootClassificationContextclassificationPluginLootClassification