コード例 #1
0
        private void UpdateTradebackG12()
        {
            if (pkm.Format == 1)
            {
                Legal.GetTradebackStatusRBY(pkm);
                return;
            }

            if (pkm.Format == 2 || pkm.VC2)
            {
                // check for impossible tradeback scenarios
                if (pkm.IsEgg || pkm.HasOriginalMetLocation || pkm.Species > Legal.MaxSpeciesID_1 && !Legal.FutureEvolutionsGen1.Contains(pkm.Species))
                {
                    pkm.TradebackStatus = TradebackType.Gen2_NotTradeback;
                }
                else
                {
                    pkm.TradebackStatus = TradebackType.Any;
                }
            }
            else if (pkm.VC1)
            {
                // If VC2 is ever released, we can assume it will be TradebackType.Any.
                // Met date cannot be used definitively as the player can change their system clock.
                pkm.TradebackStatus = TradebackType.Gen1_NotTradeback;
            }
            else
            {
                pkm.TradebackStatus = TradebackType.Any;
            }
        }