Joriku
Working in the mines, need something?
Hi,
Getting some errors. Any Ideas?
Following this:
Luascript.h
Depotlocker.h
Update#1
Moving uint32_t maxSize; from Private to Public solves the issue with the maxSize.
container.h
Update#2
Removed
static int luaContainerGetContentDescription(lua_State* L);
In luascript.h
X2 existed because I putted an extra in, solved the issue.
Update#3
Removed the double there aswell, need to check the int code tho. It's diffrent, but that solved the issue but might cause something to bug with the reward container
Now onto this, why is this happening?
Getting some errors. Any Ideas?
Following this:
Feature - Reward Chest & Boss Reward [TFS 1.2]
Tested on TFS 1.2, 10.77/78 Based on http://www.tibia.com/news/?subtopic=newsarchive&id=2486 Features To-Do Changelog Comments Special thanks to Setup instructions Execute query at database CREATE TABLE IF NOT EXISTS `player_rewardchest` ( `id` int(11) NOT NULL AUTO_INCREMENT...
otland.net
Luascript.h
Lua:
// Container
static int luaContainerCreate(lua_State* L);
static int luaContainerGetContentDescription(lua_State* L);
static int luaContainerGetSize(lua_State* L);
static int luaContainerGetCapacity(lua_State* L);
static int luaContainerGetEmptySlots(lua_State* L);
static int luaContainerGetContentDescription(lua_State* L);
static int luaContainerGetItems(lua_State* L);
static int luaContainerGetItemHoldingCount(lua_State* L);
static int luaContainerGetItemCountById(lua_State* L);
static int luaContainerGetItem(lua_State* L);
static int luaContainerHasItem(lua_State* L);
static int luaContainerAddItem(lua_State* L);
static int luaContainerAddItemEx(lua_State* L);
static int luaContainerGetCorpseOwner(lua_State* L);
Depotlocker.h
Lua:
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FS_DEPOTLOCKER_H_53AD8E0606A34070B87F792611F4F3F8
#define FS_DEPOTLOCKER_H_53AD8E0606A34070B87F792611F4F3F8
#include "container.h"
#include "inbox.h"
class DepotLocker final : public Container
{
public:
explicit DepotLocker(uint16_t type);
DepotLocker* getDepotLocker() override {
return this;
}
const DepotLocker* getDepotLocker() const override {
return this;
}
void removeInbox(Inbox* inbox);
//serialization
Attr_ReadValue readAttr(AttrTypes_t attr, PropStream& propStream) override;
uint16_t getDepotId() const {
return depotId;
}
void setDepotId(uint16_t depotId) {
this->depotId = depotId;
}
void setMaxLockerItems(uint32_t maxitems) {
maxSize = maxitems;
}
//cylinder implementations
ReturnValue queryAdd(int32_t index, const Thing& thing, uint32_t count,
uint32_t flags, Creature* actor = nullptr) const override;
void postAddNotification(Thing* thing, const Cylinder* oldParent, int32_t index, cylinderlink_t link = LINK_OWNER) override;
void postRemoveNotification(Thing* thing, const Cylinder* newParent, int32_t index, cylinderlink_t link = LINK_OWNER) override;
bool canRemove() const override {
return false;
}
private:
uint16_t depotId;
};
#endif
Update#1
Moving uint32_t maxSize; from Private to Public solves the issue with the maxSize.
container.h
Update#2
Removed
static int luaContainerGetContentDescription(lua_State* L);
In luascript.h
X2 existed because I putted an extra in, solved the issue.
Update#3
Removed the double there aswell, need to check the int code tho. It's diffrent, but that solved the issue but might cause something to bug with the reward container
Now onto this, why is this happening?
Last edited: