• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Check in Monster Spells

Aspect

New Member
Joined
Dec 27, 2022
Messages
1
Reaction score
0
How do I do this in TFS 1.5?
C++:
SpellList::const_iterator it = mType->spellAttackList.begin();
for(uint32_t i = 1; it != mType->spellAttackList.end(); ++it, ++i)
I know how the functions are called, but I didn't understand how it would work to do it this way in 1.5 since SpellList and spellAttackList are called in another way:
C++:
monsterType->info.attackSpells
std::vector<spellBlock_t> attackSpells;
What I'm trying to do is check if the monster's attacks have a "variable" called "key", in 0.3.6 I can do it this way:
C++:
std::string moveName = "";
    SpellList::const_iterator it = mType->spellAttackList.begin();
    for(uint32_t i = 1; it != mType->spellAttackList.end(); ++it, ++i)
    {
        if(it->key != key)
        {
            continue;
        }
        moveName = it->isName;
        break;
    }
But I would like to know how it works to do in 1.5?
 
Back
Top