public virtual bool UpGracePet(UsersPetinfo pet, int place, bool isUpdateProp, int min, int max, ref string msg) { if (isUpdateProp) { int blood = 0; int attack = 0; int defence = 0; int agility = 0; int luck = 0; PetMgr.PlusPetProp(pet, min, max, ref blood, ref attack, ref defence, ref agility, ref luck); pet.Blood = blood; pet.Attack = attack; pet.Defence = defence; pet.Agility = agility; pet.Luck = luck; int num = PetMgr.UpdateEvolution(pet.TemplateID, max); pet.TemplateID = ((num == 0) ? pet.TemplateID : num); string skill = pet.Skill; string text = PetMgr.UpdateSkillPet(max, pet.TemplateID); pet.Skill = ((text == "") ? skill : text); pet.SkillEquip = PetMgr.ActiveEquipSkill(max); if (max > min) { msg = pet.Name + " thăng cấp " + max; } } object @lock; Monitor.Enter(@lock = this.m_lock); try { this.m_pets[place] = pet; } finally { Monitor.Exit(@lock); } return(true); }