Hello guys,asking about the pet training system.
I modified the TrainingProfile.cs line 55:
Now pets can apply gains from 1% of training progress,but now the pets cannot gain more exp after apply the first hability points,,i tested on other targets,and best npcs to gain,but no gains after apply these points.
If i do not apply points,pet continue gaining experience as intended.
Here the related code,finally found:
Can anyone help me please?Thank you so much.
I modified the TrainingProfile.cs line 55:
C#:
public bool CanApplyOptions { get { return HasBegunTraining && TrainingProgressPercentile >= 0.01; } }
If i do not apply points,pet continue gaining experience as intended.
Here the related code,finally found:
C#:
if (PetTrainingHelper.ApplyTrainingPoint(Creature, TrainingPoint, Value))
{
User.SendLocalizedMessage(1157497); // You successfully train the pet!
if (TrainingPoint.TrainPoint is SkillName)
{
Effects.SendLocationParticles(EffectItem.Create(Creature.Location, Creature.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);
Effects.PlaySound(Creature.Location, Creature.Map, 0x243);
Effects.SendMovingParticles(new Entity(Server.Serial.Zero, new Point3D(Creature.X - 6, Creature.Y - 6, Creature.Z + 15), Creature.Map), Creature, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Server.Serial.Zero, new Point3D(Creature.X - 4, Creature.Y - 6, Creature.Z + 15), Creature.Map), Creature, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Server.Serial.Zero, new Point3D(Creature.X - 6, Creature.Y - 4, Creature.Z + 15), Creature.Map), Creature, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendTargetParticles(Creature, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);
if (scroll != null)
scroll.Delete();
}
else
{
Creature.PlaySound(0x1EB);
Creature.FixedEffect(0x375A, 1, 11);
}
profile.OnTrain(User, cost);
ResendGumps(profile.HasBegunTraining);
Server.Engines.Quests.TeachingSomethingNewQuest.CheckComplete(User);
}
Post automatically merged:
Attachments
Last edited: