Project

General

Profile

EQ2 onRaidMembershipChange (Event)

Description

The EQ2_onRaidMembershipChange event will fire when the membership of your raid changes.

Arguments

  1. int PreviousRaidCount
  2. int NewRaidCount

Context

This event provides a context (${Context}) object which will be an index:string of the raid membership prior to the update.   (See example below for how the context object can be used in an event atom.)

Usage Example

atom EQ2_onRaidMembershipChange(int PreviousRaidCount, int NewRaidCount)
{
    variable int PrevRaidIterator = 1
    variable int NewRaidIterator = 1
    echo "** EQ2_onRaidMembershipChange(${PreviousRaidCount}, ${NewRaidCount}) **"
    
    if (${PreviousRaidCount} > 0)
    {
        echo "- Old Raid Membership:"
        do
        {
            echo "-- ${PrevRaidIterator}. ${Context[${Prev
RaidIterator}]}"
        }
        while (${Prev
RaidIterator:Inc} < ${Context.Used})
    }
    
    if (${New
RaidCount} > 0)
    {
        echo "- New
Raid Membership:"
        do
        {
            echo "-- ${New
RaidIterator}. ${Me.Raid[${NewRaidIterator}]}"
        }
        while (${New
RaidIterator:Inc} < ${Me.RaidCount})
    }
}

function main()
{
    Event[EQ2_on
RaidMembershipChange]:AttachAtom[EQ2_onRaidMembershipChange]
    
    do
    {
        waitframe
    }
    while (${ISXEQ2(exists)})
}