// Gets the memorized spell of the provided creature for the provided class, level, and index.
        // Index bounds: 0 <= index < GetMemorizedSpellCountByLevel(creature, class, level).
        public MemorizedSpellSlot GetMemorizedSpell(NWCreature creature, int classId, int level, int index)
        {
            string             sFunc = "GetMemorisedSpell";
            MemorizedSpellSlot spell = new MemorizedSpellSlot();

            NWNX_PushArgumentInt(NWNX_Creature, sFunc, index);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, level);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, classId);
            NWNX_PushArgumentObject(NWNX_Creature, sFunc, creature.Object);

            NWNX_CallFunction(NWNX_Creature, sFunc);

            spell.Domain = NWNX_GetReturnValueInt(NWNX_Creature, sFunc);
            spell.Meta   = NWNX_GetReturnValueInt(NWNX_Creature, sFunc);
            spell.Ready  = NWNX_GetReturnValueInt(NWNX_Creature, sFunc);
            spell.ID     = NWNX_GetReturnValueInt(NWNX_Creature, sFunc);
            return(spell);
        }
        // Sets the memorized spell of the provided creature for the provided class, level, and index.
        // Index bounds: 0 <= index < GetMemorizedSpellCountByLevel(creature, class, level).
        public void SetMemorizedSpell(NWCreature creature, int classId, int level, int index, MemorizedSpellSlot spell)
        {
            string sFunc = "SetMemorisedSpell";

            NWNX_PushArgumentInt(NWNX_Creature, sFunc, spell.ID);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, spell.Ready);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, spell.Meta);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, spell.Domain);

            NWNX_PushArgumentInt(NWNX_Creature, sFunc, index);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, level);
            NWNX_PushArgumentInt(NWNX_Creature, sFunc, classId);
            NWNX_PushArgumentObject(NWNX_Creature, sFunc, creature.Object);

            NWNX_CallFunction(NWNX_Creature, sFunc);
        }