43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
//
|
|
// Created by marob on 12/27/2023.
|
|
//
|
|
|
|
#ifndef ABILITY_H
|
|
#define ABILITY_H
|
|
|
|
#include "AbilityInfo.h"
|
|
#include "ISXMr.h"
|
|
#include "LSObject.h"
|
|
|
|
|
|
class Ability {
|
|
public:
|
|
explicit Ability(const shared_ptr<LSObject> &obj) : lsObject(obj) {}
|
|
|
|
u_long Id() const;
|
|
bool IsReady() const;
|
|
float TimeUntilReady() const;
|
|
bool IsQueued() const;
|
|
|
|
// ABility Details
|
|
bool IsAbilityInfoAvailable() const;
|
|
|
|
/// \brief If the ability "details" are not already stored in a cache, then this will return NULL until it is available.
|
|
/// Script writers are encouraged to utilize the logic shown in the sample included with the Knowledgebase article
|
|
/// "Iterating Abilities and Handling 'abilityinfo' Aquisition". http://forge.isxgames.com/projects/isxeq2/knowledgebase/articles/43
|
|
///
|
|
/// Due to how ISXEQ2 handles the acquisition of abilityinfo, script writers should check IsAbilityInfoAvailable
|
|
/// until it's TRUE before using ToAbilityInfo (as opposed to checking ToAbilityInfo until it's not NULL.) This methodology will avoid spamming the server with requests.
|
|
AbilityInfo GetAbilityInfo() const;
|
|
|
|
// Methods
|
|
void Use() const;
|
|
void Examine() const;
|
|
private:
|
|
const shared_ptr<LSObject> lsObject;
|
|
};
|
|
|
|
|
|
|
|
#endif //ABILITY_H
|