Hello!
I need to disable the mounts for "X" outfits/looktypes
If the player is wearing/using "citizen outfit" he can't use/ride mounts.
Is that possible?
Thanks
You can read through this function in player.cpp and set the limitation there:
https://github.com/otland/forgottenserver/blob/master/src/player.cpp#L4173
const Outfit* playerOutfit = Outfits::getInstance()->getOutfitByLookType(getSex(), defaultOutfit.lookType);
if (!playerOutfit) {
sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
return false;
}
if ((playerOutfit->lookType == 128) || (playerOutfit->lookType == 136)) {
sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
return false;
}
For example,
Below this line:
Code:const Outfit* playerOutfit = Outfits::getInstance()->getOutfitByLookType(getSex(), defaultOutfit.lookType); if (!playerOutfit) { sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return false; }
Add:
Code:if ((playerOutfit->lookType == 128) || (playerOutfit->lookType == 136)) { sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return false; }
Let me know if you get any compiling errors.
Sorry to relive old threads, but is it possible for this to become a LUA function for TFS 1.2. If so, some code would be appreciated!