diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort.sql
index 00eb12a37e..33143b0805 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/grandboss_data.sql
index a6eea53a0e..d1008dd77e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 229898.48, 667.776), -- Queen Ant
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/items.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles.sql
index 0c8b3d0f9b..8e46191a26 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_done_week_non_classed` tinyint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week_team` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/config/General.ini b/L2J_Mobius_01.0_Ertheia/dist/game/config/General.ini
index e2e7d162ab..3448711898 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/config/General.ini
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/config/General.ini
@@ -426,8 +426,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/ActionData.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/ActionData.xml
index 965751da7b..9b400ad513 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/ActionData.xml
@@ -1,219 +1,252 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/DoorData.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/DoorData.xml
index 0790af5b77..75078aea42 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/DoorData.xml
@@ -11298,6 +11298,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 4c9d1bc4cc..056fe69093 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -252,6 +253,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 6a1e99290e..2ec17e9b00 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
@@ -225,7 +227,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
similarity index 80%
rename from L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
rename to L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
index c99b060259..4f72de76fa 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -1,31 +1,31 @@
-/*
- * 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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
similarity index 80%
rename from L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
rename to L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
index c99b060259..84f20e491a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -1,31 +1,31 @@
-/*
- * 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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 68c2f77658..7e9df354f4 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java
index 5cc212ec6f..95f6b485ff 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java
@@ -16,9 +16,10 @@
*/
package quests.Q00625_TheFinestIngredientsPart2;
-import org.l2jmobius.gameserver.data.SpawnTable;
+import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
@@ -120,7 +121,7 @@ public class Q00625_TheFinestIngredientsPart2 extends Quest
{
rewardItems(player, GREATER_DYE_OF_DEX_2);
}
- qs.exitQuest(false, true);
+ qs.exitQuest(true, true);
htmltext = event;
}
else
@@ -136,12 +137,11 @@ public class Q00625_TheFinestIngredientsPart2 extends Quest
{
if (hasItem(player, FOOD_FOR_BUMBALUMP))
{
+ qs.setCond(2, true);
if (!isBumbalumpSpawned())
{
- qs.setCond(2, true);
takeItem(player, FOOD_FOR_BUMBALUMP);
- final Npc umpaloopa = addSpawn(ICICLE_EMPEROR_BUMBALUMP, ICICLE_EMPEROR_BUMBALUMP_LOC);
- umpaloopa.setSummoner(player);
+ addSpawn(ICICLE_EMPEROR_BUMBALUMP, ICICLE_EMPEROR_BUMBALUMP_LOC);
htmltext = event;
}
else
@@ -154,6 +154,18 @@ public class Q00625_TheFinestIngredientsPart2 extends Quest
htmltext = "31542-04.html";
}
}
+ else if (qs.isCond(2))
+ {
+ if (!isBumbalumpSpawned())
+ {
+ addSpawn(ICICLE_EMPEROR_BUMBALUMP, ICICLE_EMPEROR_BUMBALUMP_LOC);
+ htmltext = event;
+ }
+ else
+ {
+ htmltext = "31542-03.html";
+ }
+ }
break;
}
case "NPC_TALK":
@@ -181,7 +193,7 @@ public class Q00625_TheFinestIngredientsPart2 extends Quest
{
if (talker.getLevel() >= MIN_LEVEL)
{
- htmltext = (hasItem(talker, SOY_SOURCE_JAR)) ? "31521-01.htm" : "31521-02.htm";
+ htmltext = hasItem(talker, SOY_SOURCE_JAR) ? "31521-01.htm" : "31521-02.htm";
}
else
{
@@ -221,18 +233,14 @@ public class Q00625_TheFinestIngredientsPart2 extends Quest
{
case 1:
{
- if (hasItem(talker, FOOD_FOR_BUMBALUMP))
- {
- htmltext = "31542-01.html";
- }
+ htmltext = "31542-01.html";
break;
}
case 2:
{
if (!isBumbalumpSpawned())
{
- final Npc umpaloopa = addSpawn(ICICLE_EMPEROR_BUMBALUMP, ICICLE_EMPEROR_BUMBALUMP_LOC);
- umpaloopa.setSummoner(talker);
+ addSpawn(ICICLE_EMPEROR_BUMBALUMP, ICICLE_EMPEROR_BUMBALUMP_LOC);
htmltext = "31542-02.html";
}
else
@@ -264,20 +272,23 @@ public class Q00625_TheFinestIngredientsPart2 extends Quest
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
- final QuestState qs = getRandomPartyMemberState(killer, 1, 2, npc);
- if ((qs != null) && Util.checkIfInRange(1500, npc, killer, true))
- {
- if (npc.getSummoner() == killer)
- {
- qs.setCond(3, true);
- giveItems(qs.getPlayer(), SPECIAL_YETI_MEAT);
- }
- }
+ executeForEachPlayer(killer, npc, isSummon, true, false);
return super.onKill(npc, killer, isSummon);
}
+ @Override
+ public void actionForEachPlayer(Player player, Npc npc, boolean isSummon)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if ((qs != null) && qs.isCond(2) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, true))
+ {
+ qs.setCond(3, true);
+ giveItems(player, SPECIAL_YETI_MEAT);
+ }
+ }
+
private static boolean isBumbalumpSpawned()
{
- return SpawnTable.getInstance().getAnySpawn(ICICLE_EMPEROR_BUMBALUMP) != null;
+ return World.getInstance().getVisibleObjects().stream().anyMatch(object -> object.getId() == ICICLE_EMPEROR_BUMBALUMP);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml
index e7d9149662..be3105929f 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml
@@ -2254,26 +2254,37 @@
- HUMAN
- FEMALE
-
+ FRIEND
+ MALE
+
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/34000-34099.xml
index e01080c485..8781c15070 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/16300-16399.xml
index 32b05dca8a..ea9c427db0 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/16300-16399.xml
@@ -794,6 +794,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/30000-30099.xml
index 30c64231be..c056683b3a 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/30000-30099.xml
@@ -1584,8 +1584,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt
index 117b6c3638..4422565298 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -196,7 +198,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/Config.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/Config.java
index cf8ebad6d2..23a188f297 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/Config.java
@@ -1242,6 +1242,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1317,6 +1318,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2596,6 +2598,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3353,6 +3356,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 01a9aec62d..93e23a1ba8 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -416,7 +416,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -427,14 +426,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java
index e229501dae..663ea6b31c 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Player.java
index 15b20f8f7c..e3cb3d181b 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4571,7 +4571,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8335,9 +8335,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index a5b88e0118..6e93ee87d7 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index b125be1866..f4ae05dca6 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -43,9 +43,9 @@ import org.l2jmobius.gameserver.enums.AttributeType;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
-import org.l2jmobius.gameserver.instancemanager.ItemCommissionManager;
import org.l2jmobius.gameserver.instancemanager.FortManager;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
+import org.l2jmobius.gameserver.instancemanager.ItemCommissionManager;
import org.l2jmobius.gameserver.instancemanager.MailManager;
import org.l2jmobius.gameserver.instancemanager.PcCafePointsManager;
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
@@ -2241,6 +2241,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index e94a83beb6..07fde85bba 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -38,6 +38,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.OptionData;
import org.l2jmobius.gameserver.enums.AttributeType;
@@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -67,12 +69,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -80,11 +84,13 @@ import org.l2jmobius.gameserver.model.options.EnchantOptions;
import org.l2jmobius.gameserver.model.options.Options;
import org.l2jmobius.gameserver.model.siege.Castle;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.model.skill.SkillConditionScope;
import org.l2jmobius.gameserver.model.variables.ItemVariables;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1580,7 +1586,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2208,6 +2216,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2232,6 +2245,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2257,6 +2272,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index 61caf4ca41..958b8e0bc5 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -736,7 +736,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -888,7 +889,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index 5dbb5b80d0..5f008153ea 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 6894ac0fba..e2e6bb404c 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -129,7 +129,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index ba0cae8d91..3d8867918f 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -701,7 +701,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList(false);
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index 272b2a4e6e..d8e61aaa3e 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -61,6 +61,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, 0, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index d78d842163..07ed7641a9 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,127 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
similarity index 96%
rename from L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
rename to L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
index 52a4032d14..62bb425a5a 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -1,182 +1,182 @@
-/*
- * 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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 7cabe767a2..dcf0dfd50b 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,9 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeShort(0);
- writeShort(0);
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeShort(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeShort(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeShort(0);
+ writeShort(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..5cbe0a07b6 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeShort(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeShort(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_01.0_Ertheia/readme.txt b/L2J_Mobius_01.0_Ertheia/readme.txt
index e1d3241e7a..4ed6098455 100644
--- a/L2J_Mobius_01.0_Ertheia/readme.txt
+++ b/L2J_Mobius_01.0_Ertheia/readme.txt
@@ -6,7 +6,7 @@ Eclipse: https://www.mediafire.com/file/dd2fj30rtvj33lz/eclipse-java-2023-03-R-w
Geodata: http://www.mediafire.com/file/pzykzq2vpy4po2u/L2J_Mobius_01.0_Ertheia_Geodata.zip
Client (password L2jMobius): https://drive.google.com/u/0/uc?id=1MhjWZwmgfNVQeuTLWPJsFIDfeZi2300T&export=download
-System: https://mega.nz/#!s8lghARA!f7Hi1Yx5JWrNjT3kMRaGK_StI1Tnrxnhia8kaG8edSs
+System: https://mega.nz/file/opMwVYTb#GxZnLjDOV0lJvz4oUTwyojVJa9AE_mm1ypcTGSxV1KQ
All provided download links are for personal use. Redistribution of these links is bannable.
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/grandboss_data.sql
index d2dd95c8fd..ac0712c7fa 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 229898.48, 667.776), -- Queen Ant
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/items.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles.sql
index 0c8b3d0f9b..8e46191a26 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_done_week_non_classed` tinyint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week_team` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_02.5_Underground/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_02.5_Underground/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_02.5_Underground/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_02.5_Underground/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_02.5_Underground/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_02.5_Underground/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_02.5_Underground/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_02.5_Underground/dist/game/config/General.ini b/L2J_Mobius_02.5_Underground/dist/game/config/General.ini
index ff90e7e58e..d765d7ce87 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/config/General.ini
+++ b/L2J_Mobius_02.5_Underground/dist/game/config/General.ini
@@ -434,8 +434,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/ActionData.xml b/L2J_Mobius_02.5_Underground/dist/game/data/ActionData.xml
index 965751da7b..0a6251e2e3 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/ActionData.xml
@@ -1,219 +1,264 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/DoorData.xml b/L2J_Mobius_02.5_Underground/dist/game/data/DoorData.xml
index 97c5aa1a38..9b22fbf524 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/DoorData.xml
@@ -11258,6 +11258,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 4c9d1bc4cc..056fe69093 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -252,6 +253,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 6a1e99290e..2ec17e9b00 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
@@ -225,7 +227,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 7bc5cc6e16..c46acc049a 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -66,7 +66,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 68c2f77658..7e9df354f4 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/items/46200-46299.xml
index 5453de5be2..b15d68e1fc 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/items/46200-46299.xml
@@ -795,14 +795,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/33900-33999.xml
index e7d9149662..be3105929f 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/33900-33999.xml
@@ -2254,26 +2254,37 @@
- HUMAN
- FEMALE
-
+ FRIEND
+ MALE
+
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/34000-34099.xml
index c4901037b2..b0801690fc 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/16300-16399.xml
index 74ed4f803d..81368cb1a4 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/16300-16399.xml
@@ -794,6 +794,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/18400-18499.xml
index ee4f8ee396..c871a8e610 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
icon.ev_dinos_baseball_gold
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/30000-30099.xml
index ff76ae6f6e..fd4dbef53d 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/30000-30099.xml
@@ -1923,8 +1923,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt
index 117b6c3638..4422565298 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -196,7 +198,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/Config.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/Config.java
index cd8efaff2d..a9f25cabde 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/Config.java
@@ -1254,6 +1254,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1329,6 +1330,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2621,6 +2623,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3378,6 +3381,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 01a9aec62d..93e23a1ba8 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -416,7 +416,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -427,14 +426,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java
index e229501dae..663ea6b31c 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Player.java
index cc1647c702..1f7275c9c9 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4573,7 +4573,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8338,9 +8338,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index a5b88e0118..6e93ee87d7 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index b125be1866..aebcf37378 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2241,6 +2241,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index 953f769a75..a5dcc7540c 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -38,6 +38,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -51,6 +52,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -69,12 +71,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -82,11 +86,13 @@ import org.l2jmobius.gameserver.model.options.EnchantOptions;
import org.l2jmobius.gameserver.model.options.Options;
import org.l2jmobius.gameserver.model.siege.Castle;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.model.skill.SkillConditionScope;
import org.l2jmobius.gameserver.model.variables.ItemVariables;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1585,7 +1591,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2471,6 +2479,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2495,6 +2508,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2520,6 +2535,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index 57c751293a..a27e3aea14 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -742,7 +742,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -894,7 +895,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index e7c37a9ae6..cc8e010ff3 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 6894ac0fba..e2e6bb404c 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -129,7 +129,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index 54704f9bda..6d4c3d9e2e 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -701,7 +701,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList(false);
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index 50c8e2816f..aaf2725444 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -63,6 +63,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index d78d842163..07ed7641a9 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,127 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
similarity index 96%
rename from L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
rename to L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
index 52a4032d14..62bb425a5a 100644
--- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -1,182 +1,182 @@
-/*
- * 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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 83e29f7bed..3ee2b1ef96 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,8 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..c2b8c8f51a 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/grandboss_data.sql
index cdf2d6c810..d1d27566f9 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 229898.48, 667.776), -- Queen Ant
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/items.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles.sql
index 0c8b3d0f9b..8e46191a26 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_done_week_non_classed` tinyint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week_team` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_03.0_Helios/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_03.0_Helios/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_03.0_Helios/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_03.0_Helios/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_03.0_Helios/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_03.0_Helios/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_03.0_Helios/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_03.0_Helios/dist/game/config/General.ini b/L2J_Mobius_03.0_Helios/dist/game/config/General.ini
index ff90e7e58e..d765d7ce87 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/config/General.ini
+++ b/L2J_Mobius_03.0_Helios/dist/game/config/General.ini
@@ -434,8 +434,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/ActionData.xml b/L2J_Mobius_03.0_Helios/dist/game/data/ActionData.xml
index 965751da7b..faab75a2f1 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/ActionData.xml
@@ -1,219 +1,265 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/DoorData.xml b/L2J_Mobius_03.0_Helios/dist/game/data/DoorData.xml
index bd9fae8fbe..478bdac9bc 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/DoorData.xml
@@ -11258,6 +11258,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/multisell/3160302.xml b/L2J_Mobius_03.0_Helios/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 4c9d1bc4cc..056fe69093 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -252,6 +253,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 6a1e99290e..2ec17e9b00 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
@@ -225,7 +227,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 7bc5cc6e16..c46acc049a 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -66,7 +66,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 68c2f77658..7e9df354f4 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/items/46200-46299.xml
index a01fbd148f..98acfe9ec5 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/items/46200-46299.xml
@@ -795,14 +795,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/33900-33999.xml
index 5164bff2c0..5440046ef3 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/33900-33999.xml
@@ -2254,26 +2254,37 @@
- HUMAN
- FEMALE
-
+ FRIEND
+ MALE
+
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/34000-34099.xml
index 1fe5999dc4..62a1e6ac2f 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/16300-16399.xml
index dbc97136a3..be4550a865 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/16300-16399.xml
@@ -794,6 +794,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/18400-18499.xml
index 5dec60a7e1..5100d9425f 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
icon.ev_dinos_baseball_gold
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/30000-30099.xml
index 15c8a7d57b..522699adc6 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/30000-30099.xml
@@ -1923,8 +1923,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt
index 117b6c3638..4422565298 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -196,7 +198,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/Config.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/Config.java
index ad4c5cff52..f16b39c04c 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/Config.java
@@ -1267,6 +1267,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1342,6 +1343,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2643,6 +2645,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3400,6 +3403,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index a50cbb8033..8378c362cb 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -420,7 +420,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -431,14 +430,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java
index e229501dae..663ea6b31c 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Player.java
index da6ebb9cb2..c66305dcf6 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4575,7 +4575,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8340,9 +8340,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index a5b88e0118..6e93ee87d7 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index e17d405a46..fba22cdb8c 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2242,6 +2242,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index 953f769a75..a5dcc7540c 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -38,6 +38,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -51,6 +52,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -69,12 +71,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -82,11 +86,13 @@ import org.l2jmobius.gameserver.model.options.EnchantOptions;
import org.l2jmobius.gameserver.model.options.Options;
import org.l2jmobius.gameserver.model.siege.Castle;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.model.skill.SkillConditionScope;
import org.l2jmobius.gameserver.model.variables.ItemVariables;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1585,7 +1591,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2471,6 +2479,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2495,6 +2508,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2520,6 +2535,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index 57c751293a..a27e3aea14 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -742,7 +742,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -894,7 +895,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index e7c37a9ae6..cc8e010ff3 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 6894ac0fba..e2e6bb404c 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -129,7 +129,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index 54704f9bda..6d4c3d9e2e 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -701,7 +701,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList(false);
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index c16d3301f0..7c284015a5 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -63,6 +63,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index d78d842163..07ed7641a9 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,127 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
similarity index 96%
rename from L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
rename to L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
index 52a4032d14..62bb425a5a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -1,182 +1,182 @@
-/*
- * 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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 83e29f7bed..3ee2b1ef96 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,8 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..c2b8c8f51a 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/grandboss_data.sql
index cdf2d6c810..d1d27566f9 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 229898.48, 667.776), -- Queen Ant
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/items.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles.sql
index 386b27df45..0f48e9f71c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/config/General.ini b/L2J_Mobius_04.0_GrandCrusade/dist/game/config/General.ini
index ff90e7e58e..d765d7ce87 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/config/General.ini
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/config/General.ini
@@ -434,8 +434,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/ActionData.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/ActionData.xml
index 965751da7b..7c9012c234 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/ActionData.xml
@@ -1,219 +1,266 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/DoorData.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/DoorData.xml
index e3cedbdf7d..431cc1a08d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/DoorData.xml
@@ -11308,6 +11308,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/multisell/3160302.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 4c9d1bc4cc..056fe69093 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -252,6 +253,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
index e048aa180a..1d2bdeff34 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
@@ -229,7 +231,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 68c2f77658..7e9df354f4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/46200-46299.xml
index 911244acf7..8cdd54d498 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/46200-46299.xml
@@ -795,14 +795,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/33900-33999.xml
index 3c49f48bf7..078b62ab5f 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/33900-33999.xml
@@ -2265,26 +2265,37 @@
- HUMAN
- FEMALE
+ FRIEND
+ MALE
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/34000-34099.xml
index bf754d796b..94008f3f8f 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/16300-16399.xml
index 36b7b1c7a5..f1f3ee17f8 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/16300-16399.xml
@@ -794,6 +794,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18400-18499.xml
index 075118bfaa..98aff3a6ab 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
icon.ev_dinos_baseball_gold
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/30000-30099.xml
index 4e1e1a1278..8adacbda05 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/30000-30099.xml
@@ -1841,8 +1841,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
index 30a08c7143..01fbc79dcc 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -200,7 +202,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/Config.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/Config.java
index 87194d630c..b8dab50682 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/Config.java
@@ -1254,6 +1254,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1329,6 +1330,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2617,6 +2619,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3374,6 +3377,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 6485e6c47d..2208f823ee 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -420,7 +420,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -431,14 +430,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java
index e229501dae..663ea6b31c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Player.java
index a80469774c..a43cdaf22a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4570,7 +4570,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8357,9 +8357,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index a5b88e0118..6e93ee87d7 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index e17d405a46..fba22cdb8c 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2242,6 +2242,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index deb95a0431..2a8fb54b97 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -38,6 +38,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -51,6 +52,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -69,12 +71,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -82,11 +86,13 @@ import org.l2jmobius.gameserver.model.options.EnchantOptions;
import org.l2jmobius.gameserver.model.options.Options;
import org.l2jmobius.gameserver.model.siege.Castle;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.model.skill.SkillConditionScope;
import org.l2jmobius.gameserver.model.variables.ItemVariables;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1585,7 +1591,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2505,6 +2513,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2529,6 +2542,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2554,6 +2569,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index 04d1b9eca7..77ec47e3aa 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -742,7 +742,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -894,7 +895,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index e7c37a9ae6..cc8e010ff3 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 5e7139a310..2140c9a55d 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -129,7 +129,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index 54704f9bda..6d4c3d9e2e 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -701,7 +701,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList(false);
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index c16d3301f0..7c284015a5 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -63,6 +63,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index d78d842163..07ed7641a9 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,127 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
similarity index 96%
rename from L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
rename to L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
index 52a4032d14..62bb425a5a 100644
--- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -1,182 +1,182 @@
-/*
- * 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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 83e29f7bed..3ee2b1ef96 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,8 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..c2b8c8f51a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/grandboss_data.sql
index cdf2d6c810..d1d27566f9 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 229898.48, 667.776), -- Queen Ant
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/items.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles.sql
index 386b27df45..0f48e9f71c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_05.0_Salvation/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/config/General.ini b/L2J_Mobius_05.0_Salvation/dist/game/config/General.ini
index ff90e7e58e..d765d7ce87 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/config/General.ini
+++ b/L2J_Mobius_05.0_Salvation/dist/game/config/General.ini
@@ -434,8 +434,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/ActionData.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/ActionData.xml
index 965751da7b..34c4fa24b6 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/ActionData.xml
@@ -1,219 +1,264 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/DoorData.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/DoorData.xml
index a8329e9ede..2c6a47df32 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/DoorData.xml
@@ -11539,6 +11539,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/multisell/3160302.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 5a5354674c..d83f874085 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -250,6 +251,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java
index ff35ec6ce0..b4f60dddfa 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
@@ -233,7 +235,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
deleted file mode 100644
index c99b060259..0000000000
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ /dev/null
@@ -1,31 +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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
index 163645cc95..17726d3831 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
@@ -26,7 +26,9 @@ import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.instance.Item;
+import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.network.serverpackets.AbnormalStatusUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ShortCutInit;
import org.l2jmobius.gameserver.network.serverpackets.ShortCutRegister;
@@ -73,7 +75,36 @@ public class ReplaceSkillBySkill extends AbstractEffect
player.deleteShortCut(slot, page);
final Shortcut newShortcut = new Shortcut(slot, page, ShortcutType.SKILL, addedSkill.getId(), addedSkill.getLevel(), addedSkill.getSubLevel(), characterType);
player.registerShortCut(newShortcut);
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
+ }
+ }
+
+ // Replace continuous effects.
+ if (knownSkill.isContinuous() && player.isAffectedBySkill(knownSkill.getId()))
+ {
+ int abnormalTime = 0;
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == knownSkill.getId())
+ {
+ abnormalTime = info.getAbnormalTime();
+ break;
+ }
+ }
+
+ if (abnormalTime > 2000)
+ {
+ addedSkill.applyEffects(player, player);
+ final AbnormalStatusUpdate asu = new AbnormalStatusUpdate();
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == addedSkill.getId())
+ {
+ info.resetAbnormalTime(abnormalTime);
+ asu.addSkill(info);
+ }
+ }
+ player.sendPacket(asu);
}
}
@@ -105,7 +136,36 @@ public class ReplaceSkillBySkill extends AbstractEffect
player.deleteShortCut(slot, page);
final Shortcut newShortcut = new Shortcut(slot, page, ShortcutType.SKILL, addedSkill.getId(), addedSkill.getLevel(), addedSkill.getSubLevel(), characterType);
player.registerShortCut(newShortcut);
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
+ }
+ }
+
+ // Replace continuous effects.
+ if (knownSkill.isContinuous() && player.isAffectedBySkill(knownSkill.getId()))
+ {
+ int abnormalTime = 0;
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == knownSkill.getId())
+ {
+ abnormalTime = info.getAbnormalTime();
+ break;
+ }
+ }
+
+ if (abnormalTime > 2000)
+ {
+ addedSkill.applyEffects(player, player);
+ final AbnormalStatusUpdate asu = new AbnormalStatusUpdate();
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == addedSkill.getId())
+ {
+ info.resetAbnormalTime(abnormalTime);
+ asu.addSkill(info);
+ }
+ }
+ player.sendPacket(asu);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index fb87dc68c5..07bbfa7e21 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/46200-46299.xml
index a8511b3604..a9cc5fe23c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/46200-46299.xml
@@ -796,14 +796,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/33900-33999.xml
index 303a0bfeb1..e1b6dd79e9 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/33900-33999.xml
@@ -2287,26 +2287,37 @@
- HUMAN
- FEMALE
+ FRIEND
+ MALE
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/34000-34099.xml
index 63e1bea4d1..6ba051967c 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/16300-16399.xml
index 18b0020780..ea5b54bce7 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/16300-16399.xml
@@ -794,6 +794,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18400-18499.xml
index 3590d8e6f8..160622b0f9 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
BranchIcon.icon.g_ev_goldenball
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/30000-30099.xml
index a06b78109c..e8603046f6 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/30000-30099.xml
@@ -1841,8 +1841,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/documentation.txt
index 8ff0ea62d7..015e227d6d 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -204,7 +206,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/Config.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/Config.java
index cb6ce29649..0c6cc44f74 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/Config.java
@@ -1249,6 +1249,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1324,6 +1325,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2608,6 +2610,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3365,6 +3368,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 6485e6c47d..2208f823ee 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -420,7 +420,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -431,14 +430,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 8f070057a2..a2c1396ce8 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Player.java
index 87c570457d..381fd21993 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4614,7 +4614,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8402,9 +8402,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index 6015c738a8..0a92034304 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index 0c1b384f4b..f3f6a9b3f8 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2242,6 +2242,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index e9fd1cbbd6..c62cb2e398 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -39,6 +39,7 @@ import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AgathionData;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -52,6 +53,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -74,12 +76,14 @@ import org.l2jmobius.gameserver.model.events.impl.item.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.holders.AgathionSkillHolder;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -94,6 +98,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1652,7 +1657,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2578,6 +2585,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2602,6 +2614,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2627,6 +2641,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index d56b0c567d..60de6aa87e 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -755,7 +755,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -907,7 +908,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index b5c422461f..f0419f52eb 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 7da4c71951..f165fbf19a 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -131,7 +131,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index f8b2d25913..c079b52adf 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -651,7 +651,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList();
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index c16d3301f0..7c284015a5 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -63,6 +63,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index d78d842163..07ed7641a9 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,127 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
deleted file mode 100644
index 52a4032d14..0000000000
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ /dev/null
@@ -1,182 +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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
new file mode 100644
index 0000000000..62bb425a5a
--- /dev/null
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -0,0 +1,182 @@
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 83e29f7bed..3ee2b1ef96 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,8 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..c2b8c8f51a 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/grandboss_data.sql
index e14345aecf..6631489eea 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 229898.48, 667.776), -- Queen Ant
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/items.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles.sql
index 386b27df45..0f48e9f71c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/config/General.ini b/L2J_Mobius_05.5_EtinasFate/dist/game/config/General.ini
index ff90e7e58e..d765d7ce87 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/config/General.ini
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/config/General.ini
@@ -434,8 +434,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/ActionData.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/ActionData.xml
index 965751da7b..34c4fa24b6 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/ActionData.xml
@@ -1,219 +1,264 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/DoorData.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/DoorData.xml
index 6359925c81..5756103fc7 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/DoorData.xml
@@ -11539,6 +11539,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/multisell/3160302.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 5a5354674c..d83f874085 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -250,6 +251,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java
index e6a82043f1..73348a7dba 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
@@ -234,7 +236,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
deleted file mode 100644
index c99b060259..0000000000
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ /dev/null
@@ -1,31 +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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
index 163645cc95..17726d3831 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
@@ -26,7 +26,9 @@ import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.instance.Item;
+import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.network.serverpackets.AbnormalStatusUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ShortCutInit;
import org.l2jmobius.gameserver.network.serverpackets.ShortCutRegister;
@@ -73,7 +75,36 @@ public class ReplaceSkillBySkill extends AbstractEffect
player.deleteShortCut(slot, page);
final Shortcut newShortcut = new Shortcut(slot, page, ShortcutType.SKILL, addedSkill.getId(), addedSkill.getLevel(), addedSkill.getSubLevel(), characterType);
player.registerShortCut(newShortcut);
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
+ }
+ }
+
+ // Replace continuous effects.
+ if (knownSkill.isContinuous() && player.isAffectedBySkill(knownSkill.getId()))
+ {
+ int abnormalTime = 0;
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == knownSkill.getId())
+ {
+ abnormalTime = info.getAbnormalTime();
+ break;
+ }
+ }
+
+ if (abnormalTime > 2000)
+ {
+ addedSkill.applyEffects(player, player);
+ final AbnormalStatusUpdate asu = new AbnormalStatusUpdate();
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == addedSkill.getId())
+ {
+ info.resetAbnormalTime(abnormalTime);
+ asu.addSkill(info);
+ }
+ }
+ player.sendPacket(asu);
}
}
@@ -105,7 +136,36 @@ public class ReplaceSkillBySkill extends AbstractEffect
player.deleteShortCut(slot, page);
final Shortcut newShortcut = new Shortcut(slot, page, ShortcutType.SKILL, addedSkill.getId(), addedSkill.getLevel(), addedSkill.getSubLevel(), characterType);
player.registerShortCut(newShortcut);
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
+ }
+ }
+
+ // Replace continuous effects.
+ if (knownSkill.isContinuous() && player.isAffectedBySkill(knownSkill.getId()))
+ {
+ int abnormalTime = 0;
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == knownSkill.getId())
+ {
+ abnormalTime = info.getAbnormalTime();
+ break;
+ }
+ }
+
+ if (abnormalTime > 2000)
+ {
+ addedSkill.applyEffects(player, player);
+ final AbnormalStatusUpdate asu = new AbnormalStatusUpdate();
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == addedSkill.getId())
+ {
+ info.resetAbnormalTime(abnormalTime);
+ asu.addSkill(info);
+ }
+ }
+ player.sendPacket(asu);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 68c2f77658..7e9df354f4 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/46200-46299.xml
index 798c787a65..3755d71a6a 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/46200-46299.xml
@@ -796,14 +796,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/33900-33999.xml
index 303a0bfeb1..e1b6dd79e9 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/33900-33999.xml
@@ -2287,26 +2287,37 @@
- HUMAN
- FEMALE
+ FRIEND
+ MALE
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/34000-34099.xml
index bc3608afaf..938e59a205 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/16300-16399.xml
index bbc7885d2c..dbd1a42d90 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/16300-16399.xml
@@ -794,6 +794,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18400-18499.xml
index 0af1be1fc4..dc71557566 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
BranchIcon.icon.g_ev_goldenball
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/30000-30099.xml
index 73242ff0ec..26327d85e0 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/30000-30099.xml
@@ -1841,8 +1841,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/documentation.txt
index 998f4bc0a2..b176e1077d 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -205,7 +207,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/Config.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/Config.java
index 5599bd54a4..53821ec9a5 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/Config.java
@@ -1256,6 +1256,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1331,6 +1332,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2620,6 +2622,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3377,6 +3380,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 6485e6c47d..2208f823ee 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -420,7 +420,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -431,14 +430,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 8f070057a2..a2c1396ce8 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Player.java
index df9b355780..3dfda86a9f 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4627,7 +4627,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8415,9 +8415,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index 3a6780326a..821ff7ca76 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
index 97397f753f..9d5faa0c61 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
@@ -57,7 +57,10 @@ public enum CommissionItemType
NECKLACE(31),
BELT(32),
BRACELET(33),
+ AGATHION(62),
HAIR_ACCESSORY(34),
+ BROOCH_JEWEL(63),
+ ARTIFACT(64),
// Supplies
POTION(35),
SCROLL_ENCHANT_WEAPON(36),
@@ -65,6 +68,7 @@ public enum CommissionItemType
SCROLL_OTHER(38),
SOULSHOT(39),
SPIRITSHOT(40),
+ OTHER_SUPPLIES(41),
// Pet Goods
PET_EQUIPMENT(42),
PET_SUPPLIES(43),
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
index eb10918430..3a194d1660 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
@@ -47,8 +47,8 @@ public enum CommissionTreeType
CommissionItemType.SPEAR,
CommissionItemType.OTHER_WEAPON),
ARMOR(1, CommissionItemType.HELMET, CommissionItemType.ARMOR_TOP, CommissionItemType.ARMOR_PANTS, CommissionItemType.FULL_BODY, CommissionItemType.GLOVES, CommissionItemType.FEET, CommissionItemType.SHIELD, CommissionItemType.SIGIL, CommissionItemType.UNDERWEAR, CommissionItemType.CLOAK),
- ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.HAIR_ACCESSORY),
- SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT),
+ ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.AGATHION, CommissionItemType.HAIR_ACCESSORY, CommissionItemType.BROOCH_JEWEL, CommissionItemType.ARTIFACT),
+ SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT, CommissionItemType.OTHER_SUPPLIES),
PET_GOODS(4, CommissionItemType.PET_EQUIPMENT, CommissionItemType.PET_SUPPLIES),
MISC(
5,
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index 0c1b384f4b..f3f6a9b3f8 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2242,6 +2242,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index e9fd1cbbd6..c62cb2e398 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -39,6 +39,7 @@ import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AgathionData;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -52,6 +53,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -74,12 +76,14 @@ import org.l2jmobius.gameserver.model.events.impl.item.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.holders.AgathionSkillHolder;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -94,6 +98,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1652,7 +1657,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2578,6 +2585,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2602,6 +2614,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2627,6 +2641,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index 02c945c630..c2fd0080ac 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -778,7 +778,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -930,7 +931,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index b5c422461f..f0419f52eb 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 0bd8f9e76e..5df5ea8eaa 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -131,7 +131,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index 8c7e94c1d5..cd579821fe 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -651,7 +651,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList();
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index c16d3301f0..7c284015a5 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -63,6 +63,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index d78d842163..07ed7641a9 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,127 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
index a4539909c2..f7ac12028d 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
@@ -167,7 +167,7 @@ public class FakePlayerInfo extends ServerPacket
writeByte(_npc.getTeam().getId());
writeInt(_clan != null ? _clan.getCrestLargeId() : 0);
writeByte(_fpcHolder.getNobleLevel());
- writeByte(_fpcHolder.isHero());
+ writeByte(_fpcHolder.isHero() ? 2 : 0); // 152 - Value for enabled changed to 2
writeByte(_fpcHolder.isFishing());
writeInt(_fpcHolder.getBaitLocationX());
writeInt(_fpcHolder.getBaitLocationY());
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
deleted file mode 100644
index 52a4032d14..0000000000
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ /dev/null
@@ -1,182 +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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
new file mode 100644
index 0000000000..62bb425a5a
--- /dev/null
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -0,0 +1,182 @@
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 83e29f7bed..3ee2b1ef96 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,8 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..c2b8c8f51a 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/grandboss_data.sql
index 853bbd704b..50fbf93b87 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 40218408, 300), -- Queen Ant
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes.sql
index 2fc8753f90..49a371cbd5 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/items.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles.sql
index 386b27df45..0f48e9f71c 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/AutoPlay.ini
index 9a4fd4bf2e..6e9d9628be 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/AutoPlay.ini
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/AutoPlay.ini
@@ -19,6 +19,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# Enable .play command only for premium players.
# Premium System must be enabled.
# Default: False
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/config/General.ini b/L2J_Mobius_06.0_Fafurion/dist/game/config/General.ini
index ff90e7e58e..d765d7ce87 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/config/General.ini
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/config/General.ini
@@ -434,8 +434,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/ActionData.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/ActionData.xml
index 965751da7b..13073a75da 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/ActionData.xml
@@ -1,219 +1,266 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/DoorData.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/DoorData.xml
index 0a293a1b6d..613c4b0cb4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/DoorData.xml
@@ -11733,6 +11733,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/multisell/3160302.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index 5a5354674c..d83f874085 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -250,6 +251,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java
index e6a82043f1..73348a7dba 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -41,6 +41,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
@@ -234,7 +236,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
deleted file mode 100644
index c99b060259..0000000000
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ /dev/null
@@ -1,31 +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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
index 163645cc95..17726d3831 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ReplaceSkillBySkill.java
@@ -26,7 +26,9 @@ import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.instance.Item;
+import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.network.serverpackets.AbnormalStatusUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ShortCutInit;
import org.l2jmobius.gameserver.network.serverpackets.ShortCutRegister;
@@ -73,7 +75,36 @@ public class ReplaceSkillBySkill extends AbstractEffect
player.deleteShortCut(slot, page);
final Shortcut newShortcut = new Shortcut(slot, page, ShortcutType.SKILL, addedSkill.getId(), addedSkill.getLevel(), addedSkill.getSubLevel(), characterType);
player.registerShortCut(newShortcut);
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
+ }
+ }
+
+ // Replace continuous effects.
+ if (knownSkill.isContinuous() && player.isAffectedBySkill(knownSkill.getId()))
+ {
+ int abnormalTime = 0;
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == knownSkill.getId())
+ {
+ abnormalTime = info.getAbnormalTime();
+ break;
+ }
+ }
+
+ if (abnormalTime > 2000)
+ {
+ addedSkill.applyEffects(player, player);
+ final AbnormalStatusUpdate asu = new AbnormalStatusUpdate();
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == addedSkill.getId())
+ {
+ info.resetAbnormalTime(abnormalTime);
+ asu.addSkill(info);
+ }
+ }
+ player.sendPacket(asu);
}
}
@@ -105,7 +136,36 @@ public class ReplaceSkillBySkill extends AbstractEffect
player.deleteShortCut(slot, page);
final Shortcut newShortcut = new Shortcut(slot, page, ShortcutType.SKILL, addedSkill.getId(), addedSkill.getLevel(), addedSkill.getSubLevel(), characterType);
player.registerShortCut(newShortcut);
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
+ }
+ }
+
+ // Replace continuous effects.
+ if (knownSkill.isContinuous() && player.isAffectedBySkill(knownSkill.getId()))
+ {
+ int abnormalTime = 0;
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == knownSkill.getId())
+ {
+ abnormalTime = info.getAbnormalTime();
+ break;
+ }
+ }
+
+ if (abnormalTime > 2000)
+ {
+ addedSkill.applyEffects(player, player);
+ final AbnormalStatusUpdate asu = new AbnormalStatusUpdate();
+ for (BuffInfo info : player.getEffectList().getEffects())
+ {
+ if (info.getSkill().getId() == addedSkill.getId())
+ {
+ info.resetAbnormalTime(abnormalTime);
+ asu.addSkill(info);
+ }
+ }
+ player.sendPacket(asu);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..1ba322bbe3 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,55 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..798a363468 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,46 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 68c2f77658..7e9df354f4 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/armorsets/Sets.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/armorsets/Sets.xml
index df948dd3ec..ab82727579 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/armorsets/Sets.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/armorsets/Sets.xml
@@ -6995,11 +6995,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -7008,11 +7008,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -7021,11 +7021,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/46200-46299.xml
index 94b13222e2..1268056a84 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/46200-46299.xml
@@ -796,14 +796,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/33900-33999.xml
index fd03eb39db..5cbd59bfe2 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/33900-33999.xml
@@ -2288,26 +2288,37 @@
- HUMAN
- FEMALE
+ FRIEND
+ MALE
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/34000-34099.xml
index bf754d796b..94008f3f8f 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/16300-16399.xml
index 9b44023c67..17f1a9b27d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/16300-16399.xml
@@ -797,6 +797,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18400-18499.xml
index 810844bae0..1715d1ffd8 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
BranchIcon.icon.g_ev_goldenball
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/30000-30099.xml
index 468244352a..e79aa6d5d0 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/30000-30099.xml
@@ -1931,8 +1931,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/documentation.txt
index 998f4bc0a2..b176e1077d 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/documentation.txt
@@ -10,6 +10,8 @@ AddHate: Instant effect that increases target's hate towards you.
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -205,7 +207,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/Config.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/Config.java
index 131c66538b..963cbf83ab 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/Config.java
@@ -1277,6 +1277,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
public static boolean AUTO_PLAY_PREMIUM;
public static Set DISABLED_AUTO_SKILLS = new HashSet<>();
public static Set DISABLED_AUTO_ITEMS = new HashSet<>();
@@ -1352,6 +1353,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2662,6 +2664,7 @@ public class Config
ENABLE_AUTO_SKILL = autoPlayConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = autoPlayConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = autoPlayConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = autoPlayConfig.getBoolean("AssistLeader", false);
AUTO_PLAY_PREMIUM = autoPlayConfig.getBoolean("AutoPlayPremium", false);
DISABLED_AUTO_SKILLS.clear();
final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", "");
@@ -3419,6 +3422,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 6485e6c47d..2208f823ee 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -420,7 +420,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -431,14 +430,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 36f3461010..efc07efb38 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -230,7 +230,7 @@ public class ShortCuts implements IRestorable
if ((sc.getId() == skillId) && (sc.getType() == ShortcutType.SKILL))
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 8f070057a2..a2c1396ce8 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,178 +2829,140 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- player.refreshExpertisePenalty();
- sendPacket(info);
+ }
+ player.refreshExpertisePenalty();
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Player.java
index 4463f8a48c..1ec94d7ddb 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4628,7 +4628,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8416,9 +8416,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Summon.java
index d3f774596c..66a299ce8e 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -846,7 +847,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -867,7 +868,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -892,7 +900,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -900,7 +908,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -946,7 +961,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index 3a6780326a..821ff7ca76 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
index 97397f753f..9d5faa0c61 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
@@ -57,7 +57,10 @@ public enum CommissionItemType
NECKLACE(31),
BELT(32),
BRACELET(33),
+ AGATHION(62),
HAIR_ACCESSORY(34),
+ BROOCH_JEWEL(63),
+ ARTIFACT(64),
// Supplies
POTION(35),
SCROLL_ENCHANT_WEAPON(36),
@@ -65,6 +68,7 @@ public enum CommissionItemType
SCROLL_OTHER(38),
SOULSHOT(39),
SPIRITSHOT(40),
+ OTHER_SUPPLIES(41),
// Pet Goods
PET_EQUIPMENT(42),
PET_SUPPLIES(43),
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
index eb10918430..3a194d1660 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
@@ -47,8 +47,8 @@ public enum CommissionTreeType
CommissionItemType.SPEAR,
CommissionItemType.OTHER_WEAPON),
ARMOR(1, CommissionItemType.HELMET, CommissionItemType.ARMOR_TOP, CommissionItemType.ARMOR_PANTS, CommissionItemType.FULL_BODY, CommissionItemType.GLOVES, CommissionItemType.FEET, CommissionItemType.SHIELD, CommissionItemType.SIGIL, CommissionItemType.UNDERWEAR, CommissionItemType.CLOAK),
- ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.HAIR_ACCESSORY),
- SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT),
+ ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.AGATHION, CommissionItemType.HAIR_ACCESSORY, CommissionItemType.BROOCH_JEWEL, CommissionItemType.ARTIFACT),
+ SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT, CommissionItemType.OTHER_SUPPLIES),
PET_GOODS(4, CommissionItemType.PET_EQUIPMENT, CommissionItemType.PET_SUPPLIES),
MISC(
5,
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index 0c1b384f4b..f3f6a9b3f8 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2242,6 +2242,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index e9fd1cbbd6..c62cb2e398 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -39,6 +39,7 @@ import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AgathionData;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -52,6 +53,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -74,12 +76,14 @@ import org.l2jmobius.gameserver.model.events.impl.item.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.holders.AgathionSkillHolder;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -94,6 +98,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1652,7 +1657,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2578,6 +2585,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2602,6 +2614,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2627,6 +2641,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index 02c945c630..c2fd0080ac 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -778,7 +778,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -930,7 +931,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index b5c422461f..f0419f52eb 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 0bd8f9e76e..5df5ea8eaa 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -131,7 +131,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index 8c7e94c1d5..cd579821fe 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -651,7 +651,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList();
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index c16d3301f0..7c284015a5 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -63,6 +63,6 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index f0188f7bc0..07ed7641a9 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,128 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 92, 93,
- 94, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
index a4539909c2..f7ac12028d 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
@@ -167,7 +167,7 @@ public class FakePlayerInfo extends ServerPacket
writeByte(_npc.getTeam().getId());
writeInt(_clan != null ? _clan.getCrestLargeId() : 0);
writeByte(_fpcHolder.getNobleLevel());
- writeByte(_fpcHolder.isHero());
+ writeByte(_fpcHolder.isHero() ? 2 : 0); // 152 - Value for enabled changed to 2
writeByte(_fpcHolder.isFishing());
writeInt(_fpcHolder.getBaitLocationX());
writeInt(_fpcHolder.getBaitLocationY());
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
deleted file mode 100644
index 52a4032d14..0000000000
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ /dev/null
@@ -1,182 +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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
new file mode 100644
index 0000000000..62bb425a5a
--- /dev/null
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -0,0 +1,182 @@
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 83e29f7bed..3ee2b1ef96 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,19 +19,19 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
}
@@ -53,8 +53,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 8872c0cf63..c2b8c8f51a 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -42,13 +48,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -59,8 +68,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1f54b5040f..0d5d066d25 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,6 +25,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -40,6 +42,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
private static final Integer AUTO_ATTACK_ACTION = 2;
@@ -95,6 +98,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking.
+ if (player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -120,23 +134,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -144,6 +167,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -178,32 +204,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -302,6 +351,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 7cd7dd9696..c56221841f 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -51,7 +52,6 @@ import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +381,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_ranking_history.sql
index 3f938ba850..d2da345dec 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_ranking_history.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_ranking_history.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_ranking_history` (
`ranking` int(20) NOT NULL,
`exp` bigint(20) NOT NULL,
PRIMARY KEY (`charId`,`day`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/characters.sql
index ea2aace011..60e1a786a2 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/characters.sql
@@ -60,4 +60,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/grandboss_data.sql
index 853bbd704b..50fbf93b87 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 40218408, 300), -- Queen Ant
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes.sql
index ae59eb8ba1..f2ee5692a8 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/items.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_fights.sql
index 618ee73db0..662f1c4a7e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_fights.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles.sql
index 386b27df45..0f48e9f71c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/General.ini b/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/General.ini
index 7853628cdd..4d1d58170e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/General.ini
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/config/General.ini
@@ -435,8 +435,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
@@ -660,6 +660,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# ---------------------------------------------------------------------------
# Developer Settings
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/ActionData.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/ActionData.xml
index 965751da7b..58bf44b733 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/ActionData.xml
@@ -1,219 +1,269 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/DoorData.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/DoorData.xml
index ea6f1372ba..a7084241c9 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/DoorData.xml
@@ -11645,6 +11645,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/multisell/3160302.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index d3d1a6bbcf..6c678e8c19 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -235,6 +236,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 8651ac7de8..460b8efb5a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -42,6 +42,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
@@ -195,6 +197,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new);
EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new);
EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new);
+ EffectHandler.getInstance().registerHandler("IgnoreReduceDamage", IgnoreReduceDamage::new);
EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new);
EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new);
EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new);
@@ -234,7 +237,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
index b74a7564f7..c54d8970d1 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
@@ -47,6 +47,7 @@ public class SkillConditionMasterHandler
SkillConditionHandler.getInstance().registerHandler("CanUseInBattlefield", CanUseInBattlefieldSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseInDragonLair", CanUseInDragonLairSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseSwoopCannon", CanUseSwoopCannonSkillCondition::new);
+ SkillConditionHandler.getInstance().registerHandler("CanUseSymbolSealIncreaseItem", CanUseSymbolSealIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseVitalityIncreaseItem", CanUseVitalityIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckLevel", CheckLevelSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckSex", CheckSexSkillCondition::new);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java
similarity index 83%
rename from L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
rename to L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java
index 9b5e021318..5405ccd4be 100644
--- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java
@@ -20,12 +20,12 @@ import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
- * @author Mobius
+ * @author fruit
*/
-public class MaxMagicCriticalRate extends AbstractStatEffect
+public class IgnoreReduceDamage extends AbstractStatEffect
{
- public MaxMagicCriticalRate(StatSet params)
+ public IgnoreReduceDamage(StatSet params)
{
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
+ super(params, Stat.IGNORE_REDUCE_DAMAGE);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
deleted file mode 100644
index c99b060259..0000000000
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ /dev/null
@@ -1,31 +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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java
index 951002a2c2..35bfbcb6bc 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.gameserver.enums.StatModifierType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
@@ -25,6 +26,7 @@ import org.l2jmobius.gameserver.model.events.listeners.FunctionEventListener;
import org.l2jmobius.gameserver.model.events.returns.DamageReturn;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author Sdw
@@ -32,10 +34,12 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class ReduceDamage extends AbstractEffect
{
private final double _amount;
+ private final StatModifierType _mode;
public ReduceDamage(StatSet params)
{
_amount = params.getDouble("amount");
+ _mode = params.getEnum("mode", StatModifierType.class, StatModifierType.DIFF);
}
private DamageReturn onDamageReceivedEvent(OnCreatureDamageReceived event)
@@ -46,7 +50,15 @@ public class ReduceDamage extends AbstractEffect
return null;
}
- final double newDamage = event.getDamage() * (_amount / 100);
+ final double newDamage;
+ if (_mode == StatModifierType.PER)
+ {
+ newDamage = event.getDamage() - (event.getDamage() * (_amount / 100));
+ }
+ else // DIFF
+ {
+ newDamage = event.getDamage() - Math.max((_amount - event.getAttacker().getStat().getAdd(Stat.IGNORE_REDUCE_DAMAGE)), 0.0);
+ }
return new DamageReturn(false, true, false, newDamage);
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java
index 03d9e8638b..634ea96c64 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java
@@ -16,14 +16,21 @@
*/
package handlers.effecthandlers;
+import java.util.LinkedList;
+import java.util.List;
+
import org.l2jmobius.Config;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.enums.StatModifierType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
+import org.l2jmobius.gameserver.model.effects.EffectType;
+import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author NviX
@@ -39,6 +46,12 @@ public class RestoreSymbolSeal extends AbstractEffect
_mode = params.getEnum("mode", StatModifierType.class, StatModifierType.PER);
}
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.RESTORE_SYMBOL_SEAL;
+ }
+
@Override
public boolean isInstant()
{
@@ -77,6 +90,33 @@ public class RestoreSymbolSeal extends AbstractEffect
player.updateSymbolSealSkills();
player.sendSkillList();
player.broadcastUserInfo();
+
+ // Send item list to update Dye Powder with red icon in inventory.
+ ThreadPool.schedule(() ->
+ {
+ final List
- items = new LinkedList<>();
+ ITEMS: for (Item i : effected.getActingPlayer().getInventory().getItems())
+ {
+ if (i.getTemplate().hasSkills())
+ {
+ for (ItemSkillHolder s : i.getTemplate().getAllSkills())
+ {
+ if (s.getSkill().hasEffectType(EffectType.RESTORE_SYMBOL_SEAL))
+ {
+ items.add(i);
+ continue ITEMS;
+ }
+ }
+ }
+ }
+
+ if (!items.isEmpty())
+ {
+ final InventoryUpdate iu = new InventoryUpdate();
+ iu.addItems(items);
+ effected.getActingPlayer().sendInventoryUpdate(iu);
+ }
+ }, 1000);
}
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index cd446ab812..2775ff29a4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -182,6 +182,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()))
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..854051b04c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,61 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetHold.java
index 5e726bae7b..5688e59b8b 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetHold.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetHold.java
@@ -52,4 +52,10 @@ public class PetHold implements IPlayerActionHandler
((SummonAI) pet.getAI()).notifyFollowStatusChange();
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetMove.java
index e5198fda6f..7b37a62148 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetMove.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetMove.java
@@ -53,4 +53,10 @@ public class PetMove implements IPlayerActionHandler
pet.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, player.getTarget().getLocation());
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java
index 80c073b1dc..f2044ed108 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java
@@ -77,4 +77,10 @@ public class PetSkillUse implements IPlayerActionHandler
}
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetStop.java
index 7ba96efec2..bcf54c7e96 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetStop.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/PetStop.java
@@ -51,4 +51,10 @@ public class PetStop implements IPlayerActionHandler
pet.cancelAction();
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..b681353b73 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,52 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorHold.java
index 4bbeee8387..1931066222 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorHold.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorHold.java
@@ -48,4 +48,10 @@ public class ServitorHold implements IPlayerActionHandler
((SummonAI) s.getAI()).notifyFollowStatusChange();
});
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMode.java
index 456a2e042b..14159b2066 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMode.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMode.java
@@ -68,4 +68,10 @@ public class ServitorMode implements IPlayerActionHandler
}
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMove.java
index 36528e0063..a5269a3d15 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMove.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorMove.java
@@ -56,4 +56,10 @@ public class ServitorMove implements IPlayerActionHandler
}
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java
index b67b13f2cc..133040fba4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java
@@ -62,4 +62,10 @@ public class ServitorSkillUse implements IPlayerActionHandler
}
});
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorStop.java
index 24db478dc7..3dda0b9c15 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorStop.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/ServitorStop.java
@@ -47,4 +47,10 @@ public class ServitorStop implements IPlayerActionHandler
s.cancelAction();
});
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java
index 390822a7b1..eaace592ee 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java
@@ -62,4 +62,10 @@ public class UnsummonPet implements IPlayerActionHandler
pet.unSummon(player);
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java
index e4944df496..937dcaad1a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java
@@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java
new file mode 100644
index 0000000000..3ab0d0bb69
--- /dev/null
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java
@@ -0,0 +1,43 @@
+/*
+ * 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 .
+ */
+package handlers.skillconditionhandlers;
+
+import org.l2jmobius.Config;
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.WorldObject;
+import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.skill.ISkillCondition;
+import org.l2jmobius.gameserver.model.skill.Skill;
+
+/**
+ * @author CostyKiller
+ */
+public class CanUseSymbolSealIncreaseItemSkillCondition implements ISkillCondition
+{
+ private final int _amount;
+
+ public CanUseSymbolSealIncreaseItemSkillCondition(StatSet params)
+ {
+ _amount = params.getInt("amount", 0);
+ }
+
+ @Override
+ public boolean canUse(Creature caster, Skill skill, WorldObject target)
+ {
+ return caster.isPlayer() && ((caster.getActingPlayer().getSymbolSealPoints() + ((Config.MAX_SYMBOL_SEAL_POINTS * _amount) / 100)) <= Config.MAX_SYMBOL_SEAL_POINTS);
+ }
+}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 8ce0fc9393..c9ee4ab62a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/46200-46299.xml
index 434e028a8e..7a69f2c515 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/46200-46299.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/46200-46299.xml
@@ -796,14 +796,19 @@
-
+
+
+
-
-
-
+
+
+
+
+
-
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/80500-80599.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/80500-80599.xml
index 96f57c71cf..095701293c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/80500-80599.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/80500-80599.xml
@@ -377,6 +377,13 @@
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/33900-33999.xml
index 2eda1cfe8d..4d5f210282 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/33900-33999.xml
@@ -2266,26 +2266,37 @@
- HUMAN
- FEMALE
+ FRIEND
+ MALE
+
-
+
+
+
-
-
+ 600
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/34000-34099.xml
index bf754d796b..94008f3f8f 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/34000-34099.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/npcs/34000-34099.xml
@@ -17,22 +17,43 @@
-
+
- HUMAN
+ FRIEND
FEMALE
+
-
+
+
+
+ 600
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DWARF
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/16300-16399.xml
index 0dc591aae9..272e72b9b8 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/16300-16399.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/16300-16399.xml
@@ -799,6 +799,22 @@
5000
-150
true
+ 80
+ 900
+ PHYSICAL
+ ENEMY
+ SINGLE
+ PULL
+
+
+
+ 100
+
+
+ 600
+ 600
+
+
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18400-18499.xml
index 1109b35ba3..67cb44b4fd 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18400-18499.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18400-18499.xml
@@ -877,8 +877,30 @@
BranchIcon.icon.g_ev_goldenball
A2
+ 1
+ CHANGEBODY
+ CHANGE_DINOS
+ 1
+ 46254
+ NONE
+ 5
+ -3
+ 2
+ 3600
15000
+ true
+ true
4
+ SELF
+ SINGLE
+
+
+ 100
+
+
+ 100
+
+
icon.skill0000
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/30000-30099.xml
index efb2d37899..cda039eff7 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/30000-30099.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/30000-30099.xml
@@ -1948,8 +1948,8 @@
P
85
-
- 550
+
+ 350
DIFF
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/39400-39499.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/39400-39499.xml
index 1e50c6473d..8e37994268 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/39400-39499.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/39400-39499.xml
@@ -2091,6 +2091,7 @@
+
icon.skill0000
A1
5
@@ -2100,6 +2101,11 @@
1
SELF
SINGLE
+
+
+ 25
+
+
25
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt
index 5515f67c62..09511c772f 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt
@@ -11,6 +11,8 @@ AddHuntingTime: Add time for time limited hunting zones. (l2jmobius)
AdditionalPotionCp: Increases the amount of CP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionHp: Increases the amount of HP heal gained from potions or elixirs. (l2jmobius)
AdditionalPotionMp: Increases the amount of MP heal gained from potions or elixirs. (l2jmobius)
+AddMaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
+AddMaxPhysicalCriticalRate: Stat that overrides the default config MAX_PCRIT_RATE. (l2jmobius)
AddPcCafePoints: Increase PcCafe points permanently. (l2jmobius)
AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
@@ -163,10 +165,11 @@ HpCpHealCritical: HpCp heal effects always trigger Magic Critical Hit.
HpCpHeal: Increases current HP by a given amount. If the given amount exceeds maximum HP, it increases current CP with the rest value as well.
HpDrain: Magical attack that absorbs given percentage of the damage inflicted as HP.
Hp: Increases current HP by a static value.
-HpLimit: Increase a character's max hp limit (l2jmobius)
+HpLimit: Increase a character's max hp limit. (l2jmobius)
HpRegen: HP Regeneration stat.
HpToOwner: DOT effect that absorbs HP over time.
IgnoreDeath: Become undying. Hp cannot decrease below 1.
+IgnoreReduceDamage: Ignore ReduceDamage effect implementation. (l2jmobius)
ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius)
ImmobileDamageResist: Resist damage while immobile. (l2jmobius)
ImmobilePetBuff: Causes your pet to become immobilized.
@@ -205,7 +208,6 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
-MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.
@@ -270,6 +272,7 @@ RebalanceHP: Balances targets' current HP.
RebalanceHPSummon: Balances targets' current HP for summons.
RecoverVitalityInPeaceZone: Recover periodically vitality when player is in a peace zone. (l2jmobius)
Recovery: Decreases death penalty level.
+ReduceDamage: Reduce damage effect implementation.
ReduceCancel: Magic skill casting interruption stat.
ReduceDropPenalty: Reduces EXP lost and death penalty chance.
ReflectMagic: Deflects magical damage back to the attacker.
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/Config.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/Config.java
index 2feb6a811c..e04942b524 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/Config.java
@@ -614,6 +614,7 @@ public class Config
public static boolean ENABLE_AUTO_SKILL;
public static boolean ENABLE_AUTO_ITEM;
public static boolean RESUME_AUTO_PLAY;
+ public static boolean ENABLE_AUTO_ASSIST;
// --------------------------------------------------
// FloodProtector Settings
@@ -1355,6 +1356,7 @@ public class Config
public static boolean FAKE_PLAYER_USE_SHOTS;
public static boolean FAKE_PLAYER_KILL_PVP;
public static boolean FAKE_PLAYER_KILL_KARMA;
+ public static boolean FAKE_PLAYER_AUTO_ATTACKABLE;
public static boolean FAKE_PLAYER_AGGRO_MONSTERS;
public static boolean FAKE_PLAYER_AGGRO_PLAYERS;
public static boolean FAKE_PLAYER_AGGRO_FPC;
@@ -2241,6 +2243,7 @@ public class Config
ENABLE_AUTO_SKILL = generalConfig.getBoolean("EnableAutoSkill", true);
ENABLE_AUTO_ITEM = generalConfig.getBoolean("EnableAutoItem", true);
RESUME_AUTO_PLAY = generalConfig.getBoolean("ResumeAutoPlay", false);
+ ENABLE_AUTO_ASSIST = generalConfig.getBoolean("AssistLeader", false);
// Load FloodProtector config file
final PropertiesParser floodProtectorConfig = new PropertiesParser(FLOOD_PROTECTOR_CONFIG_FILE);
@@ -3416,6 +3419,7 @@ public class Config
FAKE_PLAYER_USE_SHOTS = fakePlayerConfig.getBoolean("FakePlayerUseShots", false);
FAKE_PLAYER_KILL_PVP = fakePlayerConfig.getBoolean("FakePlayerKillsRewardPvP", false);
FAKE_PLAYER_KILL_KARMA = fakePlayerConfig.getBoolean("FakePlayerUnflaggedKillsKarma", false);
+ FAKE_PLAYER_AUTO_ATTACKABLE = fakePlayerConfig.getBoolean("FakePlayerAutoAttackable", false);
FAKE_PLAYER_AGGRO_MONSTERS = fakePlayerConfig.getBoolean("FakePlayerAggroMonsters", false);
FAKE_PLAYER_AGGRO_PLAYERS = fakePlayerConfig.getBoolean("FakePlayerAggroPlayers", false);
FAKE_PLAYER_AGGRO_FPC = fakePlayerConfig.getBoolean("FakePlayerAggroFPC", false);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/SummonAI.java
index 96cef785c0..13ce9b1224 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/SummonAI.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/SummonAI.java
@@ -27,6 +27,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -327,9 +328,17 @@ public class SummonAI extends PlayableAI implements Runnable
}
final Summon summon = getActor();
- if ((summon.getOwner() != null) && (summon.getOwner() != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ final Player owner = summon.getOwner();
+ if (owner != null)
{
- summon.doAttack(attacker);
+ if (summon.calculateDistance3D(owner) > 3000)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, owner);
+ }
+ else if ((owner != attacker) && !summon.isMoving() && summon.canAttack(attacker, false))
+ {
+ summon.doAttack(attacker);
+ }
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
index 6485e6c47d..2208f823ee 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/sql/ClanTable.java
@@ -420,7 +420,6 @@ public class ClanTable
private void restoreClanWars()
{
- final long currentTime = System.currentTimeMillis();
try (Connection con = DatabaseFactory.getConnection();
Statement statement = con.createStatement();
ResultSet rset = statement.executeQuery("SELECT clan1, clan2, clan1Kill, clan2Kill, winnerClan, startTime, endTime, state FROM clan_wars"))
@@ -431,14 +430,8 @@ public class ClanTable
final Clan attacked = getClan(rset.getInt("clan2"));
if ((attacker != null) && (attacked != null))
{
- final long endTime = rset.getLong("endTime");
- if (endTime < currentTime)
- {
- continue;
- }
-
final ClanWarState state = ClanWarState.values()[rset.getInt("state")];
- final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), endTime, state);
+ final ClanWar clanWar = new ClanWar(attacker, attacked, rset.getInt("clan1Kill"), rset.getInt("clan2Kill"), rset.getInt("winnerClan"), rset.getLong("startTime"), rset.getLong("endTime"), state);
attacker.addWar(attacked.getId(), clanWar);
attacked.addWar(attacker.getId(), clanWar);
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ActionData.java
index 27860b8144..22da7987bd 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ActionData.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ActionData.java
@@ -88,6 +88,11 @@ public class ActionData implements IXmlReader
return _actionSkillsData.getOrDefault(skillId, -1);
}
+ public int[] getActionIdList()
+ {
+ return _actionData.keySet().stream().mapToInt(Number::intValue).toArray();
+ }
+
/**
* Gets the single instance of ActionData.
* @return single instance of ActionData
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
index 47ed7421e8..2995e359c4 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java
@@ -307,7 +307,7 @@ public class InitialShortcutData implements IXmlReader
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
@@ -350,7 +350,7 @@ public class InitialShortcutData implements IXmlReader
}
// Register shortcut
final Shortcut newShortcut = new Shortcut(shortcut.getSlot(), shortcut.getPage(), shortcut.getType(), shortcutId, shortcut.getLevel(), shortcut.getSubLevel(), shortcut.getCharacterType());
- player.sendPacket(new ShortCutRegister(newShortcut));
+ player.sendPacket(new ShortCutRegister(newShortcut, player));
player.registerShortCut(newShortcut);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/SkillData.java
index c5839831ba..deb0eec41a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/SkillData.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/SkillData.java
@@ -546,9 +546,10 @@ public class SkillData implements IXmlReader
variables.put("index", (i - fromLevel) + 1d);
variables.put("subIndex", (j - fromSubLevel) + 1d);
final Object base = values.getOrDefault(i, Collections.emptyMap()).get(-1);
- if ((base != null) && !(base instanceof StatSet))
+ final String baseText = String.valueOf(base);
+ if ((base != null) && !(base instanceof StatSet) && (!baseText.equalsIgnoreCase("true") && !baseText.equalsIgnoreCase("false")))
{
- variables.put("base", Double.parseDouble(String.valueOf(base)));
+ variables.put("base", Double.parseDouble(baseText));
}
parsedValue = parseValue(n, false, false, variables);
if (parsedValue != null)
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/TransformData.java
index 58610a8de5..b608fff1f7 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/TransformData.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/TransformData.java
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.holders.AdditionalItemHolder;
import org.l2jmobius.gameserver.model.holders.AdditionalSkillHolder;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* Transformation data.
@@ -142,7 +141,7 @@ public class TransformData implements IXmlReader
}
set.set("actions", z.getTextContent());
final int[] actions = set.getIntArray("actions", " ");
- templateData.setBasicActionList(new ExBasicActionList(actions));
+ templateData.setBasicActionList(actions);
break;
}
case "additionalSkills":
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
index 2260001e17..380989e049 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/NpcInfoType.java
@@ -30,14 +30,14 @@ public enum NpcInfoType implements IUpdateTypeComponent
NAME(0x03, 2),
POSITION(0x04, (3 * 4)),
HEADING(0x05, 4),
- UNKNOWN2(0x06, 4),
+ VEHICLE_ID(0x06, 4),
ATK_CAST_SPEED(0x07, (2 * 4)),
// 1
SPEED_MULTIPLIER(0x08, (2 * 4)),
EQUIPPED(0x09, (3 * 4)),
- ALIVE(0x0A, 1),
- RUNNING(0x0B, 1),
+ STOP_MODE(0x0A, 1),
+ MOVE_MODE(0x0B, 1),
SWIM_OR_FLY(0x0E, 1),
TEAM(0x0F, 1),
@@ -45,7 +45,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
ENCHANT(0x10, 4),
FLYING(0x11, 4),
CLONE(0x12, 4),
- COLOR_EFFECT(0x13, 4),
+ PET_EVOLUTION_ID(0x13, 4),
DISPLAY_EFFECT(0x16, 4),
TRANSFORMATION(0x17, 4),
@@ -55,7 +55,7 @@ public enum NpcInfoType implements IUpdateTypeComponent
MAX_HP(0x1A, 4),
MAX_MP(0x1B, 4),
SUMMONED(0x1C, 1),
- UNKNOWN12(0x1D, (2 * 4)),
+ FOLLOW_INFO(0x1D, (2 * 4)),
TITLE(0x1E, 2),
NAME_NPCSTRINGID(0x1F, 4),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java
index 40b4ea1c3d..ae43e8d744 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java
@@ -25,4 +25,9 @@ import org.l2jmobius.gameserver.model.actor.Player;
public interface IPlayerActionHandler
{
void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed);
+
+ default boolean isPetAction()
+ {
+ return false;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
index 030cf75135..8e34eea3d6 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java
@@ -364,7 +364,11 @@ public class WalkingManager implements IXmlReader
final WalkInfo walk = _activeRoutes.remove(npc.getObjectId());
if (walk != null)
{
- walk.getWalkCheckTask().cancel(true);
+ final ScheduledFuture> task = walk.getWalkCheckTask();
+ if (task != null)
+ {
+ task.cancel(true);
+ }
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ShortCuts.java
index 0c2f5d59de..0b7ad4e019 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ShortCuts.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ShortCuts.java
@@ -215,7 +215,7 @@ public class ShortCuts implements IRestorable
{
final Shortcut newsc = new Shortcut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), skillLevel, skillSubLevel, 1);
newsc.setAutoUse(sc.isAutoUse());
- _owner.sendPacket(new ShortCutRegister(newsc));
+ _owner.sendPacket(new ShortCutRegister(newsc, _owner));
_owner.registerShortCut(newsc);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 0b200f31f2..492e746f51 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -1288,7 +1288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
player.updatePvPStatus(target);
}
- if (isFakePlayer() && (target.isPlayable() || target.isFakePlayer()))
+ if (isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (target.isPlayable() || target.isFakePlayer()))
{
final Npc npc = ((Npc) this);
if (!npc.isScriptValue(1))
@@ -2816,7 +2816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// If this creature was previously moving, but now due to stat change can no longer move, broadcast StopMove packet.
- if (isMoving() && (_stat.getMoveSpeed() <= 0))
+ if (isMoving() && (getMoveSpeed() <= 0))
{
stopMove(null);
}
@@ -2829,177 +2829,139 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
summon.updateAndBroadcastStatus(1);
}
}
- else
+ else if (isPlayer())
{
- final boolean broadcastFull = true;
- final StatusUpdate su = new StatusUpdate(this);
- UserInfo info = null;
- if (isPlayer())
+ final UserInfo info = new UserInfo(getActingPlayer(), false);
+ info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
+
+ boolean updateWeight = false;
+ for (Stat stat : currentChanges)
{
- info = new UserInfo(getActingPlayer(), false);
- info.addComponentType(UserInfoType.SLOTS, UserInfoType.ENCHANTLEVEL);
- }
- if (info != null)
- {
- for (Stat stat : currentChanges)
+ switch (stat)
{
- switch (stat)
+ case MOVE_SPEED:
+ case RUN_SPEED:
+ case WALK_SPEED:
+ case SWIM_RUN_SPEED:
+ case SWIM_WALK_SPEED:
+ case FLY_RUN_SPEED:
+ case FLY_WALK_SPEED:
{
- case MOVE_SPEED:
- case RUN_SPEED:
- case WALK_SPEED:
- case SWIM_RUN_SPEED:
- case SWIM_WALK_SPEED:
- case FLY_RUN_SPEED:
- case FLY_WALK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER);
- break;
- }
- case PHYSICAL_ATTACK_SPEED:
- {
- info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
- break;
- }
- case PHYSICAL_ATTACK:
- case PHYSICAL_DEFENCE:
- case EVASION_RATE:
- case ACCURACY_COMBAT:
- case CRITICAL_RATE:
- case MAGIC_CRITICAL_RATE:
- case MAGIC_EVASION_RATE:
- case ACCURACY_MAGIC:
- case MAGIC_ATTACK:
- case MAGIC_ATTACK_SPEED:
- case MAGICAL_DEFENCE:
- {
- info.addComponentType(UserInfoType.STATS);
- break;
- }
- case MAX_CP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxCp());
- }
- break;
- }
- case MAX_HP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_HP, _stat.getMaxHp());
- }
- break;
- }
- case MAX_MP:
- {
- if (isPlayer())
- {
- info.addComponentType(UserInfoType.MAX_HPCPMP);
- }
- else
- {
- su.addUpdate(StatusUpdateType.MAX_CP, _stat.getMaxMp());
- }
- break;
- }
- case STAT_STR:
- case STAT_CON:
- case STAT_DEX:
- case STAT_INT:
- case STAT_WIT:
- case STAT_MEN:
- {
- info.addComponentType(UserInfoType.BASE_STATS);
- break;
- }
- case FIRE_RES:
- case WATER_RES:
- case WIND_RES:
- case EARTH_RES:
- case HOLY_RES:
- case DARK_RES:
- {
- info.addComponentType(UserInfoType.ELEMENTALS);
- break;
- }
- case FIRE_POWER:
- case WATER_POWER:
- case WIND_POWER:
- case EARTH_POWER:
- case HOLY_POWER:
- case DARK_POWER:
- {
- info.addComponentType(UserInfoType.ATK_ELEMENTAL);
- break;
- }
+ info.addComponentType(UserInfoType.MULTIPLIER);
+ break;
+ }
+ case PHYSICAL_ATTACK_SPEED:
+ {
+ info.addComponentType(UserInfoType.MULTIPLIER, UserInfoType.STATS);
+ break;
+ }
+ case PHYSICAL_ATTACK:
+ case PHYSICAL_DEFENCE:
+ case EVASION_RATE:
+ case ACCURACY_COMBAT:
+ case CRITICAL_RATE:
+ case MAGIC_CRITICAL_RATE:
+ case MAGIC_EVASION_RATE:
+ case ACCURACY_MAGIC:
+ case MAGIC_ATTACK:
+ case MAGIC_ATTACK_SPEED:
+ case MAGICAL_DEFENCE:
+ {
+ info.addComponentType(UserInfoType.STATS);
+ break;
+ }
+ case MAX_CP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_HP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case MAX_MP:
+ {
+ info.addComponentType(UserInfoType.MAX_HPCPMP);
+ break;
+ }
+ case STAT_STR:
+ case STAT_CON:
+ case STAT_DEX:
+ case STAT_INT:
+ case STAT_WIT:
+ case STAT_MEN:
+ {
+ info.addComponentType(UserInfoType.BASE_STATS);
+ updateWeight = true;
+ break;
+ }
+ case FIRE_RES:
+ case WATER_RES:
+ case WIND_RES:
+ case EARTH_RES:
+ case HOLY_RES:
+ case DARK_RES:
+ {
+ info.addComponentType(UserInfoType.ELEMENTALS);
+ break;
+ }
+ case FIRE_POWER:
+ case WATER_POWER:
+ case WIND_POWER:
+ case EARTH_POWER:
+ case HOLY_POWER:
+ case DARK_POWER:
+ {
+ info.addComponentType(UserInfoType.ATK_ELEMENTAL);
+ break;
+ }
+ case WEIGHT_LIMIT:
+ case WEIGHT_PENALTY:
+ {
+ updateWeight = true;
+ break;
}
}
- // currentChanges.clear();
}
- if (isPlayer())
+ final Player player = getActingPlayer();
+ if (updateWeight)
{
- final Player player = getActingPlayer();
player.refreshOverloaded(true);
- sendPacket(info);
+ }
+
+ sendPacket(info);
+
+ player.broadcastCharInfo();
+
+ if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ {
+ getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ }
+ }
+ else if (isNpc())
+ {
+ World.getInstance().forEachVisibleObject(this, Player.class, player ->
+ {
+ if (!isVisibleFor(player))
+ {
+ return;
+ }
- if (broadcastFull)
+ if (isFakePlayer())
{
- player.broadcastCharInfo();
+ player.sendPacket(new FakePlayerInfo((Npc) this));
}
- else if (su.hasUpdates())
+ else if (getRunSpeed() == 0)
{
- broadcastPacket(su);
+ player.sendPacket(new ServerObjectInfo((Npc) this, player));
}
- if (hasServitors() && hasAbnormalType(AbnormalType.ABILITY_CHANGE))
+ else
{
- getServitors().values().forEach(Summon::broadcastStatusUpdate);
+ player.sendPacket(new NpcInfo((Npc) this));
}
- }
- else if (isNpc())
- {
- if (broadcastFull)
- {
- World.getInstance().forEachVisibleObject(this, Player.class, player ->
- {
- if (!isVisibleFor(player))
- {
- return;
- }
-
- if (isFakePlayer())
- {
- player.sendPacket(new FakePlayerInfo((Npc) this));
- }
- else if (_stat.getRunSpeed() == 0)
- {
- player.sendPacket(new ServerObjectInfo((Npc) this, player));
- }
- else
- {
- player.sendPacket(new NpcInfo((Npc) this));
- }
- });
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
- }
- else if (su.hasUpdates())
- {
- broadcastPacket(su);
- }
+ });
}
_broadcastModifiedStatTask = null;
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Player.java
index 6feb134eb5..68e6b87b22 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -4573,7 +4573,7 @@ public class Player extends Playable
{
super.doAutoAttack(target);
setRecentFakeDeath(false);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
updatePvPStatus();
}
@@ -8455,9 +8455,13 @@ public class Player extends Playable
if ((getWantsPeace() == 0) && (attackerPlayer.getWantsPeace() == 0) && !isAcademyMember())
{
final ClanWar war = attackerClan.getWarWith(getClanId());
- if ((war != null) && ((war.getState() == ClanWarState.MUTUAL) || (((war.getState() == ClanWarState.BLOOD_DECLARATION) || (war.getState() == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == attackerClan.getId()))))
+ if (war != null)
{
- return true;
+ final ClanWarState warState = war.getState();
+ if ((warState == ClanWarState.MUTUAL) || (((warState == ClanWarState.BLOOD_DECLARATION) || (warState == ClanWarState.DECLARATION)) && (war.getAttackerClanId() == clan.getId())))
+ {
+ return true;
+ }
}
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Summon.java
index 196de38709..4213dec3ad 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Summon.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Summon.java
@@ -68,9 +68,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ExPartyPetWindowUpdate;
import org.l2jmobius.gameserver.network.serverpackets.ExPetInfo;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.PetDelete;
-import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
import org.l2jmobius.gameserver.network.serverpackets.PetStatusUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.PetSummonInfo;
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
import org.l2jmobius.gameserver.network.serverpackets.ServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.SummonInfo;
@@ -211,7 +211,7 @@ public abstract class Summon extends Playable
{
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, 1));
+ player.sendPacket(new PetSummonInfo(this, 1));
return;
}
@@ -375,10 +375,7 @@ public abstract class Summon extends Playable
@Override
public void onDecay()
{
- if (!isPet())
- {
- super.onDecay();
- }
+ unSummon(_owner);
deleteMe(_owner);
}
@@ -412,14 +409,18 @@ public abstract class Summon extends Playable
}
}
- // pet will be deleted along with all his items
+ // Pet will be deleted along with all his items.
if (getInventory() != null)
{
getInventory().destroyAllItems("pet deleted", _owner, this);
}
+
decayMe();
- CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ if (!isPet())
+ {
+ CharSummonTable.getInstance().removeServitor(_owner, getObjectId());
+ }
}
public void unSummon(Player owner)
@@ -854,7 +855,7 @@ public abstract class Summon extends Playable
if (isSpawned())
{
- sendPacket(new PetInfo(this, value));
+ sendPacket(new PetSummonInfo(this, value));
sendPacket(new PetStatusUpdate(this));
broadcastNpcInfo(value);
@@ -875,7 +876,14 @@ public abstract class Summon extends Playable
return;
}
- player.sendPacket(new ExPetInfo(this, player, value));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, value));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, value));
+ }
});
}
@@ -900,7 +908,7 @@ public abstract class Summon extends Playable
// Check if the Player is the owner of the Pet
if (player == _owner)
{
- player.sendPacket(new PetInfo(this, isDead() ? 0 : 1));
+ player.sendPacket(new PetSummonInfo(this, isDead() ? 0 : 1));
if (isPet())
{
player.sendPacket(new PetItemList(getInventory().getItems()));
@@ -908,7 +916,14 @@ public abstract class Summon extends Playable
}
else
{
- player.sendPacket(new ExPetInfo(this, player, 0));
+ if (isPet())
+ {
+ player.sendPacket(new ExPetInfo(this, player, 0));
+ }
+ else
+ {
+ player.sendPacket(new SummonInfo(this, player, 0));
+ }
}
}
@@ -954,7 +969,7 @@ public abstract class Summon extends Playable
{
setTarget(target);
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
- if (target.isFakePlayer())
+ if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE)
{
_owner.updatePvPStatus();
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
index 9c506b6c6b..d737078f98 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Door.java
@@ -596,6 +596,8 @@ public class Door extends Creature
{
if (isVisibleFor(player))
{
+ player.sendPacket(new StaticObjectInfo(this, player.isGM()));
+ player.sendPacket(new DoorStatusUpdate(this));
if (getEmitter() > 0)
{
if (_isInverted)
@@ -607,7 +609,6 @@ public class Door extends Creature
player.sendPacket(new OnEventTrigger(getEmitter(), _open));
}
}
- player.sendPacket(new StaticObjectInfo(this, player.isGM()));
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
index c8f288a792..66f84ae5fa 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java
@@ -67,7 +67,7 @@ public class Monster extends Attackable
{
if (isFakePlayer())
{
- return isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
+ return Config.FAKE_PLAYER_AUTO_ATTACKABLE || isInCombat() || attacker.isMonster() || (getScriptValue() > 0);
}
// Check if the Monster target is aggressive
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index eb31dfcf3e..3a1e8faafa 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.actor.stat;
+import java.util.Collections;
import java.util.Deque;
import java.util.EnumMap;
import java.util.EnumSet;
@@ -61,8 +62,6 @@ public class CreatureStat
private final Map _statsAdd = new EnumMap<>(Stat.class);
private final Map _statsMul = new EnumMap<>(Stat.class);
- private final Map _addValueCache = new EnumMap<>(Stat.class);
- private final Map _mulValueCache = new EnumMap<>(Stat.class);
private final Map> _moveTypeStats = new ConcurrentHashMap<>();
private final Map _reuseStat = new ConcurrentHashMap<>();
private final Map _mpConsumeStat = new ConcurrentHashMap<>();
@@ -873,15 +872,13 @@ public class CreatureStat
// Initialize default values
for (Stat stat : Stat.values())
{
- final Double resetAddValue = stat.getResetAddValue();
- if (resetAddValue.doubleValue() != 0)
+ if (stat.getResetAddValue() != 0)
{
- _statsAdd.put(stat, resetAddValue);
+ _statsAdd.put(stat, stat.getResetAddValue());
}
- final Double resetMulValue = stat.getResetMulValue();
- if (resetMulValue.doubleValue() != 0)
+ if (stat.getResetMulValue() != 0)
{
- _statsMul.put(stat, resetMulValue);
+ _statsMul.put(stat, stat.getResetMulValue());
}
}
}
@@ -892,8 +889,12 @@ public class CreatureStat
*/
public void recalculateStats(boolean broadcast)
{
- Set changed = null;
+ // Copy old data before wiping it out.
+ final Map adds = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsAdd);
+ final Map muls = !broadcast ? Collections.emptyMap() : new EnumMap<>(_statsMul);
+
_lock.writeLock().lock();
+
try
{
// Wipe all the data.
@@ -902,7 +903,7 @@ public class CreatureStat
// Call pump to each effect.
for (BuffInfo info : _creature.getEffectList().getPassives())
{
- if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature))
+ if (info.isInUse() && info.getSkill().checkConditions(SkillConditionScope.PASSIVE, _creature, _creature.getTarget()))
{
for (AbstractEffect effect : info.getEffects())
{
@@ -975,45 +976,26 @@ public class CreatureStat
}
_attackSpeedMultiplier = Formulas.calcAtkSpdMultiplier(_creature);
_mAttackSpeedMultiplier = Formulas.calcMAtkSpdMultiplier(_creature);
-
- if (broadcast)
- {
- // Calculate the difference between old and new stats.
- changed = EnumSet.noneOf(Stat.class);
- for (Stat stat : Stat.values())
- {
- // Check if add value changed for this stat.
- final Double resetAddValue = stat.getResetAddValue();
- final Double addValue = _statsAdd.getOrDefault(stat, resetAddValue);
- if (addValue.doubleValue() != _addValueCache.getOrDefault(stat, resetAddValue).doubleValue())
- {
- _addValueCache.put(stat, addValue);
- changed.add(stat);
- }
- else // Check if mul value changed for this stat.
- {
- final Double resetMulValue = stat.getResetMulValue();
- final Double mulValue = _statsMul.getOrDefault(stat, resetMulValue);
- if (mulValue.doubleValue() != _mulValueCache.getOrDefault(stat, resetMulValue).doubleValue())
- {
- _mulValueCache.put(stat, mulValue);
- changed.add(stat);
- }
- }
- }
- }
}
finally
{
_lock.writeLock().unlock();
}
- // Notify recalculation to child classes.
+ // Notify recalculation to child classes
onRecalculateStats(broadcast);
- // Broadcast changes.
- if ((changed != null) && !changed.isEmpty())
+ if (broadcast)
{
+ // Calculate the difference between old and new stats
+ final Set changed = EnumSet.noneOf(Stat.class);
+ for (Stat stat : Stat.values())
+ {
+ if (_statsAdd.getOrDefault(stat, stat.getResetAddValue()).equals(adds.getOrDefault(stat, stat.getResetAddValue())) || _statsMul.getOrDefault(stat, stat.getResetMulValue()).equals(muls.getOrDefault(stat, stat.getResetMulValue())))
+ {
+ changed.add(stat);
+ }
+ }
_creature.broadcastModifiedStats(changed);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
index 9adda5dc3f..b728eedc21 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java
@@ -122,7 +122,7 @@ public class Transform implements IIdentifiable
return _title;
}
- private TransformTemplate getTemplate(Creature creature)
+ public TransformTemplate getTemplate(Creature creature)
{
if (creature.isPlayer())
{
@@ -318,7 +318,7 @@ public class Transform implements IIdentifiable
// Send basic action list.
if (template.hasBasicActionList())
{
- player.sendPacket(template.getBasicActionList());
+ player.sendPacket(new ExBasicActionList(template.getBasicActionList()));
}
player.getEffectList().stopAllToggles();
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
index 6faefa8b48..fecc972ecc 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java
@@ -30,7 +30,6 @@ import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.stats.Stat;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author UnAfraid
@@ -45,8 +44,7 @@ public class TransformTemplate
private List _additionalItems;
private Map _baseDefense;
private Map _baseStats;
-
- private ExBasicActionList _list;
+ private int[] _actions;
private final Map _data = new LinkedHashMap<>(100);
public TransformTemplate(StatSet set)
@@ -282,19 +280,19 @@ public class TransformTemplate
return _additionalItems != null ? _additionalItems : Collections.emptyList();
}
- public void setBasicActionList(ExBasicActionList list)
+ public void setBasicActionList(int[] actions)
{
- _list = list;
+ _actions = actions;
}
- public ExBasicActionList getBasicActionList()
+ public int[] getBasicActionList()
{
- return _list;
+ return _actions;
}
public boolean hasBasicActionList()
{
- return _list != null;
+ return _actions != null;
}
public void addLevelData(TransformLevelData data)
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
index 8c535a998e..572963818b 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/clan/ClanWar.java
@@ -184,7 +184,7 @@ public class ClanWar
_winnerClanId = winnerClan.getId();
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(cancelor.getId(), winnerClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_DEFEAT) - System.currentTimeMillis() */);
}
public void clanWarTimeout()
@@ -203,7 +203,7 @@ public class ClanWar
_state = ClanWarState.TIE;
_endTime = System.currentTimeMillis();
- ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis());
+ ThreadPool.schedule(() -> ClanTable.getInstance().deleteClanWars(attackerClan.getId(), attackedClan.getId()), 5000 /* (_endTime + TIME_TO_DELETION_AFTER_CANCELLATION) - System.currentTimeMillis() */);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
index 97397f753f..9d5faa0c61 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java
@@ -57,7 +57,10 @@ public enum CommissionItemType
NECKLACE(31),
BELT(32),
BRACELET(33),
+ AGATHION(62),
HAIR_ACCESSORY(34),
+ BROOCH_JEWEL(63),
+ ARTIFACT(64),
// Supplies
POTION(35),
SCROLL_ENCHANT_WEAPON(36),
@@ -65,6 +68,7 @@ public enum CommissionItemType
SCROLL_OTHER(38),
SOULSHOT(39),
SPIRITSHOT(40),
+ OTHER_SUPPLIES(41),
// Pet Goods
PET_EQUIPMENT(42),
PET_SUPPLIES(43),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
index eb10918430..3a194d1660 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java
@@ -47,8 +47,8 @@ public enum CommissionTreeType
CommissionItemType.SPEAR,
CommissionItemType.OTHER_WEAPON),
ARMOR(1, CommissionItemType.HELMET, CommissionItemType.ARMOR_TOP, CommissionItemType.ARMOR_PANTS, CommissionItemType.FULL_BODY, CommissionItemType.GLOVES, CommissionItemType.FEET, CommissionItemType.SHIELD, CommissionItemType.SIGIL, CommissionItemType.UNDERWEAR, CommissionItemType.CLOAK),
- ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.HAIR_ACCESSORY),
- SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT),
+ ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.AGATHION, CommissionItemType.HAIR_ACCESSORY, CommissionItemType.BROOCH_JEWEL, CommissionItemType.ARTIFACT),
+ SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT, CommissionItemType.OTHER_SUPPLIES),
PET_GOODS(4, CommissionItemType.PET_EQUIPMENT, CommissionItemType.PET_SUPPLIES),
MISC(
5,
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/effects/EffectType.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/effects/EffectType.java
index 6d88f42f03..bc0c4a1f90 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/effects/EffectType.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/effects/EffectType.java
@@ -62,5 +62,6 @@ public enum EffectType
SUMMON_NPC,
TELEPORT,
TELEPORT_TO_TARGET,
- ABNORMAL_SHIELD
+ ABNORMAL_SHIELD,
+ RESTORE_SYMBOL_SEAL
}
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
index e17d405a46..fba22cdb8c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/AbstractScript.java
@@ -2242,6 +2242,17 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
summoner.addSummonedNpc(npc);
}
+ // Retain monster original position if ENABLE_RANDOM_MONSTER_SPAWNS is enabled.
+ if (Config.ENABLE_RANDOM_MONSTER_SPAWNS && !randomOffset && npc.isMonster())
+ {
+ spawn.setXYZ(x, y, zValue);
+ npc.setXYZ(x, y, zValue);
+ if (heading > -1)
+ {
+ npc.setHeading(heading);
+ }
+ }
+
// Fixes invisible NPCs spawned by script.
npc.broadcastInfo();
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/item/instance/Item.java
index e9fd1cbbd6..c62cb2e398 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/item/instance/Item.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/item/instance/Item.java
@@ -39,6 +39,7 @@ import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.AgathionData;
import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
+import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
import org.l2jmobius.gameserver.data.xml.EnsoulData;
import org.l2jmobius.gameserver.data.xml.OptionData;
@@ -52,6 +53,7 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
+import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.DropProtection;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.VariationInstance;
@@ -74,12 +76,14 @@ import org.l2jmobius.gameserver.model.events.impl.item.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.holders.AgathionSkillHolder;
+import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.appearance.AppearanceStone;
+import org.l2jmobius.gameserver.model.item.appearance.AppearanceType;
import org.l2jmobius.gameserver.model.item.enchant.attribute.AttributeHolder;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.ItemType;
@@ -94,6 +98,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
+import org.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.taskmanager.ItemAppearanceTaskManager;
@@ -1652,7 +1657,9 @@ public class Item extends WorldObject
setDropperObjectId(dropper != null ? dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
// Add the Item dropped in the world as a visible object
- World.getInstance().addVisibleObject(this, getWorldRegion());
+ final WorldRegion region = getWorldRegion();
+ region.addVisibleObject(this);
+ World.getInstance().addVisibleObject(this, region);
if (Config.SAVE_DROPPED_ITEM)
{
ItemsOnGroundManager.getInstance().save(this);
@@ -2578,6 +2585,11 @@ public class Item extends WorldObject
}
}
+ public int getAppearanceStoneId()
+ {
+ return getVariables().getInt(ItemVariables.VISUAL_APPEARANCE_STONE_ID, 0);
+ }
+
public long getVisualLifeTime()
{
return getVariables().getLong(ItemVariables.VISUAL_APPEARANCE_LIFE_TIME, 0);
@@ -2602,6 +2614,8 @@ public class Item extends WorldObject
public void onVisualLifeTimeEnd()
{
+ removeVisualSetSkills();
+
final ItemVariables vars = getVariables();
vars.remove(ItemVariables.VISUAL_ID);
vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID);
@@ -2627,6 +2641,124 @@ public class Item extends WorldObject
}
}
+ public void removeVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if ((armorSet.getPiecesCount(player, Item::getVisualId) - 1 /* not removed yet */) < armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ final Skill skill = holder.getSkill();
+ if (skill != null)
+ {
+ player.removeSkill(skill, false, skill.isPassive());
+ update = true;
+ }
+ }
+ }
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
+ public void applyVisualSetSkills()
+ {
+ if (!isEquipped())
+ {
+ return;
+ }
+
+ final int appearanceStoneId = getAppearanceStoneId();
+ if (appearanceStoneId > 0)
+ {
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId);
+ if ((stone != null) && (stone.getType() == AppearanceType.FIXED))
+ {
+ final Player player = getActingPlayer();
+ if (player != null)
+ {
+ boolean update = false;
+ boolean updateTimeStamp = false;
+ for (ArmorSet armorSet : ArmorSetData.getInstance().getSets(stone.getVisualId()))
+ {
+ if (armorSet.getPiecesCount(player, Item::getVisualId) >= armorSet.getMinimumPieces())
+ {
+ for (ArmorsetSkillHolder holder : armorSet.getSkills())
+ {
+ if (player.getSkillLevel(holder.getSkillId()) >= holder.getSkillLevel())
+ {
+ continue;
+ }
+
+ final Skill skill = holder.getSkill();
+ if ((skill == null) || (skill.isPassive() && !skill.checkConditions(SkillConditionScope.PASSIVE, player, player)))
+ {
+ continue;
+ }
+
+ player.addSkill(skill, false);
+ update = true;
+
+ if (skill.isActive())
+ {
+ if (!player.hasSkillReuse(skill.getReuseHashCode()))
+ {
+ final int equipDelay = getEquipReuseDelay();
+ if (equipDelay > 0)
+ {
+ player.addTimeStamp(skill, equipDelay);
+ player.disableSkill(skill, equipDelay);
+ }
+ }
+
+ // Active, non offensive, skills start with reuse on equip.
+ if (!skill.isBad() && !skill.isTransformation() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && player.hasEnteredWorld())
+ {
+ player.addTimeStamp(skill, skill.getReuseDelay() > 0 ? skill.getReuseDelay() : Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
+ }
+
+ updateTimeStamp = true;
+ }
+ }
+ }
+ }
+
+ if (updateTimeStamp)
+ {
+ player.sendPacket(new SkillCoolTime(player));
+ }
+
+ if (update)
+ {
+ player.sendSkillList();
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns the item in String format
* @return String
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
index f702ab70ee..3c841fbc9c 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
@@ -772,7 +772,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndApply(player, item, Item::getVisualId))
{
update = true;
@@ -924,7 +925,8 @@ public abstract class Inventory extends ItemContainer
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
- final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
+ final int appearanceStoneId = item.getAppearanceStoneId();
+ final AppearanceStone stone = AppearanceItemData.getInstance().getStone(appearanceStoneId > 0 ? appearanceStoneId : itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, Item::getVisualId))
{
remove = true;
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
index 7fb3323b75..6b58a96064 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java
@@ -652,7 +652,7 @@ public class SkillCaster implements Runnable
((Creature) obj).addAttackerToAttackByList(caster);
// Summoning a servitor should not renew your own PvP flag time.
- if (obj.isFakePlayer() && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
+ if (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!obj.isServitor() || (obj.getObjectId() != player.getFirstServitor().getObjectId())))
{
player.updatePvPStatus();
}
@@ -675,7 +675,7 @@ public class SkillCaster implements Runnable
{
// Consider fake player PvP status.
if (!obj.isFakePlayer() //
- || (obj.isFakePlayer() && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
+ || (obj.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE && (!((Npc) obj).isScriptValue(0) || (((Npc) obj).getReputation() < 0))))
{
player.updatePvPStatus();
}
@@ -710,7 +710,7 @@ public class SkillCaster implements Runnable
}
});
}
- else if (caster.isFakePlayer()) // fake player attacks player
+ else if (caster.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) // fake player attacks player
{
if (target.isPlayable() || target.isFakePlayer())
{
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 05d358efa9..3280a26c17 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -91,6 +91,7 @@ public enum Stat
REAR_DAMAGE_RATE("rearDamage"),
DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
AUTO_ATTACK_DAMAGE_BONUS("autoAttackDamageBonus"),
+ IGNORE_REDUCE_DAMAGE("ignoreReduceDamage"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
@@ -131,7 +132,8 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
- MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
+ ADD_MAX_MAGIC_CRITICAL_RATE("addMaxMagicCritRate"),
+ ADD_MAX_PHYSICAL_CRITICAL_RATE("addMaxPhysicalCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
index d96c2e25ae..0ca58d9970 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java
@@ -43,7 +43,18 @@ public class MCritRateFinalizer implements IStatFunction
}
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayable() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
+
+ final double maxMagicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxMagicalCritRate = Config.MAX_MCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_MAGIC_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxMagicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, maxMagicalCritRate);
}
@Override
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
index 8f916369b4..b7b0c4ef53 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java
@@ -95,6 +95,6 @@ public class MDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
index 8ab5a6ea58..c55b35b2ee 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java
@@ -42,7 +42,18 @@ public class PCriticalRateFinalizer implements IStatFunction
baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_LEGS);
}
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1;
- return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayable() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
+
+ final double maxPhysicalCritRate;
+ if (creature.isPlayable())
+ {
+ maxPhysicalCritRate = Config.MAX_PCRIT_RATE + creature.getStat().getValue(Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE, 0);
+ }
+ else
+ {
+ maxPhysicalCritRate = Double.MAX_VALUE;
+ }
+
+ return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, maxPhysicalCritRate);
}
@Override
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
index 265cef95f4..4211092a85 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java
@@ -97,6 +97,6 @@ public class PDefenseFinalizer implements IStatFunction
{
final double mul = Math.max(creature.getStat().getMul(stat), 0.5);
final double add = creature.getStat().getAdd(stat);
- return (baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType());
+ return Math.max((baseValue * mul) + add + creature.getStat().getMoveTypeValue(stat, creature.getMoveType()), creature.getTemplate().getBaseValue(stat, 0) * 0.2);
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
index 72613c1665..39d835b74b 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java
@@ -117,6 +117,11 @@ public class RequestAcquireSkill implements ClientPacket
final int skillId = player.getReplacementSkill(_id);
final Skill existingSkill = player.getKnownSkill(skillId); // Mobius: Keep existing sublevel.
+ if ((_level > 65536000) && (existingSkill != null) && (existingSkill.getSubLevel() > 1000))
+ {
+ _level -= existingSkill.getSubLevel() * 65536;
+ }
+
final Skill skill = SkillData.getInstance().getSkill(skillId, _level, existingSkill == null ? 0 : existingSkill.getSubLevel());
if (skill == null)
{
@@ -652,7 +657,7 @@ public class RequestAcquireSkill implements ClientPacket
player.sendItemList();
player.updateShortCuts(_id, skill.getLevel(), skill.getSubLevel());
player.sendPacket(new ShortCutInit(player));
- player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
+ player.sendPacket(ExBasicActionList.STATIC_PACKET);
player.sendSkillList(skill.getId());
showSkillList(trainer, player);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
index 877179d829..ee724ce9ed 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.handler.PlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
/**
@@ -86,8 +86,9 @@ public class RequestActionUse implements ClientPacket
// Don't allow to do some action if player is transformed
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, _actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, _actionId) < 0))
{
player.sendPacket(ActionFailed.STATIC_PACKET);
PacketLogger.warning(player + " used action which he does not have! Id = " + _actionId + " transform: " + player.getTransformation().get().getId());
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
index 14c84055da..63f5c4a527 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java
@@ -87,7 +87,7 @@ public class RequestShortCutReg implements ClientPacket
else if (_page == 23)
{
final Item item = player.getInventory().getItemByObjectId(_id);
- if ((item != null) && !item.isPotion())
+ if (((item != null) && !item.isPotion()) || (_type == ShortcutType.ACTION))
{
return;
}
@@ -148,7 +148,7 @@ public class RequestShortCutReg implements ClientPacket
final Shortcut sc = new Shortcut(_slot, _page, _type, _id, _level, _subLevel, _characterType);
sc.setAutoUse(_active);
player.registerShortCut(sc);
- player.sendPacket(new ShortCutRegister(sc));
+ player.sendPacket(new ShortCutRegister(sc, player));
player.sendPacket(new ExActivateAutoShortcut(sc, _active));
// When id is not auto used, deactivate auto shortcuts.
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
index 20651eb32a..7309463ac0 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java
@@ -229,6 +229,8 @@ public class RequestShapeShiftingItem implements ClientPacket
}
case FIXED:
{
+ targetItem.removeVisualSetSkills();
+
if (appearanceStone.getVisualIds().isEmpty())
{
extracItemId = appearanceStone.getVisualId();
@@ -245,6 +247,8 @@ public class RequestShapeShiftingItem implements ClientPacket
targetItem.getVariables().set(ItemVariables.VISUAL_APPEARANCE_STONE_ID, appearanceStone.getId());
}
}
+
+ targetItem.applyVisualSetSkills();
break;
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
index f0188f7bc0..07ed7641a9 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import org.l2jmobius.gameserver.data.xml.ActionData;
import org.l2jmobius.gameserver.network.ServerPackets;
/**
@@ -23,128 +24,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
*/
public class ExBasicActionList extends ServerPacket
{
- //@formatter:off
- public static final int[] ACTIONS_ON_TRANSFORM =
- {
- 1, 3, 4, 5,
- 6, 7, 8, 9,
- 11, 15, 16, 17,
- 18, 19, 21, 22,
- 23, 32, 36, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 50, 52, 53,
- 54, 55, 56, 57,
- 63, 64, 65, 70,
- 86, 1000, 1001, 1003,
- 1004, 1005, 1006, 1007,
- 1008, 1009, 1010, 1011,
- 1012, 1013, 1014, 1015,
- 1016, 1017, 1018, 1019,
- 1020, 1021, 1022, 1023,
- 1024, 1025, 1026, 1027,
- 1028, 1029, 1030, 1031,
- 1032, 1033, 1034, 1035,
- 1036, 1037, 1038, 1039,
- 1040, 1041, 1042, 1043,
- 1044, 1045, 1046, 1047,
- 1048, 1049, 1050, 1051,
- 1052, 1053, 1054, 1055,
- 1056, 1057, 1058, 1059,
- 1060, 1061, 1062, 1063,
- 1064, 1065, 1066, 1067,
- 1068, 1069, 1070, 1071,
- 1072, 1073, 1074, 1075,
- 1076, 1077, 1078, 1079,
- 1080, 1081, 1082, 1083,
- 1084, 1089, 1090, 1091,
- 1092, 1093, 1094, 1095,
- 1096, 1097, 1098, 1099,
- 1100, 1101, 1102, 1103,
- 1104, 1106, 1107, 1108,
- 1109, 1110, 1111, 1113,
- 1114, 1115, 1116, 1117,
- 1118, 1120, 1121, 1124,
- 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1132,
- 1133, 1134, 1135, 1136,
- 1137, 1138, 1139, 1140,
- 1141, 1142, 1143, 1144,
- 1145, 1146, 1147, 1148,
- 1149, 1150, 1151, 1152,
- 1153, 1154, 1155
- };
- public static final int[] DEFAULT_ACTION_LIST =
- {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23,
- 24, 25, 26, 27,
- 28, 29, 30, 31,
- 32, 33, 34, 35,
- 36, 37, 38, 39,
- 40, 41, 42, 43,
- 44, 45, 46, 47,
- 48, 49, 50, 51,
- 52, 53, 54, 55,
- 56, 57, 58, 59,
- 60, 61, 62, 63,
- 64, 65, 66, 67,
- 68, 69, 70, 71,
- 72, 73, 74, 76,
- 77, 78, 79, 80,
- 81, 82, 83, 84,
- 85, 86, 87, 88,
- 89, 90, 92, 93,
- 94, 1000, 1001,
- 1002, 1003, 1004, 1005,
- 1006, 1007, 1008, 1009,
- 1010, 1011, 1012, 1013,
- 1014, 1015, 1016, 1017,
- 1018, 1019, 1020, 1021,
- 1022, 1023, 1024, 1025,
- 1026, 1027, 1028, 1029,
- 1030, 1031, 1032, 1033,
- 1034, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041,
- 1042, 1043, 1044, 1045,
- 1046, 1047, 1048, 1049,
- 1050, 1051, 1052, 1053,
- 1054, 1055, 1056, 1057,
- 1058, 1059, 1060, 1061,
- 1062, 1063, 1064, 1065,
- 1066, 1067, 1068, 1069,
- 1070, 1071, 1072, 1073,
- 1074, 1075, 1076, 1077,
- 1078, 1079, 1080, 1081,
- 1082, 1083, 1084, 1086,
- 1087, 1088, 1089, 1090,
- 1091, 1092, 1093, 1094,
- 1095, 1096, 1097, 1098,
- 1099, 1100, 1101, 1102,
- 1103, 1104, 1106, 1107,
- 1108, 1109, 1110, 1111,
- 1112, 1113, 1114, 1115,
- 1116, 1117, 1118, 1119,
- 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127,
- 1128, 1129, 1130, 1131,
- 1132, 1133, 1134, 1135,
- 1136, 1137, 1138, 1139,
- 1140, 1141, 1142, 1143,
- 1144, 1145, 1146, 1147,
- 1148, 1149, 1150, 1151,
- 1152, 1153, 1154, 1155,
- 5000, 5001, 5002, 5003,
- 5004, 5005, 5006, 5007,
- 5008, 5009, 5010, 5011,
- 5012, 5013, 5014, 5015
- };
- //@formatter:on
- public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(DEFAULT_ACTION_LIST);
+ public static final ExBasicActionList STATIC_PACKET = new ExBasicActionList(ActionData.getInstance().getActionIdList());
private final int[] _actionIds;
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
index dcc44cb9f3..2e152e2e29 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java
@@ -67,7 +67,7 @@ public class ExPetInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class ExPetInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -207,7 +207,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
ServerPackets.EX_PET_INFO.writeId(this);
writeInt(_summon.getObjectId());
- writeByte(_value); // // 0=teleported 1=default 2=summoned
+ writeByte(_value); // 0=teleported 1=default 2=summoned
writeShort(37); // mask_bits_37
writeBytes(_masks);
// Block 1
@@ -240,9 +240,9 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -260,11 +260,11 @@ public class ExPetInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -288,9 +288,8 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -321,7 +320,7 @@ public class ExPetInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
index a4539909c2..f7ac12028d 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java
@@ -167,7 +167,7 @@ public class FakePlayerInfo extends ServerPacket
writeByte(_npc.getTeam().getId());
writeInt(_clan != null ? _clan.getCrestLargeId() : 0);
writeByte(_fpcHolder.getNobleLevel());
- writeByte(_fpcHolder.isHero());
+ writeByte(_fpcHolder.isHero() ? 2 : 0); // 152 - Value for enabled changed to 2
writeByte(_fpcHolder.isFishing());
writeInt(_fpcHolder.getBaitLocationX());
writeInt(_fpcHolder.getBaitLocationY());
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
index f93c9e5e69..03909a2746 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java
@@ -61,7 +61,7 @@ public class NpcInfo extends AbstractMaskPacket
{
_npc = npc;
_abnormalVisualEffects = npc.getEffectList().getCurrentAbnormalVisualEffects();
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE);
if (npc.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -163,7 +163,7 @@ public class NpcInfo extends AbstractMaskPacket
addComponentType(NpcInfoType.CLAN);
}
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
if (npc.getPvpFlag() > 0)
{
addComponentType(NpcInfoType.PVP_FLAG);
@@ -323,9 +323,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -343,11 +343,11 @@ public class NpcInfo extends AbstractMaskPacket
writeInt(0); // Armor id?
writeInt(_npc.getLeftHandItem());
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_npc.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_npc.isRunning());
}
@@ -371,9 +371,9 @@ public class NpcInfo extends AbstractMaskPacket
{
writeInt(_npc.getCloneObjId()); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- writeInt(_npc.getColorEffect()); // Color effect
+ writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
{
@@ -403,7 +403,7 @@ public class NpcInfo extends AbstractMaskPacket
{
writeByte(0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
deleted file mode 100644
index 52a4032d14..0000000000
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java
+++ /dev/null
@@ -1,182 +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 .
- */
-package org.l2jmobius.gameserver.network.serverpackets;
-
-import java.util.Set;
-
-import org.l2jmobius.gameserver.model.actor.Summon;
-import org.l2jmobius.gameserver.model.actor.instance.Pet;
-import org.l2jmobius.gameserver.model.actor.instance.Servitor;
-import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
-import org.l2jmobius.gameserver.network.ServerPackets;
-import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
-
-public class PetInfo extends ServerPacket
-{
- private final Summon _summon;
- private final int _value;
- private final int _runSpd;
- private final int _walkSpd;
- private final int _swimRunSpd;
- private final int _swimWalkSpd;
- private final int _flRunSpd = 0;
- private final int _flWalkSpd = 0;
- private final int _flyRunSpd;
- private final int _flyWalkSpd;
- private final double _moveMultiplier;
- private int _maxFed;
- private int _curFed;
- private int _statusMask = 0;
-
- public PetInfo(Summon summon, int value)
- {
- _summon = summon;
- _moveMultiplier = summon.getMovementSpeedMultiplier();
- _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
- _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
- _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
- _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
- _flyRunSpd = summon.isFlying() ? _runSpd : 0;
- _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
- _value = value;
- if (summon.isPet())
- {
- final Pet pet = (Pet) _summon;
- _curFed = pet.getCurrentFed(); // how fed it is
- _maxFed = pet.getMaxFed(); // max fed it can be
- }
- else if (summon.isServitor())
- {
- final Servitor sum = (Servitor) _summon;
- _curFed = sum.getLifeTimeRemaining();
- _maxFed = sum.getLifeTime();
- }
- if (summon.isBetrayed())
- {
- _statusMask |= 0x01; // Auto attackable status
- }
- _statusMask |= 0x02; // can be chatted with
- if (summon.isRunning())
- {
- _statusMask |= 0x04;
- }
- if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
- {
- _statusMask |= 0x08;
- }
- if (summon.isDead())
- {
- _statusMask |= 0x10;
- }
- if (summon.isMountable())
- {
- _statusMask |= 0x20;
- }
- }
-
- @Override
- public void write()
- {
- ServerPackets.PET_INFO.writeId(this);
- writeByte(_summon.getSummonType());
- writeInt(_summon.getObjectId());
- writeInt(_summon.getTemplate().getDisplayId() + 1000000);
- writeInt(_summon.getX());
- writeInt(_summon.getY());
- writeInt(_summon.getZ());
- writeInt(_summon.getHeading());
- writeInt(_summon.getStat().getMAtkSpd());
- writeInt(_summon.getStat().getPAtkSpd());
- writeShort(_runSpd);
- writeShort(_walkSpd);
- writeShort(_swimRunSpd);
- writeShort(_swimWalkSpd);
- writeShort(_flRunSpd);
- writeShort(_flWalkSpd);
- writeShort(_flyRunSpd);
- writeShort(_flyWalkSpd);
- writeDouble(_moveMultiplier);
- writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
- writeDouble(_summon.getTemplate().getFCollisionRadius());
- writeDouble(_summon.getTemplate().getFCollisionHeight());
- writeInt(_summon.getWeapon()); // right hand weapon
- writeInt(_summon.getArmor()); // body armor
- writeInt(0); // left hand weapon
- writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
- writeInt(-1); // High Five NPCString ID
- if (_summon.isPet())
- {
- writeString(_summon.getName()); // Pet name.
- }
- else
- {
- writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
- }
- writeInt(-1); // High Five NPCString ID
- writeString(_summon.getTitle()); // owner name
- writeByte(_summon.getPvpFlag()); // confirmed
- writeInt(_summon.getReputation()); // confirmed
- writeInt(_curFed); // how fed it is
- writeInt(_maxFed); // max fed it can be
- writeInt((int) _summon.getCurrentHp()); // current hp
- writeInt(_summon.getMaxHp()); // max hp
- writeInt((int) _summon.getCurrentMp()); // current mp
- writeInt(_summon.getMaxMp()); // max mp
- writeLong(_summon.getStat().getSp()); // sp
- writeByte(_summon.getLevel()); // level
- writeLong(_summon.getStat().getExp());
- if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
- {
- writeLong(_summon.getStat().getExp()); // 0% absolute value
- }
- else
- {
- writeLong(_summon.getExpForThisLevel()); // 0% absolute value
- }
- writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
- writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
- writeInt(_summon.getMaxLoad()); // max weight it can carry
- writeInt(_summon.getPAtk()); // patk
- writeInt(_summon.getPDef()); // pdef
- writeInt(_summon.getAccuracy()); // accuracy
- writeInt(_summon.getEvasionRate()); // evasion
- writeInt(_summon.getCriticalHit()); // critical
- writeInt(_summon.getMAtk()); // matk
- writeInt(_summon.getMDef()); // mdef
- writeInt(_summon.getMagicAccuracy()); // magic accuracy
- writeInt(_summon.getMagicEvasionRate()); // magic evasion
- writeInt(_summon.getMCriticalHit()); // mcritical
- writeInt((int) _summon.getStat().getMoveSpeed()); // speed
- writeInt(_summon.getPAtkSpd()); // atkspeed
- writeInt(_summon.getMAtkSpd()); // casting speed
- writeByte(0); // TODO: Check me, might be ride status
- writeByte(_summon.getTeam().getId()); // Confirmed
- writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
- writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
- writeInt(0); // TODO: Find me
- writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
- writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
- writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
- final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
- writeShort(aves.size()); // Confirmed
- for (AbnormalVisualEffect ave : aves)
- {
- writeShort(ave.getClientId()); // Confirmed
- }
- writeByte(_statusMask);
- }
-}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
new file mode 100644
index 0000000000..62bb425a5a
--- /dev/null
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java
@@ -0,0 +1,182 @@
+/*
+ * 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 .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import java.util.Set;
+
+import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Pet;
+import org.l2jmobius.gameserver.model.actor.instance.Servitor;
+import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
+import org.l2jmobius.gameserver.network.ServerPackets;
+import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
+
+public class PetSummonInfo extends ServerPacket
+{
+ private final Summon _summon;
+ private final int _value;
+ private final int _runSpd;
+ private final int _walkSpd;
+ private final int _swimRunSpd;
+ private final int _swimWalkSpd;
+ private final int _flRunSpd = 0;
+ private final int _flWalkSpd = 0;
+ private final int _flyRunSpd;
+ private final int _flyWalkSpd;
+ private final double _moveMultiplier;
+ private int _maxFed;
+ private int _curFed;
+ private int _statusMask = 0;
+
+ public PetSummonInfo(Summon summon, int value)
+ {
+ _summon = summon;
+ _moveMultiplier = summon.getMovementSpeedMultiplier();
+ _runSpd = (int) Math.round(summon.getRunSpeed() / _moveMultiplier);
+ _walkSpd = (int) Math.round(summon.getWalkSpeed() / _moveMultiplier);
+ _swimRunSpd = (int) Math.round(summon.getSwimRunSpeed() / _moveMultiplier);
+ _swimWalkSpd = (int) Math.round(summon.getSwimWalkSpeed() / _moveMultiplier);
+ _flyRunSpd = summon.isFlying() ? _runSpd : 0;
+ _flyWalkSpd = summon.isFlying() ? _walkSpd : 0;
+ _value = value;
+ if (summon.isPet())
+ {
+ final Pet pet = (Pet) _summon;
+ _curFed = pet.getCurrentFed(); // how fed it is
+ _maxFed = pet.getMaxFed(); // max fed it can be
+ }
+ else if (summon.isServitor())
+ {
+ final Servitor sum = (Servitor) _summon;
+ _curFed = sum.getLifeTimeRemaining();
+ _maxFed = sum.getLifeTime();
+ }
+ if (summon.isBetrayed())
+ {
+ _statusMask |= 0x01; // Auto attackable status
+ }
+ _statusMask |= 0x02; // can be chatted with
+ if (summon.isRunning())
+ {
+ _statusMask |= 0x04;
+ }
+ if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
+ {
+ _statusMask |= 0x08;
+ }
+ if (summon.isDead())
+ {
+ _statusMask |= 0x10;
+ }
+ if (summon.isMountable())
+ {
+ _statusMask |= 0x20;
+ }
+ }
+
+ @Override
+ public void write()
+ {
+ ServerPackets.PET_INFO.writeId(this);
+ writeByte(_summon.getSummonType());
+ writeInt(_summon.getObjectId());
+ writeInt(_summon.getTemplate().getDisplayId() + 1000000);
+ writeInt(_summon.getX());
+ writeInt(_summon.getY());
+ writeInt(_summon.getZ());
+ writeInt(_summon.getHeading());
+ writeInt(_summon.getStat().getMAtkSpd());
+ writeInt(_summon.getStat().getPAtkSpd());
+ writeShort(_runSpd);
+ writeShort(_walkSpd);
+ writeShort(_swimRunSpd);
+ writeShort(_swimWalkSpd);
+ writeShort(_flRunSpd);
+ writeShort(_flWalkSpd);
+ writeShort(_flyRunSpd);
+ writeShort(_flyWalkSpd);
+ writeDouble(_moveMultiplier);
+ writeDouble(_summon.getAttackSpeedMultiplier()); // attack speed multiplier
+ writeDouble(_summon.getTemplate().getFCollisionRadius());
+ writeDouble(_summon.getTemplate().getFCollisionHeight());
+ writeInt(_summon.getWeapon()); // right hand weapon
+ writeInt(_summon.getArmor()); // body armor
+ writeInt(0); // left hand weapon
+ writeByte(_summon.isShowSummonAnimation() ? 2 : _value); // 0=teleported 1=default 2=summoned
+ writeInt(-1); // High Five NPCString ID
+ if (_summon.isPet())
+ {
+ writeString(_summon.getName()); // Pet name.
+ }
+ else
+ {
+ writeString(_summon.getTemplate().isUsingServerSideName() ? _summon.getName() : ""); // Summon name.
+ }
+ writeInt(-1); // High Five NPCString ID
+ writeString(_summon.getTitle()); // owner name
+ writeByte(_summon.getPvpFlag()); // confirmed
+ writeInt(_summon.getReputation()); // confirmed
+ writeInt(_curFed); // how fed it is
+ writeInt(_maxFed); // max fed it can be
+ writeInt((int) _summon.getCurrentHp()); // current hp
+ writeInt(_summon.getMaxHp()); // max hp
+ writeInt((int) _summon.getCurrentMp()); // current mp
+ writeInt(_summon.getMaxMp()); // max mp
+ writeLong(_summon.getStat().getSp()); // sp
+ writeByte(_summon.getLevel()); // level
+ writeLong(_summon.getStat().getExp());
+ if (_summon.getExpForThisLevel() > _summon.getStat().getExp())
+ {
+ writeLong(_summon.getStat().getExp()); // 0% absolute value
+ }
+ else
+ {
+ writeLong(_summon.getExpForThisLevel()); // 0% absolute value
+ }
+ writeLong(_summon.getExpForNextLevel()); // 100% absoulte value
+ writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
+ writeInt(_summon.getMaxLoad()); // max weight it can carry
+ writeInt(_summon.getPAtk()); // patk
+ writeInt(_summon.getPDef()); // pdef
+ writeInt(_summon.getAccuracy()); // accuracy
+ writeInt(_summon.getEvasionRate()); // evasion
+ writeInt(_summon.getCriticalHit()); // critical
+ writeInt(_summon.getMAtk()); // matk
+ writeInt(_summon.getMDef()); // mdef
+ writeInt(_summon.getMagicAccuracy()); // magic accuracy
+ writeInt(_summon.getMagicEvasionRate()); // magic evasion
+ writeInt(_summon.getMCriticalHit()); // mcritical
+ writeInt((int) _summon.getStat().getMoveSpeed()); // speed
+ writeInt(_summon.getPAtkSpd()); // atkspeed
+ writeInt(_summon.getMAtkSpd()); // casting speed
+ writeByte(0); // TODO: Check me, might be ride status
+ writeByte(_summon.getTeam().getId()); // Confirmed
+ writeByte(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
+ writeByte(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
+ writeInt(0); // TODO: Find me
+ writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level.
+ writeByte(_summon.getOwner().getSummonPoints()); // Used Summon Points
+ writeByte(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
+ final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
+ writeShort(aves.size()); // Confirmed
+ for (AbnormalVisualEffect ave : aves)
+ {
+ writeShort(ave.getClientId()); // Confirmed
+ }
+ writeByte(_statusMask);
+ }
+}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
index 05aaedf2c5..46c9ccb5a9 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java
@@ -19,20 +19,21 @@ package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutInit extends ServerPacket
{
- private Collection _shortCuts;
+ private final Player _player;
+ private final Collection _shortCuts;
public ShortCutInit(Player player)
{
- if (player == null)
- {
- return;
- }
+ _player = player;
_shortCuts = player.getAllShortCuts();
+ player.restoreAutoShortcutVisual();
}
@Override
@@ -54,8 +55,21 @@ public class ShortCutInit extends ServerPacket
writeInt(sc.getSharedReuseGroup());
writeInt(0);
writeInt(0);
- writeLong(0); // Augment id
- writeInt(0); // Visual id
+
+ final Item item = _player.getInventory().getItemByObjectId(sc.getId());
+ if (item != null)
+ {
+ final VariationInstance augment = item.getAugmentation();
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
+ }
+ else
+ {
+ writeInt(0);
+ writeInt(0);
+ writeInt(0);
+ }
break;
}
case SKILL:
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
index 9c1fbbcab8..851b53dc09 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java
@@ -17,18 +17,24 @@
package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.gameserver.model.Shortcut;
+import org.l2jmobius.gameserver.model.VariationInstance;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ShortCutRegister extends ServerPacket
{
+ private final Player _player;
private final Shortcut _shortcut;
/**
* Register new skill shortcut
* @param shortcut
+ * @param player
*/
- public ShortCutRegister(Shortcut shortcut)
+ public ShortCutRegister(Shortcut shortcut, Player player)
{
+ _player = player;
_shortcut = shortcut;
}
@@ -43,13 +49,16 @@ public class ShortCutRegister extends ServerPacket
{
case ITEM:
{
+ final Item item = _player.getInventory().getItemByObjectId(_shortcut.getId());
+ final VariationInstance augment = item.getAugmentation();
writeInt(_shortcut.getId());
writeInt(_shortcut.getCharacterType());
writeInt(_shortcut.getSharedReuseGroup());
writeInt(0); // unknown
writeInt(0); // unknown
- writeInt(0); // item augment id
- writeInt(0); // TODO: Find me, item visual id ?
+ writeInt(augment != null ? augment.getOption1Id() : 0); // item augment id
+ writeInt(augment != null ? augment.getOption2Id() : 0); // item augment id
+ writeInt(item.getVisualId()); // visual id
break;
}
case SKILL:
@@ -60,8 +69,8 @@ public class ShortCutRegister extends ServerPacket
writeInt(_shortcut.getSharedReuseGroup());
writeByte(0); // C5
writeInt(_shortcut.getCharacterType());
- writeInt(0); // TODO: Find me
- writeInt(0); // TODO: Find me
+ writeInt(0); // if 1 - cant use
+ writeInt(0); // reuse delay ?
break;
}
case ACTION:
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
index 678f0f29e1..8e3bc2f155 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java
@@ -16,6 +16,9 @@
*/
package org.l2jmobius.gameserver.network.serverpackets;
+import java.util.ArrayList;
+import java.util.List;
+
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.enums.SiegeClanType;
import org.l2jmobius.gameserver.model.SiegeClan;
@@ -44,7 +47,7 @@ import org.l2jmobius.gameserver.network.ServerPackets;
* S = AllyName
* S = AllyLeaderName
* d = AllyCrestID
- * @author KenM
+ * @author Atronic
*/
public class SiegeDefenderList extends ServerPacket
{
@@ -60,64 +63,76 @@ public class SiegeDefenderList extends ServerPacket
{
ServerPackets.CASTLE_SIEGE_DEFENDER_LIST.writeId(this);
writeInt(_castle.getResidenceId());
- writeInt(0); // Unknown
- writeInt(1); // Unknown
- writeInt(0); // Unknown
- final int size = _castle.getSiege().getDefenderWaitingClans().size() + _castle.getSiege().getDefenderClans().size() + (_castle.getOwner() != null ? 1 : 0);
- writeInt(size);
- writeInt(size);
- // Add owners
- final Clan ownerClan = _castle.getOwner();
- if (ownerClan != null)
+ writeInt(0); // Unknown.
+
+ final Clan owner = _castle.getOwner();
+ writeInt((owner != null) && _castle.isTimeRegistrationOver()); // Valid registration.
+ writeInt(0); // Unknown.
+
+ // Add owners.
+ final List defenders = new ArrayList<>();
+ if (owner != null)
{
- writeInt(ownerClan.getId());
- writeString(ownerClan.getName());
- writeString(ownerClan.getLeaderName());
- writeInt(ownerClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.OWNER.ordinal());
- writeInt(ownerClan.getAllyId());
- writeString(ownerClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(ownerClan.getAllyCrestId());
+ defenders.add(owner);
}
- // List of confirmed defenders
+
+ // List of confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if ((defendingClan == null) || (defendingClan == _castle.getOwner()))
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if ((clan != null) && (clan != owner))
{
- continue;
+ defenders.add(clan);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
- // List of not confirmed defenders
+
+ // List of not confirmed defenders.
for (SiegeClan siegeClan : _castle.getSiege().getDefenderWaitingClans())
{
- final Clan defendingClan = ClanTable.getInstance().getClan(siegeClan.getClanId());
- if (defendingClan == null)
+ final Clan clan = ClanTable.getInstance().getClan(siegeClan.getClanId());
+ if (clan != null)
{
- continue;
+ defenders.add(clan);
+ }
+ }
+
+ final int size = defenders.size();
+ writeInt(size);
+ writeInt(size);
+
+ for (Clan clan : defenders)
+ {
+ writeInt(clan.getId());
+ writeString(clan.getName());
+ writeString(clan.getLeaderName());
+ writeInt(clan.getCrestId());
+ writeInt(0); // Signed time in seconds.
+ if (clan == owner)
+ {
+ writeInt(SiegeClanType.OWNER.ordinal() + 1);
+ }
+ else if (_castle.getSiege().getDefenderClans().stream().anyMatch(defender -> defender.getClanId() == clan.getId()))
+ {
+ writeInt(SiegeClanType.DEFENDER.ordinal() + 1);
+ }
+ else
+ {
+ writeInt(SiegeClanType.DEFENDER_PENDING.ordinal() + 1);
+ }
+ writeInt(clan.getAllyId());
+ if (clan.getAllyId() != 0)
+ {
+ final AllianceInfo info = new AllianceInfo(clan.getAllyId());
+ writeString(info.getName());
+ writeString(info.getLeaderP()); // Ally leader name.
+ writeInt(clan.getAllyCrestId());
+ }
+ else
+ {
+ writeString("");
+ writeString(""); // Ally leader name.
+ writeInt(0);
}
- writeInt(defendingClan.getId());
- writeString(defendingClan.getName());
- writeString(defendingClan.getLeaderName());
- writeInt(defendingClan.getCrestId());
- writeInt(0); // signed time (seconds) (not storated by L2J)
- writeInt(SiegeClanType.DEFENDER_PENDING.ordinal());
- writeInt(defendingClan.getAllyId());
- writeString(defendingClan.getAllyName());
- writeString(""); // AllyLeaderName
- writeInt(defendingClan.getAllyCrestId());
}
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
index 68ca369edf..37f3211b0a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java
@@ -67,7 +67,7 @@ public class SummonInfo extends AbstractMaskPacket
_masks[2] |= 0x10;
addComponentType(NpcInfoType.NAME);
}
- addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING, NpcInfoType.PVP_FLAG);
+ addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.RELATIONS, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.STOP_MODE, NpcInfoType.MOVE_MODE, NpcInfoType.PVP_FLAG);
if (summon.getHeading() > 0)
{
addComponentType(NpcInfoType.HEADING);
@@ -141,7 +141,7 @@ public class SummonInfo extends AbstractMaskPacket
_allyId = summon.getOwner().getAppearance().getVisibleAllyCrestId();
addComponentType(NpcInfoType.CLAN);
}
- addComponentType(NpcInfoType.COLOR_EFFECT);
+ addComponentType(NpcInfoType.PET_EVOLUTION_ID);
// TODO: Confirm me
if (summon.isInCombat())
{
@@ -241,9 +241,9 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(_summon.getHeading());
}
- if (containsMask(NpcInfoType.UNKNOWN2))
+ if (containsMask(NpcInfoType.VEHICLE_ID))
{
- writeInt(0); // Unknown
+ writeInt(0); // Vehicle object id.
}
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
{
@@ -261,11 +261,11 @@ public class SummonInfo extends AbstractMaskPacket
writeInt(_summon.getArmor()); // Armor id?
writeInt(0);
}
- if (containsMask(NpcInfoType.ALIVE))
+ if (containsMask(NpcInfoType.STOP_MODE))
{
writeByte(!_summon.isDead());
}
- if (containsMask(NpcInfoType.RUNNING))
+ if (containsMask(NpcInfoType.MOVE_MODE))
{
writeByte(_summon.isRunning());
}
@@ -289,9 +289,8 @@ public class SummonInfo extends AbstractMaskPacket
{
writeInt(0); // Player ObjectId with Decoy
}
- if (containsMask(NpcInfoType.COLOR_EFFECT))
+ if (containsMask(NpcInfoType.PET_EVOLUTION_ID))
{
- // No visual effect
writeInt(0); // Unknown
}
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
@@ -322,7 +321,7 @@ public class SummonInfo extends AbstractMaskPacket
{
writeByte(_summon.isShowSummonAnimation() ? 2 : 0); // 2 - do some animation on spawn
}
- if (containsMask(NpcInfoType.UNKNOWN12))
+ if (containsMask(NpcInfoType.FOLLOW_INFO))
{
writeInt(0);
writeInt(0);
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
index 1544a20c14..e9f977858a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java
@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.taskmanager;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -25,6 +26,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Location;
+import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -42,6 +44,7 @@ import org.l2jmobius.gameserver.util.Util;
public class AutoPlayTaskManager
{
private static final Set> POOLS = ConcurrentHashMap.newKeySet();
+ private static final Map IDLE_COUNT = new ConcurrentHashMap<>();
private static final int POOL_SIZE = 300;
private static final int TASK_DELAY = 300;
@@ -96,6 +99,17 @@ public class AutoPlayTaskManager
// We take granted that mage classes do not auto hit.
if (isMageCaster(player))
{
+ // Logic adjustment for summons not attacking when in offline play.
+ if (player.isOfflinePlay() && player.hasSummon())
+ {
+ for (Summon summon : player.getServitors().values())
+ {
+ if (summon.hasAI() && !summon.isMoving() && !summon.isDisabled() && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (summon.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature))
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature);
+ }
+ }
+ }
continue PLAY;
}
@@ -121,23 +135,32 @@ public class AutoPlayTaskManager
final Weapon weapon = player.getActiveWeaponItem();
if (weapon != null)
{
- final boolean ranged = weapon.getItemType().isRanged();
- final double angle = Util.calculateHeadingFrom(player, creature);
- final double radian = Math.toRadians(angle);
- final double course = Math.toRadians(180);
- final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
- final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
- final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
- final Location location;
- if (ranged)
+ final int idleCount = IDLE_COUNT.getOrDefault(player, 0);
+ if (idleCount > 10)
{
- location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ final boolean ranged = weapon.getItemType().isRanged();
+ final double angle = Util.calculateHeadingFrom(player, creature);
+ final double radian = Math.toRadians(angle);
+ final double course = Math.toRadians(180);
+ final double distance = (ranged ? player.getCollisionRadius() : player.getCollisionRadius() + creature.getCollisionRadius()) * 2;
+ final int x1 = (int) (Math.cos(Math.PI + radian + course) * distance);
+ final int y1 = (int) (Math.sin(Math.PI + radian + course) * distance);
+ final Location location;
+ if (ranged)
+ {
+ location = new Location(player.getX() + x1, player.getY() + y1, player.getZ());
+ }
+ else
+ {
+ location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ }
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
+ IDLE_COUNT.remove(player);
}
else
{
- location = new Location(creature.getX() + x1, creature.getY() + y1, player.getZ());
+ IDLE_COUNT.put(player, idleCount + 1);
}
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, location);
}
}
}
@@ -145,6 +168,9 @@ public class AutoPlayTaskManager
}
}
+ // Reset idle count.
+ IDLE_COUNT.remove(player);
+
// Pickup.
if (player.getAutoPlaySettings().doPickup())
{
@@ -179,32 +205,55 @@ public class AutoPlayTaskManager
// Find target.
Creature creature = null;
- double closestDistance = Double.MAX_VALUE;
- TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ final Party party = player.getParty();
+ final Player leader = party == null ? null : party.getLeader();
+ if (Config.ENABLE_AUTO_ASSIST && (party != null) && (leader != null) && (leader != player) && !leader.isDead())
{
- // Skip unavailable creatures.
- if ((nearby == null) || nearby.isAlikeDead())
+ if (leader.calculateDistance3D(player) < (Config.ALT_PARTY_RANGE * 2 /* 2? */))
{
- continue TARGET;
- }
- // Check creature target.
- if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
- {
- continue TARGET;
- }
- // Check next target mode.
- if (!isTargetModeValid(targetMode, player, nearby))
- {
- continue TARGET;
- }
- // Check if creature is reachable.
- if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
- {
- final double creatureDistance = player.calculateDistance2D(nearby);
- if (creatureDistance < closestDistance)
+ final WorldObject leaderTarget = leader.getTarget();
+ if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.containsPlayer(leaderTarget.getActingPlayer()))))
{
- creature = nearby;
- closestDistance = creatureDistance;
+ creature = (Creature) leaderTarget;
+ }
+ else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled())
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader);
+ }
+ }
+ }
+ else
+ {
+ double closestDistance = Double.MAX_VALUE;
+ TARGET: for (Creature nearby : World.getInstance().getVisibleObjectsInRange(player, Creature.class, player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400))
+ {
+ // Skip unavailable creatures.
+ if ((nearby == null) || nearby.isAlikeDead())
+ {
+ continue TARGET;
+ }
+
+ // Check creature target.
+ if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player) && !player.getServitors().containsKey(nearby.getTarget().getObjectId()))
+ {
+ continue TARGET;
+ }
+
+ // Check next target mode.
+ if (!isTargetModeValid(targetMode, player, nearby))
+ {
+ continue TARGET;
+ }
+
+ // Check if creature is reachable.
+ if ((Math.abs(player.getZ() - nearby.getZ()) < 180) && GeoEngine.getInstance().canSeeTarget(player, nearby) && GeoEngine.getInstance().canMoveToTarget(player.getX(), player.getY(), player.getZ(), nearby.getX(), nearby.getY(), nearby.getZ(), player.getInstanceWorld()))
+ {
+ final double creatureDistance = player.calculateDistance2D(nearby);
+ if (creatureDistance < closestDistance)
+ {
+ creature = nearby;
+ closestDistance = creatureDistance;
+ }
}
}
}
@@ -310,6 +359,7 @@ public class AutoPlayTaskManager
{
player.getPet().followOwner();
}
+ IDLE_COUNT.remove(player);
return;
}
}
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
index 5899235fcb..66c93af753 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java
@@ -35,7 +35,9 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Guard;
+import org.l2jmobius.gameserver.model.actor.transform.TransformTemplate;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
+import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemUse;
@@ -46,12 +48,12 @@ import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.AbnormalType;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
+import org.l2jmobius.gameserver.model.skill.EffectScope;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.serverpackets.ExBasicActionList;
/**
* @author Mobius
@@ -381,8 +383,9 @@ public class AutoUseTaskManager
// Do not allow to do some action if player is transformed.
if (player.isTransformed())
{
- final int[] allowedActions = player.isTransformed() ? ExBasicActionList.ACTIONS_ON_TRANSFORM : ExBasicActionList.DEFAULT_ACTION_LIST;
- if (Arrays.binarySearch(allowedActions, actionId) < 0)
+ final TransformTemplate transformTemplate = player.getTransformation().get().getTemplate(player);
+ final int[] allowedActions = transformTemplate.getBasicActionList();
+ if ((allowedActions == null) || (Arrays.binarySearch(allowedActions, actionId) < 0))
{
continue ACTIONS;
}
@@ -394,7 +397,24 @@ public class AutoUseTaskManager
final IPlayerActionHandler actionHandler = PlayerActionHandler.getInstance().getHandler(actionHolder.getHandler());
if (actionHandler != null)
{
- actionHandler.useAction(player, actionHolder, false, false);
+ if (!actionHandler.isPetAction())
+ {
+ actionHandler.useAction(player, actionHolder, false, false);
+ }
+ else
+ {
+ final Summon summon = player.getAnyServitor();
+ if ((summon != null) && !summon.isAlikeDead())
+ {
+ final Skill skill = summon.getKnownSkill(actionHolder.getOptionId());
+ if ((skill != null) && !canSummonCastSkill(player, summon, skill))
+ {
+ continue ACTIONS;
+ }
+
+ actionHandler.useAction(player, actionHolder, false, false);
+ }
+ }
}
}
}
@@ -477,6 +497,59 @@ public class AutoUseTaskManager
return !player.isSkillDisabled(skill) && skill.checkCondition(player, target, false);
}
+
+ private boolean canSummonCastSkill(Player player, Summon summon, Skill skill)
+ {
+ if (skill.isBad() && (player.getTarget() == null))
+ {
+ return false;
+ }
+
+ final int mpConsume = skill.getMpConsume() + skill.getMpInitialConsume();
+ if ((((mpConsume != 0) && (mpConsume > (int) Math.floor(summon.getCurrentMp()))) || ((skill.getHpConsume() != 0) && (skill.getHpConsume() > (int) Math.floor(summon.getCurrentHp())))))
+ {
+ return false;
+ }
+
+ if (summon.isSkillDisabled(skill))
+ {
+ return false;
+ }
+
+ if (((player.getTarget() != null) && !skill.checkCondition(summon, player.getTarget(), false)) || ((player.getTarget() == null) && !skill.checkCondition(summon, player, false)))
+ {
+ return false;
+ }
+
+ if ((skill.getItemConsumeCount() > 0) && (summon.getInventory().getInventoryItemCount(skill.getItemConsumeId(), -1) < skill.getItemConsumeCount()))
+ {
+ return false;
+ }
+
+ if (skill.getTargetType().equals(TargetType.SELF) || skill.getTargetType().equals(TargetType.SUMMON))
+ {
+ final BuffInfo summonInfo = summon.getEffectList().getBuffInfoBySkillId(skill.getId());
+ return (summonInfo != null) && (summonInfo.getTime() >= REUSE_MARGIN_TIME);
+ }
+
+ if ((skill.getEffects(EffectScope.GENERAL) != null) && skill.getEffects(EffectScope.GENERAL).stream().anyMatch(a -> a.getEffectType().equals(EffectType.MANAHEAL_BY_LEVEL)) && (player.getCurrentMpPercent() > 80))
+ {
+ return false;
+ }
+
+ final BuffInfo buffInfo = player.getEffectList().getBuffInfoBySkillId(skill.getId());
+ final BuffInfo abnormalBuffInfo = player.getEffectList().getFirstBuffInfoByAbnormalType(skill.getAbnormalType());
+ if (abnormalBuffInfo != null)
+ {
+ if (buffInfo != null)
+ {
+ return (abnormalBuffInfo.getSkill().getId() == buffInfo.getSkill().getId()) && ((buffInfo.getTime() <= REUSE_MARGIN_TIME) || (buffInfo.getSkill().getLevel() < skill.getLevel()));
+ }
+ return (abnormalBuffInfo.getSkill().getAbnormalLevel() < skill.getAbnormalLevel()) || abnormalBuffInfo.isAbnormalType(AbnormalType.NONE);
+ }
+
+ return true;
+ }
}
public synchronized void startAutoUseTask(Player player)
diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/util/Util.java
index c5f25272e9..7170f674d5 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/util/Util.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/util/Util.java
@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -721,13 +722,13 @@ public class Util
{
if (descending)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue(Collections.reverseOrder())).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public static > Map sortByValue(Map map)
{
- return map.entrySet().stream().sorted(Map.Entry.comparingByValue()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
+ return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_gsdata.sql
index ed8c60bfae..a0072cc6e4 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_gsdata.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_gsdata.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_gsdata` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_premium.sql
index 89f5887236..ce4703c5e7 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_premium.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/account_premium.sql
@@ -3,4 +3,4 @@ CREATE TABLE `account_premium` (
`account_name` varchar(45) NOT NULL DEFAULT '',
`enddate` decimal(20,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/airships.sql
index 50453102dd..d5dece1b03 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/airships.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/airships.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `airships` (
`owner_id` INT, -- object id of the player or clan, owner of this airship
`fuel` decimal(5,0) NOT NULL DEFAULT 600,
PRIMARY KEY (`owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/announcements.sql
index 0fef63e83e..88f8f519ad 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/announcements.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/announcements.sql
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `announcements` (
`author` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO announcements (`type`, `author`, `content`) VALUES
(0, 'L2jMobius', 'Thanks for using L2jMobius!'),
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/auction_bid.sql
index 85b978f103..2e37fbe5ba 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/auction_bid.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/auction_bid.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bbs_favorites.sql
index e7ace21bc9..a43fd1b53a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bbs_favorites.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bbs_favorites.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `bbs_favorites` (
`favAddDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`favId`),
UNIQUE INDEX `favId_playerId` (`favId`, `playerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bot_reported_char_data.sql
index d7acdfa31b..98daf2dc12 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bot_reported_char_data.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/bot_reported_char_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `bot_reported_char_data` (
`reporterId` INT UNSIGNED NOT NULL DEFAULT 0,
`reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`botId`, `reporterId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/buylists.sql
index a02ce044c8..8c89e22d90 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/buylists.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/buylists.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `buylists` (
`count` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`next_restock_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`buylist_id`, `item_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle.sql
index 7ffcebed6b..3445dea47a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle` (
`ticketBuyCount` smallint(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`name`),
KEY `id` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `castle` VALUES
(1,'Gludio','NEUTRAL',0,0,'true',0,'false',0),
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_doorupgrade.sql
index ee822091b4..43a573b36e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_doorupgrade.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_doorupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_functions.sql
index d270fca8a8..d8c1aaaeeb 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_functions.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_procure.sql
index 54c8517f65..a6cd5a00c3 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_procure.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_procure.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` (
`reward_type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`,`crop_id`,`next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_production.sql
index 3980eef7aa..71ea5b8591 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_production.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_manor_production.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` (
`price` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`next_period` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`castle_id`, `seed_id`, `next_period`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_siege_guards.sql
index b0c16e12c9..7449f852c3 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_siege_guards.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `castle_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-- Gludio Castle
REPLACE INTO `castle_siege_guards` (`castleId`,`id`,`npcId`,`x`,`y`,`z`,`heading`,`respawnDelay`,`isHired`) VALUES
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_trapupgrade.sql
index a0854df17e..139a3a5d45 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_trapupgrade.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/castle_trapupgrade.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_contacts.sql
index 3c2c5fb85a..9d8d163095 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_contacts.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_contacts.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_contacts` (
charId INT UNSIGNED NOT NULL DEFAULT 0,
contactId INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`contactId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_daily_rewards.sql
index ed0bbff883..f0b9cf08f0 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_daily_rewards.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_daily_rewards.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_daily_rewards` (
`progress` int UNSIGNED NOT NULL DEFAULT 0 ,
`lastCompleted` bigint UNSIGNED NOT NULL ,
PRIMARY KEY (`charId`, `rewardId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_friends.sql
index cdce19820b..8b2dab1d25 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_friends.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_friends.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` (
`relation` INT UNSIGNED NOT NULL DEFAULT 0,
`memo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`charId`,`friendId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_hennas.sql
index 668374b2ab..8174451ef2 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_hennas.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_hennas.sql
@@ -5,4 +5,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` (
`slot` INT NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`slot`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_HENNAS, ADD_CHAR_HENNA, DELETE_CHAR_HENNAS
+CREATE INDEX idx_charId_classIndex ON character_hennas (charId, class_index);
+
+# DELETE_CHAR_HENNA
+CREATE INDEX idx_charId_slot_classIndex ON character_hennas (charId, slot, class_index);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_homunculus.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_homunculus.sql
index 24d6a4e5ff..d8beec306a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_homunculus.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_homunculus.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_homunculus` (
`skillLevel4` TINYINT UNSIGNED NOT NULL DEFAULT '0',
`skillLevel5` TINYINT UNSIGNED NOT NULL DEFAULT '0',
`active` TINYINT UNSIGNED NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_instance_time.sql
index 1a82cf40e2..2eaa3164a3 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_instance_time.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_instance_time.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `character_instance_time` (
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_item_reuse_save.sql
index f2773fc195..22857bd4de 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_item_reuse_save.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_item_reuse_save.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_item_reuse_save` (
`reuseDelay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`itemId`,`itemObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_macroses.sql
index 7062388d7a..b23a056e24 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_macroses.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_macroses.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` (
`acronym` VARCHAR(4) ,
`commands` VARCHAR(500) ,
PRIMARY KEY (`charId`,`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_mentees.sql
index 2ad58e3219..d067728900 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_mentees.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_mentees.sql
@@ -2,4 +2,4 @@ DROP TABLE IF EXISTS `character_mentees`;
CREATE TABLE IF NOT EXISTS `character_mentees` (
`charId` int(10) unsigned NOT NULL DEFAULT '0',
`mentorId` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade.sql
index f61c711822..16925760e5 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade_items.sql
index d8a9e0b8e1..38ffd73ae0 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade_items.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_offline_trade_items.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` (
`price` bigint(20) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`),
KEY `item` (`item`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_pet_skills_save.sql
index d6e7305dad..85dfb5c310 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_pet_skills_save.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_pet_skills_save.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_pet_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`petObjItemId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_premium_items.sql
index 6b25480f4c..0f613d1029 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_premium_items.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_premium_items.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_premium_items` (
KEY `charId` (`charId`),
KEY `itemNum` (`itemNum`),
KEY `itemId` (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_quests.sql
index 6199526ae6..93db47171d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_quests.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_quests.sql
@@ -5,4 +5,8 @@ CREATE TABLE IF NOT EXISTS `character_quests` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`charId`,`name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId_name ON character_quests (charId, name);
+CREATE INDEX idx_charId_var ON character_quests (charId, var);
+CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (charId, name, var);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_ranking_history.sql
index 3f938ba850..d2da345dec 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_ranking_history.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_ranking_history.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_ranking_history` (
`ranking` int(20) NOT NULL,
`exp` bigint(20) NOT NULL,
PRIMARY KEY (`charId`,`day`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipebook.sql
index 74cc6b8bd6..807005f0c1 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipebook.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipebook.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipebook` (
`classIndex` TINYINT NOT NULL DEFAULT 0,
`type` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`,`charId`,`classIndex`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipeshoplist.sql
index e448547654..e81faed7a4 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipeshoplist.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_recipeshoplist.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_recipeshoplist` (
`price` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
`index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`recipeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_reco_bonus.sql
index f283ca5136..9717ebc5e9 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_reco_bonus.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_reco_bonus.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_shortcuts.sql
index a86b023f7c..577853fd57 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_shortcuts.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_shortcuts.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_shortcuts` (
`class_index` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`slot`,`page`,`class_index`),
KEY `shortcut_id` (`shortcut_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills.sql
index a5aec73e91..d27740e47d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills.sql
@@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` (
`skill_sub_level` INT(4) NOT NULL DEFAULT '0',
`class_index` INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS
+CREATE INDEX idx_charId_classIndex ON character_skills (charId, class_index);
+
+# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR
+CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, charId, class_index);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills_save.sql
index cce052032b..5ffb37487c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills_save.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_skills_save.sql
@@ -11,4 +11,10 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`,`skill_id`,`skill_level`,`class_index`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# ADD_SKILL_SAVE, DELETE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex ON character_skills_save (charId, class_index);
+
+# RESTORE_SKILL_SAVE
+CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (charId, class_index, buff_index);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_subclasses.sql
index 1dfd8b7197..e058480229 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_subclasses.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_subclasses.sql
@@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` (
`class_index` int(1) NOT NULL DEFAULT 0,
`dual_class` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`charId`,`class_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+# RESTORE_CHAR_SUBCLASSES, ADD_CHAR_SUBCLASS, UPDATE_CHAR_SUBCLASS, DELETE_CHAR_SUBCLASS
+CREATE INDEX idx_charId_classIndex ON character_subclasses (charId, class_index);
+
+# CharSelectionInfo
+CREATE INDEX idx_charId_classId ON character_subclasses (charId, class_id);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summon_skills_save.sql
index 648e445c0a..c10b99bc5c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summon_skills_save.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summon_skills_save.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_summon_skills_save` (
`remaining_time` INT NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`ownerId`,`ownerClassIndex`,`summonSkillId`,`skill_id`,`skill_level`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summons.sql
index e089d258b3..1936e548d4 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summons.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_summons.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `character_summons` (
`curMp` int(9) unsigned DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ownerId`,`summonId`,`summonSkillId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_tpbookmark.sql
index df70351c2e..2cd0efe8b1 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_tpbookmark.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_tpbookmark.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_tpbookmark` (
`tag` varchar(50) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`charId`,`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_variables.sql
index 97a8a898d0..82f8e79930 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_variables.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/character_variables.sql
@@ -3,4 +3,7 @@ CREATE TABLE IF NOT EXISTS `character_variables` (
`charId` int(10) UNSIGNED NOT NULL,
`var` varchar(255) NOT NULL,
`val` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_charId ON character_variables (charId);
+CREATE INDEX idx_var ON character_variables (var);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/characters.sql
index 4df7d3f88c..f39a66c2db 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/characters.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/characters.sql
@@ -62,4 +62,15 @@ CREATE TABLE IF NOT EXISTS `characters` (
KEY `char_name` (`char_name`),
KEY `clanid` (`clanid`),
KEY `online` (`online`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+# Common
+CREATE INDEX idx_charId ON characters (charId);
+CREATE INDEX idx_char_name ON characters (char_name);
+CREATE INDEX idx_account_name ON characters (account_name);
+
+# CharSelectionInfo
+CREATE INDEX idx_accountName_createDate ON characters (account_name, createDate);
+
+# TaskBirthday
+CREATE INDEX idx_createDate ON characters (createDate);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_data.sql
index 1748b666e3..a1ca68fe43 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_data.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_data.sql
@@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
KEY `ally_id` (`ally_id`),
KEY `leader_id` (`leader_id`),
KEY `auction_bid_at` (`auction_bid_at`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_notices.sql
index 3ab4c18480..7464ee18bd 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_notices.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_notices.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_notices` (
`enabled` enum('true','false') DEFAULT 'false' NOT NULL,
`notice` TEXT NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_privs.sql
index 6478e63f8a..af4e35a46b 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_privs.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_privs.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clan_privs` (
`party` INT NOT NULL DEFAULT 0,
`privs` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`clan_id`,`rank`,`party`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_skills.sql
index 785d9e489a..10b722e90e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_skills.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_skills.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_skills` (
`skill_name` varchar(26) DEFAULT NULL,
`sub_pledge_id` INT NOT NULL DEFAULT '-2',
PRIMARY KEY (`clan_id`,`skill_id`,`sub_pledge_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_subpledges.sql
index 558ae695e1..64c31b7f38 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_subpledges.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_subpledges.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clan_subpledges` (
`leader_id` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`sub_pledge_id`),
KEY `leader_id` (`leader_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_variables.sql
index 2df52d0e90..44bf3fea53 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_variables.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_variables.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `clanId` (`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_wars.sql
index 1e02dfb225..3fcf58a2ad 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_wars.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clan_wars.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` (
`endTime` bigint(13) NOT NULL DEFAULT 0,
`state` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`clan1`,`clan2`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanentry.sql
index 314f2fb6b8..91beee1ac3 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanentry.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanentry.sql
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `pledge_applicant` (
`karma` tinyint(1) NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`charId`,`clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_recruit`;
CREATE TABLE IF NOT EXISTS `pledge_recruit` (
@@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `pledge_recruit` (
`application_type` tinyint(1) NOT NULL,
`recruit_type` tinyint(1) NOT NULL,
PRIMARY KEY (`clan_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `pledge_waiting_list`;
CREATE TABLE IF NOT EXISTS `pledge_waiting_list` (
`char_id` int(10) NOT NULL,
`karma` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall.sql
index 39e3deed5c..67e85d8f99 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
index 298166e477..4c41da7fda 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/clanhall_auctions_bidders.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_auctions_bidders` (
`bid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`bidTime` BIGINT(13) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY( `clanHallId`, `clanId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/commission_items.sql
index 79601a9a4e..44a54d79f2 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/commission_items.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/commission_items.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `commission_items` (
`duration_in_days` TINYINT NOT NULL,
`discount_in_percentage` TINYINT NOT NULL,
PRIMARY KEY (`commission_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/crests.sql
index 3c8a5540ff..c4bcbe76e2 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/crests.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/crests.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `crests` (
`data` VARBINARY(2176) NOT NULL,
`type` TINYINT NOT NULL,
PRIMARY KEY(`crest_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/cursed_weapons.sql
index 06ed9c9aa4..1e35c6d476 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/cursed_weapons.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/cursed_weapons.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`),
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_mail.sql
index 59cb8b5cfa..0ad31ec68a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_mail.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_mail.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `custom_mail` (
`subject` TINYTEXT NOT NULL,
`message` TEXT NOT NULL,
`items` TEXT NOT NULL -- format: itemId1 count1;itemId2 count2;itemId3 count3...
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_teleport.sql
index 27a5d0d877..9dd08290ac 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_teleport.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/custom_teleport.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `custom_teleport` (
`fornoble` tinyint(1) NOT NULL DEFAULT '0',
`itemId` smallint(5) unsigned NOT NULL DEFAULT '57',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/event_schedulers.sql
index 0e91ede108..999126b47b 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/event_schedulers.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/event_schedulers.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `event_schedulers` (
`lastRun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `eventName_schedulerName` (`eventName`,`schedulerName`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort.sql
index c1f09a3f79..c8e7f5458c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort` (
`supplyLvL` int(2) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `fort` VALUES
(101,'Shanty',0,0,0,0,0,0,0),
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_doorupgrade.sql
index 8bca5d13fe..87e445876e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_doorupgrade.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_doorupgrade.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `fort_doorupgrade` (
`pDef` int(11) NOT NULL DEFAULT '0',
`mDef` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_functions.sql
index 3c0bdfc42a..9ec9f577d2 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_functions.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_functions.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`rate` decimal(20,0) NOT NULL DEFAULT '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_siege_guards.sql
index 4872d0110c..40ed7619dc 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_siege_guards.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_siege_guards.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` (
`isHired` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_siege_guards` VALUES
-- Shanty Guards
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_spawnlist.sql
index 0285fa6edd..d3caf9312e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_spawnlist.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fort_spawnlist.sql
@@ -11,7 +11,7 @@ CREATE TABLE `fort_spawnlist` (
`castleId` tinyint(1) unsigned NOT NULL DEFAULT '0', -- Castle ID for Special Envoys
PRIMARY KEY (`id`),
KEY `id` (`fortId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `fort_spawnlist` VALUES
(101,null,35658,-53273,156650,-1896,62000,0,0),
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fortsiege_clans.sql
index ea5e71a909..5ae471842d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fortsiege_clans.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/fortsiege_clans.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fortsiege_clans` (
`fort_id` int(1) NOT NULL DEFAULT '0',
`clan_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`,`fort_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/forums.sql
index d7bb88e274..af3a8be6ec 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/forums.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/forums.sql
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `forums` (
`forum_owner_id` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forum_owner_id` (`forum_owner_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT IGNORE INTO `forums` VALUES
(1, 'NormalRoot', 0, 0, 0, 1, 0),
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_tasks.sql
index ec8fd2c36e..5b2a05d01d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_tasks.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_tasks.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`param2` varchar(100) NOT NULL DEFAULT '',
`param3` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_variables.sql
index 580d9cd7e5..42bde4188f 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_variables.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/global_variables.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `global_variables` (
`var` VARCHAR(255) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/grandboss_data.sql
index 853bbd704b..50fbf93b87 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/grandboss_data.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/grandboss_data.sql
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`currentMP` decimal(30,15) NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`boss_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT IGNORE INTO `grandboss_data` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`currentHP`,`currentMP`) VALUES
(29001, -21610, 181594, -5734, 0, 40218408, 300), -- Queen Ant
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes.sql
index ae59eb8ba1..f2ee5692a8 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `heroes` (
`claimed` ENUM('true','false') NOT NULL DEFAULT 'false',
`message` varchar(300) NOT NULL DEFAULT '',
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes_diary.sql
index e2195a1fea..0cc38a3bdf 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes_diary.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/heroes_diary.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes_diary` (
`action` tinyint(2) unsigned NOT NULL DEFAULT '0',
`param` int(11) unsigned NOT NULL DEFAULT '0',
KEY `charId` (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction.sql
index d73ec83417..4d654f9671 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_auction` (
`endingTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`auctionStateId` tinyint(1) NOT NULL,
PRIMARY KEY (`auctionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction_bid.sql
index a132cbf33b..1fa2a7d060 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction_bid.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_auction_bid.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `item_auction_bid` (
`playerObjId` int(11) NOT NULL,
`playerBid` bigint(20) NOT NULL,
PRIMARY KEY (`auctionId`,`playerObjId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_elementals.sql
index 73c76bff70..16212982cb 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_elementals.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_elementals.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_elementals` (
`elemType` tinyint(1) NOT NULL DEFAULT -1,
`elemValue` int(11) NOT NULL DEFAULT -1,
PRIMARY KEY (`itemId`, `elemType`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId_elemType ON item_elementals (itemId, elemType);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_special_abilities.sql
index f38653c2b8..f0b9af4b51 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_special_abilities.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_special_abilities.sql
@@ -5,4 +5,6 @@ CREATE TABLE IF NOT EXISTS `item_special_abilities` (
`optionId` int(10) unsigned NOT NULL,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`objectId`,`optionId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_objectId ON item_special_abilities (objectId);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variables.sql
index aa62996a80..8ed1389861 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variables.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variables.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variables` (
`var` varchar(255) NOT NULL,
`val` text NOT NULL,
KEY `charId` (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_id ON item_variables (id);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variations.sql
index cfbf0ca91e..36adc3d83f 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variations.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/item_variations.sql
@@ -4,4 +4,6 @@ CREATE TABLE IF NOT EXISTS `item_variations` (
`option1` INT(11) NOT NULL,
`option2` INT(11) NOT NULL,
PRIMARY KEY (`itemId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+CREATE INDEX idx_itemId ON item_variations (itemId);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/items.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/items.sql
index c2225c1f32..c701ef6748 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/items.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/items.sql
@@ -17,4 +17,12 @@ CREATE TABLE IF NOT EXISTS `items` (
KEY `item_id` (`item_id`),
KEY `loc` (`loc`),
KEY `time_of_use` (`time_of_use`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE INDEX idx_item_id ON items (item_id);
+CREATE INDEX idx_object_id ON items (object_id);
+CREATE INDEX idx_owner_id ON items (owner_id);
+CREATE INDEX idx_owner_id_loc ON items (owner_id, loc);
+CREATE INDEX idx_owner_id_item_id ON items (owner_id, item_id);
+CREATE INDEX idx_owner_id_loc_locdata ON items (owner_id, loc, loc_data);
+CREATE INDEX idx_owner_id_loc_locdata_enchant ON items (owner_id, loc, loc_data, enchant_level, item_id, object_id);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/itemsonground.sql
index e0750ce461..cd0b66704c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/itemsonground.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/itemsonground.sql
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` (
`drop_time` bigint(13) NOT NULL DEFAULT '0',
`equipable` int(1) DEFAULT '0',
PRIMARY KEY (`object_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_bets.sql
index 8d7d4cb738..295e97a717 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_bets.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_bets.sql
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bets` (
`lane_id` INT(1) DEFAULT 0,
`bet` INT DEFAULT 0,
PRIMARY KEY (`lane_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `mdt_bets` VALUES
('1','0'),
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_history.sql
index 06978f3377..a0bd0e009a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_history.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/mdt_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `mdt_history` (
`second` INT(1) DEFAULT 0,
`odd_rate` DOUBLE(10,2) DEFAULT 0,
PRIMARY KEY (`race_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/merchant_lease.sql
index 5860107e3d..a5228f511e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/merchant_lease.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/merchant_lease.sql
@@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `merchant_lease` (
`type` int(11) NOT NULL DEFAULT 0,
`player_name` varchar(35),
PRIMARY KEY (`merchant_id`,`player_id`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/messages.sql
index 41df84c7d6..162cea05e4 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/messages.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/messages.sql
@@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `messages` (
`enchantLvl` INT(3) NOT NULL DEFAULT '0',
`elementals` VARCHAR(25),
PRIMARY KEY (`messageId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/npc_respawns.sql
index b93a9f4128..77f93f18ef 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/npc_respawns.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/npc_respawns.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `npc_respawns` (
`currentHp` double unsigned NOT NULL,
`currentMp` double unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_data.sql
index f3f1b5b54e..c00edf499e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_data.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_data.sql
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_data` (
`validation_end` bigint(13) unsigned NOT NULL DEFAULT '0',
`next_weekly_change` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_fights.sql
index 15ffc8332b..1e88116dfc 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_fights.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_fights.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` (
`classed` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `charOneId` (`charOneId`),
KEY `charTwoId` (`charTwoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles.sql
index 386b27df45..0f48e9f71c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles.sql
@@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` (
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_done_week` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles_eom.sql
index f22562d0d5..fde44db92f 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles_eom.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/olympiad_nobles_eom.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` (
`competitions_lost` smallint(3) unsigned NOT NULL DEFAULT 0,
`competitions_drawn` smallint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`charId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/party_matching_history.sql
index e363987455..931f044fcd 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/party_matching_history.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/party_matching_history.sql
@@ -4,4 +4,4 @@ CREATE TABLE `party_matching_history` (
`title` VARCHAR(21) DEFAULT NULL,
`leader` VARCHAR(35) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/petition_feedback.sql
index 2907d19d72..7752f5ab17 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/petition_feedback.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/petition_feedback.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `petition_feedback` (
`rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 2,
`message` text NOT NULL,
`date` bigint(13) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/pets.sql
index 4ffa7cd2b6..298b2e2df0 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/pets.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/pets.sql
@@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `pets` (
`restore` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`item_obj_id`),
KEY `ownerId` (`ownerId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/posts.sql
index 4b212c323c..179355fd62 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/posts.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/posts.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `posts` (
`post_forum_id` int(8) NOT NULL DEFAULT '0',
`post_txt` text NOT NULL,
KEY `post_forum_id` (`post_forum_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/punishments.sql
index 286bfd6ca4..8df118acf1 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/punishments.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/punishments.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `punishments` (
`reason` TEXT NOT NULL,
`punishedBy` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/residence_functions.sql
index 9f948c65c0..a78d7aed7b 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/residence_functions.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/residence_functions.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `residence_functions` (
`expiration` bigint NOT NULL ,
`residenceId` int NOT NULL ,
PRIMARY KEY (`id`, `level`, `residenceId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/siege_clans.sql
index f649ceb8e7..0cec8f57b5 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/siege_clans.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/siege_clans.sql
@@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siege_clans` (
`type` int(1) DEFAULT NULL,
`castle_owner` int(1) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`castle_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/topic.sql
index 75f73ee48c..ac232c9d55 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/topic.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/game/topic.sql
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `topic` (
`topic_ownerid` int(8) NOT NULL DEFAULT '0',
`topic_type` int(8) NOT NULL DEFAULT '0',
`topic_reply` int(8) NOT NULL DEFAULT '0'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/account_data.sql
index 1614f50a50..9f90064c1c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/account_data.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/account_data.sql
@@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `account_data` (
`var` VARCHAR(20) NOT NULL DEFAULT '',
`value` VARCHAR(255) ,
PRIMARY KEY (`account_name`,`var`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts.sql
index 66583e0598..00030c86cc 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts.sql
@@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`hop3` char(15) DEFAULT NULL,
`hop4` char(15) DEFAULT NULL,
PRIMARY KEY (`login`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts_ipauth.sql
index 0421147ef2..5e37e293e6 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts_ipauth.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/accounts_ipauth.sql
@@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `accounts_ipauth` (
`login` varchar(45) NOT NULL,
`ip` char(15) NOT NULL,
`type` enum('deny','allow') NULL DEFAULT 'allow'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/gameservers.sql
index c6f6c5ee36..d2a3e1ee5d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/gameservers.sql
+++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/sql/login/gameservers.sql
@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `gameservers` (
`hexid` varchar(50) NOT NULL DEFAULT '',
`host` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`server_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `gameservers` VALUES ('2', '-2ad66b3f483c22be097019f55c8abdf0', '');
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_08.2_Homunculus/dist/game/config/Custom/FakePlayers.ini
index f745b0d31e..d10a01dec1 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/config/Custom/FakePlayers.ini
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/config/Custom/FakePlayers.ini
@@ -17,6 +17,9 @@ FakePlayerKillsRewardPvP = True
# Fake player kills apply karma rules.
FakePlayerUnflaggedKillsKarma = True
+# Fake players can be attacked without PvP flagging.
+FakePlayerAutoAttackable = False
+
# Aggressive AI fake players attack nearby monsters.
FakePlayerAggroMonsters = True
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/config/General.ini b/L2J_Mobius_08.2_Homunculus/dist/game/config/General.ini
index 1dfe725af3..e9b5d1cfbd 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/config/General.ini
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/config/General.ini
@@ -430,8 +430,8 @@ ChatFilterChars = ^_^
# NPC_SHOUT
# NEW_TELL
# WORLD (&)
-# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
-BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
+# Default: GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE;WHISPER
+BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE;WHISPER
# ---------------------------------------------------------------------------
@@ -655,6 +655,11 @@ EnableAutoItem = True
# Retail: False
ResumeAutoPlay = False
+# Assist party leader.
+# When in party, target what the leader is targeting.
+# Retail: False
+AssistLeader = False
+
# ---------------------------------------------------------------------------
# Developer Settings
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/config/Rates.ini b/L2J_Mobius_08.2_Homunculus/dist/game/config/Rates.ini
index d4f5606320..09b75dc15e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/config/Rates.ini
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/config/Rates.ini
@@ -159,11 +159,13 @@ EventItemMaxLevelDifference = 9
# Vitality system rates. Works only if EnableVitality = True
# ---------------------------------------------------------------------------
-# The following configures the XP multiplier of each vitality level. Basically, you have
-# Default: 2
+# The following configures the XP multiplier of each vitality level.
# Take care setting these values according to your server rates, as the can lead to huge differences!
# Example with a server rate 15x and vitality = 2. => final server rate = 30 (15x2)!
+# Retail: 2
RateVitalityExpMultiplier = 2.
+# Retail: 3
+RateVitalityExpPremiumMultiplier = 3.
# Maximum vitality items allowed to be used for a week by a player.
# Default: 999
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/ActionData.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/ActionData.xml
index 965751da7b..d538403527 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/ActionData.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/ActionData.xml
@@ -1,48 +1,70 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
-
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -51,169 +73,196 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/DoorData.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/DoorData.xml
index 28a76d706e..4cd7836a06 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/DoorData.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/DoorData.xml
@@ -11645,6 +11645,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/html/default/34426.htm b/L2J_Mobius_08.2_Homunculus/dist/game/data/html/default/34426.htm
new file mode 100644
index 0000000000..9d70e30f05
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/html/default/34426.htm
@@ -0,0 +1,6 @@
+Blackbird Clan Lord Leona Blackbird:
+This place is the Atelia Outlet, the most important place of Atelia Refinery.
+Embryos might sense your presence, so please be very careful.
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3160302.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3160302.xml
index 649c3f4856..c9ee0fe75e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3160302.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3160302.xml
@@ -42,7 +42,7 @@
-
-
+
@@ -50,7 +50,7 @@
-
-
+
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3368502.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3368502.xml
index ef405f5112..0e961b13f5 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3368502.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/multisell/3368502.xml
@@ -20,7 +20,7 @@
-
-
+
-
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java
index 1ec233eb7f..a62bbab9b4 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java
@@ -170,7 +170,6 @@ public class LionelHunter extends AbstractNpcAI
htmltext = "33907-not-completed.html";
}
break;
-
}
}
return htmltext;
@@ -186,4 +185,4 @@ public class LionelHunter extends AbstractNpcAI
{
new LionelHunter();
}
-}
\ No newline at end of file
+}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java
new file mode 100644
index 0000000000..5eacdf1f03
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java
@@ -0,0 +1,181 @@
+/*
+ * 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 .
+ */
+package ai.areas.Rune.SwampOfScreams;
+
+import java.util.Calendar;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.data.xml.SpawnData;
+import org.l2jmobius.gameserver.model.World;
+import org.l2jmobius.gameserver.model.actor.Npc;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
+import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
+import org.l2jmobius.gameserver.network.NpcStringId;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Tanatos
+ */
+public class SwampOfScreamsSiege extends AbstractNpcAI
+{
+ // NPCs
+ private static final int[] SWAMP_MONSTERS =
+ {
+ 24570,
+ 24571,
+ 24572,
+ 24573
+ };
+ private static final int SWAMP_PETRA = 24574;
+ private static final AtomicReference SPAWN_SWAMP_MONSTERS = new AtomicReference<>();
+ // Misc
+ private static final int[] DAYS_OF_WEEK =
+ {
+ Calendar.MONDAY,
+ Calendar.TUESDAY,
+ Calendar.WEDNESDAY,
+ Calendar.THURSDAY,
+ Calendar.FRIDAY,
+ Calendar.SATURDAY,
+ Calendar.SUNDAY
+ };
+ // Schedule: 13-15 & 22-24
+ private static final int[] DAY_TIME =
+ {
+ 13,
+ 00
+ };
+ private static final int[] NIGHT_TIME =
+ {
+ 22,
+ 00
+ };
+ private static final long DESPAWN_DELAY = 7200000;
+ private static boolean _daytime = false;
+
+ private SwampOfScreamsSiege()
+ {
+ addKillId(SWAMP_MONSTERS);
+ scheduleDayTime();
+ scheduleNightTime();
+ LOGGER.info("Swamp of Screams siege starts from 13:00 to 15:00 and from 22:00 to 00:00.");
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, Player player)
+ {
+ switch (event)
+ {
+ case "day_time_spawn":
+ {
+ World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.EVENT_ALARM_13_00_15_00_NKILL_THE_MONSTERS_APPEARED_IN_THE_SWAMP_OF_SCREAMS, 2, 10000, true));
+ SPAWN_SWAMP_MONSTERS.set(SpawnData.getInstance().getSpawnByName("SwampOfScreamsMonsters"));
+ SPAWN_SWAMP_MONSTERS.get().getGroups().forEach(SpawnGroup::spawnAll);
+ _daytime = true;
+ startQuestTimer("despawn", DESPAWN_DELAY, null, null);
+ break;
+ }
+ case "night_time_spawn":
+ {
+ World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.EVENT_ALARM_22_00_24_00_NKILL_THE_MONSTERS_APPEARED_IN_THE_SWAMP_OF_SCREAMS, 2, 10000, true));
+ SPAWN_SWAMP_MONSTERS.set(SpawnData.getInstance().getSpawnByName("SwampOfScreamsMonsters"));
+ SPAWN_SWAMP_MONSTERS.get().getGroups().forEach(SpawnGroup::spawnAll);
+ _daytime = false;
+ startQuestTimer("despawn", DESPAWN_DELAY, null, null);
+ break;
+ }
+ case "despawn":
+ {
+ if (_daytime)
+ {
+ World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.EVENT_ALARM_22_00_24_00_NMONSTERS_OF_THE_SWAMP_OF_SCREAMS_ARE_DEFEATED, 2, 10000, true));
+ }
+ else
+ {
+ World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.EVENT_ALARM_13_00_15_00_NMONSTERS_OF_THE_SWAMP_OF_SCREAMS_ARE_DEFEATED, 2, 10000, true));
+ }
+ SPAWN_SWAMP_MONSTERS.set(SpawnData.getInstance().getSpawnByName("SwampOfScreamsMonsters"));
+ SPAWN_SWAMP_MONSTERS.get().getGroups().forEach(SpawnGroup::despawnAll);
+ break;
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onKill(Npc npc, Player killer, boolean isSummon)
+ {
+ if ((CommonUtil.contains(SWAMP_MONSTERS, npc.getId())) && (getRandom(100) < 3))
+ {
+ addSpawn(SWAMP_PETRA, npc.getLocation(), false, 600000, false);
+ }
+ return super.onKill(npc, killer, isSummon);
+ }
+
+ private void scheduleDayTime()
+ {
+ long time = Long.MAX_VALUE;
+ for (int day : DAYS_OF_WEEK)
+ {
+ final long nextDateMillis = getNextDateMilis(day, DAY_TIME[0], DAY_TIME[1]);
+ if (nextDateMillis < time)
+ {
+ time = nextDateMillis;
+ }
+ }
+ startQuestTimer("day_time_spawn", time - System.currentTimeMillis(), null, null);
+ }
+
+ private void scheduleNightTime()
+ {
+ long time = Long.MAX_VALUE;
+ for (int day : DAYS_OF_WEEK)
+ {
+ final long nextDateMillis = getNextDateMilis(day, NIGHT_TIME[0], NIGHT_TIME[1]);
+ if (nextDateMillis < time)
+ {
+ time = nextDateMillis;
+ }
+ }
+ startQuestTimer("night_time_spawn", time - System.currentTimeMillis(), null, null);
+ }
+
+ private long getNextDateMilis(int dayOfWeek, int hour, int minute)
+ {
+ final Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, hour);
+ calendar.set(Calendar.MINUTE, minute);
+ calendar.set(Calendar.SECOND, 0);
+ for (int i = 0; i < 7; i++)
+ {
+ if ((calendar.get(Calendar.DAY_OF_WEEK) == dayOfWeek) && (calendar.getTimeInMillis() > System.currentTimeMillis()))
+ {
+ return calendar.getTimeInMillis();
+ }
+ calendar.add(Calendar.DAY_OF_WEEK, 1);
+ }
+ return calendar.getTimeInMillis();
+ }
+
+ public static void main(String[] args)
+ {
+ new SwampOfScreamsSiege();
+ }
+}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
index d3d1a6bbcf..6c678e8c19 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java
@@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
+import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
@@ -235,6 +236,8 @@ public class TvT extends Event
final InstanceManager manager = InstanceManager.getInstance();
final InstanceTemplate template = manager.getInstanceTemplate(INSTANCE_ID);
PVP_WORLD = manager.createInstance(template, null);
+ // Make sure doors are closed.
+ PVP_WORLD.getDoors().forEach(Door::closeMe);
// Randomize player list and separate teams.
final List playerList = new ArrayList<>(PLAYER_LIST.size());
playerList.addAll(PLAYER_LIST);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 9d9c1c0e83..bb04e89014 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -43,6 +43,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AdditionalPotionHp", AdditionalPotionHp::new);
EffectHandler.getInstance().registerHandler("AdditionalPotionMp", AdditionalPotionMp::new);
EffectHandler.getInstance().registerHandler("AddPcCafePoints", AddPcCafePoints::new);
+ EffectHandler.getInstance().registerHandler("AddMaxPhysicalCriticalRate", AddMaxPhysicalCriticalRate::new);
+ EffectHandler.getInstance().registerHandler("AddMaxMagicCriticalRate", AddMaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
@@ -198,6 +200,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new);
EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new);
EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new);
+ EffectHandler.getInstance().registerHandler("IgnoreReduceDamage", IgnoreReduceDamage::new);
EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new);
EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new);
EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new);
@@ -237,7 +240,6 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
- EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
index ffc903fd3f..bc95845925 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
@@ -48,6 +48,7 @@ public class SkillConditionMasterHandler
SkillConditionHandler.getInstance().registerHandler("CanUseInDragonLair", CanUseInDragonLairSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseSwoopCannon", CanUseSwoopCannonSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("HasVitalityPoints", HasVitalityPointsSkillCondition::new);
+ SkillConditionHandler.getInstance().registerHandler("CanUseSymbolSealIncreaseItem", CanUseSymbolSealIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseVitalityIncreaseItem", CanUseVitalityIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckLevel", CheckLevelSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckSex", CheckSexSkillCondition::new);
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
new file mode 100644
index 0000000000..4f72de76fa
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxMagicCriticalRate extends AbstractStatEffect
+{
+ public AddMaxMagicCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_MAGIC_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
new file mode 100644
index 0000000000..84f20e491a
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 .
+ */
+package handlers.effecthandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author fruit
+ */
+public class AddMaxPhysicalCriticalRate extends AbstractStatEffect
+{
+ public AddMaxPhysicalCriticalRate(StatSet params)
+ {
+ super(params, Stat.ADD_MAX_PHYSICAL_CRITICAL_RATE);
+ }
+}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
index 53461fa88c..d2642e05ab 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.model.StatSet;
@@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.BuffInfo;
import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.skill.SkillCaster;
+import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
/**
* Call Skill effect implementation.
@@ -58,7 +60,7 @@ public class CallSkill extends AbstractEffect
return;
}
- Skill triggerSkill = null;
+ final Skill triggerSkill;
if (_skillLevelScaleTo <= 0)
{
// Mobius: Use 0 to trigger max effector learned skill level.
@@ -72,6 +74,7 @@ public class CallSkill extends AbstractEffect
else
{
LOGGER.warning("Player " + effector + " called unknown skill " + _skill + " triggered by " + skill + " CallSkill.");
+ return;
}
}
else
@@ -100,7 +103,21 @@ public class CallSkill extends AbstractEffect
return;
}
- SkillCaster.triggerCast(effector, effected, triggerSkill);
+ final int hitTime = triggerSkill.getHitTime();
+ if (hitTime > 0)
+ {
+ if (effector.isSkillDisabled(triggerSkill))
+ {
+ return;
+ }
+
+ effector.broadcastPacket(new MagicSkillUse(effector, effected, triggerSkill.getDisplayId(), triggerSkill.getLevel(), hitTime, 0));
+ ThreadPool.schedule(() -> SkillCaster.triggerCast(effector, effected, triggerSkill), hitTime);
+ }
+ else
+ {
+ SkillCaster.triggerCast(effector, effected, triggerSkill);
+ }
}
else
{
diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java
similarity index 83%
rename from L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
rename to L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java
index 9b5e021318..5405ccd4be 100644
--- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java
@@ -20,12 +20,12 @@ import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
- * @author Mobius
+ * @author fruit
*/
-public class MaxMagicCriticalRate extends AbstractStatEffect
+public class IgnoreReduceDamage extends AbstractStatEffect
{
- public MaxMagicCriticalRate(StatSet params)
+ public IgnoreReduceDamage(StatSet params)
{
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
+ super(params, Stat.IGNORE_REDUCE_DAMAGE);
}
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
deleted file mode 100644
index c99b060259..0000000000
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
+++ /dev/null
@@ -1,31 +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 .
- */
-package handlers.effecthandlers;
-
-import org.l2jmobius.gameserver.model.StatSet;
-import org.l2jmobius.gameserver.model.stats.Stat;
-
-/**
- * @author Mobius
- */
-public class MaxMagicCriticalRate extends AbstractStatEffect
-{
- public MaxMagicCriticalRate(StatSet params)
- {
- super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
- }
-}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java
index 951002a2c2..35bfbcb6bc 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java
@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
+import org.l2jmobius.gameserver.enums.StatModifierType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
@@ -25,6 +26,7 @@ import org.l2jmobius.gameserver.model.events.listeners.FunctionEventListener;
import org.l2jmobius.gameserver.model.events.returns.DamageReturn;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author Sdw
@@ -32,10 +34,12 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class ReduceDamage extends AbstractEffect
{
private final double _amount;
+ private final StatModifierType _mode;
public ReduceDamage(StatSet params)
{
_amount = params.getDouble("amount");
+ _mode = params.getEnum("mode", StatModifierType.class, StatModifierType.DIFF);
}
private DamageReturn onDamageReceivedEvent(OnCreatureDamageReceived event)
@@ -46,7 +50,15 @@ public class ReduceDamage extends AbstractEffect
return null;
}
- final double newDamage = event.getDamage() * (_amount / 100);
+ final double newDamage;
+ if (_mode == StatModifierType.PER)
+ {
+ newDamage = event.getDamage() - (event.getDamage() * (_amount / 100));
+ }
+ else // DIFF
+ {
+ newDamage = event.getDamage() - Math.max((_amount - event.getAttacker().getStat().getAdd(Stat.IGNORE_REDUCE_DAMAGE)), 0.0);
+ }
return new DamageReturn(false, true, false, newDamage);
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java
index 03d9e8638b..634ea96c64 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java
@@ -16,14 +16,21 @@
*/
package handlers.effecthandlers;
+import java.util.LinkedList;
+import java.util.List;
+
import org.l2jmobius.Config;
+import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.enums.StatModifierType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
+import org.l2jmobius.gameserver.model.effects.EffectType;
+import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
+import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author NviX
@@ -39,6 +46,12 @@ public class RestoreSymbolSeal extends AbstractEffect
_mode = params.getEnum("mode", StatModifierType.class, StatModifierType.PER);
}
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.RESTORE_SYMBOL_SEAL;
+ }
+
@Override
public boolean isInstant()
{
@@ -77,6 +90,33 @@ public class RestoreSymbolSeal extends AbstractEffect
player.updateSymbolSealSkills();
player.sendSkillList();
player.broadcastUserInfo();
+
+ // Send item list to update Dye Powder with red icon in inventory.
+ ThreadPool.schedule(() ->
+ {
+ final List
- items = new LinkedList<>();
+ ITEMS: for (Item i : effected.getActingPlayer().getInventory().getItems())
+ {
+ if (i.getTemplate().hasSkills())
+ {
+ for (ItemSkillHolder s : i.getTemplate().getAllSkills())
+ {
+ if (s.getSkill().hasEffectType(EffectType.RESTORE_SYMBOL_SEAL))
+ {
+ items.add(i);
+ continue ITEMS;
+ }
+ }
+ }
+ }
+
+ if (!items.isEmpty())
+ {
+ final InventoryUpdate iu = new InventoryUpdate();
+ iu.addItems(items);
+ effected.getActingPlayer().sendInventoryUpdate(iu);
+ }
+ }, 1000);
}
}
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
index 7e02e79abc..bff5a1734b 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java
@@ -210,6 +210,11 @@ public class TriggerSkillByAttack extends AbstractEffect
else
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getAttacker().isSkillDisabled(buffInfo.getSkill()))
+ {
+ return;
+ }
}
if ((buffInfo == null) || (buffInfo.getSkill().getLevel() < triggerSkill.getLevel()) || _renewDuration)
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
index 289fc39e34..658d88fe0a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java
@@ -124,6 +124,15 @@ public class TriggerSkillBySkill extends AbstractEffect
if (buffInfo != null)
{
triggerSkill = SkillData.getInstance().getSkill(_skill.getSkillId(), Math.min(_skillLevelScaleTo, buffInfo.getSkill().getLevel() + 1));
+
+ if (event.getCaster().isSkillDisabled(buffInfo.getSkill()))
+ {
+ if ((_replace) && (buffInfo.getSkill().getLevel() == _skillLevelScaleTo))
+ {
+ ((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
+ }
+ return;
+ }
}
else
{
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java
index 70789354f3..fd41f09a9a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java
@@ -17,7 +17,13 @@
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
+import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
+import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.stats.Stat;
+import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author Sero
@@ -28,4 +34,46 @@ public class WeaponBonusMAtk extends AbstractStatAddEffect
{
super(params, Stat.WEAPON_BONUS_MAGIC_ATTACK);
}
+
+ @Override
+ public void onStart(Creature effector, Creature effected, Skill skill, Item item)
+ {
+ final Player player = effected.getActingPlayer();
+ if (player == null)
+ {
+ return;
+ }
+
+ final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ if (weapon == null)
+ {
+ return;
+ }
+
+ final InventoryUpdate iu = new InventoryUpdate();
+ iu.addModifiedItem(weapon);
+ player.sendInventoryUpdate(iu);
+ player.broadcastUserInfo();
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ final Player player = effected.getActingPlayer();
+ if (player == null)
+ {
+ return;
+ }
+
+ final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ if (weapon == null)
+ {
+ return;
+ }
+
+ final InventoryUpdate iu = new InventoryUpdate();
+ iu.addModifiedItem(weapon);
+ player.sendInventoryUpdate(iu);
+ player.broadcastUserInfo();
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java
index df05ef8607..b36b10a92e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java
@@ -17,7 +17,13 @@
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.item.instance.Item;
+import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
+import org.l2jmobius.gameserver.model.skill.Skill;
import org.l2jmobius.gameserver.model.stats.Stat;
+import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
/**
* @author Sero
@@ -28,4 +34,46 @@ public class WeaponBonusPAtk extends AbstractStatAddEffect
{
super(params, Stat.WEAPON_BONUS_PHYSICAL_ATTACK);
}
+
+ @Override
+ public void onStart(Creature effector, Creature effected, Skill skill, Item item)
+ {
+ final Player player = effected.getActingPlayer();
+ if (player == null)
+ {
+ return;
+ }
+
+ final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ if (weapon == null)
+ {
+ return;
+ }
+
+ final InventoryUpdate iu = new InventoryUpdate();
+ iu.addModifiedItem(weapon);
+ player.sendInventoryUpdate(iu);
+ player.broadcastUserInfo();
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ final Player player = effected.getActingPlayer();
+ if (player == null)
+ {
+ return;
+ }
+
+ final Item weapon = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ if (weapon == null)
+ {
+ return;
+ }
+
+ final InventoryUpdate iu = new InventoryUpdate();
+ iu.addModifiedItem(weapon);
+ player.sendInventoryUpdate(iu);
+ player.broadcastUserInfo();
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetAttack.java
index b7434abd2e..854051b04c 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetAttack.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetAttack.java
@@ -16,39 +16,61 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Pet attack player action handler.
- * @author Nik
+ * @author Mobius
*/
public class PetAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if ((player.getPet() == null) || !player.getPet().isPet())
+ final Pet pet = player.getPet();
+ if ((pet == null) || !pet.isPet())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_PET);
return;
}
- final Pet pet = player.getPet();
if (pet.isUncontrollable())
{
player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_HUNGER_GAUGE_IS_AT_0_YOU_CANNOT_USE_YOUR_PET);
+ return;
}
- else if (pet.isBetrayed())
+
+ if (pet.isBetrayed())
{
player.sendPacket(SystemMessageId.YOUR_PET_SERVITOR_IS_UNRESPONSIVE_AND_WILL_NOT_OBEY_ANY_ORDERS);
+ return;
}
- else if (pet.canAttack(player.getTarget(), ctrlPressed))
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
{
- pet.doAttack(player.getTarget());
+ return;
+ }
+
+ if (player.calculateDistance3D(target) > 3000)
+ {
+ pet.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (pet.canAttack(target, ctrlPressed))
+ {
+ pet.doAttack(target);
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetHold.java
index 5e726bae7b..5688e59b8b 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetHold.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetHold.java
@@ -52,4 +52,10 @@ public class PetHold implements IPlayerActionHandler
((SummonAI) pet.getAI()).notifyFollowStatusChange();
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetMove.java
index e5198fda6f..7b37a62148 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetMove.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetMove.java
@@ -53,4 +53,10 @@ public class PetMove implements IPlayerActionHandler
pet.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, player.getTarget().getLocation());
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java
index 80c073b1dc..f2044ed108 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java
@@ -77,4 +77,10 @@ public class PetSkillUse implements IPlayerActionHandler
}
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetStop.java
index 7ba96efec2..bcf54c7e96 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetStop.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/PetStop.java
@@ -51,4 +51,10 @@ public class PetStop implements IPlayerActionHandler
pet.cancelAction();
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
index 3ce6e28c2a..b681353b73 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java
@@ -16,34 +16,52 @@
*/
package handlers.playeractions;
+import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.IPlayerActionHandler;
import org.l2jmobius.gameserver.model.ActionDataHolder;
+import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.network.SystemMessageId;
/**
* Servitor Attack player action handler.
- * @author St3eT
+ * @author Mobius
*/
public class ServitorAttack implements IPlayerActionHandler
{
@Override
public void useAction(Player player, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
{
- if (player.hasServitors())
- {
- for (Summon summon : player.getServitors().values())
- {
- if (summon.canAttack(player.getTarget(), ctrlPressed))
- {
- summon.doAttack(player.getTarget());
- }
- }
- }
- else
+ if (!player.hasServitors())
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
+ return;
+ }
+
+ final WorldObject target = player.getTarget();
+ if (target == null)
+ {
+ return;
+ }
+
+ final boolean targetOutOfRange = player.calculateDistance3D(target) > 3000;
+ for (Summon summon : player.getServitors().values())
+ {
+ if (targetOutOfRange)
+ {
+ summon.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ else if (summon.canAttack(target, ctrlPressed))
+ {
+ summon.doAttack(target);
+ }
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorHold.java
index 4bbeee8387..1931066222 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorHold.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorHold.java
@@ -48,4 +48,10 @@ public class ServitorHold implements IPlayerActionHandler
((SummonAI) s.getAI()).notifyFollowStatusChange();
});
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMode.java
index 456a2e042b..14159b2066 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMode.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMode.java
@@ -68,4 +68,10 @@ public class ServitorMode implements IPlayerActionHandler
}
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMove.java
index 36528e0063..a5269a3d15 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMove.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorMove.java
@@ -56,4 +56,10 @@ public class ServitorMove implements IPlayerActionHandler
}
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java
index b67b13f2cc..133040fba4 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java
@@ -62,4 +62,10 @@ public class ServitorSkillUse implements IPlayerActionHandler
}
});
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorStop.java
index 24db478dc7..3dda0b9c15 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorStop.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/ServitorStop.java
@@ -47,4 +47,10 @@ public class ServitorStop implements IPlayerActionHandler
s.cancelAction();
});
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java
index 390822a7b1..eaace592ee 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java
@@ -62,4 +62,10 @@ public class UnsummonPet implements IPlayerActionHandler
pet.unSummon(player);
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java
index e4944df496..937dcaad1a 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java
@@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_SERVITOR);
}
}
+
+ @Override
+ public boolean isPetAction()
+ {
+ return true;
+ }
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java
new file mode 100644
index 0000000000..3ab0d0bb69
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java
@@ -0,0 +1,43 @@
+/*
+ * 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 .
+ */
+package handlers.skillconditionhandlers;
+
+import org.l2jmobius.Config;
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.WorldObject;
+import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.skill.ISkillCondition;
+import org.l2jmobius.gameserver.model.skill.Skill;
+
+/**
+ * @author CostyKiller
+ */
+public class CanUseSymbolSealIncreaseItemSkillCondition implements ISkillCondition
+{
+ private final int _amount;
+
+ public CanUseSymbolSealIncreaseItemSkillCondition(StatSet params)
+ {
+ _amount = params.getInt("amount", 0);
+ }
+
+ @Override
+ public boolean canUse(Creature caster, Skill skill, WorldObject target)
+ {
+ return caster.isPlayer() && ((caster.getActingPlayer().getSymbolSealPoints() + ((Config.MAX_SYMBOL_SEAL_POINTS * _amount) / 100)) <= Config.MAX_SYMBOL_SEAL_POINTS);
+ }
+}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
index 57ebb3bb4c..fffb222021 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java
@@ -39,10 +39,11 @@ public class OpSkillAcquireSkillCondition implements ISkillCondition
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
- if (!target.isCreature())
+ if ((target == null) || !target.isCreature())
{
return false;
}
+
final int skillLevel = ((Creature) target).getSkillLevel(_skillId);
return _hasLearned ? skillLevel != 0 : skillLevel == 0;
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
index 18c4d64dbc..58cf8bd50e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java
@@ -67,7 +67,7 @@ public class PartyPledge implements IAffectScopeHandler
return false;
}
- if ((p != player) && (p.getClanId() != clanId) && ((party == null) || (party != p.getParty())))
+ if ((p != player) && ((clanId == 0) || (p.getClanId() != clanId)) && ((party == null) || (party != p.getParty())))
{
return false;
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
index 89e06fc91d..7e94e156e6 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java
@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
+import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.quest.QuestState;
@@ -46,10 +47,11 @@ public class ChamberOfProphecies extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 31639;
- private static final int VAN_HALTER = 33999;
- private static final int FERIN = 34001;
private static final int GRAIL = 33996;
private static final int MYSTERIOUS_WIZARD = 33980;
+ // Helper NPCs
+ private static final int HELPER_VAN_HALTER = 33999;
+ private static final int HELPER_FERIN = 34001;
// Misc
private static final int DOOR_2 = 17230102;
private static final int DOOR_3 = 17230103;
@@ -66,7 +68,7 @@ public class ChamberOfProphecies extends AbstractInstance
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD);
- addCreatureSeeId(FERIN, VAN_HALTER);
+ addCreatureSeeId(HELPER_FERIN, HELPER_VAN_HALTER);
}
@Override
@@ -145,12 +147,12 @@ public class ChamberOfProphecies extends AbstractInstance
{
return null;
}
- final Npc valHalter = world.getNpc(VAN_HALTER);
- if (valHalter != null)
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
+ if (vanHalter != null)
{
- valHalter.deleteMe(); // probably needs another npc id for initial room
+ vanHalter.deleteMe(); // probably needs another npc id for initial room
}
- final Npc ferin = world.getNpc(FERIN);
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
if (ferin != null)
{
ferin.deleteMe(); // probably needs another npc id for initial room
@@ -190,6 +192,8 @@ public class ChamberOfProphecies extends AbstractInstance
case "CHECK_STATUS":
{
final Instance world = player.getInstanceWorld();
+ final FriendlyNpc ferin = (FriendlyNpc) world.getNpc(HELPER_FERIN);
+ final FriendlyNpc vanHalter = (FriendlyNpc) world.getNpc(HELPER_VAN_HALTER);
if (!isInInstance(world))
{
return null;
@@ -200,8 +204,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
- startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY2", 14000, ferin, player);
+ startQuestTimer("SEY_KAIN", 24000, vanHalter, player);
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -221,7 +225,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
if (world.getAliveNpcs(Monster.class).isEmpty())
{
- startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY3", 8000, ferin, player);
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
@@ -234,7 +238,7 @@ public class ChamberOfProphecies extends AbstractInstance
world.setStatus(4);
world.spawnGroup("wof_room3_2");
world.openCloseDoor(DOOR_3, false);
- startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
+ startQuestTimer("SEY_KAIN_1", 5000, vanHalter, player);
}
startQuestTimer("CHECK_STATUS", 7000, npc, player);
break;
@@ -245,8 +249,8 @@ public class ChamberOfProphecies extends AbstractInstance
{
world.setStatus(5);
world.spawnGroup("wof_room4");
- startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
- startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
+ startQuestTimer("SEY_KAIN_2", 3000, vanHalter, player);
+ startQuestTimer("SEY4", 7000, ferin, player);
}
else
{
@@ -304,7 +308,7 @@ public class ChamberOfProphecies extends AbstractInstance
return null;
}
cancelQuestTimer("ATTACK1", npc, player);
- startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
+ startQuestTimer("ATTACK2", 200, world.getNpc(HELPER_VAN_HALTER), player, true);
world.setStatus(3);
world.spawnGroup("wof_room3");
world.openCloseDoor(DOOR_3, true);
@@ -321,7 +325,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY2":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
@@ -330,7 +334,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
@@ -340,7 +344,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY3":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
@@ -349,7 +353,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_1":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
}
@@ -357,7 +361,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_2":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
@@ -367,7 +371,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY4":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
npc.setScriptValue(1);
@@ -377,7 +381,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "SEY_KAIN_3":
{
- if ((npc != null) && (npc.getId() == VAN_HALTER))
+ if ((npc != null) && (npc.getId() == HELPER_VAN_HALTER))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
npc.setScriptValue(1);
@@ -387,7 +391,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
case "REST":
{
- if ((npc != null) && (npc.getId() == FERIN))
+ if ((npc != null) && (npc.getId() == HELPER_FERIN))
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
}
@@ -508,7 +512,7 @@ public class ChamberOfProphecies extends AbstractInstance
{
switch (npc.getId())
{
- case FERIN:
+ case HELPER_FERIN:
{
if (creature.isPlayer() && !creature.isDead() && npc.isScriptValue(0))
{
@@ -516,7 +520,7 @@ public class ChamberOfProphecies extends AbstractInstance
}
break;
}
- case VAN_HALTER:
+ case HELPER_VAN_HALTER:
{
if (creature.isPlayer() && !creature.isDead() && world.isStatus(0))
{
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java
index 57f651334c..da4e516f85 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java
@@ -177,7 +177,14 @@ public class Q00933_TombRaiders extends Quest
final Party party = killer.getParty();
if (party != null)
{
- party.getMembers().forEach(p -> processKill(npc, p));
+ for (Player member : party.getMembers())
+ {
+ final QuestState qs = getQuestState(member, false);
+ if (qs != null)
+ {
+ processKill(npc, member);
+ }
+ }
}
else
{
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm
index 3314d03969..5094a407f3 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm
@@ -1,4 +1,6 @@
Verdure Elder Elikia:
-Have you brought me the message from Leona Blackbird?
-
+Greetings! I've been expecting you for a while.
+Leona asked me to tell you something.
+I hope you are ready to hear me out and help.
+
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm
new file mode 100644
index 0000000000..e7fc7b5818
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm
@@ -0,0 +1,6 @@
+Verdure Elder Elikia:
+I see you are ready. Now I'm going to tell you what Leona has told me.
+In the last combat with Etis van Etina, Leona was badly wounded, so she had to train to recover her strength. Unfortunately, she had no time to complete the trainings because she received a message. It said about a dungeon of Atelia Fortress. Something connected to Etis van Etina was found there. That place was very odd and was called Atelia Refinery.
+Leona wanted to meet you personally, but there was an urgent business, so she asked me to see you and explain the situation. My mission is connected with that place.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html
deleted file mode 100644
index 9d262558f5..0000000000
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html
+++ /dev/null
@@ -1,3 +0,0 @@
-Verdure Elder Elikia:
-I don't see any message from Leona Blackbird, make sure you bring that to me.
-
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm
new file mode 100644
index 0000000000..32f35f5524
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm
@@ -0,0 +1,6 @@
+Verdure Elder Elikia:
+We're assuming by the name that it's where Atelia is refined.
+It's located at the underground of Atelia Fortress, so we didn't know about it until now.
+I think Atelia refined from there is sent to the great temple where Etis van Etina is.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html
deleted file mode 100644
index 5eeee527eb..0000000000
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html
+++ /dev/null
@@ -1,3 +0,0 @@
-Verdure Elder Elikia:
-Great! You have brought it, now let me read it.
-
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm
deleted file mode 100644
index 216047fa2e..0000000000
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm
+++ /dev/null
@@ -1,4 +0,0 @@
-Verdure Elder Elikia:
-I've read the message from Leona Blackbird you should go see her to tell you what you have to do.
-
-
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html
new file mode 100644
index 0000000000..30f55b94dd
--- /dev/null
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html
@@ -0,0 +1,6 @@
+Verdure Elder Elikia:
+Leona was lost in despair for some time but she finally rose again and started investigating the Atelia Refinery.
+But our strength still isn't enough, so we're asking for your help once again.
+Leona will be at the entrance of the Atelia Refinery. You'll find it if you leave camp and follow the passage of Dimensional Energy to the west.
+Leona will fill you in with more details.
+
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html
deleted file mode 100644
index 59c38eaca9..0000000000
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html
+++ /dev/null
@@ -1,3 +0,0 @@
-Verdure Elder Elikia:
-Leona Blackbird is waiting for you at Atelia Refinery entrance.
-
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html
deleted file mode 100644
index 66e7889930..0000000000
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html
+++ /dev/null
@@ -1,5 +0,0 @@
-Message:
-You received a message from Leona Blackbird, this means you can start Savior's Path quests.
-To learn more, go to Blackbird Campsite and talk to Elikia.
-
-
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java
index 1463675b0a..75d384ed5e 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java
@@ -16,6 +16,7 @@
*/
package quests.Q10885_SaviorsPathDiscovery;
+import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -58,20 +59,27 @@ public class Q10885_SaviorsPathDiscovery extends Quest
String htmltext = null;
switch (event)
{
- case "34057-03.html":
+ case "34057-02.htm":
+ {
+ qs.startQuest();
+ htmltext = event;
+ break;
+ }
+ case "34057-03.htm":
{
if (qs.isCond(1))
{
- takeItems(player, -1, LEONA_BLACKBIRDS_MESSAGE);
qs.setCond(2);
}
htmltext = event;
break;
}
- case "34057-05.html":
+ case "34057-04.html":
{
if (qs.isCond(2))
{
+ giveItems(player, LEONA_BLACKBIRDS_MESSAGE, 1, true);
+ playMovie(player, Movie.EP5_ASTATINE_QST_START);
qs.setCond(3);
}
htmltext = event;
@@ -83,6 +91,7 @@ public class Q10885_SaviorsPathDiscovery extends Quest
{
if ((player.getLevel() >= MIN_LEVEL))
{
+ takeItems(player, -1, LEONA_BLACKBIRDS_MESSAGE);
addExpAndSp(player, 906387492, 906387);
qs.exitQuest(false, true);
htmltext = event;
@@ -137,7 +146,11 @@ public class Q10885_SaviorsPathDiscovery extends Quest
}
else if (qs.isCond(2))
{
- htmltext = "34057-04.htm";
+ htmltext = "34057-03.htm";
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "34057-04.html";
}
break;
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html
index 37b0c2b30c..7d977a4778 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html
@@ -1,4 +1,4 @@
Blackbird Clan Lord Leona Blackbird:
-Yes. Go speak to Devianne.
+Yes. Go speak to Devianne.
Devianne will tell you how to get to the Atelia Refinery and what you must do there.
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java
index f2fe21a819..0626200ce8 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java
@@ -621,7 +621,7 @@ public class Q11025_PathOfDestinyProving extends Quest
holder.add(new NpcLogListHolder(NpcStringId.DEFEAT_SKELETONS_3.getId(), true, qs.getInt(KILL_COUNT_VAR)));
return holder;
}
- else if (qs.isCond(11))
+ else if (qs.isCond(12))
{
final Set holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.INVESTIGATE_THE_SURROUNDINGS.getId(), true, qs.getInt(KILL_COUNT_VAR2)));
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java
index 37414acbff..9e42f6e195 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java
@@ -315,7 +315,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT1);
}
- htmltext = event;
break;
}
case "teleport2":
@@ -324,7 +323,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT2);
}
- htmltext = event;
break;
}
case "teleport3":
@@ -333,7 +331,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT3);
}
- htmltext = event;
break;
}
case "teleport4":
@@ -342,7 +339,6 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT4);
}
- htmltext = event;
break;
}
case "teleport5":
@@ -351,10 +347,8 @@ public class Q11026_PathOfDestinyConviction extends Quest
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT5);
}
- htmltext = event;
break;
}
-
}
return htmltext;
}
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html
index 34fcecd6d8..a0fbc4196d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html
@@ -3,7 +3,7 @@
When the god's voice will no longer be heard.
A red river flows...
Hard frost upon the earth... And one of half-noble blood, descending with the winds to become the prophesied one.
-Your lonely, solitary journey has begun. A small child in the middle of a blocked road appears. When joined by one of nobility, the path will open to the Grail.
+Your lonely, solitary journey has begun. A small child in the middle of a blocked road appears. When joined by one of nobility, the path will open to the Grail.
So it wasn't a coincidence that you left on your journey.