Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

[Feature Request] Party dialog #1155

Open canerksk opened 1 year ago

canerksk commented 1 year ago

Might be better for customized party menus. For example, sending mass party invitations to people around you within this customized party menu.

eg;

    case PARTYMSG_Add:

        if (IsValidResourceDef("d_party"))
        {
            client->Dialog_Setup(CLIMODE_DIALOG, g_Cfg.ResourceGetIDType(RES_DIALOG, "d_party"), 0, character);
        }
        else
        {
            client->addTarget(CLIMODE_TARG_PARTY_ADD, g_Cfg.GetDefaultMsg(DEFMSG_PARTY_TARG_WHO), false, false);
        }
        break;

    case PARTYMSG_Disband:
        if (character->m_pParty == nullptr)
            return false;

        if (IsValidResourceDef("d_party"))
        {
            client->Dialog_Setup(CLIMODE_DIALOG, g_Cfg.ResourceGetIDType(RES_DIALOG, "d_party"), 0, character);
        }
        else
        {
            character->m_pParty->Disband(character->GetUID());
        }
        break;

The codes here are purely examples. Although many have been tested, some may need to be rewritten.