@@ -469,24 +469,26 @@ void PokeEdit::changeItem(const QString &itemName)
469
469
{
470
470
int itemNum = ItemInfo::Number (itemName);
471
471
poke ().item () = itemNum;
472
- if (poke ().num () == Pokemon::Giratina && itemNum == Item::GriseousOrb && PokemonInfo::Released (Pokemon::Giratina_O, poke ().gen ())) {
473
- setNum (Pokemon::Giratina_O);
474
- } else if (poke ().num () == Pokemon::Giratina_O && itemNum != Item::GriseousOrb) {
475
- setNum (Pokemon::Giratina);
476
- } else if (itemNum == Item::GriseousOrb && poke ().gen () <= 4 && poke ().num ().pokenum != Pokemon::Giratina) {
477
- poke ().item () = 0 ;
478
- }
479
- if (poke ().num ().pokenum == Pokemon::Arceus) {
480
- int subnum = ItemInfo::isPlate (itemNum) ? ItemInfo::PlateType (itemNum) : 0 ;
481
- setNum (Pokemon::uniqueId (poke ().num ().pokenum , subnum));
482
- }
483
- if (poke ().num ().pokenum == Pokemon::Genesect) {
484
- int subnum = ItemInfo::isDrive (itemNum) ? ItemInfo::DriveForme (itemNum) : 0 ;
485
- setNum (Pokemon::uniqueId (poke ().num ().pokenum , subnum));
486
- }
487
- if (itemNum != ItemInfo::StoneForForme (poke ().num ())) {
488
- if (PokemonInfo::IsMegaEvo (poke ().num ()) && !PokeEdit::hackMons) {
489
- setNum (Pokemon::uniqueId (poke ().num ().pokenum ,0 ));
472
+ if (!PokeEdit::hackMons) {
473
+ if (poke ().num () == Pokemon::Giratina && itemNum == Item::GriseousOrb && PokemonInfo::Released (Pokemon::Giratina_O, poke ().gen ())) {
474
+ setNum (Pokemon::Giratina_O);
475
+ } else if (poke ().num () == Pokemon::Giratina_O && itemNum != Item::GriseousOrb) {
476
+ setNum (Pokemon::Giratina);
477
+ } else if (itemNum == Item::GriseousOrb && poke ().gen () <= 4 && poke ().num ().pokenum != Pokemon::Giratina) {
478
+ poke ().item () = 0 ;
479
+ }
480
+ if (poke ().num ().pokenum == Pokemon::Arceus) {
481
+ int subnum = ItemInfo::isPlate (itemNum) ? ItemInfo::PlateType (itemNum) : 0 ;
482
+ setNum (Pokemon::uniqueId (poke ().num ().pokenum , subnum));
483
+ }
484
+ if (poke ().num ().pokenum == Pokemon::Genesect) {
485
+ int subnum = ItemInfo::isDrive (itemNum) ? ItemInfo::DriveForme (itemNum) : 0 ;
486
+ setNum (Pokemon::uniqueId (poke ().num ().pokenum , subnum));
487
+ }
488
+ if (itemNum != ItemInfo::StoneForForme (poke ().num ())) {
489
+ if (PokemonInfo::IsMegaEvo (poke ().num ()) && !PokeEdit::hackMons) {
490
+ setNum (Pokemon::uniqueId (poke ().num ().pokenum ,0 ));
491
+ }
490
492
}
491
493
}
492
494
updateItemSprite (poke ().item ());
0 commit comments