ItemGradeSPlus Custom Tweak Help
Posted: Sat Oct 01, 2016 11:30 am
Revision: Master Branch High 5
Hey everyone,
Since I am experimenting a lot with java these days, I decided to customize the way ItemGradeSPlus method works in L2Item.java. This is how the original works:
And this is what I did:
In other words what I am trying to achieve is when an item that is S80/S84 and is enchanted over a certain value, it should return a different grade than the one assigned to it.
The build executed fine without errors, however it doesn't seem to be working at all. When I entered the game I started hitting with an S84 grade weapon without enchant value in it and I could see from the soulshots that it was S grade. When I enchanted it to +11 the crystal type did not change (tested with Soulshots and Enchant scrolls which were both S grade at the testing phase)
I might have done stupid things but that's why I am here asking for your help afterall guys .
I would really appreciate any help.
Cheers
EDIT: Even after correcting this huge integer mistake I still don't get it to work (No compilation errors though).
Hey everyone,
Since I am experimenting a lot with java these days, I decided to customize the way ItemGradeSPlus method works in L2Item.java. This is how the original works:
Code: Select all
public final CrystalType getItemGradeSPlus()
{
switch (getItemGrade())
{
case S80:
case S84:
return CrystalType.S;
default:
return getItemGrade();
}
}
Code: Select all
public final CrystalType getItemGradeSPlus()
{
int enchantLevel = 0;
switch (getItemGrade())
{
case S80:
if (enchantLevel > 12)
{
return CrystalType.A;
}
else if (enchantLevel < 12)
{
return CrystalType.S;
}
case S84:
if (enchantLevel > 10)
{
return CrystalType.B;
}
else if (enchantLevel < 10)
{
return CrystalType.S;
}
default:
return getItemGrade();
}
}
The build executed fine without errors, however it doesn't seem to be working at all. When I entered the game I started hitting with an S84 grade weapon without enchant value in it and I could see from the soulshots that it was S grade. When I enchanted it to +11 the crystal type did not change (tested with Soulshots and Enchant scrolls which were both S grade at the testing phase)
I might have done stupid things but that's why I am here asking for your help afterall guys .
I would really appreciate any help.
Cheers
EDIT: Even after correcting this huge integer mistake I still don't get it to work (No compilation errors though).
Code: Select all
public final CrystalType getItemGradeSPlus()
{
_enchant = _defaultEnchantLevel;
switch (getItemGrade())
{
case S80:
if (_enchant > 12)
{
return CrystalType.A;
}
else if (_enchant < 12)
{
return CrystalType.S;
}
case S84:
if (_enchant > 10)
{
return CrystalType.B;
}
else if (_enchant < 10)
{
return CrystalType.S;
}
default:
return getItemGrade();
}
}