예제 #1
0
        public Asda2PetRecord AddAsda2Pet(PetTemplate petTemplate, bool silent = false)
        {
            var newPet = new Asda2PetRecord(petTemplate, this);

            newPet.Create();
            OwnedPets.Add(newPet.Guid, newPet);
            Asda2TitleChecker.OnPetCountChanged(OwnedPets.Count, this);
            if (!silent)
            {
                Asda2PetHandler.SendInitPetInfoOnLoginResponse(Client, newPet);
            }
            return(newPet);
        }
예제 #2
0
 public Asda2PetRecord(PetTemplate template, Character owner)
 {
     Guid          = (int)_idGenerator.Next();
     Id            = (short)template.Id;
     OwnerId       = owner.EntityId.Low;
     Name          = template.Name;
     Owner         = owner;
     MaxLevel      = (byte)template.MaxLevel;
     _level        = 1;
     Template      = template;
     CanChangeName = true;
     HungerPrc     = 100;
 }
예제 #3
0
 public Asda2PetRecord(PetTemplate template, Character owner)
 {
     this.Guid          = (int)Asda2PetRecord._idGenerator.Next();
     this.Id            = (short)template.Id;
     this.OwnerId       = owner.EntityId.Low;
     this.Name          = template.Name;
     this.Owner         = owner;
     this.MaxLevel      = (byte)template.MaxLevel;
     this._level        = (byte)1;
     this.Template      = template;
     this.CanChangeName = true;
     this.HungerPrc     = (byte)100;
 }