Various pet related fixes.
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user