LandSandBoat / server

:sailboat: LandSandBoat - a server emulator for Final Fantasy XI
https://landsandboat.github.io/server/
GNU General Public License v3.0
294 stars 591 forks source link

Trusts summonable in BSNMs/KSNMs #988

Open Skerxan opened 2 years ago

Skerxan commented 2 years ago

Additional Information (Steps to reproduce/Expected behavior) :

Trusts shouldnt be summonable in BSNMs and KSNMs. Not only are they summonable but they can also bypass the allowed member cap in battlefields where only 3 are allowed.

https://www.bg-wiki.com/ffxi/Category:Trust#Available_Battle_Content

TeoTwawki commented 2 years ago

This is supposed to be dependent on the battlefiled, and we'll need to use a battlefield flag aka "rule" for it. https://github.com/LandSandBoat/server/blob/base/src/map/battlefield.h#L34 Additionally KI checks: Maat fight allows trusts only with a KI from RoV

zach2good commented 2 years ago

We don't handle most cases, but we do handle the Maat LB fights (dependant on ROV KI's): https://github.com/LandSandBoat/server/blob/base/scripts/globals/trust.lua#L30-L53

    -- Some battlefields allow trusts after you get this ROV Key Item
    local casterBattlefieldID = caster:getBattlefieldID()
    if rovKIBattlefieldIDs[casterBattlefieldID] and not caster:hasKeyItem(xi.ki.RHAPSODY_IN_UMBER) then
        return xi.msg.basic.TRUST_NO_CAST_TRUST
    end
TeoTwawki commented 2 years ago

@zach2good I think some others involve a KI check,no sure. but we def need to be able to set this case by case. It'll be a nice customization point for people too: toggle a value instead of messing with source creating a bug and telling us about said bug.