GetMetaMagicFeat

GetMetaMagicFeat returns the metamagic types of the last spell cast by the caller.

int GetMetaMagicFeat;

Description
Returns an integer value that is the OR-ed combination of one or more of the METAMAGIC_* constants, describing which Metamagic feats were used by the caster. Although a spellcaster cannot normally apply more than one metamagic at a time to a spell, at epic levels a caster may select the Auto-silent/still/quicken feats.

Remarks
When testing the return value against the constants one should use the bitwise and operator and not test for equality.

int mm = GetMetaMagicFeat; if(mm & METAMAGIC_STILL) { // Code for Still Spell } if(mm & METAMAGIC_QUICKEN) { // Additional code for Quicken Spell }

Testing the return value for equality with one of the constants will result in errors when the epic metamagic feats enable the caster to combine multiple metamagic feats.

int mm = GetMetaMagicFeat; if(mm == METAMAGIC_STILL) { // Code for Still Spell fails when feats are combined }