Sync with L2jServer HighFive Mar 25th 2015.

This commit is contained in:
MobiusDev
2015-03-25 06:48:51 +00:00
parent e0c66b1412
commit 82606870c0
194 changed files with 2619 additions and 2869 deletions

View File

@@ -166,8 +166,8 @@ public class MC_Show extends AbstractNpcAI
}
}
private static Map<String, ShoutInfo> talks = new HashMap<>();
private static Map<String, WalkInfo> walks = new HashMap<>();
private static final Map<String, ShoutInfo> TALKS = new HashMap<>();
private static final Map<String, WalkInfo> WALKS = new HashMap<>();
private MC_Show()
{
@@ -180,112 +180,112 @@ public class MC_Show extends AbstractNpcAI
private void load()
{
// TODO put this stuff in Routes.xml
talks.put("1", new ShoutInfo(MESSAGES[1], "2", 1000));
talks.put("2", new ShoutInfo(MESSAGES[2], "3", 6000));
talks.put("3", new ShoutInfo(MESSAGES[3], "4", 4000));
talks.put("4", new ShoutInfo(MESSAGES[4], "5", 5000));
talks.put("5", new ShoutInfo(MESSAGES[5], "6", 3000));
talks.put("8", new ShoutInfo(MESSAGES[9], "9", 5000));
talks.put("9", new ShoutInfo(MESSAGES[10], "10", 5000));
talks.put("12", new ShoutInfo(MESSAGES[12], "13", 5000));
talks.put("13", new ShoutInfo(MESSAGES[13], "14", 5000));
talks.put("15", new ShoutInfo(MESSAGES[14], "16", 5000));
talks.put("16", new ShoutInfo(MESSAGES[15], "17", 5000));
talks.put("18", new ShoutInfo(MESSAGES[17], "19", 5000));
talks.put("19", new ShoutInfo(MESSAGES[18], "20", 5000));
talks.put("21", new ShoutInfo(MESSAGES[19], "22", 5000));
talks.put("22", new ShoutInfo(MESSAGES[20], "23", 400));
talks.put("25", new ShoutInfo(MESSAGES[21], "26", 5000));
talks.put("26", new ShoutInfo(MESSAGES[22], "27", 5400));
TALKS.put("1", new ShoutInfo(MESSAGES[1], "2", 1000));
TALKS.put("2", new ShoutInfo(MESSAGES[2], "3", 6000));
TALKS.put("3", new ShoutInfo(MESSAGES[3], "4", 4000));
TALKS.put("4", new ShoutInfo(MESSAGES[4], "5", 5000));
TALKS.put("5", new ShoutInfo(MESSAGES[5], "6", 3000));
TALKS.put("8", new ShoutInfo(MESSAGES[9], "9", 5000));
TALKS.put("9", new ShoutInfo(MESSAGES[10], "10", 5000));
TALKS.put("12", new ShoutInfo(MESSAGES[12], "13", 5000));
TALKS.put("13", new ShoutInfo(MESSAGES[13], "14", 5000));
TALKS.put("15", new ShoutInfo(MESSAGES[14], "16", 5000));
TALKS.put("16", new ShoutInfo(MESSAGES[15], "17", 5000));
TALKS.put("18", new ShoutInfo(MESSAGES[17], "19", 5000));
TALKS.put("19", new ShoutInfo(MESSAGES[18], "20", 5000));
TALKS.put("21", new ShoutInfo(MESSAGES[19], "22", 5000));
TALKS.put("22", new ShoutInfo(MESSAGES[20], "23", 400));
TALKS.put("25", new ShoutInfo(MESSAGES[21], "26", 5000));
TALKS.put("26", new ShoutInfo(MESSAGES[22], "27", 5400));
walks.put("npc1_1", new WalkInfo(new Location(-56546, -56384, -2008, 0), "npc1_2", 1200));
walks.put("npc1_2", new WalkInfo(new Location(-56597, -56384, -2008, 0), "npc1_3", 1200));
walks.put("npc1_3", new WalkInfo(new Location(-56596, -56428, -2008, 0), "npc1_4", 1200));
walks.put("npc1_4", new WalkInfo(new Location(-56593, -56474, -2008, 0), "npc1_5", 1000));
walks.put("npc1_5", new WalkInfo(new Location(-56542, -56474, -2008, 0), "npc1_6", 1000));
walks.put("npc1_6", new WalkInfo(new Location(-56493, -56473, -2008, 0), "npc1_7", 2000));
walks.put("npc1_7", new WalkInfo(new Location(-56495, -56425, -2008, 0), "npc1_1", 4000));
walks.put("npc2_1", new WalkInfo(new Location(-56550, -56291, -2008, 0), "npc2_2", 1200));
walks.put("npc2_2", new WalkInfo(new Location(-56601, -56293, -2008, 0), "npc2_3", 1200));
walks.put("npc2_3", new WalkInfo(new Location(-56603, -56247, -2008, 0), "npc2_4", 1200));
walks.put("npc2_4", new WalkInfo(new Location(-56605, -56203, -2008, 0), "npc2_5", 1000));
walks.put("npc2_5", new WalkInfo(new Location(-56553, -56202, -2008, 0), "npc2_6", 1100));
walks.put("npc2_6", new WalkInfo(new Location(-56504, -56200, -2008, 0), "npc2_7", 2000));
walks.put("npc2_7", new WalkInfo(new Location(-56503, -56243, -2008, 0), "npc2_1", 4000));
walks.put("npc3_1", new WalkInfo(new Location(-56500, -56290, -2008, 0), "npc3_2", 1200));
walks.put("npc3_2", new WalkInfo(new Location(-56551, -56313, -2008, 0), "npc3_3", 1200));
walks.put("npc3_3", new WalkInfo(new Location(-56601, -56293, -2008, 0), "npc3_4", 1200));
walks.put("npc3_4", new WalkInfo(new Location(-56651, -56294, -2008, 0), "npc3_5", 1200));
walks.put("npc3_5", new WalkInfo(new Location(-56653, -56250, -2008, 0), "npc3_6", 1200));
walks.put("npc3_6", new WalkInfo(new Location(-56654, -56204, -2008, 0), "npc3_7", 1200));
walks.put("npc3_7", new WalkInfo(new Location(-56605, -56203, -2008, 0), "npc3_8", 1200));
walks.put("npc3_8", new WalkInfo(new Location(-56554, -56202, -2008, 0), "npc3_9", 1200));
walks.put("npc3_9", new WalkInfo(new Location(-56503, -56200, -2008, 0), "npc3_10", 1200));
walks.put("npc3_10", new WalkInfo(new Location(-56502, -56244, -2008, 0), "npc3_1", 900));
walks.put("npc4_1", new WalkInfo(new Location(-56495, -56381, -2008, 0), "npc4_2", 1200));
walks.put("npc4_2", new WalkInfo(new Location(-56548, -56383, -2008, 0), "npc4_3", 1200));
walks.put("npc4_3", new WalkInfo(new Location(-56597, -56383, -2008, 0), "npc4_4", 1200));
walks.put("npc4_4", new WalkInfo(new Location(-56643, -56385, -2008, 0), "npc4_5", 1200));
walks.put("npc4_5", new WalkInfo(new Location(-56639, -56436, -2008, 0), "npc4_6", 1200));
walks.put("npc4_6", new WalkInfo(new Location(-56639, -56473, -2008, 0), "npc4_7", 1200));
walks.put("npc4_7", new WalkInfo(new Location(-56589, -56473, -2008, 0), "npc4_8", 1200));
walks.put("npc4_8", new WalkInfo(new Location(-56541, -56473, -2008, 0), "npc4_9", 1200));
walks.put("npc4_9", new WalkInfo(new Location(-56496, -56473, -2008, 0), "npc4_10", 1200));
walks.put("npc4_10", new WalkInfo(new Location(-56496, -56429, -2008, 0), "npc4_1", 900));
walks.put("npc5_1", new WalkInfo(new Location(-56549, -56335, -2008, 0), "npc5_2", 1000));
walks.put("npc5_2", new WalkInfo(new Location(-56599, -56337, -2008, 0), "npc5_3", 2000));
walks.put("npc5_3", new WalkInfo(new Location(-56649, -56341, -2008, 0), "npc5_4", 26000));
walks.put("npc5_4", new WalkInfo(new Location(-56600, -56341, -2008, 0), "npc5_5", 1000));
walks.put("npc5_5", new WalkInfo(new Location(-56553, -56341, -2008, 0), "npc5_6", 1000));
walks.put("npc5_6", new WalkInfo(new Location(-56508, -56331, -2008, 0), "npc5_2", 8000));
walks.put("npc6_1", new WalkInfo(new Location(-56595, -56428, -2008, 0), "npc6_2", 1000));
walks.put("npc6_2", new WalkInfo(new Location(-56596, -56383, -2008, 0), "npc6_3", 1000));
walks.put("npc6_3", new WalkInfo(new Location(-56648, -56384, -2008, 0), "npc6_4", 1000));
walks.put("npc6_4", new WalkInfo(new Location(-56645, -56429, -2008, 0), "npc6_5", 1000));
walks.put("npc6_5", new WalkInfo(new Location(-56644, -56475, -2008, 0), "npc6_6", 1000));
walks.put("npc6_6", new WalkInfo(new Location(-56595, -56473, -2008, 0), "npc6_7", 1000));
walks.put("npc6_7", new WalkInfo(new Location(-56542, -56473, -2008, 0), "npc6_8", 1000));
walks.put("npc6_8", new WalkInfo(new Location(-56492, -56472, -2008, 0), "npc6_9", 1200));
walks.put("npc6_9", new WalkInfo(new Location(-56495, -56426, -2008, 0), "npc6_10", 2000));
walks.put("npc6_10", new WalkInfo(new Location(-56540, -56426, -2008, 0), "npc6_1", 3000));
walks.put("npc7_1", new WalkInfo(new Location(-56603, -56249, -2008, 0), "npc7_2", 1000));
walks.put("npc7_2", new WalkInfo(new Location(-56601, -56294, -2008, 0), "npc7_3", 1000));
walks.put("npc7_3", new WalkInfo(new Location(-56651, -56295, -2008, 0), "npc7_4", 1000));
walks.put("npc7_4", new WalkInfo(new Location(-56653, -56248, -2008, 0), "npc7_5", 1000));
walks.put("npc7_5", new WalkInfo(new Location(-56605, -56203, -2008, 0), "npc7_6", 1000));
walks.put("npc7_6", new WalkInfo(new Location(-56554, -56202, -2008, 0), "npc7_7", 1000));
walks.put("npc7_7", new WalkInfo(new Location(-56504, -56201, -2008, 0), "npc7_8", 1000));
walks.put("npc7_8", new WalkInfo(new Location(-56502, -56247, -2008, 0), "npc7_9", 1200));
walks.put("npc7_9", new WalkInfo(new Location(-56549, -56248, -2008, 0), "npc7_10", 2000));
walks.put("npc7_10", new WalkInfo(new Location(-56549, -56248, -2008, 0), "npc7_1", 3000));
walks.put("npc8_1", new WalkInfo(new Location(-56493, -56426, -2008, 0), "npc8_2", 1000));
walks.put("npc8_2", new WalkInfo(new Location(-56497, -56381, -2008, 0), "npc8_3", 1200));
walks.put("npc8_3", new WalkInfo(new Location(-56544, -56381, -2008, 0), "npc8_4", 1200));
walks.put("npc8_4", new WalkInfo(new Location(-56596, -56383, -2008, 0), "npc8_5", 1200));
walks.put("npc8_5", new WalkInfo(new Location(-56594, -56428, -2008, 0), "npc8_6", 900));
walks.put("npc8_6", new WalkInfo(new Location(-56645, -56429, -2008, 0), "npc8_7", 1200));
walks.put("npc8_7", new WalkInfo(new Location(-56647, -56384, -2008, 0), "npc8_8", 1200));
walks.put("npc8_8", new WalkInfo(new Location(-56649, -56362, -2008, 0), "npc8_9", 9200));
walks.put("npc8_9", new WalkInfo(new Location(-56654, -56429, -2008, 0), "npc8_10", 1200));
walks.put("npc8_10", new WalkInfo(new Location(-56644, -56474, -2008, 0), "npc8_11", 900));
walks.put("npc8_11", new WalkInfo(new Location(-56593, -56473, -2008, 0), "npc8_12", 1100));
walks.put("npc8_12", new WalkInfo(new Location(-56543, -56472, -2008, 0), "npc8_13", 1200));
walks.put("npc8_13", new WalkInfo(new Location(-56491, -56471, -2008, 0), "npc8_1", 1200));
walks.put("npc9_1", new WalkInfo(new Location(-56505, -56246, -2008, 0), "npc9_2", 1000));
walks.put("npc9_2", new WalkInfo(new Location(-56504, -56291, -2008, 0), "npc9_3", 1200));
walks.put("npc9_3", new WalkInfo(new Location(-56550, -56291, -2008, 0), "npc9_4", 1200));
walks.put("npc9_4", new WalkInfo(new Location(-56600, -56292, -2008, 0), "npc9_5", 1200));
walks.put("npc9_5", new WalkInfo(new Location(-56603, -56248, -2008, 0), "npc9_6", 900));
walks.put("npc9_6", new WalkInfo(new Location(-56653, -56249, -2008, 0), "npc9_7", 1200));
walks.put("npc9_7", new WalkInfo(new Location(-56651, -56294, -2008, 0), "npc9_8", 1200));
walks.put("npc9_8", new WalkInfo(new Location(-56650, -56316, -2008, 0), "npc9_9", 9200));
walks.put("npc9_9", new WalkInfo(new Location(-56660, -56250, -2008, 0), "npc9_10", 1200));
walks.put("npc9_10", new WalkInfo(new Location(-56656, -56205, -2008, 0), "npc9_11", 900));
walks.put("npc9_11", new WalkInfo(new Location(-56606, -56204, -2008, 0), "npc9_12", 1100));
walks.put("npc9_12", new WalkInfo(new Location(-56554, -56203, -2008, 0), "npc9_13", 1200));
walks.put("npc9_13", new WalkInfo(new Location(-56506, -56203, -2008, 0), "npc9_1", 1200));
walks.put("24", new WalkInfo(new Location(-56730, -56340, -2008, 0), "25", 1800));
walks.put("27", new WalkInfo(new Location(-56702, -56340, -2008, 0), "29", 1800));
WALKS.put("npc1_1", new WalkInfo(new Location(-56546, -56384, -2008, 0), "npc1_2", 1200));
WALKS.put("npc1_2", new WalkInfo(new Location(-56597, -56384, -2008, 0), "npc1_3", 1200));
WALKS.put("npc1_3", new WalkInfo(new Location(-56596, -56428, -2008, 0), "npc1_4", 1200));
WALKS.put("npc1_4", new WalkInfo(new Location(-56593, -56474, -2008, 0), "npc1_5", 1000));
WALKS.put("npc1_5", new WalkInfo(new Location(-56542, -56474, -2008, 0), "npc1_6", 1000));
WALKS.put("npc1_6", new WalkInfo(new Location(-56493, -56473, -2008, 0), "npc1_7", 2000));
WALKS.put("npc1_7", new WalkInfo(new Location(-56495, -56425, -2008, 0), "npc1_1", 4000));
WALKS.put("npc2_1", new WalkInfo(new Location(-56550, -56291, -2008, 0), "npc2_2", 1200));
WALKS.put("npc2_2", new WalkInfo(new Location(-56601, -56293, -2008, 0), "npc2_3", 1200));
WALKS.put("npc2_3", new WalkInfo(new Location(-56603, -56247, -2008, 0), "npc2_4", 1200));
WALKS.put("npc2_4", new WalkInfo(new Location(-56605, -56203, -2008, 0), "npc2_5", 1000));
WALKS.put("npc2_5", new WalkInfo(new Location(-56553, -56202, -2008, 0), "npc2_6", 1100));
WALKS.put("npc2_6", new WalkInfo(new Location(-56504, -56200, -2008, 0), "npc2_7", 2000));
WALKS.put("npc2_7", new WalkInfo(new Location(-56503, -56243, -2008, 0), "npc2_1", 4000));
WALKS.put("npc3_1", new WalkInfo(new Location(-56500, -56290, -2008, 0), "npc3_2", 1200));
WALKS.put("npc3_2", new WalkInfo(new Location(-56551, -56313, -2008, 0), "npc3_3", 1200));
WALKS.put("npc3_3", new WalkInfo(new Location(-56601, -56293, -2008, 0), "npc3_4", 1200));
WALKS.put("npc3_4", new WalkInfo(new Location(-56651, -56294, -2008, 0), "npc3_5", 1200));
WALKS.put("npc3_5", new WalkInfo(new Location(-56653, -56250, -2008, 0), "npc3_6", 1200));
WALKS.put("npc3_6", new WalkInfo(new Location(-56654, -56204, -2008, 0), "npc3_7", 1200));
WALKS.put("npc3_7", new WalkInfo(new Location(-56605, -56203, -2008, 0), "npc3_8", 1200));
WALKS.put("npc3_8", new WalkInfo(new Location(-56554, -56202, -2008, 0), "npc3_9", 1200));
WALKS.put("npc3_9", new WalkInfo(new Location(-56503, -56200, -2008, 0), "npc3_10", 1200));
WALKS.put("npc3_10", new WalkInfo(new Location(-56502, -56244, -2008, 0), "npc3_1", 900));
WALKS.put("npc4_1", new WalkInfo(new Location(-56495, -56381, -2008, 0), "npc4_2", 1200));
WALKS.put("npc4_2", new WalkInfo(new Location(-56548, -56383, -2008, 0), "npc4_3", 1200));
WALKS.put("npc4_3", new WalkInfo(new Location(-56597, -56383, -2008, 0), "npc4_4", 1200));
WALKS.put("npc4_4", new WalkInfo(new Location(-56643, -56385, -2008, 0), "npc4_5", 1200));
WALKS.put("npc4_5", new WalkInfo(new Location(-56639, -56436, -2008, 0), "npc4_6", 1200));
WALKS.put("npc4_6", new WalkInfo(new Location(-56639, -56473, -2008, 0), "npc4_7", 1200));
WALKS.put("npc4_7", new WalkInfo(new Location(-56589, -56473, -2008, 0), "npc4_8", 1200));
WALKS.put("npc4_8", new WalkInfo(new Location(-56541, -56473, -2008, 0), "npc4_9", 1200));
WALKS.put("npc4_9", new WalkInfo(new Location(-56496, -56473, -2008, 0), "npc4_10", 1200));
WALKS.put("npc4_10", new WalkInfo(new Location(-56496, -56429, -2008, 0), "npc4_1", 900));
WALKS.put("npc5_1", new WalkInfo(new Location(-56549, -56335, -2008, 0), "npc5_2", 1000));
WALKS.put("npc5_2", new WalkInfo(new Location(-56599, -56337, -2008, 0), "npc5_3", 2000));
WALKS.put("npc5_3", new WalkInfo(new Location(-56649, -56341, -2008, 0), "npc5_4", 26000));
WALKS.put("npc5_4", new WalkInfo(new Location(-56600, -56341, -2008, 0), "npc5_5", 1000));
WALKS.put("npc5_5", new WalkInfo(new Location(-56553, -56341, -2008, 0), "npc5_6", 1000));
WALKS.put("npc5_6", new WalkInfo(new Location(-56508, -56331, -2008, 0), "npc5_2", 8000));
WALKS.put("npc6_1", new WalkInfo(new Location(-56595, -56428, -2008, 0), "npc6_2", 1000));
WALKS.put("npc6_2", new WalkInfo(new Location(-56596, -56383, -2008, 0), "npc6_3", 1000));
WALKS.put("npc6_3", new WalkInfo(new Location(-56648, -56384, -2008, 0), "npc6_4", 1000));
WALKS.put("npc6_4", new WalkInfo(new Location(-56645, -56429, -2008, 0), "npc6_5", 1000));
WALKS.put("npc6_5", new WalkInfo(new Location(-56644, -56475, -2008, 0), "npc6_6", 1000));
WALKS.put("npc6_6", new WalkInfo(new Location(-56595, -56473, -2008, 0), "npc6_7", 1000));
WALKS.put("npc6_7", new WalkInfo(new Location(-56542, -56473, -2008, 0), "npc6_8", 1000));
WALKS.put("npc6_8", new WalkInfo(new Location(-56492, -56472, -2008, 0), "npc6_9", 1200));
WALKS.put("npc6_9", new WalkInfo(new Location(-56495, -56426, -2008, 0), "npc6_10", 2000));
WALKS.put("npc6_10", new WalkInfo(new Location(-56540, -56426, -2008, 0), "npc6_1", 3000));
WALKS.put("npc7_1", new WalkInfo(new Location(-56603, -56249, -2008, 0), "npc7_2", 1000));
WALKS.put("npc7_2", new WalkInfo(new Location(-56601, -56294, -2008, 0), "npc7_3", 1000));
WALKS.put("npc7_3", new WalkInfo(new Location(-56651, -56295, -2008, 0), "npc7_4", 1000));
WALKS.put("npc7_4", new WalkInfo(new Location(-56653, -56248, -2008, 0), "npc7_5", 1000));
WALKS.put("npc7_5", new WalkInfo(new Location(-56605, -56203, -2008, 0), "npc7_6", 1000));
WALKS.put("npc7_6", new WalkInfo(new Location(-56554, -56202, -2008, 0), "npc7_7", 1000));
WALKS.put("npc7_7", new WalkInfo(new Location(-56504, -56201, -2008, 0), "npc7_8", 1000));
WALKS.put("npc7_8", new WalkInfo(new Location(-56502, -56247, -2008, 0), "npc7_9", 1200));
WALKS.put("npc7_9", new WalkInfo(new Location(-56549, -56248, -2008, 0), "npc7_10", 2000));
WALKS.put("npc7_10", new WalkInfo(new Location(-56549, -56248, -2008, 0), "npc7_1", 3000));
WALKS.put("npc8_1", new WalkInfo(new Location(-56493, -56426, -2008, 0), "npc8_2", 1000));
WALKS.put("npc8_2", new WalkInfo(new Location(-56497, -56381, -2008, 0), "npc8_3", 1200));
WALKS.put("npc8_3", new WalkInfo(new Location(-56544, -56381, -2008, 0), "npc8_4", 1200));
WALKS.put("npc8_4", new WalkInfo(new Location(-56596, -56383, -2008, 0), "npc8_5", 1200));
WALKS.put("npc8_5", new WalkInfo(new Location(-56594, -56428, -2008, 0), "npc8_6", 900));
WALKS.put("npc8_6", new WalkInfo(new Location(-56645, -56429, -2008, 0), "npc8_7", 1200));
WALKS.put("npc8_7", new WalkInfo(new Location(-56647, -56384, -2008, 0), "npc8_8", 1200));
WALKS.put("npc8_8", new WalkInfo(new Location(-56649, -56362, -2008, 0), "npc8_9", 9200));
WALKS.put("npc8_9", new WalkInfo(new Location(-56654, -56429, -2008, 0), "npc8_10", 1200));
WALKS.put("npc8_10", new WalkInfo(new Location(-56644, -56474, -2008, 0), "npc8_11", 900));
WALKS.put("npc8_11", new WalkInfo(new Location(-56593, -56473, -2008, 0), "npc8_12", 1100));
WALKS.put("npc8_12", new WalkInfo(new Location(-56543, -56472, -2008, 0), "npc8_13", 1200));
WALKS.put("npc8_13", new WalkInfo(new Location(-56491, -56471, -2008, 0), "npc8_1", 1200));
WALKS.put("npc9_1", new WalkInfo(new Location(-56505, -56246, -2008, 0), "npc9_2", 1000));
WALKS.put("npc9_2", new WalkInfo(new Location(-56504, -56291, -2008, 0), "npc9_3", 1200));
WALKS.put("npc9_3", new WalkInfo(new Location(-56550, -56291, -2008, 0), "npc9_4", 1200));
WALKS.put("npc9_4", new WalkInfo(new Location(-56600, -56292, -2008, 0), "npc9_5", 1200));
WALKS.put("npc9_5", new WalkInfo(new Location(-56603, -56248, -2008, 0), "npc9_6", 900));
WALKS.put("npc9_6", new WalkInfo(new Location(-56653, -56249, -2008, 0), "npc9_7", 1200));
WALKS.put("npc9_7", new WalkInfo(new Location(-56651, -56294, -2008, 0), "npc9_8", 1200));
WALKS.put("npc9_8", new WalkInfo(new Location(-56650, -56316, -2008, 0), "npc9_9", 9200));
WALKS.put("npc9_9", new WalkInfo(new Location(-56660, -56250, -2008, 0), "npc9_10", 1200));
WALKS.put("npc9_10", new WalkInfo(new Location(-56656, -56205, -2008, 0), "npc9_11", 900));
WALKS.put("npc9_11", new WalkInfo(new Location(-56606, -56204, -2008, 0), "npc9_12", 1100));
WALKS.put("npc9_12", new WalkInfo(new Location(-56554, -56203, -2008, 0), "npc9_13", 1200));
WALKS.put("npc9_13", new WalkInfo(new Location(-56506, -56203, -2008, 0), "npc9_1", 1200));
WALKS.put("24", new WalkInfo(new Location(-56730, -56340, -2008, 0), "25", 1800));
WALKS.put("27", new WalkInfo(new Location(-56702, -56340, -2008, 0), "29", 1800));
}
private void scheduleTimer()
@@ -487,18 +487,18 @@ public class MC_Show extends AbstractNpcAI
}
else
{
if (talks.containsKey(event))
if (TALKS.containsKey(event))
{
final ShoutInfo si = talks.get(event);
final ShoutInfo si = TALKS.get(event);
if (si != null)
{
autoChat(npc, si.getNpcStringId(), ChatType.NPC_SHOUT);
startQuestTimer(si.getNextEvent(), si.getTime(), npc, null);
}
}
else if (walks.containsKey(event))
else if (WALKS.containsKey(event))
{
final WalkInfo wi = walks.get(event);
final WalkInfo wi = WALKS.get(event);
if (wi != null)
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, wi.getCharPos());

View File

@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import quests.Q00020_BringUpWithLove.Q00020_BringUpWithLove;
import ai.npc.AbstractNpcAI;
@@ -104,8 +105,8 @@ public final class BeastFarm extends AbstractNpcAI
18900
};
private static Map<Integer, Integer> _FeedInfo = new HashMap<>();
private static Map<Integer, GrowthCapableMob> _GrowthCapableMobs = new HashMap<>();
private static final Map<Integer, Integer> FEED_INFO = new ConcurrentHashMap<>();
private static final Map<Integer, GrowthCapableMob> GROWTH_CAPABLE_MONSTERS = new HashMap<>();
private static List<TamedBeast> TAMED_BEAST_DATA = new ArrayList<>();
private BeastFarm()
@@ -124,23 +125,23 @@ public final class BeastFarm extends AbstractNpcAI
temp.addNpcIdForSkillId(SKILL_BLESSED_CRYSTAL_SPICE, 18869);
temp.addNpcIdForSkillId(SKILL_SGRADE_GOLDEN_SPICE, 18878);
temp.addNpcIdForSkillId(SKILL_SGRADE_CRYSTAL_SPICE, 18879);
_GrowthCapableMobs.put(18873, temp);
GROWTH_CAPABLE_MONSTERS.put(18873, temp);
temp = new GrowthCapableMob(40, 1, 18869);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18876);
_GrowthCapableMobs.put(18874, temp);
GROWTH_CAPABLE_MONSTERS.put(18874, temp);
temp = new GrowthCapableMob(40, 1, 18869);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18877);
_GrowthCapableMobs.put(18875, temp);
GROWTH_CAPABLE_MONSTERS.put(18875, temp);
temp = new GrowthCapableMob(25, 2, 18869);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18878);
_GrowthCapableMobs.put(18876, temp);
GROWTH_CAPABLE_MONSTERS.put(18876, temp);
temp = new GrowthCapableMob(25, 2, 18869);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18879);
_GrowthCapableMobs.put(18877, temp);
GROWTH_CAPABLE_MONSTERS.put(18877, temp);
// Cougar
temp = new GrowthCapableMob(100, 0, 18870);
@@ -150,23 +151,23 @@ public final class BeastFarm extends AbstractNpcAI
temp.addNpcIdForSkillId(SKILL_BLESSED_CRYSTAL_SPICE, 18870);
temp.addNpcIdForSkillId(SKILL_SGRADE_GOLDEN_SPICE, 18885);
temp.addNpcIdForSkillId(SKILL_SGRADE_CRYSTAL_SPICE, 18886);
_GrowthCapableMobs.put(18880, temp);
GROWTH_CAPABLE_MONSTERS.put(18880, temp);
temp = new GrowthCapableMob(40, 1, 18870);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18883);
_GrowthCapableMobs.put(18881, temp);
GROWTH_CAPABLE_MONSTERS.put(18881, temp);
temp = new GrowthCapableMob(40, 1, 18870);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18884);
_GrowthCapableMobs.put(18882, temp);
GROWTH_CAPABLE_MONSTERS.put(18882, temp);
temp = new GrowthCapableMob(25, 2, 18870);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18885);
_GrowthCapableMobs.put(18883, temp);
GROWTH_CAPABLE_MONSTERS.put(18883, temp);
temp = new GrowthCapableMob(25, 2, 18870);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18886);
_GrowthCapableMobs.put(18884, temp);
GROWTH_CAPABLE_MONSTERS.put(18884, temp);
// Buffalo
temp = new GrowthCapableMob(100, 0, 18871);
@@ -176,23 +177,23 @@ public final class BeastFarm extends AbstractNpcAI
temp.addNpcIdForSkillId(SKILL_BLESSED_CRYSTAL_SPICE, 18871);
temp.addNpcIdForSkillId(SKILL_SGRADE_GOLDEN_SPICE, 18892);
temp.addNpcIdForSkillId(SKILL_SGRADE_CRYSTAL_SPICE, 18893);
_GrowthCapableMobs.put(18887, temp);
GROWTH_CAPABLE_MONSTERS.put(18887, temp);
temp = new GrowthCapableMob(40, 1, 18871);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18890);
_GrowthCapableMobs.put(18888, temp);
GROWTH_CAPABLE_MONSTERS.put(18888, temp);
temp = new GrowthCapableMob(40, 1, 18871);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18891);
_GrowthCapableMobs.put(18889, temp);
GROWTH_CAPABLE_MONSTERS.put(18889, temp);
temp = new GrowthCapableMob(25, 2, 18871);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18892);
_GrowthCapableMobs.put(18890, temp);
GROWTH_CAPABLE_MONSTERS.put(18890, temp);
temp = new GrowthCapableMob(25, 2, 18871);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18893);
_GrowthCapableMobs.put(18891, temp);
GROWTH_CAPABLE_MONSTERS.put(18891, temp);
// Grendel
temp = new GrowthCapableMob(100, 0, 18872);
@@ -202,23 +203,23 @@ public final class BeastFarm extends AbstractNpcAI
temp.addNpcIdForSkillId(SKILL_BLESSED_CRYSTAL_SPICE, 18872);
temp.addNpcIdForSkillId(SKILL_SGRADE_GOLDEN_SPICE, 18899);
temp.addNpcIdForSkillId(SKILL_SGRADE_CRYSTAL_SPICE, 18900);
_GrowthCapableMobs.put(18894, temp);
GROWTH_CAPABLE_MONSTERS.put(18894, temp);
temp = new GrowthCapableMob(40, 1, 18872);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18897);
_GrowthCapableMobs.put(18895, temp);
GROWTH_CAPABLE_MONSTERS.put(18895, temp);
temp = new GrowthCapableMob(40, 1, 18872);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18898);
_GrowthCapableMobs.put(18896, temp);
GROWTH_CAPABLE_MONSTERS.put(18896, temp);
temp = new GrowthCapableMob(25, 2, 18872);
temp.addNpcIdForSkillId(SKILL_GOLDEN_SPICE, 18899);
_GrowthCapableMobs.put(18897, temp);
GROWTH_CAPABLE_MONSTERS.put(18897, temp);
temp = new GrowthCapableMob(25, 2, 18872);
temp.addNpcIdForSkillId(SKILL_CRYSTAL_SPICE, 18900);
_GrowthCapableMobs.put(18898, temp);
GROWTH_CAPABLE_MONSTERS.put(18898, temp);
// Tamed beasts data
TAMED_BEAST_DATA.add(new TamedBeast("%name% of Focus", new SkillHolder(6432, 1), new SkillHolder(6668, 1)));
@@ -232,11 +233,11 @@ public final class BeastFarm extends AbstractNpcAI
public void spawnNext(L2Npc npc, L2PcInstance player, int nextNpcId, int food)
{
// remove the feedinfo of the mob that got despawned, if any
if (_FeedInfo.containsKey(npc.getObjectId()))
if (FEED_INFO.containsKey(npc.getObjectId()))
{
if (_FeedInfo.get(npc.getObjectId()) == player.getObjectId())
if (FEED_INFO.get(npc.getObjectId()) == player.getObjectId())
{
_FeedInfo.remove(npc.getObjectId());
FEED_INFO.remove(npc.getObjectId());
}
}
// despawn the old mob
@@ -289,7 +290,7 @@ public final class BeastFarm extends AbstractNpcAI
L2Attackable nextNpc = (L2Attackable) addSpawn(nextNpcId, npc);
// register the player in the feedinfo for the mob that just spawned
_FeedInfo.put(nextNpc.getObjectId(), player.getObjectId());
FEED_INFO.put(nextNpc.getObjectId(), player.getObjectId());
nextNpc.setRunning();
nextNpc.addDamageHate(player, 0, 99999);
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
@@ -319,19 +320,19 @@ public final class BeastFarm extends AbstractNpcAI
// first gather some values on local variables
int objectId = npc.getObjectId();
int growthLevel = 3; // if a mob is in FEEDABLE_BEASTS but not in _GrowthCapableMobs, then it's at max growth (3)
if (_GrowthCapableMobs.containsKey(npcId))
if (GROWTH_CAPABLE_MONSTERS.containsKey(npcId))
{
growthLevel = _GrowthCapableMobs.get(npcId).getGrowthLevel();
growthLevel = GROWTH_CAPABLE_MONSTERS.get(npcId).getGrowthLevel();
}
// prevent exploit which allows 2 players to simultaneously raise the same 0-growth beast
// If the mob is at 0th level (when it still listens to all feeders) lock it to the first feeder!
if ((growthLevel == 0) && _FeedInfo.containsKey(objectId))
if ((growthLevel == 0) && FEED_INFO.containsKey(objectId))
{
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
_FeedInfo.put(objectId, caster.getObjectId());
FEED_INFO.put(objectId, caster.getObjectId());
// display the social action of the beast eating the food.
npc.broadcastSocialAction(2);
@@ -347,22 +348,22 @@ public final class BeastFarm extends AbstractNpcAI
}
// if this pet can't grow, it's all done.
if (_GrowthCapableMobs.containsKey(npcId))
if (GROWTH_CAPABLE_MONSTERS.containsKey(npcId))
{
// do nothing if this mob doesn't eat the specified food (food gets consumed but has no effect).
int newNpcId = _GrowthCapableMobs.get(npcId).getLeveledNpcId(skillId);
int newNpcId = GROWTH_CAPABLE_MONSTERS.get(npcId).getLeveledNpcId(skillId);
if (newNpcId == -1)
{
if (growthLevel == 0)
{
_FeedInfo.remove(objectId);
FEED_INFO.remove(objectId);
npc.setRunning();
((L2Attackable) npc).addDamageHate(caster, 0, 1);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, caster);
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
else if ((growthLevel > 0) && (_FeedInfo.get(objectId) != caster.getObjectId()))
else if ((growthLevel > 0) && (FEED_INFO.get(objectId) != caster.getObjectId()))
{
// check if this is the same player as the one who raised it from growth 0.
// if no, then do not allow a chance to raise the pet (food gets consumed but has no effect).
@@ -382,9 +383,9 @@ public final class BeastFarm extends AbstractNpcAI
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
// remove the feedinfo of the mob that got killed, if any
if (_FeedInfo.containsKey(npc.getObjectId()))
if (FEED_INFO.containsKey(npc.getObjectId()))
{
_FeedInfo.remove(npc.getObjectId());
FEED_INFO.remove(npc.getObjectId());
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -20,6 +20,7 @@ package ai.group_template;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import quests.Q00020_BringUpWithLove.Q00020_BringUpWithLove;
import quests.Q00655_AGrandPlanForTamingWildBeasts.Q00655_AGrandPlanForTamingWildBeasts;
@@ -129,8 +130,8 @@ public final class FeedableBeasts extends AbstractNpcAI
NpcStringId.ANIMALS_NEED_LOVE_TOO
};
private static Map<Integer, Integer> _FeedInfo = new HashMap<>();
private static Map<Integer, GrowthCapableMob> _GrowthCapableMobs = new HashMap<>();
private static final Map<Integer, Integer> FEED_INFO = new ConcurrentHashMap<>();
private static final Map<Integer, GrowthCapableMob> GROWTH_CAPABLE_MONSTERS = new HashMap<>();
// all mobs that grow by eating
private static class GrowthCapableMob
@@ -221,139 +222,139 @@ public final class FeedableBeasts extends AbstractNpcAI
temp = new GrowthCapableMob(0, 100);
temp.addMobs(GOLDEN_SPICE, Kookabura_0_Gold);
temp.addMobs(CRYSTAL_SPICE, Kookabura_0_Crystal);
_GrowthCapableMobs.put(21451, temp);
GROWTH_CAPABLE_MONSTERS.put(21451, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(GOLDEN_SPICE, Kookabura_1_Gold_1);
_GrowthCapableMobs.put(21452, temp);
_GrowthCapableMobs.put(21454, temp);
GROWTH_CAPABLE_MONSTERS.put(21452, temp);
GROWTH_CAPABLE_MONSTERS.put(21454, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(GOLDEN_SPICE, Kookabura_1_Gold_2);
_GrowthCapableMobs.put(21453, temp);
_GrowthCapableMobs.put(21455, temp);
GROWTH_CAPABLE_MONSTERS.put(21453, temp);
GROWTH_CAPABLE_MONSTERS.put(21455, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(CRYSTAL_SPICE, Kookabura_1_Crystal_1);
_GrowthCapableMobs.put(21456, temp);
_GrowthCapableMobs.put(21458, temp);
GROWTH_CAPABLE_MONSTERS.put(21456, temp);
GROWTH_CAPABLE_MONSTERS.put(21458, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(CRYSTAL_SPICE, Kookabura_1_Crystal_2);
_GrowthCapableMobs.put(21457, temp);
_GrowthCapableMobs.put(21459, temp);
GROWTH_CAPABLE_MONSTERS.put(21457, temp);
GROWTH_CAPABLE_MONSTERS.put(21459, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(GOLDEN_SPICE, Kookabura_2_1);
_GrowthCapableMobs.put(21460, temp);
_GrowthCapableMobs.put(21462, temp);
GROWTH_CAPABLE_MONSTERS.put(21460, temp);
GROWTH_CAPABLE_MONSTERS.put(21462, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(GOLDEN_SPICE, Kookabura_2_2);
_GrowthCapableMobs.put(21461, temp);
_GrowthCapableMobs.put(21463, temp);
GROWTH_CAPABLE_MONSTERS.put(21461, temp);
GROWTH_CAPABLE_MONSTERS.put(21463, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(CRYSTAL_SPICE, Kookabura_2_1);
_GrowthCapableMobs.put(21464, temp);
_GrowthCapableMobs.put(21466, temp);
GROWTH_CAPABLE_MONSTERS.put(21464, temp);
GROWTH_CAPABLE_MONSTERS.put(21466, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(CRYSTAL_SPICE, Kookabura_2_2);
_GrowthCapableMobs.put(21465, temp);
_GrowthCapableMobs.put(21467, temp);
GROWTH_CAPABLE_MONSTERS.put(21465, temp);
GROWTH_CAPABLE_MONSTERS.put(21467, temp);
// Alpen Buffalo
temp = new GrowthCapableMob(0, 100);
temp.addMobs(GOLDEN_SPICE, Buffalo_0_Gold);
temp.addMobs(CRYSTAL_SPICE, Buffalo_0_Crystal);
_GrowthCapableMobs.put(21470, temp);
GROWTH_CAPABLE_MONSTERS.put(21470, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(GOLDEN_SPICE, Buffalo_1_Gold_1);
_GrowthCapableMobs.put(21471, temp);
_GrowthCapableMobs.put(21473, temp);
GROWTH_CAPABLE_MONSTERS.put(21471, temp);
GROWTH_CAPABLE_MONSTERS.put(21473, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(GOLDEN_SPICE, Buffalo_1_Gold_2);
_GrowthCapableMobs.put(21472, temp);
_GrowthCapableMobs.put(21474, temp);
GROWTH_CAPABLE_MONSTERS.put(21472, temp);
GROWTH_CAPABLE_MONSTERS.put(21474, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(CRYSTAL_SPICE, Buffalo_1_Crystal_1);
_GrowthCapableMobs.put(21475, temp);
_GrowthCapableMobs.put(21477, temp);
GROWTH_CAPABLE_MONSTERS.put(21475, temp);
GROWTH_CAPABLE_MONSTERS.put(21477, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(CRYSTAL_SPICE, Buffalo_1_Crystal_2);
_GrowthCapableMobs.put(21476, temp);
_GrowthCapableMobs.put(21478, temp);
GROWTH_CAPABLE_MONSTERS.put(21476, temp);
GROWTH_CAPABLE_MONSTERS.put(21478, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(GOLDEN_SPICE, Buffalo_2_1);
_GrowthCapableMobs.put(21479, temp);
_GrowthCapableMobs.put(21481, temp);
GROWTH_CAPABLE_MONSTERS.put(21479, temp);
GROWTH_CAPABLE_MONSTERS.put(21481, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(GOLDEN_SPICE, Buffalo_2_2);
_GrowthCapableMobs.put(21480, temp);
_GrowthCapableMobs.put(21482, temp);
GROWTH_CAPABLE_MONSTERS.put(21480, temp);
GROWTH_CAPABLE_MONSTERS.put(21482, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(CRYSTAL_SPICE, Buffalo_2_1);
_GrowthCapableMobs.put(21483, temp);
_GrowthCapableMobs.put(21485, temp);
GROWTH_CAPABLE_MONSTERS.put(21483, temp);
GROWTH_CAPABLE_MONSTERS.put(21485, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(CRYSTAL_SPICE, Buffalo_2_2);
_GrowthCapableMobs.put(21484, temp);
_GrowthCapableMobs.put(21486, temp);
GROWTH_CAPABLE_MONSTERS.put(21484, temp);
GROWTH_CAPABLE_MONSTERS.put(21486, temp);
// Alpen Cougar
temp = new GrowthCapableMob(0, 100);
temp.addMobs(GOLDEN_SPICE, Cougar_0_Gold);
temp.addMobs(CRYSTAL_SPICE, Cougar_0_Crystal);
_GrowthCapableMobs.put(21489, temp);
GROWTH_CAPABLE_MONSTERS.put(21489, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(GOLDEN_SPICE, Cougar_1_Gold_1);
_GrowthCapableMobs.put(21490, temp);
_GrowthCapableMobs.put(21492, temp);
GROWTH_CAPABLE_MONSTERS.put(21490, temp);
GROWTH_CAPABLE_MONSTERS.put(21492, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(GOLDEN_SPICE, Cougar_1_Gold_2);
_GrowthCapableMobs.put(21491, temp);
_GrowthCapableMobs.put(21493, temp);
GROWTH_CAPABLE_MONSTERS.put(21491, temp);
GROWTH_CAPABLE_MONSTERS.put(21493, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(CRYSTAL_SPICE, Cougar_1_Crystal_1);
_GrowthCapableMobs.put(21494, temp);
_GrowthCapableMobs.put(21496, temp);
GROWTH_CAPABLE_MONSTERS.put(21494, temp);
GROWTH_CAPABLE_MONSTERS.put(21496, temp);
temp = new GrowthCapableMob(1, 40);
temp.addMobs(CRYSTAL_SPICE, Cougar_1_Crystal_2);
_GrowthCapableMobs.put(21495, temp);
_GrowthCapableMobs.put(21497, temp);
GROWTH_CAPABLE_MONSTERS.put(21495, temp);
GROWTH_CAPABLE_MONSTERS.put(21497, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(GOLDEN_SPICE, Cougar_2_1);
_GrowthCapableMobs.put(21498, temp);
_GrowthCapableMobs.put(21500, temp);
GROWTH_CAPABLE_MONSTERS.put(21498, temp);
GROWTH_CAPABLE_MONSTERS.put(21500, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(GOLDEN_SPICE, Cougar_2_2);
_GrowthCapableMobs.put(21499, temp);
_GrowthCapableMobs.put(21501, temp);
GROWTH_CAPABLE_MONSTERS.put(21499, temp);
GROWTH_CAPABLE_MONSTERS.put(21501, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(CRYSTAL_SPICE, Cougar_2_1);
_GrowthCapableMobs.put(21502, temp);
_GrowthCapableMobs.put(21504, temp);
GROWTH_CAPABLE_MONSTERS.put(21502, temp);
GROWTH_CAPABLE_MONSTERS.put(21504, temp);
temp = new GrowthCapableMob(2, 25);
temp.addMobs(CRYSTAL_SPICE, Cougar_2_2);
_GrowthCapableMobs.put(21503, temp);
_GrowthCapableMobs.put(21505, temp);
GROWTH_CAPABLE_MONSTERS.put(21503, temp);
GROWTH_CAPABLE_MONSTERS.put(21505, temp);
}
private void spawnNext(L2Npc npc, int growthLevel, L2PcInstance player, int food)
@@ -369,11 +370,11 @@ public final class FeedableBeasts extends AbstractNpcAI
{
if (player.getClassId().isMage())
{
nextNpcId = _GrowthCapableMobs.get(npcId).getMob(food, 1, 1);
nextNpcId = GROWTH_CAPABLE_MONSTERS.get(npcId).getMob(food, 1, 1);
}
else
{
nextNpcId = _GrowthCapableMobs.get(npcId).getMob(food, 1, 0);
nextNpcId = GROWTH_CAPABLE_MONSTERS.get(npcId).getMob(food, 1, 0);
}
}
else
@@ -382,26 +383,26 @@ public final class FeedableBeasts extends AbstractNpcAI
// that is a stronger-than-normal animal that attacks its feeder
if (getRandom(5) == 0)
{
nextNpcId = _GrowthCapableMobs.get(npcId).getMob(food, 0, 1);
nextNpcId = GROWTH_CAPABLE_MONSTERS.get(npcId).getMob(food, 0, 1);
}
else
{
nextNpcId = _GrowthCapableMobs.get(npcId).getMob(food, 0, 0);
nextNpcId = GROWTH_CAPABLE_MONSTERS.get(npcId).getMob(food, 0, 0);
}
}
}
else
{
// all other levels of growth are straight-forward
nextNpcId = _GrowthCapableMobs.get(npcId).getRandomMob(food);
nextNpcId = GROWTH_CAPABLE_MONSTERS.get(npcId).getRandomMob(food);
}
// remove the feedinfo of the mob that got despawned, if any
if (_FeedInfo.containsKey(npc.getObjectId()))
if (FEED_INFO.containsKey(npc.getObjectId()))
{
if (_FeedInfo.get(npc.getObjectId()) == player.getObjectId())
if (FEED_INFO.get(npc.getObjectId()) == player.getObjectId())
{
_FeedInfo.remove(npc.getObjectId());
FEED_INFO.remove(npc.getObjectId());
}
}
// despawn the old mob
@@ -476,7 +477,7 @@ public final class FeedableBeasts extends AbstractNpcAI
}
// register the player in the feedinfo for the mob that just spawned
_FeedInfo.put(nextNpc.getObjectId(), player.getObjectId());
FEED_INFO.put(nextNpc.getObjectId(), player.getObjectId());
nextNpc.setRunning();
nextNpc.addDamageHate(player, 0, 99999);
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
@@ -491,9 +492,9 @@ public final class FeedableBeasts extends AbstractNpcAI
if (MAD_COW_POLYMORPH.containsKey(npc.getId()))
{
// remove the feed info from the previous mob
if (_FeedInfo.get(npc.getObjectId()) == player.getObjectId())
if (FEED_INFO.get(npc.getObjectId()) == player.getObjectId())
{
_FeedInfo.remove(npc.getObjectId());
FEED_INFO.remove(npc.getObjectId());
}
// despawn the mad cow
npc.deleteMe();
@@ -501,7 +502,7 @@ public final class FeedableBeasts extends AbstractNpcAI
L2Attackable nextNpc = (L2Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
// register the player in the feedinfo for the mob that just spawned
_FeedInfo.put(nextNpc.getObjectId(), player.getObjectId());
FEED_INFO.put(nextNpc.getObjectId(), player.getObjectId());
nextNpc.setRunning();
nextNpc.addDamageHate(player, 0, 99999);
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
@@ -531,19 +532,19 @@ public final class FeedableBeasts extends AbstractNpcAI
// first gather some values on local variables
int objectId = npc.getObjectId();
int growthLevel = 3; // if a mob is in FEEDABLE_BEASTS but not in _GrowthCapableMobs, then it's at max growth (3)
if (_GrowthCapableMobs.containsKey(npcId))
if (GROWTH_CAPABLE_MONSTERS.containsKey(npcId))
{
growthLevel = _GrowthCapableMobs.get(npcId).getGrowthLevel();
growthLevel = GROWTH_CAPABLE_MONSTERS.get(npcId).getGrowthLevel();
}
// prevent exploit which allows 2 players to simultaneously raise the same 0-growth beast
// If the mob is at 0th level (when it still listens to all feeders) lock it to the first feeder!
if ((growthLevel == 0) && _FeedInfo.containsKey(objectId))
if ((growthLevel == 0) && FEED_INFO.containsKey(objectId))
{
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
_FeedInfo.put(objectId, caster.getObjectId());
FEED_INFO.put(objectId, caster.getObjectId());
int food = 0;
if (skillId == SKILL_GOLDEN_SPICE)
@@ -559,10 +560,10 @@ public final class FeedableBeasts extends AbstractNpcAI
npc.broadcastSocialAction(2);
// if this pet can't grow, it's all done.
if (_GrowthCapableMobs.containsKey(npcId))
if (GROWTH_CAPABLE_MONSTERS.containsKey(npcId))
{
// do nothing if this mob doesn't eat the specified food (food gets consumed but has no effect).
if (_GrowthCapableMobs.get(npcId).getMob(food, 0, 0) == null)
if (GROWTH_CAPABLE_MONSTERS.get(npcId).getMob(food, 0, 0) == null)
{
return super.onSkillSee(npc, caster, skill, targets, isSummon);
}
@@ -579,7 +580,7 @@ public final class FeedableBeasts extends AbstractNpcAI
npc.broadcastPacket(packet);
}
if ((growthLevel > 0) && (_FeedInfo.get(objectId) != caster.getObjectId()))
if ((growthLevel > 0) && (FEED_INFO.get(objectId) != caster.getObjectId()))
{
// check if this is the same player as the one who raised it from growth 0.
// if no, then do not allow a chance to raise the pet (food gets consumed but has no effect).
@@ -587,7 +588,7 @@ public final class FeedableBeasts extends AbstractNpcAI
}
// Polymorph the mob, with a certain chance, given its current growth level
if (getRandom(100) < _GrowthCapableMobs.get(npcId).getChance())
if (getRandom(100) < GROWTH_CAPABLE_MONSTERS.get(npcId).getChance())
{
spawnNext(npc, growthLevel, caster, food);
}
@@ -614,9 +615,9 @@ public final class FeedableBeasts extends AbstractNpcAI
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
// remove the feedinfo of the mob that got killed, if any
if (_FeedInfo.containsKey(npc.getObjectId()))
if (FEED_INFO.containsKey(npc.getObjectId()))
{
_FeedInfo.remove(npc.getObjectId());
FEED_INFO.remove(npc.getObjectId());
}
return super.onKill(npc, killer, isSummon);
}

View File

@@ -33,7 +33,7 @@ import com.l2jserver.gameserver.model.actor.L2Npc;
*/
public final class RandomSpawn extends AbstractNpcAI
{
private static Map<Integer, Location[]> SPAWN_POINTS = new HashMap<>();
private static final Map<Integer, Location[]> SPAWN_POINTS = new HashMap<>();
static
{
// Keltas

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,6 @@
*/
package ai.individual;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -43,8 +42,8 @@ public final class DarkWaterDragon extends AbstractNpcAI
private static final int FAFURION = 18482;
private static final int DETRACTOR1 = 22270;
private static final int DETRACTOR2 = 22271;
private static Set<Integer> SECOND_SPAWN = new HashSet<>(); // Used to track if second Shades were already spawned
private static Set<Integer> MY_TRACKING_SET = new HashSet<>(); // Used to track instances of npcs
private static final Set<Integer> SECOND_SPAWN = ConcurrentHashMap.newKeySet(); // Used to track if second Shades were already spawned
private static Set<Integer> MY_TRACKING_SET = ConcurrentHashMap.newKeySet(); // Used to track instances of npcs
private static Map<Integer, L2PcInstance> ID_MAP = new ConcurrentHashMap<>(); // Used to track instances of npcs
private DarkWaterDragon()

View File

@@ -18,8 +18,8 @@
*/
package ai.individual;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import ai.npc.AbstractNpcAI;
@@ -72,7 +72,7 @@ public final class Orfen extends AbstractNpcAI
private static final int RIBA_IREN = 29018;
private static boolean _IsTeleported;
private static List<L2Attackable> _Minions = new ArrayList<>();
private static final List<L2Attackable> MINIONS = new CopyOnWriteArrayList<>();
private static L2BossZone ZONE;
private static final byte ALIVE = 0;
@@ -158,16 +158,16 @@ public final class Orfen extends AbstractNpcAI
L2Attackable mob;
mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x + 100, y + 100, npc.getZ(), 0, false, 0);
mob.setIsRaidMinion(true);
_Minions.add(mob);
MINIONS.add(mob);
mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x + 100, y - 100, npc.getZ(), 0, false, 0);
mob.setIsRaidMinion(true);
_Minions.add(mob);
MINIONS.add(mob);
mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x - 100, y + 100, npc.getZ(), 0, false, 0);
mob.setIsRaidMinion(true);
_Minions.add(mob);
MINIONS.add(mob);
mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x - 100, y - 100, npc.getZ(), 0, false, 0);
mob.setIsRaidMinion(true);
_Minions.add(mob);
MINIONS.add(mob);
startQuestTimer("check_minion_loc", 10000, npc, null, true);
}
@@ -208,9 +208,9 @@ public final class Orfen extends AbstractNpcAI
}
else if (event.equalsIgnoreCase("check_minion_loc"))
{
for (int i = 0; i < _Minions.size(); i++)
for (int i = 0; i < MINIONS.size(); i++)
{
L2Attackable mob = _Minions.get(i);
L2Attackable mob = MINIONS.get(i);
if (!npc.isInsideRadius(mob, 3000, false, false))
{
mob.teleToLocation(npc.getLocation());
@@ -221,21 +221,21 @@ public final class Orfen extends AbstractNpcAI
}
else if (event.equalsIgnoreCase("despawn_minions"))
{
for (int i = 0; i < _Minions.size(); i++)
for (int i = 0; i < MINIONS.size(); i++)
{
L2Attackable mob = _Minions.get(i);
L2Attackable mob = MINIONS.get(i);
if (mob != null)
{
mob.decayMe();
}
}
_Minions.clear();
MINIONS.clear();
}
else if (event.equalsIgnoreCase("spawn_minion"))
{
L2Attackable mob = (L2Attackable) addSpawn(RAIKEL_LEOS, npc.getX(), npc.getY(), npc.getZ(), 0, false, 0);
mob.setIsRaidMinion(true);
_Minions.add(mob);
MINIONS.add(mob);
}
return super.onAdvEvent(event, npc, player);
}
@@ -344,7 +344,7 @@ public final class Orfen extends AbstractNpcAI
}
else if ((GrandBossManager.getInstance().getBossStatus(ORFEN) == ALIVE) && (npc.getId() == RAIKEL_LEOS))
{
_Minions.remove(npc);
MINIONS.remove(npc);
startQuestTimer("spawn_minion", 360000, npc, null);
}
return super.onKill(npc, killer, isSummon);

View File

@@ -18,8 +18,8 @@
*/
package ai.individual;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledFuture;
import ai.npc.AbstractNpcAI;
@@ -83,7 +83,7 @@ public final class QueenAnt extends AbstractNpcAI
L2MonsterInstance _queen = null;
private L2MonsterInstance _larva = null;
private final List<L2MonsterInstance> _nurses = new ArrayList<>(5);
private final List<L2MonsterInstance> _nurses = new CopyOnWriteArrayList<>();
ScheduledFuture<?> _task = null;
private QueenAnt()

View File

@@ -18,8 +18,8 @@
*/
package ai.individual;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import ai.npc.AbstractNpcAI;
@@ -54,7 +54,7 @@ public final class SinWardens extends AbstractNpcAI
22438
};
private final Map<Integer, Integer> killedMinionsCount = new HashMap<>();
private final Map<Integer, Integer> killedMinionsCount = new ConcurrentHashMap<>();
private SinWardens()
{

View File

@@ -29,12 +29,12 @@ import org.w3c.dom.Node;
import com.l2jserver.gameserver.GeoData;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.L2Spawn;
import com.l2jserver.gameserver.model.L2Territory;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.util.Rnd;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Tar Beetle zone spawn

View File

@@ -29,7 +29,6 @@ import org.w3c.dom.Node;
import ai.npc.AbstractNpcAI;
import com.l2jserver.Config;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.enums.CategoryType;
import com.l2jserver.gameserver.enums.MailType;
import com.l2jserver.gameserver.instancemanager.MailManager;
@@ -57,6 +56,7 @@ import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.network.serverpackets.mentoring.ExMentorList;
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* Mentor Guide.

View File

@@ -28,8 +28,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.gameserver.data.xml.IXmlReader;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.util.data.xml.IXmlReader;
/**
* @author UnAfraid

View File

@@ -30,8 +30,7 @@ import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.util.Util;
/**
* Newbie Travel Token AI.<br>
* Original Jython script by DrLecter.
* Newbie Travel Token AI.
* @author Plim
*/
public final class NewbieTravelToken extends AbstractNpcAI