• 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!

C++ Can I add quivers to tfs 1.4.2? and keep 10.98

gabrielsaintz

New Member
Joined
Jul 19, 2022
Messages
6
Reaction score
2
GitHub
gabrielsaintz
what's up guys! I want to add the quivers system to my server, I'm using tfs 1.4.2 and I want to keep it compatible with version 1098. I tried to base myself on a pull request, it worked but it changed my game version to 12.87, and I want it to continue 1098 .
 
yes, totally possible, apply these changes:


except for networkmessage.cpp/player.h changes
and also these lines should not be added:

weapons.cpp:
C++:
player->sendQuiverUpdate();

game.cpp:
C++:
    // update quiver
    if (actorPlayer) {
        actorPlayer->sendQuiverUpdate(g_config.getBoolean(ConfigManager::CLASSIC_EQUIPMENT_SLOTS));
    }

add:

Lua:
function ItemType:isBow()
    local ammoType = self:getAmmoType()
    return self:getWeaponType() == WEAPON_DISTANCE and (ammoType == AMMO_ARROW or ammoType == AMMO_BOLT)
end

to data/lib/core/itemtype.lua
 
Last edited by a moderator:
thank you very much!! @Evil Puncker
yes, totally possible, apply these changes:


except for networkmessage.cpp/player.h changes
and also these lines should not be added:

weapons.cpp:
C++:
player->sendQuiverUpdate();

game.cpp:
C++:
    // update quiver
    if (actorPlayer) {
        actorPlayer->sendQuiverUpdate(g_config.getBoolean(ConfigManager::CLASSIC_EQUIPMENT_SLOTS));
    }
 
for anyone wondering, just add:

Lua:
function ItemType:isBow()
    local ammoType = self:getAmmoType()
    return self:getWeaponType() == WEAPON_DISTANCE and (ammoType == AMMO_ARROW or ammoType == AMMO_BOLT)
end

to data/lib/core/itemtype.lua

Is it possible to apply these changes to TFS 1.4.2 (10.98) and add your item (in 10.98 there was no quiver yet).
 
Back
Top