merge pull request #2 from AndreFaramir/otclient
This commit is contained in:
parent
e6cb3de637
commit
a21b4dc4f1
|
@ -50,8 +50,18 @@ public:
|
|||
|
||||
LocalPlayerPtr asLocalPlayer() { return std::static_pointer_cast<LocalPlayer>(shared_from_this()); }
|
||||
|
||||
double getHealth() { return getStatistic(Otc::Health); }
|
||||
double getMaxHealth() { return getStatistic(Otc::MaxHealth); }
|
||||
double getFreeCapacity() { return getStatistic(Otc::FreeCapacity); }
|
||||
double getExperience() { return getStatistic(Otc::Experience); }
|
||||
double getLevel() { return getStatistic(Otc::Level); }
|
||||
//TODO: more gets
|
||||
double getLevelPercent() { return getStatistic(Otc::LevelPercent); }
|
||||
double getMana() { return getStatistic(Otc::Mana); }
|
||||
double getMaxMana() { return getStatistic(Otc::MaxMana); }
|
||||
double getMagicLevel() { return getStatistic(Otc::MagicLevel); }
|
||||
double getMagicLevelPercent() { return getStatistic(Otc::MagicLevelPercent); }
|
||||
double getSoul() { return getStatistic(Otc::Soul); }
|
||||
double getStamina() { return getStatistic(Otc::Stamina); }
|
||||
|
||||
private:
|
||||
bool m_canReportBugs;
|
||||
|
|
|
@ -145,7 +145,18 @@ void OTClient::registerLuaFunctions()
|
|||
g_lua.registerClass<LocalPlayer, Player>();
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getAttackingCreature", &LocalPlayer::getAttackingCreature);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getFollowingCreature", &LocalPlayer::getFollowingCreature);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getHealth", &LocalPlayer::getHealth);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getMaxHealth", &LocalPlayer::getMaxHealth);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getFreeCapacity", &LocalPlayer::getFreeCapacity);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getExperience", &LocalPlayer::getExperience);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getLevel", &LocalPlayer::getLevel);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getLevelPercent", &LocalPlayer::getLevelPercent);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getMana", &LocalPlayer::getMana);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getMaxMana", &LocalPlayer::getMaxMana);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getMagicLevel", &LocalPlayer::getMagicLevel);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getMagicLevelPercent", &LocalPlayer::getMagicLevelPercent);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getSoul", &LocalPlayer::getSoul);
|
||||
g_lua.bindClassMemberFunction<LocalPlayer>("getStamina", &LocalPlayer::getStamina);
|
||||
|
||||
g_lua.registerClass<Tile>();
|
||||
g_lua.bindClassMemberFunction<Tile>("clean", &Tile::clean);
|
||||
|
|
Loading…
Reference in New Issue