Sphereserver / Source-X

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

[Feature Request] New trigger: @Reveal #1157

Closed canerksk closed 3 months ago

canerksk commented 1 year ago

This trigger can be triggered when the character is revealed in any way. We can only control StepStealth if it is revealed while walking, but for example, it does not have a trigger triggered by someone whose invisibility is broken by a timed out hiding/stealth or wis quas/detecting hide.

eg;

bool CChar::Reveal(uint64 iFlags)

under


    m_StepStealth = 0;

    if (IsTrigUsed(TRIGGER_REVEAL))
    {
        if (OnTrigger(CTRIG_Reveal, this, nullptr) == TRIGRET_RET_TRUE)
            return false;
    }

    UpdateMode(nullptr, true);
    SysMessageDefault(DEFMSG_HIDING_REVEALED);
    return true;

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