mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-03 04:23:39 +00:00
120 lines
3.8 KiB
C++
120 lines
3.8 KiB
C++
// This Header is auto generated by BDSLiteLoader Toolchain
|
|
#pragma once
|
|
#define AUTO_GENERATED
|
|
#include "../Global.h"
|
|
#include "AttributeInstanceDelegate.hpp"
|
|
|
|
#define BEFORE_EXTRA
|
|
class BaseAttributeMap;
|
|
class Attribute;
|
|
|
|
#undef BEFORE_EXTRA
|
|
|
|
class AttributeInstance {
|
|
public:
|
|
|
|
BaseAttributeMap *mAttributeMap;
|
|
const Attribute *mAttribute;
|
|
std::vector<AttributeModifier> mModifierList;
|
|
std::vector<TemporalAttributeBuff> mTemporalBuffs;
|
|
std::vector<AttributeInstanceHandle> mListeners;
|
|
std::shared_ptr<AttributeInstanceDelegate> mDelegate;
|
|
union{
|
|
float mDefaultValues[3];
|
|
struct
|
|
{
|
|
float mDefaultMinValue;
|
|
float mDefaultMaxValue;
|
|
float mDefaultValue;
|
|
} __s1;
|
|
} _anon_0;
|
|
union{
|
|
float mCurrentValues[3];
|
|
struct
|
|
{
|
|
float mCurrentMinValue;
|
|
float mCurrentMaxValue;
|
|
float mCurrentValue;
|
|
} __s1;
|
|
} _anon_1;
|
|
|
|
#define AFTER_EXTRA
|
|
public:
|
|
inline float getMinValue()const{
|
|
// return dAccess<float>(this, 124);
|
|
return _anon_1.__s1.mCurrentMinValue;
|
|
};
|
|
inline float getMaxValue()const{
|
|
// return dAccess<float>(this, 128);
|
|
return _anon_1.__s1.mCurrentMaxValue;
|
|
};
|
|
inline float getCurrentValue()const{
|
|
// return dAccess<float>(this, 132);
|
|
return _anon_1.__s1.mCurrentValue;
|
|
};
|
|
//maybe error
|
|
inline void setCurrentValue(float value){
|
|
//dAccess<float, 33>((void*)this)= value;
|
|
this->_anon_1.__s1.mCurrentValue = value;
|
|
//AttributeInstance::resetToMaxValue Line11~Line28
|
|
// if (this + 3)
|
|
// {
|
|
// auto p_mDirtyAttributes = dAccess<std::vector<ScoreInfo> *>(this, 65);
|
|
// ScoreInfo* value = dAccess<ScoreInfo*>(p_mDirtyAttributes, 8);
|
|
|
|
// if ( dAccess<ScoreInfo*>(p_mDirtyAttributes, 16) == value )
|
|
// {
|
|
// //std::vector<ScoreInfo>::_Emplace_reallocate<ScoreInfo &>(p_mDirtyAttributes, value, &v5);
|
|
// p_mDirtyAttributes->emplace_back(value);
|
|
// }
|
|
// else
|
|
// {
|
|
// *v4 = v5;
|
|
// *(v3 + 8) += 16i64;
|
|
// }
|
|
// }
|
|
};
|
|
inline float getDefaultValue(int a)const{
|
|
// return dAccess<float>(this, 120);
|
|
return _anon_0.__s1.mDefaultValue;
|
|
};
|
|
|
|
#undef AFTER_EXTRA
|
|
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_ATTRIBUTEINSTANCE
|
|
public:
|
|
class AttributeInstance& operator=(class AttributeInstance const &) = delete;
|
|
AttributeInstance(class AttributeInstance const &) = delete;
|
|
AttributeInstance() = delete;
|
|
#endif
|
|
|
|
public:
|
|
/*0*/ virtual ~AttributeInstance();
|
|
/*1*/ virtual void tick();
|
|
#ifdef ENABLE_VIRTUAL_FAKESYMBOL_ATTRIBUTEINSTANCE
|
|
#endif
|
|
MCAPI void addBuff(class AttributeBuff const &);
|
|
MCAPI void addModifier(class std::shared_ptr<class AttributeModifier>);
|
|
MCAPI void addModifier(class AttributeModifier const &);
|
|
MCAPI std::vector<class AttributeModifier> getModifiers(int) const;
|
|
MCAPI std::vector<class AttributeModifier> getModifiers() const;
|
|
MCAPI bool hasModifier(class std::shared_ptr<class AttributeModifier>) const;
|
|
MCAPI bool hasModifier(class AttributeModifier const &) const;
|
|
MCAPI void removeModifier(class std::shared_ptr<class AttributeModifier>);
|
|
MCAPI void removeModifier(class AttributeModifier const &);
|
|
MCAPI void resetToDefaultValue();
|
|
MCAPI void resetToMaxValue();
|
|
MCAPI void resetToMinValue();
|
|
MCAPI void setDefaultValue(float, int);
|
|
MCAPI void setDelegate(class std::shared_ptr<class AttributeInstanceDelegate>);
|
|
MCAPI void setMaxValue(float);
|
|
MCAPI void setRange(float, float, float);
|
|
|
|
//private:
|
|
MCAPI float _calculateValue();
|
|
MCAPI float _calculateValue(class AttributeBuff const &);
|
|
MCAPI float _sanitizeValue(float);
|
|
MCAPI void _setDirty();
|
|
|
|
private:
|
|
|
|
}; |