• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling RewardBoss TFS 1.3

Kuantikum

Member
Joined
Jul 3, 2015
Messages
219
Solutions
1
Reaction score
20
HELLO!!! :p :p

I basically open all the files from the sources of ot "New OT Project: OTServBR - Global (10x outdated with sprites 12.15" and searched for the word reward and added the modifications to the sources of my project 🤪🤪🤪


Iologindata.ccp

Rewardchest.ccp

Code:
/**
* @file rewardchest.cpp
*
* 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.
*/

#include "otpch.h"

#include "rewardchest.h"

RewardChest::RewardChest(uint16_t type) :
    Container(type)
{
    maxSize = 32;
    unlocked = false;
    pagination = true;
}

ReturnValue RewardChest::queryAdd(int32_t, const Thing&, uint32_t,
    uint32_t, Creature* actor/* = nullptr*/) const
{
    if (actor) {
        return RETURNVALUE_NOTPOSSIBLE;
    }
     
    return RETURNVALUE_NOERROR;
}

void RewardChest::postAddNotification(Thing* thing, const Cylinder* oldParent, int32_t index, cylinderlink_t)
{
    if (parent != nullptr) {
        parent->postAddNotification(thing, oldParent, index, LINK_PARENT);
    }
}

void RewardChest::postRemoveNotification(Thing* thing, const Cylinder* newParent, int32_t index, cylinderlink_t)
{
    if (parent != nullptr) {
        parent->postRemoveNotification(thing, newParent, index, LINK_PARENT);
    }
}

Reward.ccp

C++:
/**
* @file reward.cpp
*
* 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.
*/

#include "otpch.h"

#include <iostream>
#include "reward.h"


Reward::Reward() :
    Container(ITEM_REWARD_CONTAINER)
{
    maxSize = 32;
    unlocked = false;
    pagination = true;
}

ReturnValue Reward::queryAdd(int32_t, const Thing& thing, uint32_t,
    uint32_t, Creature* actor/* = nullptr*/) const
{
    if (actor) {
        return RETURNVALUE_NOTPOSSIBLE;
    }

    const Item* item = thing.getItem();
    if (!item) {
        return RETURNVALUE_NOTPOSSIBLE;
    }
 
    if (item == this) {
        return RETURNVALUE_THISISIMPOSSIBLE;
    }
 
    if (!item->isPickupable()) {
        return RETURNVALUE_CANNOTPICKUP;
    }

    return RETURNVALUE_NOERROR;
}

void Reward::postAddNotification(Thing* thing, const Cylinder* oldParent, int32_t index, cylinderlink_t)
{
    Cylinder* localParent = getParent();
    if (localParent != nullptr) {
        localParent->postAddNotification(thing, oldParent, index, LINK_PARENT);
    }
}

void Reward::postRemoveNotification(Thing* thing, const Cylinder* newParent, int32_t index, cylinderlink_t)
{
    Cylinder* localParent = getParent();
    if (localParent != nullptr) {
        localParent->postRemoveNotification(thing, newParent, index, LINK_PARENT);
    }
}

Cylinder* Reward::getParent() const
{
    if (parent) {
        return parent->getParent();
    }
    return nullptr;
}

Erros:

C++:
Severity    Code    Description    Project    File    Line    Suppression State
Error (active)    E0265    member "Container::maxSize" (declared at line 173 of "SERVER\Server\src\container.h") is inaccessible    SERVER    SERVER\Server\src\reward.cpp    31
Error (active)    E0265    member "Container::unlocked" (declared at line 177 of "SERVER\Server\src\container.h") is inaccessible    SERVER    SERVER\Server\src\reward.cpp    32
Error (active)    E0265    member "Container::pagination" (declared at line 178 of "SERVER\Server\src\container.h") is inaccessible    SERVER    SERVER\Server\src\reward.cpp    33
Error    C2248    'Container::maxSize': cannot access private member declared in class 'Container'    SERVER    SERVER\server\src\reward.cpp    31
Error    C2248    'Container::unlocked': cannot access private member declared in class 'Container'    SERVER    SERVER\server\src\reward.cpp    32
Error    C2248    'Container::pagination': cannot access private member declared in class 'Container'    SERVER    SERVER\server\src\reward.cpp    33
Error    C2248    'Container::maxSize': cannot access private member declared in class 'Container'    SERVER    SERVER\server\src\rewardchest.cpp    29
Error    C2248    'Container::unlocked': cannot access private member declared in class 'Container'    SERVER    SERVER\server\src\rewardchest.cpp    30
Error    C2248    'Container::pagination': cannot access private member declared in class 'Container'    SERVER    SERVER\server\src\rewardchest.cpp    31
Error    C2039    'adaptors': is not a member of 'boost'    SERVER    SERVER\server\src\iologindata.cpp    531
Error    C3083    'adaptors': the symbol to the left of a '::' must be a type    SERVER    SERVER\server\src\iologindata.cpp    531
Error    C2039    'reverse': is not a member of 'boost'    SERVER    SERVER\server\src\iologindata.cpp    531
Error    C2672    'reverse': no matching overloaded function found    SERVER    SERVER\server\src\iologindata.cpp    531
Error    C2780    'void std::reverse(const _BidIt,const _BidIt)': expects 2 arguments - 1 provided    SERVER    SERVER\server\src\iologindata.cpp    531
Error    C2065    'it': undeclared identifier    SERVER    SERVER\server\src\iologindata.cpp    532
Error    C2530    'pair': references must be initialized    SERVER    SERVER\server\src\iologindata.cpp    532
Error    C2043    illegal break    SERVER    SERVER\server\src\iologindata.cpp    537
Error    C2044    illegal continue    SERVER    SERVER\server\src\iologindata.cpp    542
 
Last edited:

Similar threads

Back
Top