LandSandBoat / server

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

πŸ› instance menu should be able to populate more than 1 choice #2818

Open KnowOne134 opened 2 years ago

KnowOne134 commented 2 years ago

OS / platform the server is running (if known)

windows 10

Branch affected by issue

base

Steps to reproduce

if you have an active toau mission say Shades of Vengeance and an assault: Seagul Grounded. then when you click the gate the menu should populate with both items to choose from. Currently not something that can be done because the mask is hardcoded into the lookup and should be able to manipulate. LSB:

{ 5600, { 143, 79, -6, 0, 99, 3, 0 }, { 143, 4 }, { 147, 3 } }, -- Shades of Vengeance (TOAU31)
{ 5601, { 143, 31, -4, 0, 70, 0, 1 }, { 143, 4 }, { 147, 0 } }, -- Assault: Seagull Grounded

the 3rd param is what updates menu

in Eden it works like this for that

    if player:hasKeyItem(xi.ki.PERIQIA_ASSAULT_ORDERS) and player:getVar("assaultEntered") == 0 then
        mask = mask - 2
        assault = player:getCurrentAssault()
        level = assaultUtil.missionInfo[assault].suggestedLevel
    end

    if player:getCurrentMission(TOAU) == SHADES_OF_VENGEANCE and player:hasKeyItem(xi.ki.PERIQIA_ASSAULT_AREA_ENTRY_PERMIT) then
        mask = mask - 4
    end

    if mask < 0 then
        player:startEvent(143, {[0] = assault, [1] = mask - 0x02, [3] = level, [4] = destination, [5] = armband})
    end

as you can see here the mask updates as it checks requirements

claywar commented 1 year ago

Looks like this bitfield is unavailable for true values, and available for false. On my list to take a look