Replaced both buffer NPCs with interlude version.
This commit is contained in:
5
L2J_Mobius_CT_2.6_HighFive/dist/db_installer/sql/game/buffer_schemes.sql
vendored
Normal file
5
L2J_Mobius_CT_2.6_HighFive/dist/db_installer/sql/game/buffer_schemes.sql
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE IF NOT EXISTS `buffer_schemes` (
|
||||
`object_id` INT UNSIGNED NOT NULL DEFAULT '0',
|
||||
`scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default',
|
||||
`skills` VARCHAR(200) NOT NULL
|
||||
);
|
@@ -1,65 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS `custom_npc_buffer` (
|
||||
`npc_id` mediumint(7) NOT NULL,
|
||||
`skill_id` int(6) NOT NULL,
|
||||
`skill_level` int(6) NOT NULL DEFAULT '1',
|
||||
`skill_fee_id` int(6) NOT NULL DEFAULT '0',
|
||||
`skill_fee_amount` int(6) NOT NULL DEFAULT '0',
|
||||
`buff_group` int(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`npc_id`,`skill_id`,`buff_group`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT IGNORE INTO `custom_npc_buffer` VALUES
|
||||
(1000003,264,1,57,100,264),
|
||||
(1000003,265,1,57,100,265),
|
||||
(1000003,266,1,57,100,266),
|
||||
(1000003,267,1,57,100,267),
|
||||
(1000003,268,1,57,100,268),
|
||||
(1000003,269,1,57,100,269),
|
||||
(1000003,270,1,57,100,270),
|
||||
(1000003,271,1,57,100,271),
|
||||
(1000003,272,1,57,100,272),
|
||||
(1000003,273,1,57,100,273),
|
||||
(1000003,274,1,57,100,274),
|
||||
(1000003,275,1,57,100,275),
|
||||
(1000003,276,1,57,100,276),
|
||||
(1000003,277,1,57,100,277),
|
||||
(1000003,304,1,57,100,304),
|
||||
(1000003,305,1,57,100,305),
|
||||
(1000003,306,1,57,100,306),
|
||||
(1000003,307,1,57,100,307),
|
||||
(1000003,308,1,57,100,308),
|
||||
(1000003,309,1,57,100,309),
|
||||
(1000003,310,1,57,100,310),
|
||||
(1000003,311,1,57,100,311),
|
||||
(1000003,349,1,57,100,349),
|
||||
(1000003,363,1,57,100,363),
|
||||
(1000003,364,1,57,100,364),
|
||||
(1000003,366,1,57,100,366),
|
||||
(1000003,367,1,57,100,367),
|
||||
(1000003,529,1,57,100,529),
|
||||
(1000003,530,1,57,100,530),
|
||||
(1000003,1032,1,57,100,1032),
|
||||
(1000003,1033,1,57,100,1033),
|
||||
(1000003,1035,1,57,100,1035),
|
||||
(1000003,1036,1,57,100,1036),
|
||||
(1000003,1040,1,57,100,1040),
|
||||
(1000003,1043,1,57,100,1043),
|
||||
(1000003,1044,1,57,100,1044),
|
||||
(1000003,1045,1,57,100,1045),
|
||||
(1000003,1048,1,57,100,1048),
|
||||
(1000003,1059,1,57,100,1059),
|
||||
(1000003,1062,1,57,100,1062),
|
||||
(1000003,1068,1,57,100,1068),
|
||||
(1000003,1077,1,57,100,1077),
|
||||
(1000003,1078,1,57,100,1078),
|
||||
(1000003,1085,1,57,100,1085),
|
||||
(1000003,1086,1,57,100,1086),
|
||||
(1000003,1182,1,57,100,1182),
|
||||
(1000003,1189,1,57,100,1189),
|
||||
(1000003,1191,1,57,100,1191),
|
||||
(1000003,1204,1,57,100,1204),
|
||||
(1000003,1240,1,57,100,1240),
|
||||
(1000003,1242,1,57,100,1242),
|
||||
(1000003,1243,1,57,100,1243),
|
||||
(1000003,1303,1,57,100,1303),
|
||||
(1000003,1397,1,57,100,1397);
|
@@ -1,22 +0,0 @@
|
||||
DROP TABLE IF EXISTS `npc_buffer`;
|
||||
CREATE TABLE `npc_buffer` (
|
||||
`npc_id` int(6) NOT NULL,
|
||||
`skill_id` int(6) NOT NULL,
|
||||
`skill_level` int(6) NOT NULL DEFAULT '1',
|
||||
`skill_fee_id` int(6) NOT NULL DEFAULT '0',
|
||||
`skill_fee_amount` int(6) NOT NULL DEFAULT '0',
|
||||
`buff_group` int(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`npc_id`,`skill_id`,`buff_group`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `npc_buffer` VALUES
|
||||
(36402,4356,3,0,0,4356),
|
||||
(36402,4352,2,0,0,4352),
|
||||
(36402,4345,3,0,0,4345),
|
||||
(36402,4359,3,0,0,4359),
|
||||
(36402,4351,6,0,0,4351),
|
||||
(36402,4355,3,0,0,4355),
|
||||
(36402,4357,2,0,0,4357),
|
||||
(36402,4342,2,0,0,4342),
|
||||
(36402,4358,3,0,0,4358),
|
||||
(36402,4360,3,0,0,4360);
|
@@ -1,178 +0,0 @@
|
||||
DROP TABLE IF EXISTS `npcbuffer_buff_list`;
|
||||
DROP TABLE IF EXISTS `npcbuffer_scheme_contents`;
|
||||
DROP TABLE IF EXISTS `npcbuffer_scheme_list`;
|
||||
|
||||
CREATE TABLE `npcbuffer_buff_list` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`buff_class` int(2) DEFAULT NULL,
|
||||
`buffType` varchar(10) DEFAULT NULL,
|
||||
`buffId` int(5) DEFAULT '0',
|
||||
`buffLevel` int(5) DEFAULT NULL,
|
||||
`forClass` tinyint(1) DEFAULT NULL,
|
||||
`canUse` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) AUTO_INCREMENT=136;
|
||||
CREATE TABLE `npcbuffer_scheme_contents` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`scheme_id` int(11) DEFAULT NULL,
|
||||
`skill_id` int(8) DEFAULT NULL,
|
||||
`skill_level` int(4) DEFAULT NULL,
|
||||
`buff_class` int(2) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) AUTO_INCREMENT=30;
|
||||
CREATE TABLE `npcbuffer_scheme_list` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`player_id` varchar(40) DEFAULT NULL,
|
||||
`scheme_name` varchar(36) DEFAULT NULL,
|
||||
`mod_accepted` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) AUTO_INCREMENT=7;
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('1', '0', 'buff', '1036', '2', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('2', '0', 'buff', '1040', '3', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('3', '0', 'buff', '1043', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('4', '0', 'buff', '1044', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('5', '0', 'buff', '1045', '6', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('6', '0', 'buff', '1047', '4', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('7', '0', 'buff', '1048', '6', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('8', '0', 'buff', '1059', '3', '1', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('9', '0', 'buff', '1068', '3', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('10', '0', 'buff', '1077', '3', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('11', '0', 'buff', '1085', '3', '1', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('12', '0', 'buff', '1086', '2', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('13', '0', 'buff', '1087', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('14', '0', 'buff', '1204', '2', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('15', '0', 'buff', '1240', '3', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('16', '0', 'buff', '1242', '3', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('17', '0', 'buff', '1243', '6', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('18', '0', 'buff', '1257', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('19', '0', 'buff', '1268', '4', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('20', '0', 'buff', '1303', '2', '1', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('21', '0', 'buff', '1304', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('22', '0', 'buff', '1307', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('23', '0', 'buff', '1311', '6', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('24', '0', 'buff', '1397', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('25', '0', 'buff', '1460', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('26', '0', 'buff', '1232', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('27', '0', 'buff', '1238', '3', '3', '0');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('28', '0', 'special', '1323', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('29', '0', 'special', '1388', '3', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('30', '0', 'special', '1389', '3', '1', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('31', '1', 'song', '264', '1', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('32', '1', 'song', '265', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('33', '1', 'song', '266', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('34', '1', 'song', '267', '1', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('35', '1', 'song', '268', '1', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('36', '1', 'song', '269', '1', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('37', '1', 'song', '270', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('38', '1', 'song', '304', '1', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('39', '1', 'song', '305', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('40', '1', 'song', '306', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('41', '1', 'song', '308', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('42', '1', 'song', '349', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('43', '1', 'song', '363', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('44', '1', 'song', '364', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('45', '1', 'song', '529', '1', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('48', '2', 'dance', '271', '1', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('49', '2', 'dance', '272', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('50', '2', 'dance', '273', '1', '1', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('51', '2', 'dance', '274', '1', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('52', '2', 'dance', '275', '1', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('53', '2', 'dance', '276', '1', '1', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('54', '2', 'dance', '277', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('55', '2', 'dance', '307', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('56', '2', 'dance', '309', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('57', '2', 'dance', '310', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('58', '2', 'dance', '311', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('59', '2', 'dance', '365', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('60', '2', 'dance', '366', '1', '3', '0');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('61', '2', 'dance', '530', '1', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('64', '3', 'resist', '1461', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('65', '3', 'chant', '1002', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('66', '3', 'chant', '1006', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('67', '3', 'chant', '1007', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('68', '3', 'chant', '1009', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('69', '3', 'chant', '1251', '2', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('70', '3', 'chant', '1252', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('71', '3', 'chant', '1253', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('72', '3', 'chant', '1284', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('73', '3', 'chant', '1308', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('74', '3', 'chant', '1309', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('75', '3', 'chant', '1310', '4', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('76', '3', 'chant', '1362', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('77', '3', 'special', '1499', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('78', '3', 'special', '1500', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('79', '3', 'special', '1501', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('80', '3', 'special', '1502', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('81', '3', 'special', '1503', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('82', '3', 'special', '1504', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('83', '3', 'special', '1519', '1', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('84', '4', 'others', '825', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('85', '4', 'others', '826', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('86', '4', 'others', '827', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('87', '4', 'others', '828', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('88', '4', 'others', '829', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('89', '4', 'others', '830', '1', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('90', '5', 'others', '834', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('91', '5', 'others', '1442', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('92', '5', 'others', '1443', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('93', '5', 'others', '1444', '1', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('94', '6', 'cubic', '67', '7', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('95', '6', 'cubic', '10', '8', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('96', '6', 'cubic', '22', '7', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('97', '6', 'cubic', '33', '8', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('98', '6', 'cubic', '278', '6', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('99', '6', 'cubic', '449', '4', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('100', '6', 'cubic', '1279', '9', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('101', '6', 'cubic', '1280', '9', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('102', '6', 'cubic', '1281', '9', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('103', '6', 'cubic', '1328', '8', '3', '0');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('104', '6', 'cubic', '1329', '9', '3', '0');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('105', '6', 'cubic', '1330', '8', '3', '0');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('106', '6', 'cubic', '779', '1', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('107', '7', 'special', '1062', '2', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('108', '7', 'special', '1355', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('109', '7', 'special', '1356', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('110', '7', 'special', '1357', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('111', '7', 'special', '1363', '1', '0', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('112', '7', 'special', '1413', '1', '1', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('114', '7', 'special', '1457', '1', '3', '0');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('115', '7', 'special', '4699', '13', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('116', '7', 'special', '4700', '13', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('117', '7', 'special', '4702', '13', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('118', '7', 'special', '4703', '13', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('119', '8', 'resist', '1032', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('120', '8', 'resist', '1033', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('121', '8', 'resist', '1035', '4', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('122', '8', 'resist', '1078', '6', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('123', '8', 'resist', '1182', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('124', '8', 'resist', '1189', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('125', '8', 'resist', '1191', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('126', '8', 'resist', '1259', '4', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('127', '8', 'resist', '1352', '1', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('128', '8', 'resist', '1353', '1', '2', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('129', '8', 'resist', '1354', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('130', '8', 'resist', '1392', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('131', '8', 'resist', '1393', '3', '3', '1');
|
||||
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('132', '8', 'overlord', '1003', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('133', '8', 'overlord', '1004', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('134', '8', 'overlord', '1005', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('135', '8', 'overlord', '1008', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('136', '8', 'overlord', '1249', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('137', '8', 'overlord', '1250', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('138', '8', 'overlord', '1260', '3', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('139', '8', 'overlord', '1261', '2', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('140', '8', 'overlord', '1282', '2', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('141', '8', 'overlord', '1364', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('142', '8', 'overlord', '1365', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('143', '8', 'overlord', '1415', '1', '3', '1');
|
||||
INSERT INTO `npcbuffer_buff_list` VALUES ('144', '8', 'overlord', '1416', '1', '3', '1');
|
10
L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/ShemeBuffer.ini
vendored
Normal file
10
L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/ShemeBuffer.ini
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#=============================================================
|
||||
# Buffer
|
||||
#=============================================================
|
||||
# Also check data\SchemeBufferSkills.xml
|
||||
|
||||
# Maximum number of available schemes per player.
|
||||
BufferMaxSchemesPerChar = 4
|
||||
|
||||
# Static cost of buffs ; override skills price if different of -1.
|
||||
BufferStaticCostPerBuff = -1
|
69
L2J_Mobius_CT_2.6_HighFive/dist/game/data/SchemeBufferSkills.xml
vendored
Normal file
69
L2J_Mobius_CT_2.6_HighFive/dist/game/data/SchemeBufferSkills.xml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/SchemeBufferSkills.xsd">
|
||||
<category type="Buffs">
|
||||
<buff id="1035" price="0" desc="Increases resistance to mental attacks." /> <!-- Mental Shield -->
|
||||
<buff id="1036" price="0" desc="Increases M. Def." /> <!-- Magic Barrier -->
|
||||
<buff id="1040" price="0" desc="Increases P. Def." /> <!-- Shield -->
|
||||
<buff id="1045" price="0" desc="Increases maximum HP." /> <!-- Blessed Body -->
|
||||
<buff id="1048" price="0" desc="Increases maximum MP." /> <!-- Blessed Soul -->
|
||||
<buff id="1059" price="0" desc="Increases M. Atk." /> <!-- Empower -->
|
||||
<buff id="1062" price="0" desc="Reduces def. and increase atk. power." /> <!-- Berserker Spirit -->
|
||||
<buff id="1068" price="0" desc="Increases P. Atk." /> <!-- Might -->
|
||||
<buff id="1077" price="0" desc="Increases critical attack rate." /> <!-- Focus -->
|
||||
<buff id="1078" price="0" desc="Increases magic concentration." /> <!-- Concentration -->
|
||||
<buff id="1085" price="0" desc="Increases Casting Spd." /> <!-- Acumen -->
|
||||
<buff id="1086" price="0" desc="Increases Atk. Spd." /> <!-- Haste -->
|
||||
<buff id="1087" price="0" desc="Increases Evasion." /> <!-- Agility -->
|
||||
<buff id="1204" price="0" desc="Increases Speed." /> <!-- Wind Walk -->
|
||||
<buff id="1240" price="0" desc="Increases Accuracy." /> <!-- Guidance -->
|
||||
<buff id="1242" price="0" desc="Increases critical attack." /> <!-- Death Whisper -->
|
||||
<buff id="1243" price="0" desc="Increases shield defense rate." /> <!-- Bless Shield -->
|
||||
<buff id="1259" price="0" desc="Increases resistance to stun attack." /> <!-- Resist Shock -->
|
||||
<buff id="1268" price="0" desc="Restores HP using inflicted damage." /> <!-- Vampiric Rage -->
|
||||
<buff id="1303" price="0" desc="Increases crit. rate of magic attacks." /> <!-- Wild Magic -->
|
||||
<buff id="1304" price="0" desc="Increases shield defense power." /> <!-- Advanced Block -->
|
||||
<buff id="1352" price="0" desc="Increases resistance to atures." /> <!-- Elemental Protection -->
|
||||
<buff id="1353" price="0" desc="Increases resistance to dark attack." /> <!-- Divine Protection -->
|
||||
<buff id="1354" price="0" desc="Increases resistance to de-buff attack." /> <!-- Arcane Protection -->
|
||||
<buff id="1355" price="0" desc="Increases mage abilities." /> <!-- Prophecy of Water -->
|
||||
<buff id="1356" price="0" desc="Increases fighter abilities." /> <!-- Prophecy of Fire -->
|
||||
<buff id="1357" price="0" desc="Increases dagger abilities." /> <!-- Prophecy of Wind -->
|
||||
<buff id="1363" price="0" desc="Increases combat abilities." /> <!-- Chant of Victory -->
|
||||
<buff id="1388" price="0" desc="Increases P. Atk." /> <!-- Greater Might -->
|
||||
<buff id="1389" price="0" desc="Increases P. Def." /> <!-- Greater Shield -->
|
||||
<buff id="1390" price="0" desc="Increases P. Atk." /> <!-- War Chant -->
|
||||
<buff id="1391" price="0" desc="Increases P. Def." /> <!-- Earth Chant -->
|
||||
<buff id="1397" price="0" desc="Decreases MP consumption rate." /> <!-- Clarity -->
|
||||
<buff id="1413" price="0" desc="Increases mage abilities." /> <!-- Magnus' Chant -->
|
||||
</category>
|
||||
<category type="Dances">
|
||||
<buff id="271" price="0" desc="Increases P. Atk." /> <!-- Dance of the Warrior -->
|
||||
<buff id="272" price="0" desc="Increases Accuracy." /> <!-- Dance of Inspiration -->
|
||||
<buff id="273" price="0" desc="Increases M. Atk." /> <!-- Dance of the Mystic -->
|
||||
<buff id="274" price="0" desc="Increases critical damage." /> <!-- Dance of Fire -->
|
||||
<buff id="275" price="0" desc="Increases attack speed." /> <!-- Dance of Fury -->
|
||||
<buff id="276" price="0" desc="Increases Casting Spd." /> <!-- Dance of Concentration -->
|
||||
<buff id="277" price="0" desc="Sacred power to physical attack." /> <!-- Dance of Light -->
|
||||
<buff id="307" price="0" desc="Increases water resistance." /> <!-- Dance of Aqua Guard -->
|
||||
<buff id="309" price="0" desc="Increases earth resistance." /> <!-- Dance of Earth Guard -->
|
||||
<buff id="310" price="0" desc="Restores HP by inflicted damage." /> <!-- Dance of the Vampire -->
|
||||
<buff id="311" price="0" desc="Increases resistance to terrain damage." /> <!-- Dance of Protection -->
|
||||
<buff id="365" price="0" desc="Increases rate of magic crit. damage." /> <!-- Siren's Dance -->
|
||||
</category>
|
||||
<category type="Songs">
|
||||
<buff id="264" price="0" desc="Increases P. Def." /> <!-- Song of Earth -->
|
||||
<buff id="265" price="0" desc="Increases HP regeneration." /> <!-- Song of Life -->
|
||||
<buff id="266" price="0" desc="Increases Evasion." /> <!-- Song of Water -->
|
||||
<buff id="267" price="0" desc="Increases M. Def." /> <!-- Song of Warding -->
|
||||
<buff id="268" price="0" desc="Increases movement." /> <!-- Song of Wind -->
|
||||
<buff id="269" price="0" desc="Increases critical rate." /> <!-- Song of Hunter -->
|
||||
<buff id="270" price="0" desc="Increases resistance to dark magic." /> <!-- Song of Invocation -->
|
||||
<buff id="304" price="0" desc="Increases maximum HP." /> <!-- Song of Vitality -->
|
||||
<buff id="305" price="0" desc="Reflects damage received." /> <!-- Song of Vengeance -->
|
||||
<buff id="306" price="0" desc="Increases resistance to fire." /> <!-- Song of Flame Guard -->
|
||||
<buff id="308" price="0" desc="Increases resistance to wind." /> <!-- Song of Storm Guard -->
|
||||
<buff id="349" price="0" desc="Decreases re-use time." /> <!-- Song of Renewal -->
|
||||
<buff id="363" price="0" desc="Increases MP regeneration rate." /> <!-- Song of Meditation -->
|
||||
<buff id="364" price="0" desc="Decreases re-use time of physical skills." /> <!-- Song of Champion -->
|
||||
</category>
|
||||
</list>
|
@@ -1,23 +0,0 @@
|
||||
<html><title>Core NPC Buffer</title>
|
||||
<body>
|
||||
<center>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br><br>
|
||||
Please tell me the buff you would like.<br><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 530">Dance of Alignment</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 307">Dance of Aqua Guard</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 276">Dance of Concentration</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 309">Dance of Earth Guard</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 274">Dance of Fire</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 275">Dance of Fury</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 272">Dance of Inspiration</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 277">Dance of Light</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 311">Dance of Protection</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 366">Dance of Shadows</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 273">Dance of the Mystic</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 310">Dance of the Vampire</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 271">Dance of the Warrior</a><br><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br><br>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
@@ -1,35 +0,0 @@
|
||||
<html><title>Core NPC Buffer</title>
|
||||
<body>
|
||||
<center>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br><br>
|
||||
Please tell me the buff you would like.<br><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1085">Acumen</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1062">Berserk Spirit</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1243">Bless Shield</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1045">Bless the Body</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1048">Bless the Soul</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1078">Concentration</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1397">Clarity</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1242">Death Whisper</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1059">Empower</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1077">Focus</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1240">Guidance</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1086">Haste</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1043">Holy Weapon</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1032">Invigor</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1036">Magic Barrier</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1035">Mental Shield</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1068">Might</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1044">Regeneration</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1182">Resist Aqua</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1191">Resist Fire</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1033">Resist Poison</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1189">Resist Wind</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1040">Shield</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1303">Wild Magic</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 1204">Wind Walk</a><br><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br><br>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
@@ -1,25 +0,0 @@
|
||||
<html><title>Core NPC Buffer</title>
|
||||
<body>
|
||||
<center>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br><br>
|
||||
Please tell me the buff you would like.<br><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 364">Song of Champion</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 264">Song of Earth</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 529">Song of Elemental</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 306">Song of Flame Guard</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 269">Song of Hunter</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 270">Song of Invocation</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 265">Song of Life</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 363">Song of Meditation</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 349">Song of Renewal</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 308">Song of Storm Guard</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 305">Song of Vengeance</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 304">Song of Vitality</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 267">Song of Warding</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 266">Song of Water</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buff 268">Song of Wind</a><br><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br><br>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
@@ -1,12 +0,0 @@
|
||||
<html><title>Core NPC Buffer</title>
|
||||
<body>
|
||||
<center>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br><br>
|
||||
Please tell me the player style you are so I can give you 20 recommended buffs.<br><br>
|
||||
<button action="bypass -h npc_%objectId%_Buff 264 266 268 269 271 274 275 304 310 1036 1040 1045 1062 1068 1077 1086 1240 1242" value="Fighter" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br><br>
|
||||
<button action="bypass -h npc_%objectId%_Buff 264 266 268 273 276 304 1035 1040 1045 1048 1062 1085 1240" value="Mage" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br><br>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
@@ -1,22 +0,0 @@
|
||||
<html><title>NPC Buffer</title>
|
||||
<body>
|
||||
<center>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br><br>
|
||||
</center>
|
||||
Hello,<br>
|
||||
Please have your Express Credit Card ready for this transaction.<br><br>
|
||||
Oh, wait you play on a Server, that means you can put away that<br>
|
||||
Express Credit Card, and use your pocket change to pay for these buffs...<br><br>
|
||||
I'd normally charge you 200 adena per buff, but since I think you're cute, I'll charge half off<br><br>
|
||||
That means you pay 100 adena per buff only.<br><br>
|
||||
*wink*Aren't I nice...<br><br>
|
||||
<center>
|
||||
What type of buffs would you like?<br><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 1" value="Dance" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 2" value="Prophet" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 3" value="Song" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>
|
||||
<button action="bypass -h npc_%objectId%_Chat 4" value="Preset" width=200 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>
|
||||
<img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
14
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/mods/SchemeBuffer/50008-1.htm
vendored
Normal file
14
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/mods/SchemeBuffer/50008-1.htm
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
<font color="LEVEL">You can create up to %max_schemes% schemes.</font> Is it clear for you?<br1>
|
||||
If not, read until you get it! I can't afford idiots...<br>
|
||||
You can register a new scheme filling this form, here!
|
||||
<center><table width=220>
|
||||
<tr>
|
||||
<td width="140"><edit var="name" width=140 height=15></td>
|
||||
<td width="60"><button value="Create" action="bypass -h npc_%objectId%_createscheme $name" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td>
|
||||
</tr>
|
||||
</table></center><br>
|
||||
Here are listed your schemes and their fee.<br>
|
||||
%schemes%<br>
|
||||
<a action="bypass -h npc_%objectId%_menu">Back</a>
|
||||
</body></html>
|
8
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/mods/SchemeBuffer/50008-2.htm
vendored
Normal file
8
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/mods/SchemeBuffer/50008-2.htm
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>
|
||||
<font color="LEVEL">%schemename%</font> scheme holds %count% buffs.<br>
|
||||
<center>
|
||||
%typesframe%<br>
|
||||
%skilllistframe%<br>
|
||||
</center>
|
||||
<a action="bypass -h npc_%objectId%_support">Back</a>
|
||||
</body></html>
|
8
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/mods/SchemeBuffer/50008.htm
vendored
Normal file
8
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/mods/SchemeBuffer/50008.htm
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>
|
||||
Hello stranger!<br>
|
||||
Yup, you're right, I decided to share some of my powerful buffs in order to improve your pew-pew-bum-zap abilities.<br>
|
||||
What can I do for you?<br>
|
||||
<a action="bypass -h npc_%objectId%_support">Magic support</a><br>
|
||||
<a action="bypass -h npc_%objectId%_heal">Heal me and my pet</a><br1>
|
||||
<a action="bypass -h npc_%objectId%_cleanup">Cleanup all effects on me and my pet</a>
|
||||
</body></html>
|
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,8 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.NpcBufferTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.NpcBufferTable.NpcBufferData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -283,16 +282,10 @@ public class OlympiadManagerLink implements IBypassHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
final NpcBufferData npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(target.getId(), BUFFS[index]);
|
||||
if (npcBuffGroupInfo == null)
|
||||
{
|
||||
LOGGER.warning("Olympiad Buffer Warning: npcId = " + target.getId() + " Location: " + target.getX() + ", " + target.getY() + ", " + target.getZ() + " Player: " + activeChar.getName() + " has tried to use skill group (" + params[1] + ") not assigned to the NPC Buffer!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (buffCount > 0)
|
||||
{
|
||||
final Skill skill = npcBuffGroupInfo.getSkill().getSkill();
|
||||
// TODO: Add allowed buff list check?
|
||||
final Skill skill = SkillData.getInstance().getSkill(target.getId(), BUFFS[index]);
|
||||
if (skill != null)
|
||||
{
|
||||
target.setTarget(activeChar);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/npcs.xsd">
|
||||
<npc id="12" displayId="32226" name="Neonin" usingServerSideName="true" title="Scheme Buffer" usingServerSideTitle="true">
|
||||
<npc id="50008" displayId="32226" type="L2SchemeBuffer" name="Neonin" usingServerSideName="true" title="Scheme Buffer" usingServerSideTitle="true">
|
||||
<collision>
|
||||
<radius normal="11" />
|
||||
<height normal="22.25" />
|
||||
|
@@ -52,10 +52,4 @@
|
||||
<height normal="12.5" />
|
||||
</collision>
|
||||
</npc>
|
||||
<npc id="1000003" displayId="32226" name="Shiela" usingServerSideName="true" title="NPC Buffer" usingServerSideTitle="true" type="L2NpcBuffer">
|
||||
<collision>
|
||||
<radius normal="11" />
|
||||
<height normal="22.25" />
|
||||
</collision>
|
||||
</npc>
|
||||
</list>
|
32
L2J_Mobius_CT_2.6_HighFive/dist/game/data/xsd/SchemeBufferSkills.xsd
vendored
Normal file
32
L2J_Mobius_CT_2.6_HighFive/dist/game/data/xsd/SchemeBufferSkills.xsd
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="list">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="category" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Magnus' Chant Siren's Dance Song of Champion</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="buff" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Mental Shield Magic Barrier Shield Blessed Body Blessed Soul Empower Berserker Spirit Might Focus Concentration Acumen Haste Agility Wind Walk Guidance Death Whisper Bless Shield Resist Shock Vampiric Rage Wild Magic Advanced Block Elemental Protection Divine Protection Arcane Protection Prophecy of Water Prophecy of Fire Prophecy of Wind Chant of Victory Greater Might Greater Shield War Chant Earth Chant Clarity Dance of the Warrior Dance of Inspiration Dance of the Mystic Dance of Fire Dance of Fury Dance of Concentration Dance of Light Dance of Aqua Guard Dance of Earth Guard Dance of the Vampire Dance of Protection Song of Earth Song of Life Song of Water Song of Warding Song of Wind Song of Hunter Song of Invocation Song of Vitality Song of Vengeance Song of Flame Guard Song of Storm Guard Song of Renewal Song of Meditation</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:short" name="id" use="optional"/>
|
||||
<xs:attribute type="xs:byte" name="price" use="optional"/>
|
||||
<xs:attribute type="xs:string" name="desc" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute type="xs:string" name="type" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -128,6 +128,7 @@ public final class Config
|
||||
public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini";
|
||||
public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini";
|
||||
public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini";
|
||||
public static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini";
|
||||
public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini";
|
||||
public static final String CUSTOM_TVT_CONFIG_FILE = "./config/Custom/TeamVersusTeam.ini";
|
||||
public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini";
|
||||
@@ -1175,6 +1176,8 @@ public final class Config
|
||||
public static boolean OFFLINE_FAME;
|
||||
public static boolean STORE_OFFLINE_TRADE_IN_REALTIME;
|
||||
public static boolean DISPLAY_SERVER_TIME;
|
||||
public static int BUFFER_MAX_SCHEMES;
|
||||
public static int BUFFER_STATIC_BUFF_COST;
|
||||
public static boolean WELCOME_MESSAGE_ENABLED;
|
||||
public static String WELCOME_MESSAGE_TEXT;
|
||||
public static int WELCOME_MESSAGE_TIME;
|
||||
@@ -3021,6 +3024,12 @@ public final class Config
|
||||
|
||||
DISPLAY_SERVER_TIME = ServerTime.getBoolean("DisplayServerTime", false);
|
||||
|
||||
// Load SchemeBuffer config file (if exists)
|
||||
final PropertiesParser SchemeBuffer = new PropertiesParser(CUSTOM_SCHEME_BUFFER_CONFIG_FILE);
|
||||
|
||||
BUFFER_MAX_SCHEMES = SchemeBuffer.getInt("BufferMaxSchemesPerChar", 4);
|
||||
BUFFER_STATIC_BUFF_COST = SchemeBuffer.getInt("BufferStaticCostPerBuff", -1);
|
||||
|
||||
// Load StartingLocation config file (if exists)
|
||||
final PropertiesParser StartingLocation = new PropertiesParser(CUSTOM_STARTING_LOCATION_CONFIG_FILE);
|
||||
|
||||
|
@@ -38,7 +38,6 @@ import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharSummonTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CrestTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.NpcBufferTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.TeleportLocationTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
|
||||
@@ -81,6 +80,7 @@ import com.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.UIData;
|
||||
import com.l2jmobius.gameserver.datatables.AugmentationData;
|
||||
import com.l2jmobius.gameserver.datatables.BotReportTable;
|
||||
import com.l2jmobius.gameserver.datatables.SchemeBufferTable;
|
||||
import com.l2jmobius.gameserver.datatables.EventDroplist;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.datatables.MerchantPriceConfigTable;
|
||||
@@ -273,7 +273,7 @@ public class GameServer
|
||||
StaticObjectData.getInstance();
|
||||
ItemAuctionManager.getInstance();
|
||||
CastleManager.getInstance().loadInstances();
|
||||
NpcBufferTable.getInstance();
|
||||
SchemeBufferTable.getInstance();
|
||||
ZoneManager.getInstance();
|
||||
GrandBossManager.getInstance().initZones();
|
||||
EventDroplist.getInstance();
|
||||
|
@@ -1,199 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
|
||||
public class NpcBufferTable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(NpcBufferTable.class.getName());
|
||||
|
||||
private final Map<Integer, NpcBufferSkills> _buffers = new HashMap<>();
|
||||
|
||||
public static class NpcBufferData
|
||||
{
|
||||
private final SkillHolder _skill;
|
||||
private final ItemHolder _fee;
|
||||
|
||||
protected NpcBufferData(int skillId, int skillLevel, int feeId, int feeAmount)
|
||||
{
|
||||
_skill = new SkillHolder(skillId, skillLevel);
|
||||
_fee = new ItemHolder(feeId, feeAmount);
|
||||
}
|
||||
|
||||
public SkillHolder getSkill()
|
||||
{
|
||||
return _skill;
|
||||
}
|
||||
|
||||
public ItemHolder getFee()
|
||||
{
|
||||
return _fee;
|
||||
}
|
||||
}
|
||||
|
||||
private static class NpcBufferSkills
|
||||
{
|
||||
private final int _npcId;
|
||||
private final Map<Integer, NpcBufferData> _skills = new HashMap<>();
|
||||
|
||||
protected NpcBufferSkills(int npcId)
|
||||
{
|
||||
_npcId = npcId;
|
||||
}
|
||||
|
||||
public void addSkill(int skillId, int skillLevel, int skillFeeId, int skillFeeAmount, int buffGroup)
|
||||
{
|
||||
_skills.put(buffGroup, new NpcBufferData(skillId, skillLevel, skillFeeId, skillFeeAmount));
|
||||
}
|
||||
|
||||
public NpcBufferData getSkillGroupInfo(int buffGroup)
|
||||
{
|
||||
return _skills.get(buffGroup);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public int getNpcId()
|
||||
{
|
||||
return _npcId;
|
||||
}
|
||||
}
|
||||
|
||||
protected NpcBufferTable()
|
||||
{
|
||||
int skillCount = 0;
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rset = s.executeQuery("SELECT `npc_id`,`skill_id`,`skill_level`,`skill_fee_id`,`skill_fee_amount`,`buff_group` FROM `npc_buffer` ORDER BY `npc_id` ASC"))
|
||||
{
|
||||
int lastNpcId = 0;
|
||||
NpcBufferSkills skills = null;
|
||||
|
||||
while (rset.next())
|
||||
{
|
||||
final int npcId = rset.getInt("npc_id");
|
||||
final int skillId = rset.getInt("skill_id");
|
||||
final int skillLevel = rset.getInt("skill_level");
|
||||
final int skillFeeId = rset.getInt("skill_fee_id");
|
||||
final int skillFeeAmount = rset.getInt("skill_fee_amount");
|
||||
final int buffGroup = rset.getInt("buff_group");
|
||||
|
||||
if (npcId != lastNpcId)
|
||||
{
|
||||
if (lastNpcId != 0)
|
||||
{
|
||||
_buffers.put(lastNpcId, skills);
|
||||
}
|
||||
|
||||
skills = new NpcBufferSkills(npcId);
|
||||
skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
|
||||
}
|
||||
else if (skills != null)
|
||||
{
|
||||
skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
|
||||
}
|
||||
|
||||
lastNpcId = npcId;
|
||||
skillCount++;
|
||||
}
|
||||
|
||||
if (lastNpcId != 0)
|
||||
{
|
||||
_buffers.put(lastNpcId, skills);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Error reading npc_buffer table: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
if (Config.CUSTOM_NPCBUFFER_TABLES)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rset = s.executeQuery("SELECT `npc_id`,`skill_id`,`skill_level`,`skill_fee_id`,`skill_fee_amount`,`buff_group` FROM `custom_npc_buffer` ORDER BY `npc_id` ASC"))
|
||||
{
|
||||
int lastNpcId = 0;
|
||||
NpcBufferSkills skills = null;
|
||||
while (rset.next())
|
||||
{
|
||||
final int npcId = rset.getInt("npc_id");
|
||||
final int skillId = rset.getInt("skill_id");
|
||||
final int skillLevel = rset.getInt("skill_level");
|
||||
final int skillFeeId = rset.getInt("skill_fee_id");
|
||||
final int skillFeeAmount = rset.getInt("skill_fee_amount");
|
||||
final int buffGroup = rset.getInt("buff_group");
|
||||
|
||||
if (npcId != lastNpcId)
|
||||
{
|
||||
if (lastNpcId != 0)
|
||||
{
|
||||
_buffers.put(lastNpcId, skills);
|
||||
}
|
||||
|
||||
skills = new NpcBufferSkills(npcId);
|
||||
skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
|
||||
}
|
||||
else if (skills != null)
|
||||
{
|
||||
skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
|
||||
}
|
||||
lastNpcId = npcId;
|
||||
skillCount++;
|
||||
}
|
||||
|
||||
if (lastNpcId != 0)
|
||||
{
|
||||
_buffers.put(lastNpcId, skills);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Error reading custom_npc_buffer table: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _buffers.size() + " buffers and " + skillCount + " skills.");
|
||||
}
|
||||
|
||||
public NpcBufferData getSkillInfo(int npcId, int buffGroup)
|
||||
{
|
||||
final NpcBufferSkills skills = _buffers.get(npcId);
|
||||
return skills != null ? skills.getSkillGroupInfo(buffGroup) : null;
|
||||
}
|
||||
|
||||
public static NpcBufferTable getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final NpcBufferTable _instance = new NpcBufferTable();
|
||||
}
|
||||
}
|
@@ -0,0 +1,289 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.datatables;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.model.holders.BuffSkillHolder;
|
||||
|
||||
/**
|
||||
* This class loads available skills and stores players' buff schemes into _schemesTable.
|
||||
*/
|
||||
public class SchemeBufferTable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SchemeBufferTable.class.getName());
|
||||
|
||||
private static final String LOAD_SCHEMES = "SELECT * FROM buffer_schemes";
|
||||
private static final String DELETE_SCHEMES = "TRUNCATE TABLE buffer_schemes";
|
||||
private static final String INSERT_SCHEME = "INSERT INTO buffer_schemes (object_id, scheme_name, skills) VALUES (?,?,?)";
|
||||
|
||||
private final Map<Integer, HashMap<String, ArrayList<Integer>>> _schemesTable = new ConcurrentHashMap<>();
|
||||
private final Map<Integer, BuffSkillHolder> _availableBuffs = new LinkedHashMap<>();
|
||||
|
||||
public SchemeBufferTable()
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
PreparedStatement st = con.prepareStatement(LOAD_SCHEMES);
|
||||
ResultSet rs = st.executeQuery();
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
final int objectId = rs.getInt("object_id");
|
||||
|
||||
final String schemeName = rs.getString("scheme_name");
|
||||
final String[] skills = rs.getString("skills").split(",");
|
||||
|
||||
ArrayList<Integer> schemeList = new ArrayList<>();
|
||||
|
||||
for (String skill : skills)
|
||||
{
|
||||
// Don't feed the skills list if the list is empty.
|
||||
if (skill.isEmpty())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
schemeList.add(Integer.valueOf(skill));
|
||||
}
|
||||
|
||||
setScheme(objectId, schemeName, schemeList);
|
||||
count++;
|
||||
}
|
||||
|
||||
rs.close();
|
||||
st.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("BufferTable: Failed to load buff schemes : " + e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
Document doc = db.parse(new File("./data/SchemeBufferSkills.xml"));
|
||||
|
||||
final Node n = doc.getFirstChild();
|
||||
|
||||
for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
|
||||
{
|
||||
if (!d.getNodeName().equalsIgnoreCase("category"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final String category = d.getAttributes().getNamedItem("type").getNodeValue();
|
||||
|
||||
for (Node c = d.getFirstChild(); c != null; c = c.getNextSibling())
|
||||
{
|
||||
if (!c.getNodeName().equalsIgnoreCase("buff"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final NamedNodeMap attrs = c.getAttributes();
|
||||
final int skillId = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
|
||||
|
||||
_availableBuffs.put(skillId, new BuffSkillHolder(skillId, Integer.parseInt(attrs.getNamedItem("price").getNodeValue()), category, attrs.getNamedItem("desc").getNodeValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("BufferTable: Failed to load buff info : " + e);
|
||||
}
|
||||
LOGGER.info("BufferTable: Loaded " + count + " players schemes and " + _availableBuffs.size() + " available buffs.");
|
||||
}
|
||||
|
||||
public void saveSchemes()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
// Delete all entries from database.
|
||||
PreparedStatement st = con.prepareStatement(DELETE_SCHEMES);
|
||||
st.execute();
|
||||
st.close();
|
||||
|
||||
st = con.prepareStatement(INSERT_SCHEME);
|
||||
|
||||
// Save _schemesTable content.
|
||||
for (Map.Entry<Integer, HashMap<String, ArrayList<Integer>>> player : _schemesTable.entrySet())
|
||||
{
|
||||
for (Map.Entry<String, ArrayList<Integer>> scheme : player.getValue().entrySet())
|
||||
{
|
||||
// Build a String composed of skill ids seperated by a ",".
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (int skillId : scheme.getValue())
|
||||
{
|
||||
sb.append(skillId + ",");
|
||||
}
|
||||
|
||||
// Delete the last "," : must be called only if there is something to delete !
|
||||
if (sb.length() > 0)
|
||||
{
|
||||
sb.setLength(sb.length() - 1);
|
||||
}
|
||||
|
||||
st.setInt(1, player.getKey());
|
||||
st.setString(2, scheme.getKey());
|
||||
st.setString(3, sb.toString());
|
||||
st.addBatch();
|
||||
}
|
||||
}
|
||||
st.executeBatch();
|
||||
st.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("BufferTable: Error while saving schemes : " + e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setScheme(int playerId, String schemeName, ArrayList<Integer> list)
|
||||
{
|
||||
if (!_schemesTable.containsKey(playerId))
|
||||
{
|
||||
_schemesTable.put(playerId, new HashMap<String, ArrayList<Integer>>());
|
||||
}
|
||||
else if (_schemesTable.get(playerId).size() >= Config.BUFFER_MAX_SCHEMES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_schemesTable.get(playerId).put(schemeName, list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param playerId : The player objectId to check.
|
||||
* @return the list of schemes for a given player.
|
||||
*/
|
||||
public Map<String, ArrayList<Integer>> getPlayerSchemes(int playerId)
|
||||
{
|
||||
return _schemesTable.get(playerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param playerId : The player objectId to check.
|
||||
* @param schemeName : The scheme name to check.
|
||||
* @return the List holding skills for the given scheme name and player, or null (if scheme or player isn't registered).
|
||||
*/
|
||||
public List<Integer> getScheme(int playerId, String schemeName)
|
||||
{
|
||||
if ((_schemesTable.get(playerId) == null) || (_schemesTable.get(playerId).get(schemeName) == null))
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return _schemesTable.get(playerId).get(schemeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param playerId : The player objectId to check.
|
||||
* @param schemeName : The scheme name to check.
|
||||
* @param skillId : The skill id to check.
|
||||
* @return true if the skill is already registered on the scheme, or false otherwise.
|
||||
*/
|
||||
public boolean getSchemeContainsSkill(int playerId, String schemeName, int skillId)
|
||||
{
|
||||
final List<Integer> skills = getScheme(playerId, schemeName);
|
||||
if (skills.isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int id : skills)
|
||||
{
|
||||
if (id == skillId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param groupType : The type of skills to return.
|
||||
* @return a list of skills ids based on the given groupType.
|
||||
*/
|
||||
public List<Integer> getSkillsIdsByType(String groupType)
|
||||
{
|
||||
List<Integer> skills = new ArrayList<>();
|
||||
for (BuffSkillHolder skill : _availableBuffs.values())
|
||||
{
|
||||
if (skill.getType().equalsIgnoreCase(groupType))
|
||||
{
|
||||
skills.add(skill.getId());
|
||||
}
|
||||
}
|
||||
return skills;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a list of all buff types available.
|
||||
*/
|
||||
public List<String> getSkillTypes()
|
||||
{
|
||||
List<String> skillTypes = new ArrayList<>();
|
||||
for (BuffSkillHolder skill : _availableBuffs.values())
|
||||
{
|
||||
if (!skillTypes.contains(skill.getType()))
|
||||
{
|
||||
skillTypes.add(skill.getType());
|
||||
}
|
||||
}
|
||||
return skillTypes;
|
||||
}
|
||||
|
||||
public BuffSkillHolder getAvailableBuff(int skillId)
|
||||
{
|
||||
return _availableBuffs.get(skillId);
|
||||
}
|
||||
|
||||
public static SchemeBufferTable getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final SchemeBufferTable INSTANCE = new SchemeBufferTable();
|
||||
}
|
||||
}
|
@@ -103,7 +103,7 @@ public enum InstanceType
|
||||
L2ClanHallDoormenInstance(L2DoormenInstance),
|
||||
// Custom
|
||||
L2ClassMasterInstance(L2NpcInstance),
|
||||
L2NpcBufferInstance(L2Npc),
|
||||
L2SchemeBufferInstance(L2Npc),
|
||||
L2EventMobInstance(L2Npc);
|
||||
|
||||
private final InstanceType _parent;
|
||||
|
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.NpcBufferTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.NpcBufferTable.NpcBufferData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
|
||||
/**
|
||||
* The Class L2NpcBufferInstance.<br>
|
||||
* Zoey76: TODO: Unhardcode as DP base script for NPC Buffers.
|
||||
*/
|
||||
public class L2NpcBufferInstance extends L2Npc
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(L2NpcBufferInstance.class.getName());
|
||||
|
||||
private static final Map<Integer, Integer> pageVal = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Creates a NPC buffer.
|
||||
* @param template the template
|
||||
*/
|
||||
public L2NpcBufferInstance(L2NpcTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.L2NpcBufferInstance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showChatWindow(L2PcInstance player, int val)
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/NpcBuffer.htm");
|
||||
if (val > 0)
|
||||
{
|
||||
htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/NpcBuffer-" + val + ".htm");
|
||||
}
|
||||
|
||||
if (htmContent != null)
|
||||
{
|
||||
final NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
|
||||
npcHtmlMessage.setHtml(htmContent);
|
||||
npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(npcHtmlMessage);
|
||||
}
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBypassFeedback(L2PcInstance player, String command)
|
||||
{
|
||||
// BypassValidation Exploit plug.
|
||||
if ((player == null) || (player.getLastFolkNPC() == null) || (player.getLastFolkNPC().getObjectId() != getObjectId()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
L2Character target = player;
|
||||
if (command.startsWith("Pet"))
|
||||
{
|
||||
if (!player.hasSummon()) // TODO: Should be hasPet() ?
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
|
||||
showChatWindow(player, 0); // 0 = main window
|
||||
return;
|
||||
}
|
||||
target = player.getSummon();
|
||||
}
|
||||
|
||||
final int npcId = getId();
|
||||
if (command.startsWith("Chat"))
|
||||
{
|
||||
final int val = Integer.parseInt(command.substring(5));
|
||||
|
||||
pageVal.put(player.getObjectId(), val);
|
||||
|
||||
showChatWindow(player, val);
|
||||
}
|
||||
else if (command.startsWith("Buff") || command.startsWith("PetBuff"))
|
||||
{
|
||||
final String[] buffGroupArray = command.substring(command.indexOf("Buff") + 5).split(" ");
|
||||
|
||||
for (String buffGroupList : buffGroupArray)
|
||||
{
|
||||
if (buffGroupList == null)
|
||||
{
|
||||
LOGGER.warning("NPC Buffer Warning: npcId = " + npcId + " has no buffGroup set in the bypass for the buff selected.");
|
||||
return;
|
||||
}
|
||||
|
||||
final int buffGroup = Integer.parseInt(buffGroupList);
|
||||
|
||||
final NpcBufferData npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(npcId, buffGroup);
|
||||
if (npcBuffGroupInfo == null)
|
||||
{
|
||||
LOGGER.warning("NPC Buffer Warning: npcId = " + npcId + " Location: " + getX() + ", " + getY() + ", " + getZ() + " Player: " + player.getName() + " has tried to use skill group (" + buffGroup + ") not assigned to the NPC Buffer!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (npcBuffGroupInfo.getFee().getId() != 0)
|
||||
{
|
||||
final L2ItemInstance itemInstance = player.getInventory().getItemByItemId(npcBuffGroupInfo.getFee().getId());
|
||||
if ((itemInstance == null) || (!itemInstance.isStackable() && (player.getInventory().getInventoryItemCount(npcBuffGroupInfo.getFee().getId(), -1) < npcBuffGroupInfo.getFee().getCount())))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
|
||||
player.sendPacket(sm);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (itemInstance.isStackable())
|
||||
{
|
||||
if (!player.destroyItemByItemId("Npc Buffer", npcBuffGroupInfo.getFee().getId(), npcBuffGroupInfo.getFee().getCount(), player.getTarget(), true))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
|
||||
player.sendPacket(sm);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < npcBuffGroupInfo.getFee().getCount(); ++i)
|
||||
{
|
||||
player.destroyItemByItemId("Npc Buffer", npcBuffGroupInfo.getFee().getId(), 1, player.getTarget(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final Skill skill = SkillData.getInstance().getSkill(npcBuffGroupInfo.getSkill().getSkillId(), npcBuffGroupInfo.getSkill().getSkillLevel());
|
||||
if (skill != null)
|
||||
{
|
||||
skill.applyEffects(player, target);
|
||||
}
|
||||
}
|
||||
|
||||
showChatWindow(player, pageVal.get(player.getObjectId()));
|
||||
}
|
||||
else if (command.startsWith("Heal") || command.startsWith("PetHeal"))
|
||||
{
|
||||
if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().hasAttackStanceTask(target))
|
||||
{
|
||||
final String[] healArray = command.substring(command.indexOf("Heal") + 5).split(" ");
|
||||
|
||||
for (String healType : healArray)
|
||||
{
|
||||
if (healType.equalsIgnoreCase("HP"))
|
||||
{
|
||||
target.setCurrentHp(target.getMaxHp());
|
||||
}
|
||||
else if (healType.equalsIgnoreCase("MP"))
|
||||
{
|
||||
target.setCurrentMp(target.getMaxMp());
|
||||
}
|
||||
else if (healType.equalsIgnoreCase("CP"))
|
||||
{
|
||||
target.setCurrentCp(target.getMaxCp());
|
||||
}
|
||||
}
|
||||
}
|
||||
showChatWindow(player, pageVal.get(player.getObjectId()));
|
||||
}
|
||||
else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs"))
|
||||
{
|
||||
target.stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||
showChatWindow(player, pageVal.get(player.getObjectId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
super.onBypassFeedback(player, command);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,450 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.datatables.SchemeBufferTable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
public class L2SchemeBufferInstance extends L2Npc
|
||||
{
|
||||
private static final int PAGE_LIMIT = 6;
|
||||
|
||||
public L2SchemeBufferInstance(L2NpcTemplate template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBypassFeedback(L2PcInstance player, String command)
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(command, " ");
|
||||
String currentCommand = st.nextToken();
|
||||
|
||||
if (currentCommand.startsWith("menu"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), getHtmlPath(getId(), 0));
|
||||
html.replace("%objectId%", getObjectId());
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else if (currentCommand.startsWith("cleanup"))
|
||||
{
|
||||
player.stopAllEffects();
|
||||
|
||||
final L2Summon summon = player.getSummon();
|
||||
if (summon != null)
|
||||
{
|
||||
summon.stopAllEffects();
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), getHtmlPath(getId(), 0));
|
||||
html.replace("%objectId%", getObjectId());
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else if (currentCommand.startsWith("heal"))
|
||||
{
|
||||
player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
|
||||
player.setCurrentCp(player.getMaxCp());
|
||||
|
||||
final L2Summon summon = player.getSummon();
|
||||
if (summon != null)
|
||||
{
|
||||
summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp());
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), getHtmlPath(getId(), 0));
|
||||
html.replace("%objectId%", getObjectId());
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else if (currentCommand.startsWith("support"))
|
||||
{
|
||||
showGiveBuffsWindow(player);
|
||||
}
|
||||
else if (currentCommand.startsWith("givebuffs"))
|
||||
{
|
||||
final String schemeName = st.nextToken();
|
||||
final int cost = Integer.parseInt(st.nextToken());
|
||||
|
||||
L2Character target = null;
|
||||
if (st.hasMoreTokens())
|
||||
{
|
||||
final String targetType = st.nextToken();
|
||||
if ((targetType != null) && targetType.equalsIgnoreCase("pet"))
|
||||
{
|
||||
target = player.getSummon();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
target = player;
|
||||
}
|
||||
|
||||
if (target == null)
|
||||
{
|
||||
player.sendMessage("You don't have a pet.");
|
||||
}
|
||||
else if ((cost == 0) || player.reduceAdena("NPC Buffer", cost, this, true))
|
||||
{
|
||||
for (int skillId : SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName))
|
||||
{
|
||||
SkillData.getInstance().getSkill(skillId, SkillData.getInstance().getMaxLevel(skillId)).applyEffects(this, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (currentCommand.startsWith("editschemes"))
|
||||
{
|
||||
showEditSchemeWindow(player, st.nextToken(), st.nextToken(), Integer.parseInt(st.nextToken()));
|
||||
}
|
||||
else if (currentCommand.startsWith("skill"))
|
||||
{
|
||||
final String groupType = st.nextToken();
|
||||
final String schemeName = st.nextToken();
|
||||
|
||||
final int skillId = Integer.parseInt(st.nextToken());
|
||||
final int page = Integer.parseInt(st.nextToken());
|
||||
|
||||
final List<Integer> skills = SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
|
||||
|
||||
if (currentCommand.startsWith("skillselect") && !schemeName.equalsIgnoreCase("none"))
|
||||
{
|
||||
if (skills.size() < player.getStat().getMaxBuffCount())
|
||||
{
|
||||
skills.add(skillId);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendMessage("This scheme has reached the maximum amount of buffs.");
|
||||
}
|
||||
}
|
||||
else if (currentCommand.startsWith("skillunselect"))
|
||||
{
|
||||
skills.remove(Integer.valueOf(skillId));
|
||||
}
|
||||
|
||||
showEditSchemeWindow(player, groupType, schemeName, page);
|
||||
}
|
||||
else if (currentCommand.startsWith("createscheme"))
|
||||
{
|
||||
try
|
||||
{
|
||||
final String schemeName = st.nextToken();
|
||||
if (schemeName.length() > 14)
|
||||
{
|
||||
player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed.");
|
||||
return;
|
||||
}
|
||||
|
||||
final Map<String, ArrayList<Integer>> schemes = SchemeBufferTable.getInstance().getPlayerSchemes(player.getObjectId());
|
||||
if (schemes != null)
|
||||
{
|
||||
if (schemes.size() == Config.BUFFER_MAX_SCHEMES)
|
||||
{
|
||||
player.sendMessage("Maximum schemes amount is already reached.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (schemes.containsKey(schemeName))
|
||||
{
|
||||
player.sendMessage("The scheme name already exists.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SchemeBufferTable.getInstance().setScheme(player.getObjectId(), schemeName.trim(), new ArrayList<Integer>());
|
||||
showGiveBuffsWindow(player);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed.");
|
||||
}
|
||||
}
|
||||
else if (currentCommand.startsWith("deletescheme"))
|
||||
{
|
||||
try
|
||||
{
|
||||
final String schemeName = st.nextToken();
|
||||
final Map<String, ArrayList<Integer>> schemes = SchemeBufferTable.getInstance().getPlayerSchemes(player.getObjectId());
|
||||
|
||||
if ((schemes != null) && schemes.containsKey(schemeName))
|
||||
{
|
||||
schemes.remove(schemeName);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
player.sendMessage("This scheme name is invalid.");
|
||||
}
|
||||
showGiveBuffsWindow(player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHtmlPath(int npcId, int val)
|
||||
{
|
||||
String filename = "";
|
||||
if (val == 0)
|
||||
{
|
||||
filename = "" + npcId;
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = npcId + "-" + val;
|
||||
}
|
||||
|
||||
return "data/html/mods/SchemeBuffer/" + filename + ".htm";
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an html packet to player with Give Buffs menu info for player and pet, depending on targetType parameter {player, pet}
|
||||
* @param player : The player to make checks on.
|
||||
*/
|
||||
private void showGiveBuffsWindow(L2PcInstance player)
|
||||
{
|
||||
final StringBuilder sb = new StringBuilder(200);
|
||||
|
||||
final Map<String, ArrayList<Integer>> schemes = SchemeBufferTable.getInstance().getPlayerSchemes(player.getObjectId());
|
||||
if ((schemes == null) || schemes.isEmpty())
|
||||
{
|
||||
sb.append("<font color=\"LEVEL\">You haven't defined any scheme.</font>");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet())
|
||||
{
|
||||
final int cost = getFee(scheme.getValue());
|
||||
sb.append("<font color=\"LEVEL\">" + scheme.getKey() + " [" + scheme.getValue().size() + " / " + player.getStat().getMaxBuffCount() + "]" + ((cost > 0) ? " - cost: " + NumberFormat.getInstance(Locale.ENGLISH).format(cost) : "") + "</font><br1>");
|
||||
sb.append("<a action=\"bypass -h npc_%objectId%_givebuffs " + scheme.getKey() + " " + cost + "\">Use on Me</a> | ");
|
||||
sb.append("<a action=\"bypass -h npc_%objectId%_givebuffs " + scheme.getKey() + " " + cost + " pet\">Use on Pet</a> | ");
|
||||
sb.append("<a action=\"bypass -h npc_%objectId%_editschemes Buffs " + scheme.getKey() + " 1\">Edit</a> | ");
|
||||
sb.append("<a action=\"bypass -h npc_%objectId%_deletescheme " + scheme.getKey() + "\">Delete</a><br>");
|
||||
}
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), getHtmlPath(getId(), 1));
|
||||
html.replace("%schemes%", sb.toString());
|
||||
html.replace("%max_schemes%", Config.BUFFER_MAX_SCHEMES);
|
||||
html.replace("%objectId%", getObjectId());
|
||||
player.sendPacket(html);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sends an html packet to player with Edit Scheme Menu info. This allows player to edit each created scheme (add/delete skills)
|
||||
* @param player : The player to make checks on.
|
||||
* @param groupType : The group of skills to select.
|
||||
* @param schemeName : The scheme to make check.
|
||||
* @param page The page.
|
||||
*/
|
||||
private void showEditSchemeWindow(L2PcInstance player, String groupType, String schemeName, int page)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
final List<Integer> schemeSkills = SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
|
||||
|
||||
html.setFile(player.getHtmlPrefix(), getHtmlPath(getId(), 2));
|
||||
html.replace("%schemename%", schemeName);
|
||||
html.replace("%count%", schemeSkills.size() + " / " + player.getStat().getMaxBuffCount());
|
||||
html.replace("%typesframe%", getTypesFrame(groupType, schemeName));
|
||||
html.replace("%skilllistframe%", getGroupSkillList(player, groupType, schemeName, page));
|
||||
html.replace("%objectId%", getObjectId());
|
||||
player.sendPacket(html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player : The player to make checks on.
|
||||
* @param groupType : The group of skills to select.
|
||||
* @param schemeName : The scheme to make check.
|
||||
* @param page The page.
|
||||
* @return a String representing skills available to selection for a given groupType.
|
||||
*/
|
||||
private String getGroupSkillList(L2PcInstance player, String groupType, String schemeName, int page)
|
||||
{
|
||||
// Retrieve the entire skills list based on group type.
|
||||
List<Integer> skills = SchemeBufferTable.getInstance().getSkillsIdsByType(groupType);
|
||||
if (skills.isEmpty())
|
||||
{
|
||||
return "That group doesn't contain any skills.";
|
||||
}
|
||||
|
||||
// Calculate page number.
|
||||
final int max = countPagesNumber(skills.size(), PAGE_LIMIT);
|
||||
if (page > max)
|
||||
{
|
||||
page = max;
|
||||
}
|
||||
|
||||
// Cut skills list up to page number.
|
||||
skills = skills.subList((page - 1) * PAGE_LIMIT, Math.min(page * PAGE_LIMIT, skills.size()));
|
||||
|
||||
final List<Integer> schemeSkills = SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName);
|
||||
final StringBuilder sb = new StringBuilder(skills.size() * 150);
|
||||
|
||||
int row = 0;
|
||||
for (int skillId : skills)
|
||||
{
|
||||
sb.append(((row % 2) == 0 ? "<table width=\"280\" bgcolor=\"000000\"><tr>" : "<table width=\"280\"><tr>"));
|
||||
|
||||
if (skillId < 100)
|
||||
{
|
||||
if (schemeSkills.contains(skillId))
|
||||
{
|
||||
sb.append("<td height=40 width=40><img src=\"icon.skill00" + skillId + "\" width=32 height=32></td><td width=190>" + SkillData.getInstance().getSkill(skillId, 1).getName() + "<br1><font color=\"B09878\">" + SchemeBufferTable.getInstance().getAvailableBuff(skillId).getDescription() + "</font></td><td><button action=\"bypass -h npc_%objectId%_skillunselect " + groupType + " " + schemeName + " " + skillId + " " + page + "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomout2\" fore=\"L2UI_CH3.mapbutton_zoomout1\"></td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("<td height=40 width=40><img src=\"icon.skill00" + skillId + "\" width=32 height=32></td><td width=190>" + SkillData.getInstance().getSkill(skillId, 1).getName() + "<br1><font color=\"B09878\">" + SchemeBufferTable.getInstance().getAvailableBuff(skillId).getDescription() + "</font></td><td><button action=\"bypass -h npc_%objectId%_skillselect " + groupType + " " + schemeName + " " + skillId + " " + page + "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomin2\" fore=\"L2UI_CH3.mapbutton_zoomin1\"></td>");
|
||||
}
|
||||
}
|
||||
else if (skillId < 1000)
|
||||
{
|
||||
if (schemeSkills.contains(skillId))
|
||||
{
|
||||
sb.append("<td height=40 width=40><img src=\"icon.skill0" + skillId + "\" width=32 height=32></td><td width=190>" + SkillData.getInstance().getSkill(skillId, 1).getName() + "<br1><font color=\"B09878\">" + SchemeBufferTable.getInstance().getAvailableBuff(skillId).getDescription() + "</font></td><td><button action=\"bypass -h npc_%objectId%_skillunselect " + groupType + " " + schemeName + " " + skillId + " " + page + "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomout2\" fore=\"L2UI_CH3.mapbutton_zoomout1\"></td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("<td height=40 width=40><img src=\"icon.skill0" + skillId + "\" width=32 height=32></td><td width=190>" + SkillData.getInstance().getSkill(skillId, 1).getName() + "<br1><font color=\"B09878\">" + SchemeBufferTable.getInstance().getAvailableBuff(skillId).getDescription() + "</font></td><td><button action=\"bypass -h npc_%objectId%_skillselect " + groupType + " " + schemeName + " " + skillId + " " + page + "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomin2\" fore=\"L2UI_CH3.mapbutton_zoomin1\"></td>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (schemeSkills.contains(skillId))
|
||||
{
|
||||
sb.append("<td height=40 width=40><img src=\"icon.skill" + skillId + "\" width=32 height=32></td><td width=190>" + SkillData.getInstance().getSkill(skillId, 1).getName() + "<br1><font color=\"B09878\">" + SchemeBufferTable.getInstance().getAvailableBuff(skillId).getDescription() + "</font></td><td><button action=\"bypass -h npc_%objectId%_skillunselect " + groupType + " " + schemeName + " " + skillId + " " + page + "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomout2\" fore=\"L2UI_CH3.mapbutton_zoomout1\"></td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("<td height=40 width=40><img src=\"icon.skill" + skillId + "\" width=32 height=32></td><td width=190>" + SkillData.getInstance().getSkill(skillId, 1).getName() + "<br1><font color=\"B09878\">" + SchemeBufferTable.getInstance().getAvailableBuff(skillId).getDescription() + "</font></td><td><button action=\"bypass -h npc_%objectId%_skillselect " + groupType + " " + schemeName + " " + skillId + " " + page + "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomin2\" fore=\"L2UI_CH3.mapbutton_zoomin1\"></td>");
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("</tr></table><img src=\"L2UI.SquareGray\" width=277 height=1>");
|
||||
row++;
|
||||
}
|
||||
|
||||
// Build page footer.
|
||||
sb.append("<br><img src=\"L2UI.SquareGray\" width=277 height=1><table width=\"100%\" bgcolor=000000><tr>");
|
||||
|
||||
if (page > 1)
|
||||
{
|
||||
sb.append("<td align=left width=70><a action=\"bypass -h npc_" + getObjectId() + "_editschemes " + groupType + " " + schemeName + " " + (page - 1) + "\">Previous</a></td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("<td align=left width=70>Previous</td>");
|
||||
}
|
||||
|
||||
sb.append("<td align=center width=100>Page " + page + "</td>");
|
||||
|
||||
if (page < max)
|
||||
{
|
||||
sb.append("<td align=right width=70><a action=\"bypass -h npc_" + getObjectId() + "_editschemes " + groupType + " " + schemeName + " " + (page + 1) + "\">Next</a></td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("<td align=right width=70>Next</td>");
|
||||
}
|
||||
|
||||
sb.append("</tr></table><img src=\"L2UI.SquareGray\" width=277 height=1>");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param groupType : The group of skills to select.
|
||||
* @param schemeName : The scheme to make check.
|
||||
* @return a string representing all groupTypes available. The group currently on selection isn't linkable.
|
||||
*/
|
||||
private static String getTypesFrame(String groupType, String schemeName)
|
||||
{
|
||||
final StringBuilder sb = new StringBuilder(500);
|
||||
sb.append("<table>");
|
||||
|
||||
int count = 0;
|
||||
for (String type : SchemeBufferTable.getInstance().getSkillTypes())
|
||||
{
|
||||
if (count == 0)
|
||||
{
|
||||
sb.append("<tr>");
|
||||
}
|
||||
|
||||
if (groupType.equalsIgnoreCase(type))
|
||||
{
|
||||
sb.append("<td width=65>" + type + "</td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("<td width=65><a action=\"bypass -h npc_%objectId%_editschemes " + type + " " + schemeName + " 1\">" + type + "</a></td>");
|
||||
}
|
||||
|
||||
count++;
|
||||
if (count == 4)
|
||||
{
|
||||
sb.append("</tr>");
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sb.toString().endsWith("</tr>"))
|
||||
{
|
||||
sb.append("</tr>");
|
||||
}
|
||||
|
||||
sb.append("</table>");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list : A list of skill ids.
|
||||
* @return a global fee for all skills contained in list.
|
||||
*/
|
||||
private static int getFee(ArrayList<Integer> list)
|
||||
{
|
||||
if (Config.BUFFER_STATIC_BUFF_COST > 0)
|
||||
{
|
||||
return list.size() * Config.BUFFER_STATIC_BUFF_COST;
|
||||
}
|
||||
|
||||
int fee = 0;
|
||||
for (int sk : list)
|
||||
{
|
||||
fee += SchemeBufferTable.getInstance().getAvailableBuff(sk).getValue();
|
||||
}
|
||||
|
||||
return fee;
|
||||
}
|
||||
|
||||
private static int countPagesNumber(int objectsSize, int pageSize)
|
||||
{
|
||||
return (objectsSize / pageSize) + ((objectsSize % pageSize) == 0 ? 0 : 1);
|
||||
}
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.holders;
|
||||
|
||||
/**
|
||||
* A container used for schemes buffer.
|
||||
*/
|
||||
public final class BuffSkillHolder extends IntIntHolder
|
||||
{
|
||||
private final String _type;
|
||||
private final String _description;
|
||||
|
||||
public BuffSkillHolder(int id, int price, String type, String description)
|
||||
{
|
||||
super(id, price);
|
||||
|
||||
_type = type;
|
||||
_description = description;
|
||||
}
|
||||
|
||||
public final String getType()
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
public final String getDescription()
|
||||
{
|
||||
return _description;
|
||||
}
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.holders;
|
||||
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* A generic int/int container.
|
||||
*/
|
||||
public class IntIntHolder
|
||||
{
|
||||
private int _id;
|
||||
private int _value;
|
||||
|
||||
public IntIntHolder(int id, int value)
|
||||
{
|
||||
_id = id;
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public int getId()
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getValue()
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
public void setId(int id)
|
||||
{
|
||||
_id = id;
|
||||
}
|
||||
|
||||
public void setValue(int value)
|
||||
{
|
||||
_value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the L2Skill associated to the id/value.
|
||||
*/
|
||||
public final Skill getSkill()
|
||||
{
|
||||
return SkillData.getInstance().getSkill(_id, _value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getClass().getSimpleName() + ": Id: " + _id + ", Value: " + _value;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user