Code style changes.
This commit is contained in:
@@ -525,10 +525,10 @@ public class AugmentationData
|
||||
int stat34 = 0;
|
||||
if (Config.RETAIL_LIKE_AUGMENTATION)
|
||||
{
|
||||
final List<AugmentationChance> _selectedChances12 = new ArrayList<>();
|
||||
final List<AugmentationChance> _selectedChances34 = new ArrayList<>();
|
||||
if (item.getItem().isMagicWeapon())
|
||||
{
|
||||
final List<AugmentationChance> _selectedChances12 = new ArrayList<>();
|
||||
final List<AugmentationChance> _selectedChances34 = new ArrayList<>();
|
||||
for (AugmentationChance ac : _augmentationChances)
|
||||
{
|
||||
if (ac.getWeaponType().equals("mage") && (ac.getStoneId() == lifeStoneId))
|
||||
@@ -543,87 +543,9 @@ public class AugmentationData
|
||||
}
|
||||
}
|
||||
}
|
||||
int r = Rnd.get(10000);
|
||||
float s = 10000;
|
||||
for (AugmentationChance ac : _selectedChances12)
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
s -= (ac.getAugmentChance() * 100);
|
||||
stat12 = ac.getAugmentId();
|
||||
}
|
||||
}
|
||||
int[] gradeChance = null;
|
||||
switch (lifeStoneGrade)
|
||||
{
|
||||
case AbstractRefinePacket.GRADE_NONE:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
|
||||
break;
|
||||
}
|
||||
case AbstractRefinePacket.GRADE_MID:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_MID_CHANCE;
|
||||
break;
|
||||
}
|
||||
case AbstractRefinePacket.GRADE_HIGH:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE;
|
||||
break;
|
||||
}
|
||||
case AbstractRefinePacket.GRADE_TOP:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_TOP_CHANCE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
|
||||
}
|
||||
}
|
||||
|
||||
int c = Rnd.get(100);
|
||||
if (c < gradeChance[0])
|
||||
{
|
||||
c = 55;
|
||||
}
|
||||
else if (c < (gradeChance[0] + gradeChance[1]))
|
||||
{
|
||||
c = 35;
|
||||
}
|
||||
else if (c < (gradeChance[0] + gradeChance[1] + gradeChance[2]))
|
||||
{
|
||||
c = 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = 3;
|
||||
}
|
||||
final List<AugmentationChance> _selectedChances34final = new ArrayList<>();
|
||||
for (AugmentationChance ac : _selectedChances34)
|
||||
{
|
||||
if (ac.getCategoryChance() == c)
|
||||
{
|
||||
_selectedChances34final.add(ac);
|
||||
}
|
||||
}
|
||||
|
||||
r = Rnd.get(10000);
|
||||
s = 10000;
|
||||
|
||||
for (AugmentationChance ac : _selectedChances34final)
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
s -= (ac.getAugmentChance() * 100);
|
||||
stat34 = ac.getAugmentId();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final List<AugmentationChance> _selectedChances12 = new ArrayList<>();
|
||||
final List<AugmentationChance> _selectedChances34 = new ArrayList<>();
|
||||
for (AugmentationChance ac : _augmentationChances)
|
||||
{
|
||||
if (ac.getWeaponType().equals("warrior") && (ac.getStoneId() == lifeStoneId))
|
||||
@@ -638,79 +560,78 @@ public class AugmentationData
|
||||
}
|
||||
}
|
||||
}
|
||||
int r = Rnd.get(10000);
|
||||
float s = 10000;
|
||||
for (AugmentationChance ac : _selectedChances12)
|
||||
}
|
||||
int r = Rnd.get(10000);
|
||||
float s = 10000;
|
||||
for (AugmentationChance ac : _selectedChances12)
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
s -= (ac.getAugmentChance() * 100);
|
||||
stat12 = ac.getAugmentId();
|
||||
}
|
||||
s -= ac.getAugmentChance() * 100;
|
||||
stat12 = ac.getAugmentId();
|
||||
}
|
||||
int[] gradeChance = null;
|
||||
switch (lifeStoneGrade)
|
||||
}
|
||||
int[] gradeChance = null;
|
||||
switch (lifeStoneGrade)
|
||||
{
|
||||
case AbstractRefinePacket.GRADE_NONE:
|
||||
{
|
||||
case AbstractRefinePacket.GRADE_NONE:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
|
||||
break;
|
||||
}
|
||||
case AbstractRefinePacket.GRADE_MID:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_MID_CHANCE;
|
||||
break;
|
||||
}
|
||||
case AbstractRefinePacket.GRADE_HIGH:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE;
|
||||
break;
|
||||
}
|
||||
case AbstractRefinePacket.GRADE_TOP:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_TOP_CHANCE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
|
||||
}
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
|
||||
break;
|
||||
}
|
||||
|
||||
int c = Rnd.get(100);
|
||||
if (c < gradeChance[0])
|
||||
case AbstractRefinePacket.GRADE_MID:
|
||||
{
|
||||
c = 55;
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_MID_CHANCE;
|
||||
break;
|
||||
}
|
||||
else if (c < (gradeChance[0] + gradeChance[1]))
|
||||
case AbstractRefinePacket.GRADE_HIGH:
|
||||
{
|
||||
c = 35;
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE;
|
||||
break;
|
||||
}
|
||||
else if (c < (gradeChance[0] + gradeChance[1] + gradeChance[2]))
|
||||
case AbstractRefinePacket.GRADE_TOP:
|
||||
{
|
||||
c = 7;
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_TOP_CHANCE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
default:
|
||||
{
|
||||
c = 3;
|
||||
gradeChance = Config.RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
|
||||
}
|
||||
final List<AugmentationChance> _selectedChances34final = new ArrayList<>();
|
||||
for (AugmentationChance ac : _selectedChances34)
|
||||
}
|
||||
int c = Rnd.get(100);
|
||||
if (c < gradeChance[0])
|
||||
{
|
||||
c = 55;
|
||||
}
|
||||
else if (c < (gradeChance[0] + gradeChance[1]))
|
||||
{
|
||||
c = 35;
|
||||
}
|
||||
else if (c < (gradeChance[0] + gradeChance[1] + gradeChance[2]))
|
||||
{
|
||||
c = 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = 3;
|
||||
}
|
||||
final List<AugmentationChance> _selectedChances34final = new ArrayList<>();
|
||||
for (AugmentationChance ac : _selectedChances34)
|
||||
{
|
||||
if (ac.getCategoryChance() == c)
|
||||
{
|
||||
if (ac.getCategoryChance() == c)
|
||||
{
|
||||
_selectedChances34final.add(ac);
|
||||
}
|
||||
_selectedChances34final.add(ac);
|
||||
}
|
||||
r = Rnd.get(10000);
|
||||
s = 10000;
|
||||
for (AugmentationChance ac : _selectedChances34final)
|
||||
}
|
||||
r = Rnd.get(10000);
|
||||
s = 10000;
|
||||
for (AugmentationChance ac : _selectedChances34final)
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
s -= (ac.getAugmentChance() * 100);
|
||||
stat34 = ac.getAugmentId();
|
||||
}
|
||||
s -= ac.getAugmentChance() * 100;
|
||||
stat34 = ac.getAugmentId();
|
||||
}
|
||||
}
|
||||
return new L2Augmentation(((stat34 << 16) + stat12));
|
||||
@@ -802,20 +723,17 @@ public class AugmentationData
|
||||
resultColor = 0;
|
||||
}
|
||||
}
|
||||
else if ((resultColor <= ((10 * lifeStoneGrade) + 5)) || (stat34 != 0))
|
||||
{
|
||||
resultColor = 3;
|
||||
}
|
||||
else if (resultColor <= ((10 * lifeStoneGrade) + 10))
|
||||
{
|
||||
resultColor = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((resultColor <= ((10 * lifeStoneGrade) + 5)) || (stat34 != 0))
|
||||
{
|
||||
resultColor = 3;
|
||||
}
|
||||
else if (resultColor <= ((10 * lifeStoneGrade) + 10))
|
||||
{
|
||||
resultColor = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
resultColor = 2;
|
||||
}
|
||||
resultColor = 2;
|
||||
}
|
||||
|
||||
// generate a skill if necessary
|
||||
@@ -866,29 +784,26 @@ public class AugmentationData
|
||||
if (stat34 == 0)
|
||||
{
|
||||
final int temp = Rnd.get(2, 3);
|
||||
final int colorOffset = (resultColor * (10 * STAT_SUBBLOCKSIZE)) + (temp * STAT_BLOCKSIZE) + 1;
|
||||
final int colorOffset = (resultColor * 10 * STAT_SUBBLOCKSIZE) + (temp * STAT_BLOCKSIZE) + 1;
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + colorOffset;
|
||||
|
||||
stat34 = Rnd.get(offset, (offset + STAT_SUBBLOCKSIZE) - 1);
|
||||
if (generateGlow && (lifeStoneGrade >= 2))
|
||||
{
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + ((temp - 2) * STAT_BLOCKSIZE) + (lifeStoneGrade * (10 * STAT_SUBBLOCKSIZE)) + 1;
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + ((temp - 2) * STAT_BLOCKSIZE) + (lifeStoneGrade * 10 * STAT_SUBBLOCKSIZE) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + ((temp - 2) * STAT_BLOCKSIZE) + (Rnd.get(0, 1) * (10 * STAT_SUBBLOCKSIZE)) + 1;
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + ((temp - 2) * STAT_BLOCKSIZE) + (Rnd.get(0, 1) * 10 * STAT_SUBBLOCKSIZE) + 1;
|
||||
}
|
||||
}
|
||||
else if (!generateGlow)
|
||||
{
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + (Rnd.get(0, 1) * STAT_BLOCKSIZE) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!generateGlow)
|
||||
{
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + (Rnd.get(0, 1) * STAT_BLOCKSIZE) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + (Rnd.get(0, 1) * STAT_BLOCKSIZE) + (((lifeStoneGrade + resultColor) / 2) * (10 * STAT_SUBBLOCKSIZE)) + 1;
|
||||
}
|
||||
offset = (lifeStoneLevel * STAT_SUBBLOCKSIZE) + (Rnd.get(0, 1) * STAT_BLOCKSIZE) + (((lifeStoneGrade + resultColor) / 2) * 10 * STAT_SUBBLOCKSIZE) + 1;
|
||||
}
|
||||
stat12 = Rnd.get(offset, (offset + STAT_SUBBLOCKSIZE) - 1);
|
||||
|
||||
@@ -927,7 +842,7 @@ public class AugmentationData
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
s -= (ac.getAugmentChance() * 100);
|
||||
s -= ac.getAugmentChance() * 100;
|
||||
stat12 = ac.getAugmentId();
|
||||
}
|
||||
}
|
||||
@@ -962,7 +877,7 @@ public class AugmentationData
|
||||
{
|
||||
if (s > r)
|
||||
{
|
||||
s -= (ac.getAugmentChance() * 100);
|
||||
s -= ac.getAugmentChance() * 100;
|
||||
stat34 = ac.getAugmentId();
|
||||
}
|
||||
}
|
||||
@@ -1031,7 +946,7 @@ public class AugmentationData
|
||||
return new L2Augmentation(((stat34 << 16) + stat12));
|
||||
}
|
||||
|
||||
public static final AugmentationData getInstance()
|
||||
public static AugmentationData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
@@ -288,7 +288,7 @@ public final class BotReportTable
|
||||
return false;
|
||||
}
|
||||
|
||||
final long reuse = (System.currentTimeMillis() - rcdRep.getLastReporTime());
|
||||
final long reuse = System.currentTimeMillis() - rcdRep.getLastReporTime();
|
||||
if (reuse < Config.BOTREPORT_REPORT_DELAY)
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_CAN_MAKE_ANOTHER_REPORT_IN_S1_MINUTE_S_YOU_HAVE_S2_POINT_S_REMAINING_ON_THIS_ACCOUNT);
|
||||
|
@@ -260,7 +260,7 @@ public class ItemTable
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
{
|
||||
referenceName = (((L2Object) reference).getName() != null ? ((L2Object) reference).getName() : "no-name");
|
||||
referenceName = ((L2Object) reference).getName() != null ? ((L2Object) reference).getName() : "no-name";
|
||||
}
|
||||
else if (reference instanceof String)
|
||||
{
|
||||
@@ -268,7 +268,7 @@ public class ItemTable
|
||||
}
|
||||
if (Config.GMAUDIT)
|
||||
{
|
||||
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]", process + "(id: " + itemId + " count: " + count + " name: " + item.getItemName() + " objId: " + item.getObjectId() + ")", (actor.getTarget() != null ? actor.getTarget().getName() : "no-target"), "L2Object referencing this action is: " + referenceName);
|
||||
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]", process + "(id: " + itemId + " count: " + count + " name: " + item.getItemName() + " objId: " + item.getObjectId() + ")", actor.getTarget() != null ? actor.getTarget().getName() : "no-target", "L2Object referencing this action is: " + referenceName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ public class ItemTable
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
{
|
||||
referenceName = (((L2Object) reference).getName() != null ? ((L2Object) reference).getName() : "no-name");
|
||||
referenceName = ((L2Object) reference).getName() != null ? ((L2Object) reference).getName() : "no-name";
|
||||
}
|
||||
else if (reference instanceof String)
|
||||
{
|
||||
@@ -335,7 +335,7 @@ public class ItemTable
|
||||
}
|
||||
if (Config.GMAUDIT)
|
||||
{
|
||||
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]", process + "(id: " + item.getId() + " count: " + item.getCount() + " itemObjId: " + item.getObjectId() + ")", (actor.getTarget() != null ? actor.getTarget().getName() : "no-target"), "L2Object referencing this action is: " + referenceName);
|
||||
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]", process + "(id: " + item.getId() + " count: " + item.getCount() + " itemObjId: " + item.getObjectId() + ")", actor.getTarget() != null ? actor.getTarget().getName() : "no-target", "L2Object referencing this action is: " + referenceName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -103,7 +103,7 @@ public class MerchantPriceConfigTable implements InstanceListManager
|
||||
}
|
||||
}
|
||||
|
||||
final MerchantPriceConfig defaultMpc = this.getMerchantPriceConfig(defaultPriceConfigId);
|
||||
final MerchantPriceConfig defaultMpc = getMerchantPriceConfig(defaultPriceConfigId);
|
||||
if (defaultMpc == null)
|
||||
{
|
||||
throw new IllegalStateException("'defaultPriceConfig' points to an non-loaded priceConfig");
|
||||
|
@@ -104,13 +104,13 @@ public class NpcPersonalAIData
|
||||
{
|
||||
case "disableRandomAnimation":
|
||||
{
|
||||
npc.setRandomAnimationEnabled((map.get(key) == 0));
|
||||
npc.setRandomAnimationEnabled(map.get(key) == 0);
|
||||
break;
|
||||
}
|
||||
case "disableRandomWalk":
|
||||
{
|
||||
npc.setIsNoRndWalk((map.get(key) == 1));
|
||||
spawn.setIsNoRndWalk((map.get(key) == 1));
|
||||
npc.setIsNoRndWalk(map.get(key) == 1);
|
||||
spawn.setIsNoRndWalk(map.get(key) == 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user