mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
restore inventory and healthbar
* make inventory/healthbar work again allowing reload * changes in top menu toggle buttons * all modules are now reloadable by default * fix warning when using fade in * remove some unused files
This commit is contained in:
@@ -108,7 +108,7 @@ void Module::discover(const OTMLNodePtr& moduleNode)
|
||||
m_website = moduleNode->valueAt("website", none);
|
||||
m_version = moduleNode->valueAt("version", none);
|
||||
m_autoLoad = moduleNode->valueAt<bool>("autoload", false);
|
||||
m_reloadable = moduleNode->valueAt<bool>("reloadable", false);
|
||||
m_reloadable = moduleNode->valueAt<bool>("reloadable", true);
|
||||
m_autoLoadPriority = moduleNode->valueAt<int>("autoload-priority", 9999);
|
||||
|
||||
if(OTMLNodePtr node = moduleNode->get("dependencies")) {
|
||||
|
@@ -25,7 +25,9 @@
|
||||
|
||||
#include "declarations.h"
|
||||
|
||||
class Container
|
||||
#include <framework/luascript/luaobject.h>
|
||||
|
||||
class Container : public LuaObject
|
||||
{
|
||||
public:
|
||||
Container();
|
||||
|
@@ -31,10 +31,6 @@ public:
|
||||
Player() { }
|
||||
virtual ~Player() { }
|
||||
|
||||
bool isPartyMember() { return (m_shield != 0); }
|
||||
bool isPartyLeader() { return (m_shield & Otc::ShieldYellow); }
|
||||
bool isPartySharedExperienceActive() { return false; }
|
||||
|
||||
PlayerPtr asPlayer() { return std::static_pointer_cast<Player>(shared_from_this()); }
|
||||
};
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <otclient/luascript/luavaluecasts.h>
|
||||
#include <otclient/core/game.h>
|
||||
#include <otclient/core/tile.h>
|
||||
#include <otclient/core/container.h>
|
||||
#include <otclient/core/item.h>
|
||||
#include <otclient/core/effect.h>
|
||||
#include <otclient/core/missile.h>
|
||||
@@ -161,6 +162,8 @@ void OTClient::registerLuaFunctions()
|
||||
|
||||
g_lua.registerClass<ProtocolGame, Protocol>();
|
||||
|
||||
g_lua.registerClass<Container>();
|
||||
|
||||
g_lua.registerClass<Thing>();
|
||||
g_lua.bindClassMemberFunction<Thing>("setId", &Thing::setId);
|
||||
g_lua.bindClassMemberFunction<Thing>("setPosition", &Thing::setPosition);
|
||||
@@ -192,6 +195,7 @@ void OTClient::registerLuaFunctions()
|
||||
g_lua.bindClassMemberFunction<Thing>("isHookSouth", &Thing::isHookSouth);
|
||||
g_lua.bindClassMemberFunction<Thing>("isTranslucent", &Thing::isTranslucent);
|
||||
g_lua.bindClassMemberFunction<Thing>("isFullGround", &Thing::isFullGround);
|
||||
g_lua.bindClassMemberFunction<Thing>("getParentContainer", &Thing::getParentContainer);
|
||||
|
||||
g_lua.registerClass<Creature, Thing>();
|
||||
g_lua.bindClassMemberFunction<Creature>("getId", &Creature::getId);
|
||||
@@ -221,9 +225,6 @@ void OTClient::registerLuaFunctions()
|
||||
g_lua.registerClass<AnimatedText, Thing>();
|
||||
|
||||
g_lua.registerClass<Player, Creature>();
|
||||
g_lua.bindClassMemberFunction<Player>("isPartyMember", &LocalPlayer::isPartyMember);
|
||||
g_lua.bindClassMemberFunction<Player>("isPartyLeader", &LocalPlayer::isPartyLeader);
|
||||
g_lua.bindClassMemberFunction<Player>("isPartySharedExperienceActive", &LocalPlayer::isPartySharedExperienceActive);
|
||||
g_lua.registerClass<Npc, Creature>();
|
||||
g_lua.registerClass<Monster, Creature>();
|
||||
|
||||
|
Reference in New Issue
Block a user