Various pet related fixes.

This commit is contained in:
MobiusDev
2017-01-08 11:05:53 +00:00
parent cb60ead6c1
commit b30c70e704
6 changed files with 42 additions and 32 deletions

View File

@ -180,6 +180,10 @@ public final class PetDataTable implements IGameXmlReader
final L2PetData pd = getPetData(petId);
if (pd != null)
{
if (petLevel > pd.getMaxLevel())
{
return pd.getPetLevelData(pd.getMaxLevel());
}
return pd.getPetLevelData(petLevel);
}
return null;

View File

@ -191,12 +191,14 @@ public class L2PetData
public int getAvailableLevel(int skillId, int petLvl)
{
int lvl = 0;
boolean found = false;
for (L2PetSkillLearn temp : _skills)
{
if (temp.getSkillId() != skillId)
{
continue;
}
found = true;
if (temp.getSkillLevel() == 0)
{
if (petLvl < 70)
@ -228,6 +230,10 @@ public class L2PetData
}
}
}
if (found && (lvl == 0))
{
return 1;
}
return lvl;
}