diff options
Diffstat (limited to 'pokemod/Dialog.cpp')
-rw-r--r-- | pokemod/Dialog.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/pokemod/Dialog.cpp b/pokemod/Dialog.cpp index d934d4ae..ca91e14b 100644 --- a/pokemod/Dialog.cpp +++ b/pokemod/Dialog.cpp @@ -144,7 +144,7 @@ bool PokeMod::Dialog::validate() const break; case 3: case 4: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; } break; @@ -156,7 +156,7 @@ bool PokeMod::Dialog::validate() const } else if (numArgs == 2) { - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = 2; } break; @@ -170,14 +170,14 @@ bool PokeMod::Dialog::validate() const break; case 2: case 3: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; } break; case ItemShop: if (numArgs == 1) { - if (!okU || (pokemod.getStoreByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getStoreIndex(tempU) == UINT_MAX)) invError = 1; } break; @@ -191,12 +191,12 @@ bool PokeMod::Dialog::validate() const invError = 1; break; case 2: - if (!okU || (pokemod.getItemByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getItemIndex(tempU) == UINT_MAX)) invError = 2; break; case 3: case 4: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -204,7 +204,7 @@ bool PokeMod::Dialog::validate() const case CoinList: if (numArgs == 1) { - if (!okU || (pokemod.getCoinListByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getCoinListIndex(tempU) == UINT_MAX)) invError = 1; } break; @@ -216,13 +216,13 @@ bool PokeMod::Dialog::validate() const invError = 1; break; case 2: - if (!okU || (pokemod.getMoveByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getMoveIndex(tempU) == UINT_MAX)) invError = 2; break; case 3: case 4: case 5: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -239,12 +239,12 @@ bool PokeMod::Dialog::validate() const invError = 2; break; case 3: - if (!okU || (pokemod.getMoveByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getMoveIndex(tempU) == UINT_MAX)) invError = 3; break; case 4: case 5: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -257,7 +257,7 @@ bool PokeMod::Dialog::validate() const invError = 1; break; case 2: - if (!okU || (pokemod.getSpeciesByID(tempU) ==UINT_MAX)) + if (!okU || (pokemod.getSpeciesIndex(tempU) ==UINT_MAX)) invError = 2; break; case 3: @@ -282,7 +282,7 @@ bool PokeMod::Dialog::validate() const break; case 6: case 7: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -297,12 +297,12 @@ bool PokeMod::Dialog::validate() const invError = 1; break; case 2: - if (!okU || (pokemod.getSpeciesByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getSpeciesIndex(tempU) == UINT_MAX)) invError = 2; break; case 3: case 4: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -310,7 +310,7 @@ bool PokeMod::Dialog::validate() const case ShowPokemon: if (numArgs == 1) { - if (!okU || (pokemod.getSpeciesByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getSpeciesIndex(tempU) == UINT_MAX)) invError = 1; } break; @@ -350,7 +350,7 @@ bool PokeMod::Dialog::validate() const break; case 3: case 4: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -364,15 +364,15 @@ bool PokeMod::Dialog::validate() const invError = 1; break; case 2: - if (!okU || (pokemod.getMapByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getMapIndex(tempU) == UINT_MAX)) invError = 2; else - map = &pokemod.getMap(pokemod.getMapByID(tempU)); + map = &pokemod.getMap(pokemod.getMapIndex(tempU)); break; case 3: if (map) { - if (!okU || (map->getEffectByID(tempU) == UINT_MAX)) + if (!okU || (map->getEffectIndex(tempU) == UINT_MAX)) invError = 3; } else if ((arg != "Player") && (arg != "-1")) @@ -384,7 +384,7 @@ bool PokeMod::Dialog::validate() const break; case 5: case 6: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -393,15 +393,15 @@ bool PokeMod::Dialog::validate() const switch (numArgs) { case 1: - if (!okU || (pokemod.getMapByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getMapIndex(tempU) == UINT_MAX)) invError = 1; else - map = &pokemod.getMap(pokemod.getMapByID(tempU)); + map = &pokemod.getMap(pokemod.getMapIndex(tempU)); break; case 2: if (map) { - if (!okU || (map->getEffectByID(tempU) == UINT_MAX)) + if (!okU || (map->getEffectIndex(tempU) == UINT_MAX)) invError = 2; } else if ((arg != "Player") && (arg != "-1")) @@ -441,7 +441,7 @@ bool PokeMod::Dialog::validate() const break; case 4: case 5: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -456,7 +456,7 @@ bool PokeMod::Dialog::validate() const case 2: case 3: case 4: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; } break; @@ -469,7 +469,7 @@ bool PokeMod::Dialog::validate() const break; case 2: case 3: - if (!okU || (pokemod.getSpeciesByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getSpeciesIndex(tempU) == UINT_MAX)) invError = numArgs; case 4: if (!okUL) @@ -477,7 +477,7 @@ bool PokeMod::Dialog::validate() const break; case 5: case 6: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = numArgs; break; } @@ -492,16 +492,16 @@ bool PokeMod::Dialog::validate() const case Battle: if (numArgs == 1) { - if (!okU || (pokemod.getMapByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getMapIndex(tempU) == UINT_MAX)) invError = 1; else - map = &pokemod.getMap(pokemod.getMapByID(tempU)); + map = &pokemod.getMap(pokemod.getMapIndex(tempU)); } else if (numArgs == 2) { if (map) { - if (!okU || (map->getTrainerByID(tempU) == UINT_MAX)) + if (!okU || (map->getTrainerIndex(tempU) == UINT_MAX)) invError = 2; } else @@ -512,23 +512,23 @@ bool PokeMod::Dialog::validate() const case Badge: if (numArgs == 1) { - if (!okU || (pokemod.getBadgeByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getBadgeIndex(tempU) == UINT_MAX)) invError = 1; } break; case Warp: if (numArgs == 1) { - if (!okU || (pokemod.getMapByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getMapIndex(tempU) == UINT_MAX)) invError = 1; else - map = &pokemod.getMap(pokemod.getMapByID(tempU)); + map = &pokemod.getMap(pokemod.getMapIndex(tempU)); } else if (numArgs == 2) { if (map) { - if (!okU || (map->getWarpByID(tempU) == UINT_MAX)) + if (!okU || (map->getWarpIndex(tempU) == UINT_MAX)) invError = 2; } else @@ -575,7 +575,7 @@ bool PokeMod::Dialog::validate() const invError = 2; break; case 3: - if (!okU || (pokemod.getDialogByID(tempU) == UINT_MAX)) + if (!okU || (pokemod.getDialogIndex(tempU) == UINT_MAX)) invError = 3; break; } @@ -591,9 +591,9 @@ bool PokeMod::Dialog::validate() const switch (numArgs) { case 1: - if (okU && (pokemod.getItemByID(tempU) != UINT_MAX)) + if (okU && (pokemod.getItemIndex(tempU) != UINT_MAX)) { - const Item& item = pokemod.getItem(pokemod.getItemByID(tempU)); + const Item& item = pokemod.getItem(pokemod.getItemIndex(tempU)); bool temp = false; for (unsigned i = 0; (i < item.getEffectCount()) || !temp; ++i) { @@ -629,7 +629,7 @@ bool PokeMod::Dialog::validate() const { if (okU) { - if (pokemod.getDialogByID(tempU) == UINT_MAX) + if (pokemod.getDialogIndex(tempU) == UINT_MAX) invError = numArgs; } else |