Пример #1
0
        public void Load(PetPlace[] selectedpets)
        {
            int slot = 1;
            while( slot <= 3 )
            {
                if((slot == 1 && PluginSettings.Instance.LockFirstSlot)
                || (slot == 2 && PluginSettings.Instance.LockSecondSlot)
                || (slot == 3 && PluginSettings.Instance.LockThirdSlot))
                {
                    Logger.Write(string.Format("Filling pet Slot {0} -- locked. Keeping {1}", slot, MyPets.Pet(slot-1).Name));
                }
                else
                {
                    if (selectedpets[slot - 1].opened)
                    {
                        if (selectedpets[slot - 1].opened)
                        {
                            _petLua.LoadPet(slot, selectedpets[slot-1].pet.PetId);
                            Logger.Write(string.Format("Filling pet Slot {0} with {1}", slot, selectedpets[slot-1].pet.ToString()));
                        }
                        else { Logger.Write(string.Format("Filling pet Slot {0} -- nothing selected, unchanged", slot)); }
                    }
                    else { return; }
                }

                slot++;

            }
        }
Пример #2
0
 public bool FullySelected( PetPlace[] selection)
 {
     for( int i=0; i<3; i++)
     {
         if (selection[i].opened && !selection[i].selected) return false;
     }
     return true;
 }