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.
\ No newline at end of file diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml index 805daf70ba..7da3cdc129 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml @@ -1,1183 +1,636 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/46200-46299.xml index 34b37b3e5b..eb1cfdc9fd 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/46200-46299.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/46200-46299.xml @@ -796,14 +796,19 @@ + + + - - - + + + + + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/80500-80599.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/80500-80599.xml index ba5f8ccb0e..107f6a13dd 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/80500-80599.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/80500-80599.xml @@ -382,6 +382,13 @@ + + + + + + + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81000-81099.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81000-81099.xml index 8afb5f81d6..6cd275ef26 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81000-81099.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81000-81099.xml @@ -267,8 +267,15 @@ + + + + + + + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81600-81699.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81600-81699.xml index 87371444a5..6daa7606e1 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81600-81699.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/81600-81699.xml @@ -1037,6 +1037,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/33900-33999.xml index 6da0a6b277..ec4917c625 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/33900-33999.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/33900-33999.xml @@ -3776,9 +3776,9 @@ - - - + + + @@ -3789,7 +3789,7 @@ - + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/34000-34099.xml index b6cbd2a1fb..8a76172e10 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/34000-34099.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/npcs/34000-34099.xml @@ -39,7 +39,7 @@ - + FRIEND FEMALE @@ -58,7 +58,7 @@ - + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/16300-16399.xml index 5f455b6d57..4e89f9505b 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/16300-16399.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/16300-16399.xml @@ -801,6 +801,22 @@ 5000 -150 true + 80 + 900 + PHYSICAL + ENEMY + SINGLE + PULL + + + + 100 + + + 600 + 600 + + diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18400-18499.xml index 53f1dd5519..1adc33b4c3 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18400-18499.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18400-18499.xml @@ -885,8 +885,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_08.2_Homunculus/dist/game/data/stats/skills/18500-18599.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18500-18599.xml index f3303a3a10..45b374c324 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18500-18599.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18500-18599.xml @@ -819,10 +819,12 @@ SKILL_IGNORE ABNORMAL_INVINCIBILITY + ABNORMAL_INVINCIBILITY 2 3 + 4 7 1000 diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22500-22599.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22500-22599.xml index 2a7708aba1..82a4b46e0d 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22500-22599.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22500-22599.xml @@ -1578,7 +1578,7 @@ 22883 22884 - 22885 + 22885 1 3600000 diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22700-22799.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22700-22799.xml index 6a6db390ba..3cde5afbf8 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22700-22799.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/22700-22799.xml @@ -297,7 +297,7 @@ 23338 23339 - 23340 + 23340 1 3600000 diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/30000-30099.xml index 48e426673b..fb099b2e5f 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/30000-30099.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/30000-30099.xml @@ -1978,8 +1978,8 @@ P 85 - - 550 + + 350 DIFF diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39400-39499.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39400-39499.xml index e0c8200815..dad3d4a5d5 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39400-39499.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39400-39499.xml @@ -2087,6 +2087,7 @@ + icon.skill0000 A1 5 @@ -2096,6 +2097,11 @@ 1 SELF SINGLE + + + 25 + + 25 diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39500-39599.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39500-39599.xml index c938b0779c..3c9fff1191 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39500-39599.xml +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/39500-39599.xml @@ -1185,11 +1185,16 @@ icon.armor_t2000_b_i00 - A1 + A2 + 86400 + CGRADE_CHANGE 4 1500 5000 780 + 1 + 81016 + true diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/documentation.txt index edd866e3e6..ec5ea13947 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/documentation.txt @@ -12,6 +12,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. @@ -166,10 +168,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. @@ -208,7 +211,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. @@ -273,6 +275,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_08.2_Homunculus/java/org/l2jmobius/Config.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/Config.java index 7dc56baeff..40bfcea596 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/Config.java @@ -605,6 +605,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 @@ -840,6 +841,7 @@ public class Config public static int STARTING_VITALITY_POINTS; public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; + public static float RATE_VITALITY_EXP_PREMIUM_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -1346,6 +1348,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; @@ -2217,6 +2220,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); @@ -2333,6 +2337,7 @@ public class Config MONSTER_EXP_MAX_LEVEL_DIFFERENCE = ratesConfig.getInt("MonsterExpMaxLevelDifference", 11); RATE_RAIDBOSS_POINTS = ratesConfig.getFloat("RateRaidbossPointsReward", 1); RATE_VITALITY_EXP_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpMultiplier", 2); + RATE_VITALITY_EXP_PREMIUM_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpPremiumMultiplier", 3); VITALITY_MAX_ITEMS_ALLOWED = ratesConfig.getInt("VitalityMaxItemsAllowed", 999); RATE_VITALITY_LOST = ratesConfig.getFloat("RateVitalityLost", 1); RATE_VITALITY_GAIN = ratesConfig.getFloat("RateVitalityGain", 1); @@ -3391,6 +3396,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_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index 6485e6c47d..2208f823ee 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/SkillData.java index c5839831ba..deb0eec41a 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index b277446b93..7bf956bdc5 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java index 6e4cef898f..79a06cdc78 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Player.java index 196efaa0fe..9ac8bf98fc 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -319,6 +319,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoAbnormalVisualEf import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoCubic; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoEquipSlot; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import org.l2jmobius.gameserver.network.serverpackets.ExVitalityEffectInfo; import org.l2jmobius.gameserver.network.serverpackets.GetOnVehicle; import org.l2jmobius.gameserver.network.serverpackets.HennaInfo; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -4598,7 +4599,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8566,9 +8567,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; + } } } } @@ -9876,6 +9881,7 @@ public class Player extends Playable sendPacket(new ExUserBoostStat(this, BonusExpType.VITALITY)); sendPacket(new ExUserBoostStat(this, BonusExpType.BUFFS)); sendPacket(new ExUserBoostStat(this, BonusExpType.PASSIVE)); + sendPacket(new ExVitalityEffectInfo(this)); _userBoostStatTask = null; }, 300); } diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Summon.java index 196de38709..4213dec3ad 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index ea61f72ae6..4d444a1fa3 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_08.2_Homunculus/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<>(); @@ -883,15 +882,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()); } } } @@ -902,8 +899,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. @@ -912,7 +913,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()) { @@ -985,45 +986,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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java index 33fd8aa870..ffcb16e4dc 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java @@ -482,7 +482,11 @@ public class PlayerStat extends PlayableStat public double getVitalityExpBonus() { - return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0; + if (getVitalityPoints() > 0) + { + return getMul(Stat.VITALITY_EXP_RATE, 1) * (getActiveChar().hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER); + } + return 0; } public void setVitalityPoints(int value) diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index ffdfcd5574..c56c35ad2d 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/effects/EffectType.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/effects/EffectType.java index 5a64922eb4..d0951ef585 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/effects/EffectType.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/effects/EffectType.java @@ -63,5 +63,6 @@ public enum EffectType TELEPORT, TELEPORT_TO_TARGET, ABNORMAL_SHIELD, + RESTORE_SYMBOL_SEAL, VITALITY_POINT_UP } \ No newline at end of file diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index e17d405a46..fba22cdb8c 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/instance/Item.java index ea22a67f17..d64a767c00 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 0adafe6811..9ecff3bd0c 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -754,7 +754,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; @@ -906,7 +907,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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 61d7cb0485..6c17c2a05f 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -654,7 +654,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(); } @@ -677,7 +677,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(); } @@ -712,7 +712,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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java index 550e8a579a..e8980bea33 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -95,6 +95,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"), @@ -135,7 +136,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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index d96c2e25ae..0ca58d9970 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index 8f916369b4..b7b0c4ef53 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index 265cef95f4..4211092a85 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index c5f9cfd470..64b096aefd 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_08.2_Homunculus/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) { @@ -681,7 +686,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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index e04fde4707..07ed7641a9 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_08.2_Homunculus/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,129 +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, 96, 97, - 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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java index 21202af809..9c7e0eb8b0 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java +++ b/L2J_Mobius_08.2_Homunculus/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()) { @@ -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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java index 3263349360..38c94f8160 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.network.serverpackets; +import org.l2jmobius.Config; import org.l2jmobius.gameserver.enums.BonusExpType; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.stats.Stat; @@ -45,31 +46,10 @@ public class ExUserBoostStat extends ServerPacket { case VITALITY: { - final int currentVitalityPoints = _player.getStat().getVitalityPoints(); - if (currentVitalityPoints > 105000) + if (_player.getStat().getVitalityPoints() > 0) { - count = 1; - bonus = 300; - } - else if (currentVitalityPoints > 70000) - { - count = 1; - bonus = 250; - } - else if (currentVitalityPoints > 35000) - { - count = 1; - bonus = 200; - } - else if (currentVitalityPoints > 0) - { - count = 1; - bonus = 100; - } - if (bonus > 0) - { - count += (int) _player.getStat().getValue(Stat.VITALITY_SKILLS, 0); - bonus += (int) ((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); + count = (int) (_player.getStat().getValue(Stat.VITALITY_SKILLS, 0) + 1); + bonus = (int) (((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (_player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100d); } break; } diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java index ff6541ec6f..96e9690fe6 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets; import org.l2jmobius.Config; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.stats.Stat; import org.l2jmobius.gameserver.network.ServerPackets; /** @@ -26,13 +27,15 @@ import org.l2jmobius.gameserver.network.ServerPackets; public class ExVitalityEffectInfo extends ServerPacket { private final int _vitalityBonus; + private final int _vitalityAddBonus; private final int _vitalityItemsRemaining; private final int _points; public ExVitalityEffectInfo(Player player) { _points = player.getVitalityPoints(); - _vitalityBonus = (int) player.getStat().getVitalityExpBonus() * 100; + _vitalityBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100; + _vitalityAddBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); _vitalityItemsRemaining = Config.VITALITY_MAX_ITEMS_ALLOWED - player.getVitalityItemsUsed(); } @@ -42,7 +45,7 @@ public class ExVitalityEffectInfo extends ServerPacket ServerPackets.EX_VITALITY_EFFECT_INFO.writeId(this); writeInt(_points); writeInt(_vitalityBonus); // Vitality Bonus - writeShort(0); // Vitality additional bonus in % + writeShort(_vitalityAddBonus); // Vitality additional bonus in % writeShort(_vitalityItemsRemaining); // How much vitality items remaining for use writeShort(Config.VITALITY_MAX_ITEMS_ALLOWED); // Max number of items for use } diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index 8e396d93c9..a72d906550 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index e563e8e8f2..ee8bc21244 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java deleted file mode 100644 index c69a1e8cd0..0000000000 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java +++ /dev/null @@ -1,183 +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 - writeByte(0); // 286 - 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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java new file mode 100644 index 0000000000..4a4fa97fcd --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/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 + writeShort(_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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 9c1fbbcab8..851b53dc09 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 679c26e073..06711fb502 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 1544a20c14..e9f977858a 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 5899235fcb..66c93af753 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_08.2_Homunculus/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_08.2_Homunculus/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_08.2_Homunculus/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/account_gsdata.sql index ed8c60bfae..a0072cc6e4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/airships.sql index 50453102dd..d5dece1b03 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/announcements.sql index 0fef63e83e..88f8f519ad 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/auction_bid.sql index 85b978f103..2e37fbe5ba 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/bbs_favorites.sql index e7ace21bc9..a43fd1b53a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/bot_reported_char_data.sql index d7acdfa31b..98daf2dc12 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle.sql index 7ffcebed6b..3445dea47a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_doorupgrade.sql index ee822091b4..43a573b36e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_functions.sql index d270fca8a8..d8c1aaaeeb 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_manor_procure.sql index 54c8517f65..a6cd5a00c3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_manor_production.sql index 3980eef7aa..71ea5b8591 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_trapupgrade.sql index a0854df17e..139a3a5d45 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_contacts.sql index 3c2c5fb85a..9d8d163095 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_hennas.sql index 668374b2ab..8174451ef2 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_homunculus.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_homunculus.sql index 24d6a4e5ff..d8beec306a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_homunculus.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_instance_time.sql index 1a82cf40e2..2eaa3164a3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_item_reuse_save.sql index f2773fc195..22857bd4de 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_macroses.sql index 7062388d7a..b23a056e24 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_mentees.sql index 2ad58e3219..d067728900 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_offline_trade.sql index f61c711822..16925760e5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_offline_trade_items.sql index d8a9e0b8e1..38ffd73ae0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_premium_items.sql index 6b25480f4c..0f613d1029 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_quests.sql index 6199526ae6..93db47171d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_recipebook.sql index 74cc6b8bd6..807005f0c1 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_recipeshoplist.sql index e448547654..e81faed7a4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_reco_bonus.sql index f283ca5136..9717ebc5e9 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_summons.sql index e089d258b3..1936e548d4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_tpbookmark.sql index df70351c2e..2cd0efe8b1 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_variables.sql index 97a8a898d0..82f8e79930 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_data.sql index 1748b666e3..a1ca68fe43 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_notices.sql index 3ab4c18480..7464ee18bd 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_privs.sql index 6478e63f8a..af4e35a46b 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_skills.sql index 785d9e489a..10b722e90e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_subpledges.sql index 558ae695e1..64c31b7f38 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collection_favorites.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collection_favorites.sql index 7571da448f..49758d7815 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collection_favorites.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collection_favorites.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `collection_favorites` ( `accountName` VARCHAR(45) NOT NULL DEFAULT '', `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collections.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collections.sql index 8c0fafc9fd..1ff9772ad3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collections.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/collections.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `collections` ( `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, `index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`,`index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/custom_teleport.sql index 27a5d0d877..9dd08290ac 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort.sql index c1f09a3f79..c8e7f5458c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_doorupgrade.sql index 8bca5d13fe..87e445876e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_functions.sql index 3c0bdfc42a..9ec9f577d2 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_siege_guards.sql index 4872d0110c..40ed7619dc 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_spawnlist.sql index 0285fa6edd..d3caf9312e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fortsiege_clans.sql index ea5e71a909..5ae471842d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/forums.sql index d7bb88e274..af3a8be6ec 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/global_tasks.sql index ec8fd2c36e..5b2a05d01d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/global_variables.sql index 580d9cd7e5..42bde4188f 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/grandboss_data.sql index 0fd9caf1d9..f92f39e3b8 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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 (29381, -6505, 183040, -3419, 0, 1342845023, 133301), -- Queen Ant diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/heroes.sql index ae59eb8ba1..f2ee5692a8 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/heroes_diary.sql index e2195a1fea..0cc38a3bdf 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_auction.sql index d73ec83417..4d654f9671 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_auction_bid.sql index a132cbf33b..1fa2a7d060 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_elementals.sql index 73c76bff70..16212982cb 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/items.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/items.sql index c2225c1f32..c701ef6748 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/itemsonground.sql index e0750ce461..cd0b66704c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/merchant_lease.sql index 5860107e3d..a5228f511e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_data.sql index f3f1b5b54e..c00edf499e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_fights.sql index 15ffc8332b..1e88116dfc 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_nobles.sql index 386b27df45..0f48e9f71c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_nobles_eom.sql index f22562d0d5..fde44db92f 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/petition_feedback.sql index 2907d19d72..7752f5ab17 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/pets.sql index 4ffa7cd2b6..298b2e2df0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/posts.sql index 4b212c323c..179355fd62 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/siege_clans.sql index f649ceb8e7..0cec8f57b5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/topic.sql index 75f73ee48c..ac232c9d55 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/gameservers.sql index c6f6c5ee36..d2a3e1ee5d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/config/Character.ini b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Character.ini index 16d8c76ea1..92bec6794d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Character.ini +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Character.ini @@ -299,6 +299,13 @@ HardinRemovedSkills = 148,10104,10065,10098,19558,10097,10042,19552;\ 181,11855,19212,11856,11854,11863,11859 +# --------------------------------------------------------------------------- +# Eraton (Red Libra) +# --------------------------------------------------------------------------- +# Skill ids that will remain after Eraton class change. +EratonRetainedSkills = 1370,1371,1372,11400,11401,11402,11403,11404,31048,31049,30930,30931 + + # --------------------------------------------------------------------------- # Summons configuration # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/config/General.ini b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/General.ini index 64580a7378..abe836fbf0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/General.ini +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/config/Rates.ini b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Rates.ini index d4f5606320..09b75dc15e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Rates.ini +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/ActionData.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/ActionData.xml index 965751da7b..d9637fa11c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/ActionData.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/ActionData.xml @@ -1,48 +1,70 @@ - - - + + + + + + + + + + + + - + - + + + - + - - + + + - + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -51,169 +73,196 @@ - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/DoorData.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/DoorData.xml index 28a76d706e..4cd7836a06 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/DoorData.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/DoorData.xml @@ -11645,6 +11645,176 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/html/default/34426.htm b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/html/default/34426.htm new file mode 100644 index 0000000000..9d70e30f05 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3160302.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3160302.xml index 649c3f4856..c9ee0fe75e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3160302.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3160302.xml @@ -42,7 +42,7 @@ - + @@ -50,7 +50,7 @@ - + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3368502.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3368502.xml index f280615e20..0e961b13f5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3368502.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/multisell/3368502.xml @@ -20,7 +20,7 @@ - + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java index 1ec233eb7f..a62bbab9b4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java new file mode 100644 index 0000000000..5eacdf1f03 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GreedyTreasureChests.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GreedyTreasureChests.java index 7bc5305338..c205e4d7e7 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GreedyTreasureChests.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/ai/others/GreedyTreasureChests.java @@ -213,7 +213,7 @@ public class GreedyTreasureChests extends AbstractNpcAI else if (currentTime > GlobalVariablesManager.getInstance().getLong("TREASURE_CHEST_RESPAWN_FM_2", 0)) { addSpawn(CHEST_LV110, npc, true, 0, true); - GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_FM_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET))); + GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_NZ_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET))); } else if (currentTime > GlobalVariablesManager.getInstance().getLong("TREASURE_CHEST_RESPAWN_FM_3", 0)) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index d3d1a6bbcf..6c678e8c19 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java index a2c4da4b3f..080af57b40 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java @@ -297,7 +297,20 @@ public class Eraton extends AbstractNpcAI takeItem(player, STONE_OF_DESTINY); takeItem(player, getCloakItemId(player)); - player.removeAllSkills(); + if (Config.ERATON_RETAINED_SKILLS.isEmpty()) + { + player.removeAllSkills(); + } + else + { + for (Skill skill : player.getAllSkills()) + { + if (!Config.ERATON_RETAINED_SKILLS.contains(skill.getId())) + { + player.removeSkill(skill); + } + } + } // Stop auto use. for (Shortcut shortcut : player.getAllShortCuts()) diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/EffectMasterHandler.java index 136f136a58..871b734c13 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -44,6 +44,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); @@ -199,6 +201,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); @@ -238,7 +241,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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java index ffc903fd3f..bc95845925 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 951002a2c2..35bfbcb6bc 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java index 03d9e8638b..634ea96c64 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 7e02e79abc..bff5a1734b 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index 70789354f3..fd41f09a9a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index df05ef8607..b36b10a92e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetAttack.java index b7434abd2e..854051b04c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetHold.java index 5e726bae7b..5688e59b8b 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetMove.java index e5198fda6f..7b37a62148 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index 80c073b1dc..f2044ed108 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetStop.java index 7ba96efec2..bcf54c7e96 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 3ce6e28c2a..b681353b73 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index 4bbeee8387..1931066222 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index 456a2e042b..14159b2066 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index 36528e0063..a5269a3d15 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index b67b13f2cc..133040fba4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 24db478dc7..3dda0b9c15 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index 390822a7b1..eaace592ee 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index e4944df496..937dcaad1a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java new file mode 100644 index 0000000000..3ab0d0bb69 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index 89e06fc91d..7e94e156e6 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java index 57f651334c..da4e516f85 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm index 3314d03969..5094a407f3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm new file mode 100644 index 0000000000..e7fc7b5818 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html deleted file mode 100644 index 9d262558f5..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm new file mode 100644 index 0000000000..32f35f5524 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html deleted file mode 100644 index 5eeee527eb..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm deleted file mode 100644 index 216047fa2e..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html new file mode 100644 index 0000000000..30f55b94dd --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html deleted file mode 100644 index 59c38eaca9..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html deleted file mode 100644 index 66e7889930..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java index 1463675b0a..75d384ed5e 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html index 37b0c2b30c..7d977a4778 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java index 5f08cbbf5c..3adf10d05f 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java @@ -614,7 +614,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_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java index 64bd6eb6a7..cd880b6095 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java @@ -312,7 +312,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT1); } - htmltext = event; break; } case "teleport2": @@ -321,7 +320,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT2); } - htmltext = event; break; } case "teleport3": @@ -330,7 +328,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT3); } - htmltext = event; break; } case "teleport4": @@ -339,7 +336,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT4); } - htmltext = event; break; } case "teleport5": @@ -348,10 +344,8 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT5); } - htmltext = event; break; } - } return htmltext; } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html index 34fcecd6d8..a0fbc4196d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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.
\ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml index 805daf70ba..7da3cdc129 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml @@ -1,1183 +1,636 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/46200-46299.xml index 7635f4ec8f..9fbfe71ec5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/46200-46299.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/46200-46299.xml @@ -796,14 +796,19 @@ + + + - - - + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/80500-80599.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/80500-80599.xml index d2dd65d767..46f0303a1c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/80500-80599.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/80500-80599.xml @@ -382,6 +382,13 @@ + + + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81000-81099.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81000-81099.xml index 869df6e88e..01e50b878a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81000-81099.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81000-81099.xml @@ -267,8 +267,15 @@ + + + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81600-81699.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81600-81699.xml index aa2af2bfe7..2a7885f576 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81600-81699.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/81600-81699.xml @@ -1037,6 +1037,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/33900-33999.xml index 74a4b0c13f..634dbd82cb 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/33900-33999.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/33900-33999.xml @@ -3776,9 +3776,9 @@ - - - + + + @@ -3789,7 +3789,7 @@ - + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/34000-34099.xml index 7162e954ca..0e4ce7eed0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/34000-34099.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/npcs/34000-34099.xml @@ -39,7 +39,7 @@ - + FRIEND FEMALE @@ -58,7 +58,7 @@ - + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/16300-16399.xml index 5e42554634..221c2945ed 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/16300-16399.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/16300-16399.xml @@ -801,6 +801,22 @@ 5000 -150 true + 80 + 900 + PHYSICAL + ENEMY + SINGLE + PULL + + + + 100 + + + 600 + 600 + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18400-18499.xml index 5da87b23b6..11cf6bb101 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18400-18499.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18400-18499.xml @@ -885,8 +885,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_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18500-18599.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18500-18599.xml index 72a241be74..b3b6c1fdb7 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18500-18599.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18500-18599.xml @@ -819,10 +819,12 @@ SKILL_IGNORE ABNORMAL_INVINCIBILITY + ABNORMAL_INVINCIBILITY 2 3 + 4 7 1000 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22500-22599.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22500-22599.xml index 1c842e3486..b549546a09 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22500-22599.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22500-22599.xml @@ -1578,7 +1578,7 @@ 22883 22884 - 22885 + 22885 1 3600000 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22700-22799.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22700-22799.xml index 50ed7fa42c..1713eadda9 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22700-22799.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/22700-22799.xml @@ -297,7 +297,7 @@ 23338 23339 - 23340 + 23340 1 3600000 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/30000-30099.xml index 0ce433ca81..aa8b5c86b8 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/30000-30099.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/30000-30099.xml @@ -1978,8 +1978,8 @@ P 85 - - 550 + + 350 DIFF diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39100-39199.xml index 95cdc78ccd..012962144b 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39100-39199.xml @@ -52,12 +52,14 @@ 2 3 4 + 5 3600 7200 21600 28800 + 28800 CHANGEBODY CHANGESHAPE_TRANSFORM diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39400-39499.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39400-39499.xml index 70d4a163b6..9d43c48781 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39400-39499.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39400-39499.xml @@ -2087,6 +2087,7 @@ + icon.skill0000 A1 5 @@ -2096,6 +2097,11 @@ 1 SELF SINGLE + + + 25 + + 25 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39500-39599.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39500-39599.xml index 3327b34fd2..8034ab9075 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39500-39599.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/39500-39599.xml @@ -1166,11 +1166,16 @@ icon.armor_t2000_b_i00 - A1 + A2 + 86400 + CGRADE_CHANGE 4 1500 5000 780 + 1 + 81016 + true diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/documentation.txt index c8b2310fd3..a010587846 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/documentation.txt @@ -12,6 +12,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. @@ -166,10 +168,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. @@ -208,7 +211,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. @@ -273,6 +275,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java index 34f021b389..8a287a7d6a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java @@ -606,6 +606,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 @@ -834,6 +835,9 @@ public class Config public static boolean HARDIN_ENABLE_ERTHEIAS; public static Map> HARDIN_REMOVED_SKILLS; + // Eraton + public static Set ERATON_RETAINED_SKILLS = new HashSet<>(); + // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -841,6 +845,7 @@ public class Config public static int STARTING_VITALITY_POINTS; public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; + public static float RATE_VITALITY_EXP_PREMIUM_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -1360,6 +1365,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; @@ -1847,6 +1853,15 @@ public class Config HARDIN_REMOVED_SKILLS.get(classId).add(Integer.parseInt(classInfo[i])); } } + ERATON_RETAINED_SKILLS.clear(); + final String eratonRetainedSkills = characterConfig.getString("EratonRetainedSkills", "").trim(); + if (!eratonRetainedSkills.isEmpty()) + { + for (String id : eratonRetainedSkills.split(",")) + { + ERATON_RETAINED_SKILLS.add(Integer.parseInt(id)); + } + } ENABLE_VITALITY = characterConfig.getBoolean("EnableVitality", true); STARTING_VITALITY_POINTS = characterConfig.getInt("StartingVitalityPoints", 140000); RAIDBOSS_USE_VITALITY = characterConfig.getBoolean("RaidbossUseVitality", true); @@ -2225,6 +2240,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); @@ -2341,6 +2357,7 @@ public class Config MONSTER_EXP_MAX_LEVEL_DIFFERENCE = ratesConfig.getInt("MonsterExpMaxLevelDifference", 11); RATE_RAIDBOSS_POINTS = ratesConfig.getFloat("RateRaidbossPointsReward", 1); RATE_VITALITY_EXP_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpMultiplier", 2); + RATE_VITALITY_EXP_PREMIUM_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpPremiumMultiplier", 3); VITALITY_MAX_ITEMS_ALLOWED = ratesConfig.getInt("VitalityMaxItemsAllowed", 999); RATE_VITALITY_LOST = ratesConfig.getFloat("RateVitalityLost", 1); RATE_VITALITY_GAIN = ratesConfig.getFloat("RateVitalityGain", 1); @@ -3399,6 +3416,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index 6485e6c47d..2208f823ee 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/SkillData.java index c5839831ba..deb0eec41a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index b277446b93..7bf956bdc5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java index 6e4cef898f..79a06cdc78 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Player.java index 90398174b7..8df0f2c6c5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -327,6 +327,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoAbnormalVisualEf import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoCubic; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoEquipSlot; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import org.l2jmobius.gameserver.network.serverpackets.ExVitalityEffectInfo; import org.l2jmobius.gameserver.network.serverpackets.GetOnVehicle; import org.l2jmobius.gameserver.network.serverpackets.HennaInfo; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -4617,7 +4618,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8594,9 +8595,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; + } } } } @@ -9919,6 +9924,7 @@ public class Player extends Playable sendPacket(new ExUserBoostStat(this, BonusExpType.VITALITY)); sendPacket(new ExUserBoostStat(this, BonusExpType.BUFFS)); sendPacket(new ExUserBoostStat(this, BonusExpType.PASSIVE)); + sendPacket(new ExVitalityEffectInfo(this)); _userBoostStatTask = null; }, 300); } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Summon.java index 196de38709..4213dec3ad 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index ea61f72ae6..4d444a1fa3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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<>(); @@ -883,15 +882,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()); } } } @@ -902,8 +899,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. @@ -912,7 +913,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()) { @@ -985,45 +986,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java index 33fd8aa870..ffcb16e4dc 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java @@ -482,7 +482,11 @@ public class PlayerStat extends PlayableStat public double getVitalityExpBonus() { - return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0; + if (getVitalityPoints() > 0) + { + return getMul(Stat.VITALITY_EXP_RATE, 1) * (getActiveChar().hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER); + } + return 0; } public void setVitalityPoints(int value) diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index ffdfcd5574..c56c35ad2d 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/effects/EffectType.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/effects/EffectType.java index 5f8f754d04..e8e874b856 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/effects/EffectType.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/effects/EffectType.java @@ -64,5 +64,6 @@ public enum EffectType TELEPORT_TO_TARGET, ABNORMAL_SHIELD, DUAL_RANGE, + RESTORE_SYMBOL_SEAL, VITALITY_POINT_UP } \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index e17d405a46..fba22cdb8c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/instance/Item.java index ea22a67f17..d64a767c00 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 0adafe6811..9ecff3bd0c 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -754,7 +754,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; @@ -906,7 +907,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index c691e9164c..51afd01651 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -686,7 +686,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(); } @@ -709,7 +709,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(); } @@ -744,7 +744,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/Stat.java index 550e8a579a..e8980bea33 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -95,6 +95,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"), @@ -135,7 +136,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index d96c2e25ae..0ca58d9970 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index 8f916369b4..b7b0c4ef53 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index 265cef95f4..4211092a85 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index c5f9cfd470..64b096aefd 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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) { @@ -681,7 +686,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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index e04fde4707..07ed7641a9 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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,129 +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, 96, 97, - 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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java index 21202af809..9c7e0eb8b0 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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()) { @@ -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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java index 3263349360..38c94f8160 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.network.serverpackets; +import org.l2jmobius.Config; import org.l2jmobius.gameserver.enums.BonusExpType; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.stats.Stat; @@ -45,31 +46,10 @@ public class ExUserBoostStat extends ServerPacket { case VITALITY: { - final int currentVitalityPoints = _player.getStat().getVitalityPoints(); - if (currentVitalityPoints > 105000) + if (_player.getStat().getVitalityPoints() > 0) { - count = 1; - bonus = 300; - } - else if (currentVitalityPoints > 70000) - { - count = 1; - bonus = 250; - } - else if (currentVitalityPoints > 35000) - { - count = 1; - bonus = 200; - } - else if (currentVitalityPoints > 0) - { - count = 1; - bonus = 100; - } - if (bonus > 0) - { - count += (int) _player.getStat().getValue(Stat.VITALITY_SKILLS, 0); - bonus += (int) ((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); + count = (int) (_player.getStat().getValue(Stat.VITALITY_SKILLS, 0) + 1); + bonus = (int) (((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (_player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100d); } break; } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java index ff6541ec6f..96e9690fe6 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets; import org.l2jmobius.Config; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.stats.Stat; import org.l2jmobius.gameserver.network.ServerPackets; /** @@ -26,13 +27,15 @@ import org.l2jmobius.gameserver.network.ServerPackets; public class ExVitalityEffectInfo extends ServerPacket { private final int _vitalityBonus; + private final int _vitalityAddBonus; private final int _vitalityItemsRemaining; private final int _points; public ExVitalityEffectInfo(Player player) { _points = player.getVitalityPoints(); - _vitalityBonus = (int) player.getStat().getVitalityExpBonus() * 100; + _vitalityBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100; + _vitalityAddBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); _vitalityItemsRemaining = Config.VITALITY_MAX_ITEMS_ALLOWED - player.getVitalityItemsUsed(); } @@ -42,7 +45,7 @@ public class ExVitalityEffectInfo extends ServerPacket ServerPackets.EX_VITALITY_EFFECT_INFO.writeId(this); writeInt(_points); writeInt(_vitalityBonus); // Vitality Bonus - writeShort(0); // Vitality additional bonus in % + writeShort(_vitalityAddBonus); // Vitality additional bonus in % writeShort(_vitalityItemsRemaining); // How much vitality items remaining for use writeShort(Config.VITALITY_MAX_ITEMS_ALLOWED); // Max number of items for use } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index 8e396d93c9..a72d906550 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index e563e8e8f2..ee8bc21244 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java deleted file mode 100644 index c69a1e8cd0..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java +++ /dev/null @@ -1,183 +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 - writeByte(0); // 286 - 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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java new file mode 100644 index 0000000000..4a4fa97fcd --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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 + writeShort(_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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 9c1fbbcab8..851b53dc09 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 679c26e073..06711fb502 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 1544a20c14..e9f977858a 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 5899235fcb..66c93af753 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/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_10.3_MasterClass/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/account_gsdata.sql index ed8c60bfae..a0072cc6e4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/airships.sql index 50453102dd..d5dece1b03 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/announcements.sql index 0fef63e83e..88f8f519ad 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/auction_bid.sql index 85b978f103..2e37fbe5ba 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/bbs_favorites.sql index e7ace21bc9..a43fd1b53a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/bot_reported_char_data.sql index d7acdfa31b..98daf2dc12 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle.sql index 7ffcebed6b..3445dea47a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_doorupgrade.sql index ee822091b4..43a573b36e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_functions.sql index d270fca8a8..d8c1aaaeeb 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_manor_procure.sql index 54c8517f65..a6cd5a00c3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_manor_production.sql index 3980eef7aa..71ea5b8591 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_trapupgrade.sql index a0854df17e..139a3a5d45 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_contacts.sql index 3c2c5fb85a..9d8d163095 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_hennas.sql index 668374b2ab..8174451ef2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_homunculus.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_homunculus.sql index 24d6a4e5ff..d8beec306a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_homunculus.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_instance_time.sql index 1a82cf40e2..2eaa3164a3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_item_reuse_save.sql index f2773fc195..22857bd4de 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_macroses.sql index 7db9ed6b15..0a5f6b3390 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_macroses.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` ( `acronym` VARCHAR(4) , `commands` VARCHAR(1255) , 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_10.3_MasterClass/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_mentees.sql index 2ad58e3219..d067728900 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_offline_trade.sql index f61c711822..16925760e5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_offline_trade_items.sql index d8a9e0b8e1..38ffd73ae0 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_premium_items.sql index 6b25480f4c..0f613d1029 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_quests.sql index 6199526ae6..93db47171d 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_recipebook.sql index 74cc6b8bd6..807005f0c1 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_recipeshoplist.sql index e448547654..e81faed7a4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_reco_bonus.sql index f283ca5136..9717ebc5e9 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_summons.sql index e089d258b3..1936e548d4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_tpbookmark.sql index df70351c2e..2cd0efe8b1 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_variables.sql index 97a8a898d0..82f8e79930 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_data.sql index 1748b666e3..a1ca68fe43 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_notices.sql index 3ab4c18480..7464ee18bd 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_privs.sql index 6478e63f8a..af4e35a46b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_skills.sql index 785d9e489a..10b722e90e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_subpledges.sql index 558ae695e1..64c31b7f38 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/collection_favorites.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collection_favorites.sql index 7571da448f..49758d7815 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collection_favorites.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collection_favorites.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `collection_favorites` ( `accountName` VARCHAR(45) NOT NULL DEFAULT '', `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collections.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collections.sql index 8c0fafc9fd..1ff9772ad3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collections.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/collections.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `collections` ( `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, `index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`,`index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/conquest_data.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/conquest_data.sql index 68eac09d4e..349cdcfbe8 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/conquest_data.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/conquest_data.sql @@ -4,4 +4,4 @@ CREATE TABLE `conquest_data` ( `current_cycle` mediumint(8) unsigned NOT NULL DEFAULT 1, `conquest_season_end` 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_10.3_MasterClass/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql index 6451c94f86..374f506972 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql @@ -4,4 +4,4 @@ CREATE TABLE `conquest_prev_season_ranklist` ( `char_name` VARCHAR(45) DEFAULT NULL, `personal_points` bigint(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`charId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/custom_teleport.sql index 27a5d0d877..9dd08290ac 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort.sql index c1f09a3f79..c8e7f5458c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_doorupgrade.sql index 8bca5d13fe..87e445876e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_functions.sql index 3c0bdfc42a..9ec9f577d2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_siege_guards.sql index 4872d0110c..40ed7619dc 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_spawnlist.sql index 0285fa6edd..d3caf9312e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fortsiege_clans.sql index ea5e71a909..5ae471842d 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/forums.sql index d7bb88e274..af3a8be6ec 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/global_tasks.sql index ec8fd2c36e..5b2a05d01d 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/global_variables.sql index 580d9cd7e5..42bde4188f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/grandboss_data.sql index 0fd9caf1d9..f92f39e3b8 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_10.3_MasterClass/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 (29381, -6505, 183040, -3419, 0, 1342845023, 133301), -- Queen Ant diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/heroes.sql index ae59eb8ba1..f2ee5692a8 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/heroes_diary.sql index e2195a1fea..0cc38a3bdf 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/huntpass.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/huntpass.sql index 7108d1448a..69c5e19f44 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/huntpass.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/huntpass.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `huntpass` ( `sayha_points_used` INT NOT NULL DEFAULT 0, `unclaimed_reward` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`account_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_auction.sql index d73ec83417..4d654f9671 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_auction_bid.sql index a132cbf33b..1fa2a7d060 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_elementals.sql index 73c76bff70..16212982cb 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/item_transaction_history.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_transaction_history.sql index f8ba353a1f..cd3be96e9a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_transaction_history.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_transaction_history.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_transaction_history` ( `price` BIGINT UNSIGNED NOT NULL, `count` BIGINT UNSIGNED NOT NULL, PRIMARY KEY (`created_time`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/items.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/items.sql index c2225c1f32..c701ef6748 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/itemsonground.sql index e0750ce461..cd0b66704c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/merchant_lease.sql index 5860107e3d..a5228f511e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_data.sql index f3f1b5b54e..c00edf499e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_fights.sql index 15ffc8332b..1e88116dfc 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_nobles.sql index 386b27df45..0f48e9f71c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_nobles_eom.sql index f22562d0d5..fde44db92f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/petition_feedback.sql index 2907d19d72..7752f5ab17 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/pets.sql index 4ffa7cd2b6..298b2e2df0 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/posts.sql index 4b212c323c..179355fd62 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/siege_clans.sql index f649ceb8e7..0cec8f57b5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/topic.sql index 75f73ee48c..ac232c9d55 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/game/world_exchange_items.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/world_exchange_items.sql index 0db48c4d37..0c64236313 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/world_exchange_items.sql +++ b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/game/world_exchange_items.sql @@ -9,4 +9,4 @@ CREATE TABLE `world_exchange_items` ( `start_time` bigint(13) unsigned NOT NULL DEFAULT '0', `end_time` bigint(13) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`world_exchange_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; diff --git a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/gameservers.sql index c6f6c5ee36..d2a3e1ee5d 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/config/Character.ini b/L2J_Mobius_10.3_MasterClass/dist/game/config/Character.ini index 65f412f0cc..04527febf7 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/config/Character.ini +++ b/L2J_Mobius_10.3_MasterClass/dist/game/config/Character.ini @@ -299,6 +299,13 @@ HardinRemovedSkills = 148,10104,10065,10098,19558,10097,10042,19552;\ 181,11855,19212,11856,11854,11863,11859 +# --------------------------------------------------------------------------- +# Eraton (Red Libra) +# --------------------------------------------------------------------------- +# Skill ids that will remain after Eraton class change. +EratonRetainedSkills = 1370,1371,1372,11400,11401,11402,11403,11404,31048,31049,30930,30931 + + # --------------------------------------------------------------------------- # Summons configuration # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/config/Conquest.ini b/L2J_Mobius_10.3_MasterClass/dist/game/config/Conquest.ini index 2673ec6d22..dae8c8298e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/config/Conquest.ini +++ b/L2J_Mobius_10.3_MasterClass/dist/game/config/Conquest.ini @@ -57,6 +57,10 @@ ConquestRateServerSoulOrbs = 1 # Retail: 1 ConquestRateZonePoints = 1 +# Bloody Coins multiplier +# Retail: 1 +ConquestRateBloodyCoins = 1 + # Character Attack Points # Retail: 100 ConquestCharacterAttackPoints = 100 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_10.3_MasterClass/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/config/General.ini b/L2J_Mobius_10.3_MasterClass/dist/game/config/General.ini index 8f5ce649d7..d94b6e198f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/config/General.ini +++ b/L2J_Mobius_10.3_MasterClass/dist/game/config/General.ini @@ -436,8 +436,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 + # --------------------------------------------------------------------------- # Blue-Red Team Abnormal Effect Settings diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/config/Rates.ini b/L2J_Mobius_10.3_MasterClass/dist/game/config/Rates.ini index 76ff651b5a..b2164f33ad 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/config/Rates.ini +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/ActionData.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/ActionData.xml index cce8ac65a7..d5decbe607 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/ActionData.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/ActionData.xml @@ -1,48 +1,68 @@ - - - + + + + + + + + + + + + - + - + + + - + - - - + + + + - + - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -51,170 +71,196 @@ - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/DailyMission.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/DailyMission.xml index 5459aa25ee..dab762af93 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/DailyMission.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/DailyMission.xml @@ -177,9 +177,9 @@ - + - 29020,29325,29336,29348,29379 + 29325,29336,29348,29379,25888 @@ -332,11 +332,11 @@ - + 95 255 - 29068,29028,29240,29361,29362,29363,29364,29365,29366,29367,29305,29320 + 29068,29028,29240,29305,29320 @@ -344,11 +344,11 @@ - + 95 255 - 29068,29028,29240,29361,29362,29363,29364,29365,29366,29367,29305,29320 + 29068,29028,29240,29305,29320 @@ -356,11 +356,11 @@ - + 95 255 - 29068,29028,29240,29361,29362,29363,29364,29365,29366,29367,29305,29320 + 29068,29028,29240,29305,29320 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/DoorData.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/DoorData.xml index ce8597f897..807d1dfa79 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/DoorData.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/DoorData.xml @@ -11659,6 +11659,176 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/html/default/34426.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/html/default/34426.htm new file mode 100644 index 0000000000..9d70e30f05 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/multisell/3160302.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3160302.xml index 649c3f4856..c9ee0fe75e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3160302.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3160302.xml @@ -42,7 +42,7 @@ - + @@ -50,7 +50,7 @@ - + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3368502.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3368502.xml index f280615e20..0e961b13f5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3368502.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/multisell/3368502.xml @@ -20,7 +20,7 @@ - + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java index 66cf7595d5..57ce51da5f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java @@ -657,7 +657,7 @@ public class ConquestEngine extends AbstractNpcAI updatePoints(attackerPlayer, CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel()), CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel()), 0, 0, true); if ((getAttackPoints(attackerPlayer) >= 1) && (getLifePoints(targetPlayer) >= 1)) { - attackerPlayer.addItem("ConquestCoins", BLOODY_COIN, CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()), attackerPlayer, true); + attackerPlayer.addItem("ConquestCoins", BLOODY_COIN, CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()) * Config.CONQUEST_RATE_BLOODY_COINS, attackerPlayer, true); setAttackPoints(attackerPlayer, -1); setLifePoints(targetPlayer, -1); @@ -669,7 +669,7 @@ public class ConquestEngine extends AbstractNpcAI // Winner Message SystemMessage sm2 = new SystemMessage(SystemMessageId.YOU_HAVE_DEFEATED_C1_AND_GOT_BLOODY_COINS_X_S2_PERSONAL_CONQUEST_POINTS_X_S3_SERVER_CONQUEST_POINTS_X_S4_ATTACK_POINTS_1_TO_CHECK_THEIR_CURRENT_AMOUNT_ENTER_BLOODYCOIN_IN_YOUR_CHAT_WINDOW); sm2.addString(targetPlayer.getName()); - sm2.addString(Integer.toString(CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()))); + sm2.addString(Integer.toString(CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()) * Config.CONQUEST_RATE_BLOODY_COINS)); sm2.addString(Long.toString(CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel()))); sm2.addString(Long.toString(CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel()))); attackerPlayer.sendPacket(sm2); diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java index 1ec233eb7f..a62bbab9b4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java new file mode 100644 index 0000000000..beaa3f26da --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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: 10-11 & 22-23 + private static final int[] DAY_TIME = + { + 10, + 00 + }; + private static final int[] NIGHT_TIME = + { + 22, + 00 + }; + private static final long DESPAWN_DELAY = 3600000; + private static boolean _daytime = false; + + private SwampOfScreamsSiege() + { + addKillId(SWAMP_MONSTERS); + scheduleDayTime(); + scheduleNightTime(); + LOGGER.info("Swamp of Screams siege starts from 10:00 to 11:00 and from 22:00 to 23: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.HERALD_S_ANNOUNCEMENT_10_00_11_00_MONSTERS_ARE_SPAWNING_IN_THE_SWAMP_OF_SCREAMS_KILL_THEM_ALL, 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.HERALD_S_ANNOUNCEMENT_10_00_P_M_11_00_P_M_MONSTERS_ARE_INVADING_THE_SWAMP_OF_SCREAMS_AT_NIGHT_TIME, 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.HERALD_S_ANNOUNCEMENT_10_P_M_11_00_P_M_MONSTERS_OF_THE_SWAMP_OF_SCREAMS_HAVE_FLED_AWAY, 2, 10000, true)); + } + else + { + World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.HERALD_S_ANNOUNCEMENT_10_00_11_00_MONSTERS_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_10.3_MasterClass/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java index 7ef05d97dc..5944457dd2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java @@ -42,10 +42,12 @@ import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.model.SkillLearn; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventDispatcher; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.model.events.ListenerRegisterType; import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLevelChanged; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin; @@ -266,6 +268,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader else { player.setNobleLevel(1); + checkNobleListener(player); player.broadcastUserInfo(); // TODO: SetOneTimeQuestFlag(talker, 10385, 1); htmltext = "test_server_helper025.html"; @@ -402,6 +405,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader if (data.isRewardNoblesse()) { player.setNobleLevel(1); + checkNobleListener(player); } // Give possible hero status reward. if (data.isRewardHero()) @@ -859,6 +863,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader if (data.isRewardNoblesse()) { player.setNobleLevel(1); + checkNobleListener(player); } // Give possible hero status reward. if (data.isRewardHero()) @@ -1170,6 +1175,15 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader return null; } + private void checkNobleListener(Player player) + { + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player)); + } + } + public static void main(String[] args) { new ClassMaster(); diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/GreedyTreasureChests.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/GreedyTreasureChests.java index 5c6bdecdab..26d3be6b29 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/GreedyTreasureChests.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/GreedyTreasureChests.java @@ -600,7 +600,7 @@ public class GreedyTreasureChests extends AbstractNpcAI else if (currentTime > GlobalVariablesManager.getInstance().getLong("TREASURE_CHEST_RESPAWN_NZ_2", 0)) { addSpawn(CHEST_LV110, npc, true, 0, true); - GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_FM_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET))); + GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_NZ_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET))); } break; } diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34641.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34641.html new file mode 100644 index 0000000000..a602ca161d --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34641.html @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + + + + +
+ "O Cantabile! + Your beautiful voice flows like a river!" +
+ Welcome, my friend! I am sure you will enjoy your stand in this wonderful place where exquisite music fills the air!
+ The town is divided into 3 zones and each one of them has its own features.
+ The first zone is overseen by Amoroso, the second by Delicato and the third by Comodo. Talk to them to learn more. +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34642.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34642.html new file mode 100644 index 0000000000..3df8e6e071 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34642.html @@ -0,0 +1,25 @@ + + + + + + + +
+ + + + + + + +
+ "O Amoroso! + Sing us your song of love and beauty!" +
+ My name is Amoroso, I oversee Adagio (Zone 1)! I train dancers who have 10-34 on their PK counter.
+ We are putting on an amazing, truly incredible concert! You must be dying of anticipation, right? Ha-ha! +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34643.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34643.html new file mode 100644 index 0000000000..9844339570 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34643.html @@ -0,0 +1,25 @@ + + + + + + + +
+ + + + + + + +
+ "O Delicato! + Your intrincate songs move and inspire us!" +
+ My name is Delicato, I oversee Andante (Zone 2). Lord Narcissus has asked me to look after Pomposo and Dolce.
+ Their petals are very valuable, but almost imposible to collect. Heroes who hace 35-39 on their PK counter can grow these flowers by bleeding over them. +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34644.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34644.html new file mode 100644 index 0000000000..da8fec9e47 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/34644.html @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + + + + +
+ "O Comodo! + Your mellow melodies please our ears and soothe our souls!" +
+ My name is Comodo, I oversee Allegro (Zone 3).
+ I've managed to find a Pure Crystal to offer as tribute to Narcissus, but then I learned that the poor Angel is possessed by evil spirits! Can you imagine?
+ It is possible to exorcize the spirits, but only the heroes who have 40+ on their Pk counter can do it. +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java index 1dc6e07854..2634f960ad 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java @@ -37,6 +37,16 @@ import ai.AbstractNpcAI; */ public class PrisonManager extends AbstractNpcAI { + // NPC + private static final int MORENDO = 34637; + private static final int POMPOSO = 34638; + private static final int DOLLOROSO = 34639; + private static final int DOLCE = 34640; + private static final int CANTABILE = 34641; + private static final int AMOROSO = 34642; + private static final int DELICATO = 34643; + private static final int COMODO = 34644; + // Misc private static final ScriptZone PRISON_ZONE_1 = ZoneManager.getInstance().getZoneById(26010, ScriptZone.class); private static final ScriptZone PRISON_ZONE_2 = ZoneManager.getInstance().getZoneById(26011, ScriptZone.class); private static final ScriptZone PRISON_ZONE_3 = ZoneManager.getInstance().getZoneById(26012, ScriptZone.class); @@ -48,8 +58,8 @@ public class PrisonManager extends AbstractNpcAI public PrisonManager() { - addFirstTalkId(34637, 34638, 34639, 34640); - addTalkId(34637, 34638, 34639, 34640); + addFirstTalkId(MORENDO, POMPOSO, DOLLOROSO, DOLCE, CANTABILE, AMOROSO, DELICATO, COMODO); + addTalkId(MORENDO, POMPOSO, DOLLOROSO, DOLCE, CANTABILE, AMOROSO, DELICATO, COMODO); addEnterZoneId(PRISON_ZONE_1.getId(), PRISON_ZONE_2.getId(), PRISON_ZONE_3.getId(), PRISON_ENTER_ZONE.getId(), PRISON_ENTER_ZONE2.getId()); addExitZoneId(PRISON_ZONE_1.getId(), PRISON_ZONE_2.getId(), PRISON_ZONE_3.getId(), PRISON_ENTER_ZONE2.getId()); } @@ -68,6 +78,10 @@ public class PrisonManager extends AbstractNpcAI case "34639-no.html": case "34640.html": case "34640-no.html": + case "34641.html": + case "34642.html": + case "34643.html": + case "34644.html": { htmltext = event; break; diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index d3d1a6bbcf..6c678e8c19 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java index 4289e955d0..5d832a0a04 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java @@ -302,7 +302,20 @@ public class Eraton extends AbstractNpcAI takeItem(player, STONE_OF_DESTINY); takeItem(player, getCloakItemId(player)); - player.removeAllSkills(); + if (Config.ERATON_RETAINED_SKILLS.isEmpty()) + { + player.removeAllSkills(); + } + else + { + for (Skill skill : player.getAllSkills()) + { + if (!Config.ERATON_RETAINED_SKILLS.contains(skill.getId())) + { + player.removeSkill(skill); + } + } + } // Stop auto use. for (Shortcut shortcut : player.getAllShortCuts()) diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/EffectMasterHandler.java index e8c77fe7a0..4ebfe9eab4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -44,6 +44,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); @@ -203,6 +205,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("Ignition", Ignition::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); @@ -242,7 +245,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_10.3_MasterClass/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java index ffc903fd3f..bc95845925 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 816eb1b58b..98c4196ce6 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -49,6 +49,10 @@ 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.Pet; +import org.l2jmobius.gameserver.model.events.EventDispatcher; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeExalted; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse; import org.l2jmobius.gameserver.model.html.PageBuilder; import org.l2jmobius.gameserver.model.html.PageResult; import org.l2jmobius.gameserver.model.skill.Skill; @@ -913,12 +917,22 @@ public class AdminEditChar implements IAdminCommandHandler { player.setNobleLevel(1); player.sendMessage("A GM added you nobless status!"); + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player)); + } break; } case 1: { player.setNobleLevel(2); player.sendMessage("A GM changed your nobless status to exalted!"); + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_EXALTED)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeExalted(player)); + } break; } case 2: diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 951002a2c2..35bfbcb6bc 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java index 03d9e8638b..634ea96c64 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 7e02e79abc..bff5a1734b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index 70789354f3..fd41f09a9a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index df05ef8607..b36b10a92e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetAttack.java index 78afa14171..460794e0f9 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_10.3_MasterClass/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_DON_T_HAVE_A_PET); return; } - final Pet pet = player.getPet(); if (pet.isUncontrollable()) { player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_SATIETY_REACHES_0_YOU_CANNOT_CONTROL_IT); + 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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetHold.java index 3cf51c6732..f5dbe68b37 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetMove.java index 9a029500f5..4a83d05bee 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index aa2c460865..e1a6c3faa1 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetStop.java index 4acdbddc02..0de74af5e4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 71d72e95b5..3e0acb89bd 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_10.3_MasterClass/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_DON_T_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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index fd0953d418..5bad03632b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index eb824d4851..9d7e480224 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index 919affb65d..44bed3a205 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index 7bd8e67c69..9386b57231 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 4c486d17d6..dca5d3231c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index 6a502a1f73..70384d677c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index eb845aa177..46d56ed110 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java @@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR); } } + + @Override + public boolean isPetAction() + { + return true; + } } diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java new file mode 100644 index 0000000000..3ab0d0bb69 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index 50b51c6455..16d1cae60c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/MissingQuests.txt index 25d0ed1f72..22716774be 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/MissingQuests.txt @@ -50,10 +50,6 @@ 1901 Storm Isle - Furtive Deal 10595 The Dimensional Warp, Part 8 10596 The Dimensional Warp, Part 9 -10904 Journey to the Conquest World -10905 Hunting Time -10906 Chasing the Light -10907 Where Flowers Blossom 11028 Wind of Destiny - Encounter 11029 Wind of Destiny - Promise 11030 Wind of Destiny - Choice \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java index 0d1d38c891..29426b05de 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java index 4d2155c8eb..b296c99fa4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java @@ -25,6 +25,9 @@ import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventDispatcher; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse; import org.l2jmobius.gameserver.model.holders.ItemHolder; import org.l2jmobius.gameserver.model.holders.SkillHolder; import org.l2jmobius.gameserver.model.quest.Quest; @@ -209,6 +212,7 @@ public class Q10591_NobleMaterial extends Quest giveItems(player, WARRIOR_CICLET_BOX_LV5, 1); basicRewards(player); player.setNobleLevel(1); + checkNobleListener(player); player.broadcastInfo(); showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName()); player.doCast(NOBLESSE_PRESENTATION.getSkill()); @@ -225,6 +229,7 @@ public class Q10591_NobleMaterial extends Quest giveItems(player, WIZARD_CICLET_BOX_LV5, 1); basicRewards(player); player.setNobleLevel(1); + checkNobleListener(player); player.broadcastInfo(); showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName()); player.doCast(NOBLESSE_PRESENTATION.getSkill()); @@ -241,6 +246,7 @@ public class Q10591_NobleMaterial extends Quest giveItems(player, KNIGHT_CICLET_BOX_LV5, 1); basicRewards(player); player.setNobleLevel(1); + checkNobleListener(player); player.broadcastInfo(); showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName()); player.doCast(NOBLESSE_PRESENTATION.getSkill()); @@ -573,4 +579,13 @@ public class Q10591_NobleMaterial extends Quest } } } + + private void checkNobleListener(Player player) + { + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player)); + } + } } diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm index 3314d03969..5094a407f3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm new file mode 100644 index 0000000000..e7fc7b5818 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html deleted file mode 100644 index 9d262558f5..0000000000 --- a/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm new file mode 100644 index 0000000000..32f35f5524 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html deleted file mode 100644 index 5eeee527eb..0000000000 --- a/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm deleted file mode 100644 index 216047fa2e..0000000000 --- a/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html new file mode 100644 index 0000000000..30f55b94dd --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html deleted file mode 100644 index 59c38eaca9..0000000000 --- a/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html deleted file mode 100644 index 66e7889930..0000000000 --- a/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java index e19b7a6488..9a054202bc 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java +++ b/L2J_Mobius_10.3_MasterClass/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, 90638, 82); 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_10.3_MasterClass/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html index 37b0c2b30c..7d977a4778 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-00.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-00.html new file mode 100644 index 0000000000..c9012038ad --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-00.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+I don't see any invitation from Conquest Guide Chloe, make sure you bring that to me. + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-01.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-01.htm new file mode 100644 index 0000000000..cb3365b298 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-01.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you brought the invitation that Conquest Guide Chloe gave you? + + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-02.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-02.html new file mode 100644 index 0000000000..a079e26eae --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-02.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Oh! Let me see if it's genuine, come back later.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-03.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-03.htm new file mode 100644 index 0000000000..6fb447dcef --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Checking the invitation...
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-04.html new file mode 100644 index 0000000000..673c255fff --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-04.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Great! You have brought the right one, here is your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-00.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-00.html new file mode 100644 index 0000000000..27ec4acf46 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-00.html @@ -0,0 +1,5 @@ +Conquest Guide Chloe:
+Hello, adventurer!
+I have no news for you. There's nothing I can tell you.
+(Available to characters of Lv. 110+.)
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-01.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-01.htm new file mode 100644 index 0000000000..e1ffb19ff5 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Chloe:
+Hello, adventurer!
+The most upstanding warriors receive an invitation to visit a new world - the Conquest.
+To learn more, go to Conquest Town and talk to Entropy.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-02.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-02.html new file mode 100644 index 0000000000..69730173ee --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-02.html @@ -0,0 +1,4 @@ +Conquest Guide Chloe:
+You can go now,
+you must give the invitation to Conquest Guide Entropy, in the Conquest Town.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/Q10904_JourneyToTheConquestWorld.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/Q10904_JourneyToTheConquestWorld.java new file mode 100644 index 0000000000..a720ce3330 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/Q10904_JourneyToTheConquestWorld.java @@ -0,0 +1,144 @@ +/* + * 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 quests.Q10904_JourneyToTheConquestWorld; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +/** + * @author CostyKiller + */ +public class Q10904_JourneyToTheConquestWorld extends Quest +{ + // NPCs + private static final int ENTROPY = 34599; + private static final int CHLOE = 34600; + // Items + private static final int CONQUEST_NAME_CHANGE_COUPON = 81979; + private static final int CHLOE_INVITATION = 82176; + // Misc + private static final int MIN_LEVEL = 110; + + public Q10904_JourneyToTheConquestWorld() + { + super(10904); + addStartNpc(CHLOE); + addTalkId(CHLOE, ENTROPY); + addCondMinLevel(MIN_LEVEL, "34600-00.html"); + registerQuestItems(CHLOE_INVITATION); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34600-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + giveItems(player, CHLOE_INVITATION, 1); + htmltext = event; + } + break; + } + case "34599-02.html": + { + if (qs.isCond(1) && (hasQuestItems(player, CHLOE_INVITATION))) + { + takeItems(player, -1, CHLOE_INVITATION); + qs.setCond(2); + htmltext = event; + } + break; + } + case "34599-04.html": + { + if (qs.isCond(2)) + { + giveItems(player, CONQUEST_NAME_CHANGE_COUPON, 1); + qs.exitQuest(false, true); + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == CHLOE) + { + htmltext = "34600-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case CHLOE: + { + if (qs.isCond(1)) + { + htmltext = "34600-02.html"; + } + break; + } + case ENTROPY: + { + if (qs.isCond(1)) + { + htmltext = "34599-01.htm"; + } + else if (qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-00.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-00.html new file mode 100644 index 0000000000..975f1f53b9 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-00.html @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-01.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-01.htm new file mode 100644 index 0000000000..b5b1ebc72a --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+You must learn about Conquest World, there are three zones out there and you must hunt in each one of them.
+Defeat the specified number of monsters in each of the following zones: 600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).
+Monsters to hunt: all monsters in water hunting zones of the Conquest world.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-02.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-02.html new file mode 100644 index 0000000000..1641d5e7f1 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-02.html @@ -0,0 +1,5 @@ +Conquest Guide Entropy:
+Defeat the specified number of monsters in each of the following zones: 600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).
+Monsters to hunt: all monsters in water hunting zones of the Conquest world.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-03.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-03.htm new file mode 100644 index 0000000000..94fd846b39 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you killed all the monsters?
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-04.html new file mode 100644 index 0000000000..fe78df4a7a --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-04.html @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+Don't try to foul me...
+Defeat the specified number of monsters in each of the following zones: 600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).
+Monsters to hunt: all monsters in water hunting zones of the Conquest world.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-05.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-05.html new file mode 100644 index 0000000000..d3902cf585 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-05.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/Q10905_HuntingTime.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/Q10905_HuntingTime.java new file mode 100644 index 0000000000..dbaa7de9ce --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10905_HuntingTime/Q10905_HuntingTime.java @@ -0,0 +1,345 @@ +/* + * 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 quests.Q10905_HuntingTime; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10905_HuntingTime extends Quest +{ + // NPC + private static final int ENTROPY = 34599; + // Monsters + private static final int[] MONSTERS_OUTER_CASTLE = + { + // Daril's Water Source (Lv. 112) + 27701, // Daril + 27702, // Atron + 27703, // Seo + 27704, // Craigo + 27705, // Kiku + 27706, // Floato + // Daril Phran's Water Source (Lv. 116) + 27707, // Daril Phran + 27708, // Atron Phran + 27709, // Seo Phran + 27710, // Craigo Phran + 27711, // Kiku Phran + 27712, // Floato Phran + }; + private static final int[] MONSTERS_ASA = + { + // Asa Area 1 (Lv. 116) + 27713, // Daril Asa Ar + 27714, // Seo Asa Ar + 27715, // Floato Asa Ar + 27716, // Asa Ar Hunter + 27717, // Asa Ar Sorceress + 27718, // Saida Asa Ar + 19830, // Luminous Soul + // Asa Area 2 (Lv. 120) + 27719, // Atron Asa Mide + 27720, // Craigo Asa Mide + 27721, // Kerberos Asa Mide + 27722, // Asa Mide Hunter + 27723, // Asa Mide Sorceress + 27724, // Saida Asa Mide + 27725, // Asa Mide Blader + // Asa Area 3 (Lv. 124) + 27726, // Atron Asa Telro + 27727, // Craigo Asa Telro + 27728, // Beor Asa Telro + 27729, // Asa Telro Hunter + 27730, // Asa Telro Sorceress + 27731, // Saida Asa Telro + 27732, // Asa Telro Blader + 27733, // Asa Telro Guard + }; + private static final int[] MONSTERS_ANIMA = + { + // Anima Area 1 (Lv. 116) + 27755, // Daril Anima Ar + 27756, // Seo Anima Ar + 27757, // Floato Anima Ar + 27758, // Anima Ar Hunter + 27759, // Anima Ar Sorceress + 27760, // Saida Anima Ar + // Anima Area 2 (Lv. 120) + 27761, // Atron Anima Mide + 27762, // Craigo Anima Mide + 27763, // Kerberos Anima Mide + 27764, // Anima Mide Hunter + 27765, // Anima Mide Sorceress + 27766, // Saida Anima Mide + 27767, // Anima Mide Blader + // Anima Area 3 (Lv. 124) + 27768, // Atron Anima Telro + 27769, // Craigo Anima Telro + 27770, // Beor Anima Telro + 27771, // Anima Telro Hunter + 27772, // Anima Telro Sorceress + 27773, // Saida Anima Telro + 27774, // Anima Telro Blader + 27775, // Anima Telro Guard + }; + private static final int[] MONSTERS_NOX = + { + // Nox Area 1 (Lv. 116) + 27734, // Daril Nox Ar + 27735, // Seo Nox Ar + 27736, // Floato Nox Ar + 27737, // Nox Ar Hunter + 27738, // Nox Ar Sorceress + 27739, // Saida Nox Ar + // Nox Area 2 (Lv. 120) + 27740, // Atron Nox Mide + 27741, // Craigo Nox Mide + 27742, // Kerberos Nox Mide + 27743, // Nox Mide Hunter + 27744, // Nox Mide Sorceress + 27745, // Saida Nox Mide + 27746, // Nox Mide Blader + // Nox Area 3 (Lv. 124) + 27747, // Atron Nox Telro + 27748, // Craigo Nox Telro + 27749, // Beor Nox Telro + 27750, // Nox Telro Hunter + 27751, // Nox Telro Sorceress + 27752, // Saida Nox Telro + 27753, // Nox Telro Blader + 27754, // Nox Telro Guard + }; + // Misc + private static final int MIN_LEVEL = 110; + private static final String KILL_COUNT_VAR_OUTER_CASTLE = "KillCountOuterCastle"; + private static final String KILL_COUNT_VAR_ASA = "KillCountAsa"; + private static final String KILL_COUNT_VAR_ANIMA = "KillCountAnima"; + private static final String KILL_COUNT_VAR_NOX = "KillCountNox"; + // Monsters Kill Target + private static final int MAX_KILLED_MOBS_OUTER_CASTLE = 600; + private static final int MAX_KILLED_MOBS_ASA = 600; + private static final int MAX_KILLED_MOBS_ANIMA = 600; + private static final int MAX_KILLED_MOBS_NOX = 600; + + public Q10905_HuntingTime() + { + super(10905); + addStartNpc(ENTROPY); + addTalkId(ENTROPY); + addKillId(MONSTERS_OUTER_CASTLE); + addKillId(MONSTERS_ASA); + addKillId(MONSTERS_ANIMA); + addKillId(MONSTERS_NOX); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html"); + addCondMinLevel(MIN_LEVEL, "34599-00.html"); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34599-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34599-05.html": + { + if (qs.isCond(2)) + { + addExpAndSp(player, 26617381116L, 23955643); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34599-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ENTROPY) + { + htmltext = "34599-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ENTROPY: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + final Party party = killer.getParty(); + if (party != null) + { + for (Player member : party.getMembers()) + { + final QuestState qs = getQuestState(member, false); + if (qs != null) + { + processKill(npc, member); + } + } + } + else + { + processKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void processKill(Npc npc, Player killer) + { + final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc); + if (qs != null) + { + final Player player = qs.getPlayer(); + final int killCountOuterCastle = qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE); + final int killCountAsa = qs.getInt(KILL_COUNT_VAR_ASA); + final int killCountAnima = qs.getInt(KILL_COUNT_VAR_ANIMA); + final int killCountNox = qs.getInt(KILL_COUNT_VAR_NOX); + + if (CommonUtil.contains(MONSTERS_OUTER_CASTLE, npc.getId())) + { + if (killCountOuterCastle < MAX_KILLED_MOBS_OUTER_CASTLE) + { + qs.set(KILL_COUNT_VAR_OUTER_CASTLE, killCountOuterCastle + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_ASA, npc.getId())) + { + if (killCountAsa < MAX_KILLED_MOBS_ASA) + { + qs.set(KILL_COUNT_VAR_ASA, killCountAsa + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_ANIMA, npc.getId())) + { + if (killCountAnima < MAX_KILLED_MOBS_ANIMA) + { + qs.set(KILL_COUNT_VAR_ANIMA, killCountAnima + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_NOX, npc.getId())) + { + if (killCountNox < MAX_KILLED_MOBS_NOX) + { + qs.set(KILL_COUNT_VAR_NOX, killCountNox + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + + sendNpcLogList(player); + } + } + + private void checkKillProgress(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE) >= MAX_KILLED_MOBS_OUTER_CASTLE) && (qs.getInt(KILL_COUNT_VAR_ASA) >= MAX_KILLED_MOBS_ASA) && (qs.getInt(KILL_COUNT_VAR_ANIMA) >= MAX_KILLED_MOBS_ANIMA) && (qs.getInt(KILL_COUNT_VAR_NOX) >= MAX_KILLED_MOBS_NOX)) + { + qs.setCond(2, true); + playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE); + } + } + + @Override + public Set getNpcLogList(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_OUTER_CASTLE.getId(), true, qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_ASA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_ASA))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_ANIMA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_ANIMA))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_NOX_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_NOX))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-00.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-00.html new file mode 100644 index 0000000000..975f1f53b9 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-00.html @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-01.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-01.htm new file mode 100644 index 0000000000..18c376a9c8 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+You must learn about a new way to succeed in conquering the Conquest world.
+Defeat 30 Luminous Souls that can be encountered in certain zones of the Conquest world, and collect their fragments.
+Monster to hunt: Luminous Soul.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-02.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-02.html new file mode 100644 index 0000000000..714d176159 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-02.html @@ -0,0 +1,5 @@ +Conquest Guide Entropy:
+Defeat 30 Luminous Souls that can be encountered in certain zones of the Conquest world, and collect their fragments.
+Monster to hunt: Luminous Soul.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-03.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-03.htm new file mode 100644 index 0000000000..375c0e8783 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you collected all the required luminous soul fragments?
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-04.html new file mode 100644 index 0000000000..52892111fa --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-04.html @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+Don't try to foul me...
+Defeat 30 Luminous Souls that can be encountered in certain zones of the Conquest world, and collect their fragments.
+Monster to hunt: Luminous Soul.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-05.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-05.html new file mode 100644 index 0000000000..d3902cf585 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-05.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/Q10906_ChasingTheLight.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/Q10906_ChasingTheLight.java new file mode 100644 index 0000000000..8fa1226328 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10906_ChasingTheLight/Q10906_ChasingTheLight.java @@ -0,0 +1,164 @@ +/* + * 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 quests.Q10906_ChasingTheLight; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10906_ChasingTheLight extends Quest +{ + // NPC + private static final int ENTROPY = 34599; + // Monsters + private static final int[] MONSTERS = + { + 19830, // Luminous Soul - Asa Area 1 (Lv. 116) + 19832, // Luminous Soul - Anima Area 1 (Lv. 116) + 19831, // Luminous Soul - Nox Area 1 (Lv. 116) + }; + // Item + private static final int LUMINOUS_SOUL_FRAGMENT = 82177; + // Misc + private static final int MIN_LEVEL = 110; + private static final int LUMINOUS_SOUL_FRAGMENT_NEEDED = 30; + + public Q10906_ChasingTheLight() + { + super(10906); + addStartNpc(ENTROPY); + addTalkId(ENTROPY); + addKillId(MONSTERS); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html"); + addCondMinLevel(MIN_LEVEL, "34599-00.html"); + registerQuestItems(LUMINOUS_SOUL_FRAGMENT); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34599-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34599-05.html": + { + if (qs.isCond(2)) + { + takeItems(player, LUMINOUS_SOUL_FRAGMENT, 30); + addExpAndSp(player, 8872460372L, 7985214); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34599-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ENTROPY) + { + htmltext = "34599-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ENTROPY: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + executeForEachPlayer(player, npc, isSummon, true, false); + return super.onKill(npc, player, isSummon); + } + + @Override + public void actionForEachPlayer(Player player, Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE)) + { + if (getQuestItemsCount(player, LUMINOUS_SOUL_FRAGMENT) < LUMINOUS_SOUL_FRAGMENT_NEEDED) + { + giveItems(player, LUMINOUS_SOUL_FRAGMENT, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (getQuestItemsCount(player, LUMINOUS_SOUL_FRAGMENT) >= LUMINOUS_SOUL_FRAGMENT_NEEDED) + { + qs.setCond(2, true); + } + } + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-00.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-00.html new file mode 100644 index 0000000000..975f1f53b9 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-00.html @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-01.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-01.htm new file mode 100644 index 0000000000..0b29b2dda9 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+I need you to bring me petals of the special flowers that grow only in the Conquest world.
+Defeat 120 Soul Flowers that sometimes appear while hunting monsters in the Conquest world, and gather their petals.
+Monster to hunt: Soul Flower.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-02.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-02.html new file mode 100644 index 0000000000..c715627758 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-02.html @@ -0,0 +1,5 @@ +Conquest Guide Entropy:
+Defeat 120 Soul Flowers that sometimes appear while hunting monsters in the Conquest world, and gather their petals.
+Monster to hunt: Soul Flower.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-03.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-03.htm new file mode 100644 index 0000000000..800061b434 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you gathered all the required flower petals?
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-04.html new file mode 100644 index 0000000000..376cf18f5e --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-04.html @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+Don't try to foul me...
+Defeat 120 Soul Flowers that sometimes appear while hunting monsters in the Conquest world, and gather their petals.
+Monster to hunt: Soul Flower.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-05.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-05.html new file mode 100644 index 0000000000..d3902cf585 --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-05.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/Q10907_WhereFlowersBlossom.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/Q10907_WhereFlowersBlossom.java new file mode 100644 index 0000000000..bf7448011d --- /dev/null +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/Q10907_WhereFlowersBlossom.java @@ -0,0 +1,172 @@ +/* + * 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 quests.Q10907_WhereFlowersBlossom; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10907_WhereFlowersBlossom extends Quest +{ + // NPC + private static final int ENTROPY = 34599; + // Monsters + private static final int[] MONSTERS = + { + 19818, // Soul Flower - Asa Area 1 (Lv. 116) + 19819, // Soul Flower - Asa Area 2 (Lv. 120) + 19820, // Soul Flower - Asa Area 3 (Lv. 124) + 19824, // Soul Flower - Anima Area 1 (Lv. 116) + 19825, // Soul Flower - Anima Area 2 (Lv. 120) + 19826, // Soul Flower - Anima Area 3 (Lv. 124) + 19821, // Soul Flower - Nox Area 1 (Lv. 116) + 19822, // Soul Flower - Nox Area 2 (Lv. 120) + 19823, // Soul Flower - Nox Area 3 (Lv. 124) + 19840, // Soul Flower - Vita (Lv. 124) + 19841, // Soul Flower - Ignis (Lv. 128) + }; + // Item + private static final int SOUL_FLOWER_PETAL = 82178; + // Misc + private static final int MIN_LEVEL = 110; + private static final int SOUL_FLOWER_PETAL_NEEDED = 120; + + public Q10907_WhereFlowersBlossom() + { + super(10907); + addStartNpc(ENTROPY); + addTalkId(ENTROPY); + addKillId(MONSTERS); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html"); + addCondMinLevel(MIN_LEVEL, "34599-00.html"); + registerQuestItems(SOUL_FLOWER_PETAL); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34599-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34599-05.html": + { + if (qs.isCond(2)) + { + takeItems(player, SOUL_FLOWER_PETAL, 120); + addExpAndSp(player, 8872460372L, 7985214); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34599-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ENTROPY) + { + htmltext = "34599-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ENTROPY: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + executeForEachPlayer(player, npc, isSummon, true, false); + return super.onKill(npc, player, isSummon); + } + + @Override + public void actionForEachPlayer(Player player, Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE)) + { + if (getQuestItemsCount(player, SOUL_FLOWER_PETAL) < SOUL_FLOWER_PETAL_NEEDED) + { + giveItems(player, SOUL_FLOWER_PETAL, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (getQuestItemsCount(player, SOUL_FLOWER_PETAL) >= SOUL_FLOWER_PETAL_NEEDED) + { + qs.setCond(2, true); + } + } + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java index 5d9caef35d..d5d956a12f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java @@ -614,7 +614,7 @@ public class Q11025_PathOfDestinyProving extends Quest holder.add(new NpcLogListHolder(NpcStringId.KILL_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_10.3_MasterClass/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java index 4a31dde5c2..1154f7ab9a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java @@ -312,7 +312,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT1); } - htmltext = event; break; } case "teleport2": @@ -321,7 +320,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT2); } - htmltext = event; break; } case "teleport3": @@ -330,7 +328,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT3); } - htmltext = event; break; } case "teleport4": @@ -339,7 +336,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT4); } - htmltext = event; break; } case "teleport5": @@ -348,10 +344,8 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT5); } - htmltext = event; break; } - } return htmltext; } diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html index 34fcecd6d8..a0fbc4196d 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html +++ b/L2J_Mobius_10.3_MasterClass/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.
\ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/QuestMasterHandler.java index bb0b01e84b..d78eee9929 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -60,6 +60,10 @@ import quests.Q10887_SaviorsPathDemonsAndAtelia.Q10887_SaviorsPathDemonsAndAteli import quests.Q10888_SaviorsPathDefeatTheEmbryo.Q10888_SaviorsPathDefeatTheEmbryo; import quests.Q10889_SaviorsPathFallenEmperorsThrone.Q10889_SaviorsPathFallenEmperorsThrone; import quests.Q10890_SaviorsPathHallOfEtina.Q10890_SaviorsPathHallOfEtina; +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; +import quests.Q10905_HuntingTime.Q10905_HuntingTime; +import quests.Q10906_ChasingTheLight.Q10906_ChasingTheLight; +import quests.Q10907_WhereFlowersBlossom.Q10907_WhereFlowersBlossom; import quests.Q11024_PathOfDestinyBeginning.Q11024_PathOfDestinyBeginning; import quests.Q11025_PathOfDestinyProving.Q11025_PathOfDestinyProving; import quests.Q11026_PathOfDestinyConviction.Q11026_PathOfDestinyConviction; @@ -75,10 +79,6 @@ import quests.not_done.Q01900_StormIsleSecretSpot; import quests.not_done.Q01901_StormIsleFurtiveDeal; import quests.not_done.Q10595_TheDimensionalWarpPart8; import quests.not_done.Q10596_TheDimensionalWarpPart9; -import quests.not_done.Q10904_JourneyToTheConquestWorld; -import quests.not_done.Q10905_HuntingTime; -import quests.not_done.Q10906_ChasingTheLight; -import quests.not_done.Q10907_WhereFlowersBlossom; import quests.not_done.Q11028_WindOfDestinyEncounter; import quests.not_done.Q11029_WindOfDestinyPromise; import quests.not_done.Q11030_WindOfDestinyChoice; @@ -144,10 +144,10 @@ public class QuestMasterHandler Q10888_SaviorsPathDefeatTheEmbryo.class, Q10889_SaviorsPathFallenEmperorsThrone.class, Q10890_SaviorsPathHallOfEtina.class, - Q10904_JourneyToTheConquestWorld.class, // TODO: Not done. - Q10905_HuntingTime.class, // TODO: Not done. - Q10906_ChasingTheLight.class, // TODO: Not done. - Q10907_WhereFlowersBlossom.class, // TODO: Not done. + Q10904_JourneyToTheConquestWorld.class, + Q10905_HuntingTime.class, + Q10906_ChasingTheLight.class, + Q10907_WhereFlowersBlossom.class, Q11028_WindOfDestinyEncounter.class, // TODO: Not done. Q11029_WindOfDestinyPromise.class, // TODO: Not done. Q11030_WindOfDestinyChoice.class, // TODO: Not done. diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml index 32f1b84456..404b7b2566 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml @@ -425,33 +425,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -698,24 +671,4 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml index 805daf70ba..7da3cdc129 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml @@ -1,1183 +1,636 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipment.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipment.xml index 026e3ef986..0f8028ab8f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipment.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipment.xml @@ -170,8 +170,5 @@ - - - \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipmentEvent.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipmentEvent.xml index 1a47100d7f..1c8435d4d3 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipmentEvent.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/initialEquipmentEvent.xml @@ -2,9 +2,12 @@ - - - + + + + + + @@ -12,183 +15,218 @@ - + + + - - - + + + + + + - + - - - + + + + + + - - + + + - - - + + + + + + - + - - - + + + + + + - - + + + - - - + + + + + + - + - - - + + + + + + - - + - - - + + + + + + - + - - - - + + + + + + - + - - - + + + + + + - - + - - - + + + + + + - - + - - - + + + + + + - - - - + + + + + + - - - - + + + + + + - - \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/46200-46299.xml index ff5d3488b8..8e79aebdbe 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/46200-46299.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/46200-46299.xml @@ -796,14 +796,19 @@ + + + - - - + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60300-60399.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60300-60399.xml index dcf100a62e..e1efbbf377 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60300-60399.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60300-60399.xml @@ -333,6 +333,7 @@ + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60400-60499.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60400-60499.xml index 53be6d57ac..2d8a8f2b1a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60400-60499.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/60400-60499.xml @@ -1141,9 +1141,18 @@ - + + + + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80500-80599.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80500-80599.xml index 2b8268c102..6110fbbb40 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80500-80599.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80500-80599.xml @@ -382,6 +382,13 @@ + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80800-80899.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80800-80899.xml index 3068db50e9..e95e5baf00 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80800-80899.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/80800-80899.xml @@ -242,6 +242,7 @@ + @@ -263,6 +264,7 @@ + @@ -284,6 +286,7 @@ + @@ -299,6 +302,7 @@ + @@ -307,6 +311,7 @@ + @@ -323,7 +328,24 @@ + + + + + + + + + + + + + + + + + @@ -439,25 +461,21 @@ + + - - - - - - - - - - + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81000-81099.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81000-81099.xml index 28915b98b4..e9c419601f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81000-81099.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81000-81099.xml @@ -260,8 +260,15 @@ + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81600-81699.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81600-81699.xml index 3ba6915fd6..abf2b89c3e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81600-81699.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/81600-81699.xml @@ -1080,6 +1080,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82100-82199.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82100-82199.xml index 23da2a68c5..e9b6b73bbd 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82100-82199.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82100-82199.xml @@ -827,34 +827,63 @@ - + + + + + + + + - + + + + + + + + + - + + + + + + + + + - + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82200-82299.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82200-82299.xml index 5216370340..31394d9ec0 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82200-82299.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/82200-82299.xml @@ -1443,7 +1443,7 @@ - + @@ -1458,7 +1458,7 @@ - + @@ -1638,8 +1638,15 @@ + + + + + + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/33900-33999.xml index 93b9b554c6..1b1267553b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/33900-33999.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/33900-33999.xml @@ -3776,9 +3776,9 @@ - - - + + + @@ -3789,7 +3789,7 @@ - + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/34000-34099.xml index b1a1c0cad9..1b5ff21899 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/34000-34099.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/npcs/34000-34099.xml @@ -39,7 +39,7 @@ - + FRIEND FEMALE @@ -58,7 +58,7 @@ - + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/10500-10599.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/10500-10599.xml index 15d33a8d90..97666cb586 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/10500-10599.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/10500-10599.xml @@ -848,6 +848,8 @@ 9832 10268 10704 + 10704 + 10704 365 true diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/16300-16399.xml index b5851bf6f4..895cd4a965 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/16300-16399.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/16300-16399.xml @@ -801,6 +801,22 @@ 5000 -150 true + 80 + 900 + PHYSICAL + ENEMY + SINGLE + PULL + + + + 100 + + + 600 + 600 + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18400-18499.xml index af1f979d70..fa7edfd0a5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18400-18499.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18400-18499.xml @@ -885,8 +885,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_10.3_MasterClass/dist/game/data/stats/skills/18500-18599.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18500-18599.xml index 14625d6c75..5b4e7c35a5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18500-18599.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18500-18599.xml @@ -803,10 +803,12 @@ SKILL_IGNORE ABNORMAL_INVINCIBILITY + ABNORMAL_INVINCIBILITY 2 3 + 4 7 1000 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22500-22599.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22500-22599.xml index 139da35b33..feaa2c9ed4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22500-22599.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22500-22599.xml @@ -1578,7 +1578,7 @@ 22883 22884 - 22885 + 22885 1 3600000 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22700-22799.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22700-22799.xml index b219397603..e40e6c3a34 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22700-22799.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/22700-22799.xml @@ -297,7 +297,7 @@ 23338 23339 - 23340 + 23340 1 3600000 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/27500-27599.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/27500-27599.xml index 72ef52b94f..ebd44c864c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/27500-27599.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/27500-27599.xml @@ -2735,10 +2735,12 @@ SKILL_IGNORE ABNORMAL_INVINCIBILITY + ABNORMAL_INVINCIBILITY 2 3 + 4 7 1000 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30000-30099.xml index 02f17315cd..843cab2df2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30000-30099.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30000-30099.xml @@ -2036,8 +2036,8 @@ P 85 - - 550 + + 350 DIFF diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30700-30799.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30700-30799.xml index 13dc5353c3..9717166a85 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30700-30799.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30700-30799.xml @@ -3207,6 +3207,7 @@ 90 95 110 + 110 NONE 5 diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30800-30899.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30800-30899.xml index 2ec2f4ab16..ba718db119 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30800-30899.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/30800-30899.xml @@ -2269,7 +2269,7 @@ H_DEBUFF_SELF_B_AVE 110 - 115 + 115 5 AU diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39100-39199.xml index 285eebd5e9..18fc22ef68 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39100-39199.xml @@ -52,12 +52,14 @@ 2 3 4 + 5 3600 7200 21600 28800 + 28800 CHANGEBODY CHANGESHAPE_TRANSFORM diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39200-39299.xml index a11be52fb3..18a206f7a2 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39200-39299.xml @@ -46,6 +46,7 @@ icon.bm_dragon_posion_special A2 2 + 1000 500 300000 GLOWING_DRAGON_POTION @@ -115,8 +116,10 @@ - 30 - 50 + + 30 + 50 + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39400-39499.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39400-39499.xml index 36f6cb53b1..3903492b0b 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39400-39499.xml +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/dist/game/data/stats/skills/39500-39599.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39500-39599.xml index f7c6007df1..0906121380 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39500-39599.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39500-39599.xml @@ -170,6 +170,8 @@ true true true + -5 + false 25 @@ -232,6 +234,26 @@ PER 1 + + -15 + PER + 0 + + + -15 + PER + 3 + + + -15 + PER + 2 + + + -15 + PER + 22 + 100 DIFF @@ -252,7 +274,7 @@ 22 - MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL + MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL;BUFF_SPECIAL_CLASS 100 @@ -265,8 +287,113 @@ icon.soul_spirit1 A2 100 - 2000 100 + BUFF_SPECIAL_CLASS + NONE + 5 + 85 + 1 + 420 + 2 + 2000 + SELF + SINGLE + + + 22 + PER + + + 40 + PER + + + 45 + PER + + + 15 + PER + + + 100 + PER + + + 100 + PER + + + 70 + PER + + + 10 + PER + + + 15 + PER + + + 50 + PER + + + 30 + PER + + + -15 + PER + 1 + + + -15 + PER + 0 + + + -15 + PER + 3 + + + -15 + PER + 2 + + + -15 + PER + 22 + + + -20 + PER + 1 + + + -20 + PER + 0 + + + -20 + PER + 22 + + + 30833 + + + MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL;BUFF_SPECIAL_CLASS + 100 + + + MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL;BUFF_SPECIAL_CLASS + + @@ -298,6 +425,8 @@ true true true + -5 + false 10 @@ -357,19 +486,81 @@ icon.bm_special_cocktail_of_king_p - A1 + A2 + + 3600 + 14400 + 28800 + + 1 + NONE + 7 + -2 + -2 + 2 + SELF + SINGLE + true + true + true + -5 + false 5000 + + + BUFF_SPECIAL_CLASS;DITTY;BUFF_SPECIAL_ATTACK;BUFF_SPECIAL_AURA;ARMOR_ELEMENT_ALL + 100 + + + 39514 + 1 + + + 39517 + 1 + + + 39766 + 1 + + + 39771 + 1 + + + 39772 + 1 + + + + + BUFF_SPECIAL_CLASS;DITTY;BUFF_SPECIAL_ATTACK;BUFF_SPECIAL_AURA;ARMOR_ELEMENT_ALL + 100 + + icon.bm_special_cocktail_of_king_p - A1 + A2 + 3600 + 1 + NONE + 7 + -2 + -2 + 22 + SELF + SINGLE + true + true + true 5000 icon.bm_special_cocktail_of_king_p - A1 + A2 5000 @@ -1189,11 +1380,16 @@ icon.armor_t2000_b_i00 - A1 + A2 + 86400 + CGRADE_CHANGE 4 1500 5000 780 + 1 + 81016 + true diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39700-39799.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39700-39799.xml index 70e95b11ca..db7f6b4b6c 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39700-39799.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/39700-39799.xml @@ -1067,6 +1067,11 @@ PER 3 + + -10 + PER + 22 + 9 30 @@ -1193,6 +1198,16 @@ PER 0 + + -22 + PER + 2 + + + -22 + PER + 22 + 8 30 @@ -1515,7 +1530,33 @@ icon.bless_scroll - A1 + A2 + 1 + 1800 + FREYA_SCROLL_VIT + 82295 + 1 + 4 + SELF + SINGLE + true + + + 100 + + + 150 + + + 150 + + + -100 + + + EXP_SPECIAL,-1;DANDY_CHALLENGE,-1;SANTIAGO_SCROLL,-1 + + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/documentation.txt index 9082ef31f6..f7159c901e 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/documentation.txt @@ -12,6 +12,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. @@ -169,11 +171,12 @@ 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. Ignition: Transforms sword to Death Knight's Flame Sword. (l2jmobius) 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. @@ -212,7 +215,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. @@ -277,6 +279,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_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd index 02d5bc1963..56b8adce72 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd @@ -24,6 +24,7 @@ + @@ -40,6 +41,7 @@ + diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/skills.xsd b/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/skills.xsd index 846e558dd4..c4a4a7605a 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/skills.xsd @@ -2722,6 +2722,9 @@ + + + diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/Config.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/Config.java index a6055301b3..0a0d90a72e 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/Config.java @@ -611,6 +611,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 AbnormalVisualEffect BLUE_TEAM_ABNORMAL_EFFECT; public static AbnormalVisualEffect RED_TEAM_ABNORMAL_EFFECT; @@ -841,6 +842,9 @@ public class Config public static boolean HARDIN_ENABLE_ERTHEIAS; public static Map> HARDIN_REMOVED_SKILLS; + // Eraton + public static Set ERATON_RETAINED_SKILLS = new HashSet<>(); + // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -848,6 +852,7 @@ public class Config public static int STARTING_VITALITY_POINTS; public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; + public static float RATE_VITALITY_EXP_PREMIUM_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -1153,6 +1158,7 @@ public class Config public static int CONQUEST_RATE_SERVER_POINTS; public static int CONQUEST_RATE_SERVER_SOUL_ORBS; public static int CONQUEST_RATE_ZONE_POINTS; + public static int CONQUEST_RATE_BLOODY_COINS; public static int CONQUEST_ATTACK_POINTS; public static int CONQUEST_LIFE_POINTS; public static boolean CONQUEST_PVP_ZONE; @@ -1425,6 +1431,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; @@ -1912,6 +1919,15 @@ public class Config HARDIN_REMOVED_SKILLS.get(classId).add(Integer.parseInt(classInfo[i])); } } + ERATON_RETAINED_SKILLS.clear(); + final String eratonRetainedSkills = characterConfig.getString("EratonRetainedSkills", "").trim(); + if (!eratonRetainedSkills.isEmpty()) + { + for (String id : eratonRetainedSkills.split(",")) + { + ERATON_RETAINED_SKILLS.add(Integer.parseInt(id)); + } + } ENABLE_VITALITY = characterConfig.getBoolean("EnableVitality", true); STARTING_VITALITY_POINTS = characterConfig.getInt("StartingVitalityPoints", 140000); RAIDBOSS_USE_VITALITY = characterConfig.getBoolean("RaidbossUseVitality", true); @@ -2134,6 +2150,7 @@ public class Config CONQUEST_RATE_SERVER_POINTS = conquestConfig.getInt("ConquestRateServerPoints", 1); CONQUEST_RATE_SERVER_SOUL_ORBS = conquestConfig.getInt("ConquestRateServerSoulOrbs", 100); CONQUEST_RATE_ZONE_POINTS = conquestConfig.getInt("ConquestRateZonePoints", 1); + CONQUEST_RATE_BLOODY_COINS = conquestConfig.getInt("ConquestRateBloodyCoins", 1); CONQUEST_ATTACK_POINTS = conquestConfig.getInt("ConquestCharacterAttackPoints", 100); CONQUEST_LIFE_POINTS = conquestConfig.getInt("ConquestCharacterLifePoints", 20); CONQUEST_PVP_ZONE = conquestConfig.getBoolean("ConquestIsPvpZone", false); @@ -2452,6 +2469,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); BLUE_TEAM_ABNORMAL_EFFECT = null; final String blueTeamAve = generalConfig.getString("BlueTeamAbnormalEffect", "").trim(); if (!blueTeamAve.isEmpty()) @@ -2580,6 +2598,7 @@ public class Config MONSTER_EXP_MAX_LEVEL_DIFFERENCE = ratesConfig.getInt("MonsterExpMaxLevelDifference", 11); RATE_RAIDBOSS_POINTS = ratesConfig.getFloat("RateRaidbossPointsReward", 1); RATE_VITALITY_EXP_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpMultiplier", 2); + RATE_VITALITY_EXP_PREMIUM_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpPremiumMultiplier", 3); VITALITY_MAX_ITEMS_ALLOWED = ratesConfig.getInt("VitalityMaxItemsAllowed", 999); RATE_VITALITY_LOST = ratesConfig.getFloat("RateVitalityLost", 1); RATE_VITALITY_GAIN = ratesConfig.getFloat("RateVitalityGain", 1); @@ -3647,6 +3666,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_10.3_MasterClass/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index eab3156866..9b9cbc1cc8 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java index 60350c6209..48e31e400e 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java @@ -126,7 +126,9 @@ public class LimitShopCraftData implements IXmlReader boolean announce3 = false; boolean announce4 = false; boolean announce5 = false; + int enchant = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -217,6 +219,7 @@ public class LimitShopCraftData implements IXmlReader count = parseLong(attrs, "count", 1L); chance = parseFloat(attrs, "chance", 100f); announce = parseBoolean(attrs, "announce", false); + enchant = parseInteger(attrs, "enchant", 0); productionId2 = parseInteger(attrs, "id2", 0); count2 = parseLong(attrs, "count2", 1L); chance2 = parseFloat(attrs, "chance2", 100f); @@ -233,6 +236,7 @@ public class LimitShopCraftData implements IXmlReader count5 = parseLong(attrs, "count5", 1L); announce5 = parseBoolean(attrs, "announce5", false); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -244,7 +248,7 @@ public class LimitShopCraftData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, enchant, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java index 0bdd0c2ba5..49a8e17546 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java @@ -109,6 +109,7 @@ public class LimitShopData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -197,6 +198,7 @@ public class LimitShopData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -208,7 +210,7 @@ public class LimitShopData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/SkillData.java index c5839831ba..deb0eec41a 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index b277446b93..7bf956bdc5 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index d0fd7fa44a..ac6af33bb4 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -139,6 +139,11 @@ public class DailyTaskManager resetHuntPass(); } + if (calendar.get(Calendar.DAY_OF_MONTH) == 1) + { + resetMontlyLimitShopData(); + } + // Daily tasks. resetAttendanceRewards(); resetDailySkills(); @@ -779,6 +784,31 @@ public class DailyTaskManager LOGGER.info("LimitShopData has been reset."); } + private void resetMontlyLimitShopData() + { + for (LimitShopProductHolder holder : LimitShopData.getInstance().getProducts()) + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement("DELETE FROM account_gsdata WHERE var=?")) + { + ps.setString(1, AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + ps.executeUpdate(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset LimitShopData: " + e); + } + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getAccountVariables().remove(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + player.getAccountVariables().storeMe(); + } + } + LOGGER.info("LimitShopData has been resetted."); + } + private void resetHuntPass() { // Update data for offline players. diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java index 198f9e4c20..cfba05b152 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1298,7 +1298,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)) @@ -2826,7 +2826,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); } @@ -2839,177 +2839,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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java index 1b67db5072..f98187de75 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -331,6 +331,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoAbnormalVisualEf import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoCubic; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoEquipSlot; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import org.l2jmobius.gameserver.network.serverpackets.ExVitalityEffectInfo; import org.l2jmobius.gameserver.network.serverpackets.GetOnVehicle; import org.l2jmobius.gameserver.network.serverpackets.HennaInfo; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -4690,7 +4691,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8706,9 +8707,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; + } } } } @@ -10048,6 +10053,7 @@ public class Player extends Playable sendPacket(new ExUserBoostStat(this, BonusExpType.VITALITY)); sendPacket(new ExUserBoostStat(this, BonusExpType.BUFFS)); sendPacket(new ExUserBoostStat(this, BonusExpType.PASSIVE)); + sendPacket(new ExVitalityEffectInfo(this)); _userBoostStatTask = null; }, 300); } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Summon.java index 033c7ddb2a..0439961149 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index ea61f72ae6..4d444a1fa3 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_10.3_MasterClass/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<>(); @@ -883,15 +882,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()); } } } @@ -902,8 +899,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. @@ -912,7 +913,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()) { @@ -985,45 +986,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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java index 629fdce45e..9bf6e1f9b4 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java @@ -482,7 +482,11 @@ public class PlayerStat extends PlayableStat public double getVitalityExpBonus() { - return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0; + if (getVitalityPoints() > 0) + { + return getMul(Stat.VITALITY_EXP_RATE, 1) * (getActiveChar().hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER); + } + return 0; } public void setVitalityPoints(int value) diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index 2a33946a42..da10434743 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/effects/EffectType.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/effects/EffectType.java index 5f8f754d04..e8e874b856 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/effects/EffectType.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/effects/EffectType.java @@ -64,5 +64,6 @@ public enum EffectType TELEPORT_TO_TARGET, ABNORMAL_SHIELD, DUAL_RANGE, + RESTORE_SYMBOL_SEAL, VITALITY_POINT_UP } \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index 3a9363e12c..deeb505370 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java index f72c9ddc4d..ac357b3fa1 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java @@ -32,6 +32,7 @@ public class LimitShopProductHolder private final long _count; private final float _chance; private final boolean _announce; + private final int _enchant; private final int _productionId2; private final long _count2; private final float _chance2; @@ -48,9 +49,10 @@ public class LimitShopProductHolder private final long _count5; private final boolean _announce5; private final int _accountDailyLimit; + private final int _accountMontlyLimit; private final int _accountBuyLimit; - public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountBuyLimit) + public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int enchant, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountMontlyLimit, int accountBuyLimit) { _id = id; _category = category; @@ -63,6 +65,7 @@ public class LimitShopProductHolder _count = count; _chance = chance; _announce = announce; + _enchant = enchant; _productionId2 = productionId2; _count2 = count2; _chance2 = chance2; @@ -79,6 +82,7 @@ public class LimitShopProductHolder _count5 = count5; _announce5 = announce5; _accountDailyLimit = accountDailyLimit; + _accountMontlyLimit = accountMontlyLimit; _accountBuyLimit = accountBuyLimit; } @@ -137,6 +141,11 @@ public class LimitShopProductHolder return _announce; } + public int getEnchant() + { + return _enchant; + } + public int getProductionId2() { return _productionId2; @@ -217,6 +226,11 @@ public class LimitShopProductHolder return _accountDailyLimit; } + public int getAccountMontlyLimit() + { + return _accountMontlyLimit; + } + public int getAccountBuyLimit() { return _accountBuyLimit; diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/item/instance/Item.java index b581899d76..bb16241da0 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_10.3_MasterClass/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.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemEnchantAdd; 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); @@ -2581,6 +2588,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); @@ -2605,6 +2617,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); @@ -2630,6 +2644,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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index ba76b7093f..b87ba44056 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index b23146d9b8..7df91e96bd 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -686,7 +686,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(); } @@ -709,7 +709,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(); } @@ -744,7 +744,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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/Stat.java index e34184f49c..cd0461e173 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -97,6 +97,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"), @@ -137,7 +138,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()), DEFENCE_CRITICAL_RATE("defCritRate"), DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"), diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index d96c2e25ae..0ca58d9970 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index 8f916369b4..b7b0c4ef53 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index 265cef95f4..4211092a85 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java index ffdee6263a..3717fcfbb6 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java @@ -45,6 +45,7 @@ public class AccountVariables extends AbstractVariables public static final String PRIME_SHOP_PRODUCT_DAILY_COUNT = "PSPDailyCount"; public static final String LCOIN_SHOP_PRODUCT_COUNT = "LCSCount"; public static final String LCOIN_SHOP_PRODUCT_DAILY_COUNT = "LCSDailyCount"; + public static final String LCOIN_SHOP_PRODUCT_MONTLY_COUNT = "LCSMontlyCount"; private final String _accountName; diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/ZoneType.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/ZoneType.java index ae0b7f5853..736f4f70d6 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/ZoneType.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/ZoneType.java @@ -36,6 +36,8 @@ import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneEnter; import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneExit; import org.l2jmobius.gameserver.model.instancezone.Instance; import org.l2jmobius.gameserver.model.interfaces.ILocational; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; /** @@ -215,6 +217,10 @@ public abstract class ZoneType extends ListenersContainer // Check level if ((creature.getLevel() < _minLevel) || (creature.getLevel() > _maxLevel)) { + if (creature.isPlayer()) + { + creature.getActingPlayer().sendPacket(new ExShowScreenMessage(SystemMessageId.YOU_CANNOT_ENTER_AS_YOUR_LEVEL_DOESN_T_MEED_THE_REQUIREMENTS, ExShowScreenMessage.TOP_CENTER, 10000)); + } return false; } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java index 535aabfa2d..1b32a7b69f 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.model.zone.type; +import org.l2jmobius.gameserver.enums.InstanceType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.zone.ZoneType; @@ -32,6 +33,7 @@ public class TeleportZone extends ZoneType public TeleportZone(int id) { super(id); + setTargetType(InstanceType.Player); // Default only player. } @Override diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index 455795ea8d..cdc919eb71 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_10.3_MasterClass/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) { @@ -681,7 +686,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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 366671eff4..ba7ac22ef4 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -225,21 +225,21 @@ public class UseItem implements ClientPacket if (CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId())) { - // Death Knight class unequip shields. + // Unequip shields. if ((player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND) != null) && (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND).getItemType() == ArmorType.SHIELD)) { player.disarmShield(); } - // Prevent Death Knight class to equip shields. + // Prevent equipping shields. if (item.getItemType() == ArmorType.SHIELD) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; } - // Prevent Death Knight class to equip other weapons. - if (item.isWeapon() && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND)))) + // Prevent equipping other weapons. + if (item.isWeapon() && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java index e7d165919c..2948334971 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java @@ -99,10 +99,6 @@ public class RequestEnchantItem implements ClientPacket player.removeRequest(request.getClass()); return; } - if (item.getEnchantLevel() != request.getEnchantLevel()) - { - item.setEnchantLevel(request.getEnchantLevel()); - } // Template for scroll. final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java index 2cabb297d1..3fe6d2f033 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java @@ -29,7 +29,7 @@ public class RequestHeroBookEnchant implements ClientPacket @Override public void run(GameClient client) { - Player player = client.getPlayer(); + final Player player = client.getPlayer(); if (player == null) { return; diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java index deba2be826..875c3fda08 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java @@ -112,26 +112,9 @@ public class RequestHuntPassReward implements ClientPacket return; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); huntPass.setRewardAlert(false); player.sendPacket(new HuntPassInfo(player, _huntPassType)); @@ -157,4 +140,39 @@ public class RequestHuntPassReward implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java index acc67daf3b..b878bf9e6d 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java @@ -115,26 +115,9 @@ public class RequestHuntPassRewardAll implements ClientPacket break REWARD_LOOP; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); } if (!inventoryLimitReached) @@ -165,4 +148,39 @@ public class RequestHuntPassRewardAll implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index f9625ca242..22b92dba08 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -147,6 +147,25 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket return; } } + else if (_product.getAccountMontlyLimit() > 0) + { + final long amount = _product.getAccountMontlyLimit() * _amount; + if (amount < 1) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + if (player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) >= amount) + { + player.sendMessage("You have reached your montly limit."); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + + } else if (_product.getAccountBuyLimit() > 0) // Count limit. { final long amount = _product.getAccountBuyLimit() * _amount; @@ -168,7 +187,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket } // Check existing items. - final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), _product.getAccountDailyLimit())); + final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), Math.max(_product.getAccountDailyLimit(), _product.getAccountMontlyLimit()))); for (int i = 0; i < _product.getIngredientIds().length; i++) { if (_product.getIngredientIds()[i] == 0) @@ -315,7 +334,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket if (Rnd.get(100) < _product.getChance()) { rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount()); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -362,7 +381,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket else if (Rnd.get(100) < _product.getChance()) { rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0)); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -374,6 +393,10 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), 0) + _amount); } + if (_product.getAccountMontlyLimit() > 0) + { + player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) + _amount); + } else if (_product.getAccountBuyLimit() > 0) { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), 0) + _amount); diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index 3acca7c8e2..07ed7641a9 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_10.3_MasterClass/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,129 +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, 95, 96, 97, - 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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java index c956600198..d33663880b 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java +++ b/L2J_Mobius_10.3_MasterClass/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()) { @@ -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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java index 3263349360..38c94f8160 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.network.serverpackets; +import org.l2jmobius.Config; import org.l2jmobius.gameserver.enums.BonusExpType; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.stats.Stat; @@ -45,31 +46,10 @@ public class ExUserBoostStat extends ServerPacket { case VITALITY: { - final int currentVitalityPoints = _player.getStat().getVitalityPoints(); - if (currentVitalityPoints > 105000) + if (_player.getStat().getVitalityPoints() > 0) { - count = 1; - bonus = 300; - } - else if (currentVitalityPoints > 70000) - { - count = 1; - bonus = 250; - } - else if (currentVitalityPoints > 35000) - { - count = 1; - bonus = 200; - } - else if (currentVitalityPoints > 0) - { - count = 1; - bonus = 100; - } - if (bonus > 0) - { - count += (int) _player.getStat().getValue(Stat.VITALITY_SKILLS, 0); - bonus += (int) ((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); + count = (int) (_player.getStat().getValue(Stat.VITALITY_SKILLS, 0) + 1); + bonus = (int) (((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (_player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100d); } break; } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java index ff6541ec6f..96e9690fe6 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets; import org.l2jmobius.Config; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.stats.Stat; import org.l2jmobius.gameserver.network.ServerPackets; /** @@ -26,13 +27,15 @@ import org.l2jmobius.gameserver.network.ServerPackets; public class ExVitalityEffectInfo extends ServerPacket { private final int _vitalityBonus; + private final int _vitalityAddBonus; private final int _vitalityItemsRemaining; private final int _points; public ExVitalityEffectInfo(Player player) { _points = player.getVitalityPoints(); - _vitalityBonus = (int) player.getStat().getVitalityExpBonus() * 100; + _vitalityBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100; + _vitalityAddBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); _vitalityItemsRemaining = Config.VITALITY_MAX_ITEMS_ALLOWED - player.getVitalityItemsUsed(); } @@ -42,7 +45,7 @@ public class ExVitalityEffectInfo extends ServerPacket ServerPackets.EX_VITALITY_EFFECT_INFO.writeId(this); writeInt(_points); writeInt(_vitalityBonus); // Vitality Bonus - writeShort(0); // Vitality additional bonus in % + writeShort(_vitalityAddBonus); // Vitality additional bonus in % writeShort(_vitalityItemsRemaining); // How much vitality items remaining for use writeShort(Config.VITALITY_MAX_ITEMS_ALLOWED); // Max number of items for use } diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index a49f41ca7f..2e12fcbc85 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java index 936b64a402..4a9ed2717f 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java @@ -118,7 +118,7 @@ public class MultiSellList extends AbstractItemPacket } writeLong(_list.getProductCount(product)); writeShort(product.getEnchantmentLevel() > 0 ? product.getEnchantmentLevel() : displayItemEnchantment != null ? displayItemEnchantment.getEnchantLevel() : 0); // enchant level - writeInt((int) product.getChance() * 1000000); // chance + writeInt((int) (product.getChance() * 1000000)); // chance writeItemAugment(displayItemEnchantment); writeItemElemental(displayItemEnchantment); writeItemEnsoulOptions(displayItemEnchantment); diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index 4677b2aa13..0d62a7df88 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_10.3_MasterClass/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); @@ -170,7 +170,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); @@ -330,9 +330,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)) { @@ -350,11 +350,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()); } @@ -378,9 +378,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)) { @@ -410,7 +410,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java similarity index 97% rename from L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java rename to L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java index f0b55b330c..a5cc36da6f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java @@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; import org.l2jmobius.gameserver.network.ServerPackets; import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; -public class PetInfo extends ServerPacket +public class PetSummonInfo extends ServerPacket { private final Summon _summon; private final int _value; @@ -44,7 +44,7 @@ public class PetInfo extends ServerPacket private int _curFed; private int _statusMask = 0; - public PetInfo(Summon summon, int value) + public PetSummonInfo(Summon summon, int value) { _summon = summon; _moveMultiplier = summon.getMovementSpeedMultiplier(); @@ -139,7 +139,7 @@ public class PetInfo extends ServerPacket writeInt((int) _summon.getCurrentMp()); // current mp writeInt(_summon.getMaxMp()); // max mp writeLong(_summon.getStat().getSp()); // sp - writeByte(_summon.getLevel()); // level + writeShort(_summon.getLevel()); // level writeLong(_summon.getStat().getExp()); if (_summon.getExpForThisLevel() > _summon.getStat().getExp()) { @@ -150,7 +150,6 @@ public class PetInfo extends ServerPacket writeLong(_summon.getExpForThisLevel()); // 0% absolute value } writeLong(_summon.getExpForNextLevel()); // 100% absoulte value - writeByte(0); // 286 writeInt(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight writeInt(_summon.getMaxLoad()); // max weight it can carry writeInt(_summon.getPAtk()); // patk diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 944e376e63..851b53dc09 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_10.3_MasterClass/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,14 +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); // item augment id - writeInt(0); // 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: diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 3a3a1545a5..dfbdb8b182 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java @@ -68,7 +68,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); @@ -149,7 +149,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()) { @@ -249,9 +249,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)) { @@ -269,11 +269,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()); } @@ -297,9 +297,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)) @@ -330,7 +329,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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java index 8e5c5f7765..22eb4ac7d4 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java @@ -83,6 +83,17 @@ public class ExPurchaseLimitShopItemListNew extends ServerPacket writeInt(product.getAccountDailyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + product.getProductionId(), 0)); } } + else if (product.getAccountMontlyLimit() > 0) + { + if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0) >= product.getAccountMontlyLimit()) + { + writeInt(0); + } + else + { + writeInt(product.getAccountMontlyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0)); + } + } else if (product.getAccountBuyLimit() > 0) // Count limit. { if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + product.getProductionId(), 0) >= product.getAccountBuyLimit()) diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 1544a20c14..e9f977858a 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 5899235fcb..66c93af753 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_10.3_MasterClass/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_10.3_MasterClass/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_10.3_MasterClass/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/account_gsdata.sql index b70d2eea0d..576cc18356 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/account_premium.sql index b52e46ebca..3125e00443 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/airships.sql index e4f74d138a..28cc8a9610 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/announcements.sql index eb86953965..1ff1b9ddd3 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/auction_bid.sql index 1afcf3ba88..bd42d75b3a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/bbs_favorites.sql index d46500c1bb..9cb97e6682 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/bot_reported_char_data.sql index 452d310e16..ddbda95b17 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle.sql index d4f4cbe28e..5a5caef186 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_doorupgrade.sql index c66e5d0991..dc92b68a2f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_functions.sql index 14a51b2630..be7ac8630d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_manor_procure.sql index eae8164dbd..dff0affeec 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_manor_production.sql index ca51a24e35..7f09f6c1b0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_siege_guards.sql index 5352cfb249..ad7acac0a5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_trapupgrade.sql index 63406a22f3..22f6071cb6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_contacts.sql index 5e7c88bd1a..350ec43a14 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_hennas.sql index 5225720259..806d3eb0ae 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_homunculus.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_homunculus.sql index 6676b04635..87dc86c085 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_homunculus.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_instance_time.sql index 412aecd168..f9307271bf 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_item_reuse_save.sql index 90481cbf90..bdfc7d2385 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_macroses.sql index 4647752208..d140fc9630 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_macroses.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` ( `acronym` VARCHAR(4) , `commands` VARCHAR(1255) , 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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_mentees.sql index 0ff6f45e08..48c7b48b41 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_offline_trade.sql index 232f6ad468..2019801a3b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_offline_trade_items.sql index e0c31f77e5..456b9c2231 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_premium_items.sql index 0034ae985b..adcbc4e3f1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_quests.sql index 26f87fcefc..75a036b290 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_recipebook.sql index 259046c922..c4f1ff9e42 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_recipeshoplist.sql index 384d5d2dec..97209515a1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_reco_bonus.sql index d49289a9ef..d9f0fedb2d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_summons.sql index b57b1cce1c..d7128f1c29 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_tpbookmark.sql index 05678e5513..cde9ff3db3 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_variables.sql index 2b33040680..81530a3da5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_data.sql index 4180467c9f..de5b5d95b2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_notices.sql index b8062eea96..61425ca510 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_privs.sql index cc35c5862f..baca0444a8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_skills.sql index 298f710835..ddc8b0f819 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_subpledges.sql index b1ca14bf1a..5ede8982a6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collection_favorites.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collection_favorites.sql index b08c0c4fd2..07c749c815 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collection_favorites.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collection_favorites.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `collection_favorites` ( `accountName` VARCHAR(45) NOT NULL DEFAULT '', `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collections.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collections.sql index 5814dfa284..8ff04209a6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collections.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/collections.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `collections` ( `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, `index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`,`index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_data.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_data.sql index 68eac09d4e..349cdcfbe8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_data.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_data.sql @@ -4,4 +4,4 @@ CREATE TABLE `conquest_data` ( `current_cycle` mediumint(8) unsigned NOT NULL DEFAULT 1, `conquest_season_end` 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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql index 6451c94f86..374f506972 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/conquest_prev_season_ranklist.sql @@ -4,4 +4,4 @@ CREATE TABLE `conquest_prev_season_ranklist` ( `char_name` VARCHAR(45) DEFAULT NULL, `personal_points` bigint(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`charId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/custom_mail.sql index c05ac99727..312a5ae524 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/custom_teleport.sql index 14f8570536..d7f658b250 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort.sql index ff4bd472a5..1662a5aa35 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_doorupgrade.sql index 8b40b5ffe8..db6f1a278a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_functions.sql index 76f3fa99a2..7feb890a15 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_siege_guards.sql index eec3c42b3b..628ee4d910 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_spawnlist.sql index f4257ac49f..8315eb3a23 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fortsiege_clans.sql index b091192446..0c9ab1ba84 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/forums.sql index 0b82c19b72..bd2eeda97a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/global_tasks.sql index 8cd87cb650..51cab5ed2f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/global_variables.sql index 1721657eb2..e3e5348a1a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/grandboss_data.sql index 0fd9caf1d9..f92f39e3b8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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 (29381, -6505, 183040, -3419, 0, 1342845023, 133301), -- Queen Ant diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/heroes.sql index 7691debf5f..6dd502dc65 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/heroes_diary.sql index db45dce351..bb15483356 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/huntpass.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/huntpass.sql index f3ff3061ec..b45d73a32b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/huntpass.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/huntpass.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `huntpass` ( `sayha_points_used` INT NOT NULL DEFAULT 0, `unclaimed_reward` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`account_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_auction.sql index 3b7402da4c..0c5514d192 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_auction_bid.sql index a2fd42f3a1..984709481f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_elementals.sql index 0c432dd172..8ff8322446 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_transaction_history.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_transaction_history.sql index 7ec1d192f0..a08fe3b8fd 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_transaction_history.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_transaction_history.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_transaction_history` ( `price` BIGINT UNSIGNED NOT NULL, `count` BIGINT UNSIGNED NOT NULL, PRIMARY KEY (`created_time`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/items.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/items.sql index 380faa715b..26f64fc7aa 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/itemsonground.sql index 5725d56625..1891903f34 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/merchant_lease.sql index 4c7e52d5e1..d8c5488c67 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_data.sql index fb3c7e28fa..d86b0a4e06 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_fights.sql index b39c209178..cae8bee430 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_nobles.sql index a084f69e22..bbe3bc9bf5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_nobles_eom.sql index 5f4ea7bc47..82578d73a8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/petition_feedback.sql index 55a1c41c22..a77f5730f2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/pets.sql index 07128fda6f..64c80e61f7 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/posts.sql index dbc8234412..3025ed14ac 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/siege_clans.sql index 3aa070529c..d88f155d0f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/topic.sql index 55fc74d214..b0af891b12 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/game/world_exchange_items.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/world_exchange_items.sql index c994e04006..442405f40b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/world_exchange_items.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/game/world_exchange_items.sql @@ -9,4 +9,4 @@ CREATE TABLE `world_exchange_items` ( `start_time` bigint(13) unsigned NOT NULL DEFAULT '0', `end_time` bigint(13) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`world_exchange_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/account_data.sql index d5e81eb0c9..b09fbca191 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/accounts.sql index 790c39919c..a724eb54c6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/accounts_ipauth.sql index ea37ca029b..5c79e268f9 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/gameservers.sql index f9f75ef9fe..f2c43f0d90 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/config/Character.ini b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Character.ini index b15b5ba311..89be148d0f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Character.ini +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Character.ini @@ -299,6 +299,13 @@ HardinRemovedSkills = 148,10104,10065,10098,19558,10097,10042,19552;\ 181,11855,19212,11856,11854,11863,11859 +# --------------------------------------------------------------------------- +# Eraton (Red Libra) +# --------------------------------------------------------------------------- +# Skill ids that will remain after Eraton class change. +EratonRetainedSkills = 1370,1371,1372,11400,11401,11402,11403,11404,31048,31049,30930,30931 + + # --------------------------------------------------------------------------- # Summons configuration # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Conquest.ini b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Conquest.ini index 2e6d7b5dd1..d534ffba2e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Conquest.ini +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Conquest.ini @@ -64,6 +64,10 @@ ConquestRateServerSoulOrbs = 1 # Retail: 1 ConquestRateZonePoints = 1 +# Bloody Coins multiplier +# Retail: 1 +ConquestRateBloodyCoins = 1 + # Character Attack Points # Retail: 100 ConquestCharacterAttackPoints = 100 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Custom/FakePlayers.ini index 314e1793b8..8de34755bb 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/config/General.ini b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/General.ini index 212f363d80..8b588f8d9c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/General.ini +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/General.ini @@ -436,8 +436,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 + # --------------------------------------------------------------------------- # Blue-Red Team Abnormal Effect Settings diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Rates.ini b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Rates.ini index 76ff651b5a..b2164f33ad 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/config/Rates.ini +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/ActionData.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/ActionData.xml index 3f66ed148f..7de2a1ca25 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/ActionData.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/ActionData.xml @@ -2,33 +2,33 @@ - - - - - - - - - - + + + + + + + + + + - + - + - - + + @@ -37,10 +37,9 @@ - - + @@ -50,21 +49,20 @@ - + - - - - - - + + + + + + - + - @@ -73,9 +71,9 @@ - - - + + + @@ -88,15 +86,15 @@ - - - + + + - - + + @@ -235,8 +233,6 @@ - - diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/AppearanceStones.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/AppearanceStones.xml index 3c35d41411..6e758d33e8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/AppearanceStones.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/AppearanceStones.xml @@ -4550,4 +4550,34 @@ chest fullarmor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMission.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMission.xml index 5459aa25ee..dab762af93 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMission.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMission.xml @@ -177,9 +177,9 @@ - + - 29020,29325,29336,29348,29379 + 29325,29336,29348,29379,25888 @@ -332,11 +332,11 @@ - + 95 255 - 29068,29028,29240,29361,29362,29363,29364,29365,29366,29367,29305,29320 + 29068,29028,29240,29305,29320 @@ -344,11 +344,11 @@ - + 95 255 - 29068,29028,29240,29361,29362,29363,29364,29365,29366,29367,29305,29320 + 29068,29028,29240,29305,29320 @@ -356,11 +356,11 @@ - + 95 255 - 29068,29028,29240,29361,29362,29363,29364,29365,29366,29367,29305,29320 + 29068,29028,29240,29305,29320 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMissionConquest.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMissionConquest.xml index b6cc0ff5aa..747d096c97 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMissionConquest.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DailyMissionConquest.xml @@ -4,7 +4,7 @@ - 27701,27702,27703,27704,27705,27706,27707,27708,27709,27710,27711,27712,27713,27714,27715,27716,27717,27718,27719,27720,27721,27722,27723,27724,27725,27726,27727,27728,27729,27730,27731,27732,27733,27734,27735,27736,27737,27738,27739,27740,27741,27742,27743,27744,27745,27746,27747,27748,27749,27750,27751,27752,27753,27754 + 27701,27702,27703,27704,27705,27706,27707,27708,27709,27710,27711,27712,27713,27714,27715,27716,27717,27718,27719,27720,27721,27722,27723,27724,27725,27726,27727,27728,27729,27730,27731,27732,27733,27734,27735,27736,27737,27738,27739,27740,27741,27742,27743,27744,27745,27746,27747,27748,27749,27750,27751,27752,27753,27754,27801,27802,27803,27804,27805,27806,27794,27795,27796,27797,27798,27799,27808,27810,27811,27812,27813,27814,27815,27816,27817,27819,27820,27821,27822,27823,27824,27825 101 255 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DoorData.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DoorData.xml index 2c635df7dc..858465d9b8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DoorData.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/DoorData.xml @@ -11947,6 +11947,176 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/HuntPass.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/HuntPass.xml index 44b2386585..1f3321a75d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/HuntPass.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/HuntPass.xml @@ -4,110 +4,110 @@ - - + + - + - + - + - + - + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/InstanceNames.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/InstanceNames.xml index bdf7023792..3f8c7f4b7f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/InstanceNames.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/InstanceNames.xml @@ -322,6 +322,7 @@ + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/33715-1.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/33715-1.htm index 434e4276c9..351ef62b6a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/33715-1.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/33715-1.htm @@ -1,8 +1,9 @@ Seed Talisman Manager:
-Gracia is interesting, yes, interesting for its seeds. Many seeds, very interesting!
-We have found, let me see... Talisman - Infinity, Talisman - Destruction, Talisman - Annihilation, Talisman - Hellfire, Talisman - Desire, Talisman - Longing, and Talisman - Insanity! But I can only offer the Talisman - Infinity. But no worries! With the Energy of Destruction and Giant's Energy, you can create a Seed Talisman beyond that of Destruction! It does not always work, of course, but it is worth trying, yes! Oh, and when you're upgrading them, use Kaliel's Energy or Elcyum to increase the success rate.
-Oh, and wearing multiple will not give you multiple effects!
-Ah! I want you to know that I cannot help you create Talisman - Insanity. But if you use combination in the inventory, you will be able to get one. But the chances are low because it is so rare.
-All Seed Talismans are bound to you, but you can unbind the Talisman - Longing and Talisman - Insanity by sealing them.
+Since Gracia and Aden have made an alliance, the research of Gracia's Seed is progressing at a quick rate. For instance, we've found talismans in several seeds.
+Those are Talisman of Infinity, Talisman of Destruction, Talisman of Annihilation, Talisman of Hellfire, Talisman of Desire, Talisman of Longing, and Talisman of Insanity and Heavenly Talisman. However, I can give you only the Talisman of Infinity.
+Don't worry! Using Energy of Destruction and Giant's Energy, you can create a Seed Talisman that's more powerful than Talisman of Destruction - if you're lucky, of course. You can equip several Seed Talismans, but only the most powerful of them will be active.
+You can seal Talisman of Longing and Talisman of Insanity to give them to another character.
+If you use several talismans, only one will be active.
+By the way, you can try crafting Talisman of Insanity and Heavenly Talisman by yourself via the compounding option in your inventory. But I'd recommend using my services to increase your success rate, because these are very rare items and it's not that easy to get them. \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34426.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34426.htm new file mode 100644 index 0000000000..9d70e30f05 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/html/default/34525.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34525.htm index c15b90e604..624283bd89 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34525.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34525.htm @@ -1,3 +1,3 @@ -Overseer Merksman:
+Overseer Marksman:
There are many dangerous monsters outside the camps. Don't let your guard down. \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34530.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34529.htm similarity index 71% rename from L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34530.htm rename to L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34529.htm index 2e0ae6d173..936886e2bb 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34530.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34529.htm @@ -1,3 +1,3 @@ -Investigators Guard:
+Expedition Guard:
There are many dangerous monsters outside the camps. Don't let your guard down. \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34542-6.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34542-6.htm index 1597acac3a..dad79cf16e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34542-6.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34542-6.htm @@ -3,6 +3,6 @@ It's simple. You need to defeat Freya in the Ice Queen's Castle.
You can enter the Ice Queen's Castle in a party of 2-7 players of Lv. 115 or higher. You won't need to choose difficulty level here: Unlike daily instance zones, here there is only one difficulty.
If you defeat Freya, you will be able to re-enter the Ice Queen's Castle only after resetting each Wednesday at 06:30.
Note that during the battle you can re-enter the zone, but if all the members of your party left, you need to return there within 1 minute.
- + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34553.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34553.htm new file mode 100644 index 0000000000..e43ae69016 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34553.htm @@ -0,0 +1,3 @@ +Search Team Guard:
+There are many dangerous monsters out there. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34569.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34569.htm similarity index 78% rename from L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34569.html rename to L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34569.htm index 2951107d95..f89999d41d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34569.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34569.htm @@ -1,4 +1,4 @@ Patrol Guard:
-Fafurion's Soldiers have occupied the fields. We found out rhat they have divided into two units.
+Fafurion's Soldiers have occupied the fields. We found out that they have divided into two units.
The soldiers to the north in the Field of Silence are there to capture Krofins, and the elite soldiers are to the south in the Field of Whispers. \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34619.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34619.htm new file mode 100644 index 0000000000..9923f31227 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34619.htm @@ -0,0 +1,3 @@ +Researchers' Guard:
+There are many dangerous monsters outside the camps. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34625.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34625.htm new file mode 100644 index 0000000000..9923f31227 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34625.htm @@ -0,0 +1,3 @@ +Researchers' Guard:
+There are many dangerous monsters outside the camps. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34627.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34627.htm new file mode 100644 index 0000000000..936886e2bb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34627.htm @@ -0,0 +1,3 @@ +Expedition Guard:
+There are many dangerous monsters outside the camps. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34629.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34629.htm new file mode 100644 index 0000000000..936886e2bb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34629.htm @@ -0,0 +1,3 @@ +Expedition Guard:
+There are many dangerous monsters outside the camps. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34631.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34631.htm new file mode 100644 index 0000000000..624283bd89 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34631.htm @@ -0,0 +1,3 @@ +Overseer Marksman:
+There are many dangerous monsters outside the camps. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34633.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34633.htm new file mode 100644 index 0000000000..4995673073 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34633.htm @@ -0,0 +1,3 @@ +Overseer Guardian:
+There are many dangerous monsters outside the camps. Don't let your guard down. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34648.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34648.htm new file mode 100644 index 0000000000..f89999d41d --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34648.htm @@ -0,0 +1,4 @@ +Patrol Guard:
+Fafurion's Soldiers have occupied the fields. We found out that they have divided into two units.
+The soldiers to the north in the Field of Silence are there to capture Krofins, and the elite soldiers are to the south in the Field of Whispers. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34668.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34668.htm new file mode 100644 index 0000000000..122cfedac0 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34668.htm @@ -0,0 +1,5 @@ +Fire Fortress Guide Casgard:
+I hope these landscapes were not a disappointment to you. Although this place is called the Fire Fortress, did you really think that you'll see only scorching ashes and harsh smoke here?
+In any case, you've come a long way. For now, take a breath and look around. We'll discuss my request later.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34669.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34669.htm new file mode 100644 index 0000000000..bcc9ab46dd --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34669.htm @@ -0,0 +1,5 @@ +Fire Fortress Guide Ishrin:
+Have you ever heard the expression "petals of fire"? I've always found it strange. How could anyone compare hot scarlet flames with tender florwers?
+Probably, that's the reason why I became so interested in the flowers that grow in the Fire Conquest area.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34670.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34670.htm new file mode 100644 index 0000000000..efb017de54 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/default/34670.htm @@ -0,0 +1,8 @@ +Fire Fortress Guide Kellond:
+Greetings! I hope we'll become friends, and friends have no use for formalities. There is no need to call me Fire Fortress Guide.
+Friends call me Kellond the Immortal!
+Care to know why? That's quite simple.
+I'm called the Immortal because, unlike you, I never put myself at risk and try to avoid difficulties that threaten my life. What is even more important, I always keep to safe places!
+To my mind, this is the safest place in all the Conquest world, which means I'll never ever leave it!
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34524.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34524.htm index 7ff809ad56..64da928477 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34524.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34524.htm @@ -1,12 +1,8 @@ Overseer Teleporter:
I can teleport you to any Overseer camp.
Where would you like to teleport?
- - - - - - - - + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34526.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34526.htm index 2d07f72068..1f194addfe 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34526.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34526.htm @@ -1,8 +1,9 @@ Expedition Teleporter:
We will safely send you to our camps.
Where would you like to go?
- - - - + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34529.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34529.htm index 09e500055d..87d8bb2279 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34529.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34529.htm @@ -1,8 +1,9 @@ Investigators Teleporter:
We will safely send you to our camps.
Where would you like to go?
- - - - + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34549.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34549.htm similarity index 100% rename from L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34549.html rename to L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34549.htm diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34568.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34568.htm index 4ea4e3049c..6b93180800 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34568.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34568.htm @@ -1,12 +1,13 @@ Patrol Teleporter:
-The sudden attack of the Fafurion army has had my head spinning. The first group can be found in the Field of Silence to the north trying to subjugate the Krofin. -The second one, composed of elite warriors, is setting up camp in the Field of Whispers to the south.
-Out scouts think that the soldiers in the Field of Whispers are more dangerous, so be extra careful.
-Where would you like to teleport?
- - - - - - +The sudden attack of the Fafurion army has had my head spinning. The first group can be found in the Field of Silence to the north trying to subjugate +the Krofin. The second one, composed of elite warriors, is setting up camp in the Field of Whispers to the south.
+Our scouts think that the soldiers in the Fields of Whispers are more dangerous, so be extra careful.
+Where would you like to teleport?
+ + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34618.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34618.htm new file mode 100644 index 0000000000..87d8bb2279 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34618.htm @@ -0,0 +1,9 @@ +Investigators Teleporter:
+We will safely send you to our camps.
+Where would you like to go?
+ + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34624.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34624.htm new file mode 100644 index 0000000000..a7ed83155a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34624.htm @@ -0,0 +1,9 @@ +Researchers' Teleporter:
+We will safely send you to our camps.
+Where would you like to go?
+ + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34626.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34626.htm new file mode 100644 index 0000000000..afc6ade7b9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34626.htm @@ -0,0 +1,8 @@ +Expedition Teleporter:
+We will safely send you to our camps.
+Where would you like to go?
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34628.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34628.htm new file mode 100644 index 0000000000..049fd157a6 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34628.htm @@ -0,0 +1,8 @@ +Expedition Teleporter:
+We will safely send you to our camps.
+Where would you like to go?
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34630.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34630.htm new file mode 100644 index 0000000000..3bc95d4631 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34630.htm @@ -0,0 +1,10 @@ +Overseer Teleporter:
+I can teleport you to any Overseer camp.
+Where would you like to teleport?
+ + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34632.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34632.htm new file mode 100644 index 0000000000..02ecac71b4 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34632.htm @@ -0,0 +1,9 @@ +Overseer Teleporter:
+I can teleport you to any Overseer camp.
+Where would you like to teleport?
+ + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34646.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34646.htm new file mode 100644 index 0000000000..14cf428a36 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34646.htm @@ -0,0 +1,6 @@ +Lionel Hunter:
+Select the place you wish to teleport to. + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34568.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34647.htm similarity index 52% rename from L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34568.html rename to L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34647.htm index f43b86a73b..e4eb271957 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/34568.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/html/teleporter/34647.htm @@ -3,10 +3,7 @@ The sudden attack of the Fafurion army has had my head spinning. The first group the Krofin. The second one, composed of elite warriors, is setting up camp in the Field of Whispers to the south.
Our scouts think that the soldiers in the Fields of Whispers are more dangerous, so be extra careful.
Where would you like to teleport?
- - - - - - + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/instances/IceQueensCastle.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/instances/IceQueensCastle.xml new file mode 100644 index 0000000000..b83cf486bb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/instances/IceQueensCastle.xml @@ -0,0 +1,155 @@ + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/2061.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/2061.xml index 8711f6a17c..0f790b68b8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/2061.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/2061.xml @@ -7,7 +7,7 @@ - +
\ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105301.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105301.xml index 5022eea6f5..0d3ceea1c5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105301.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105301.xml @@ -13,6 +13,10 @@ 31308 31953 + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105302.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105302.xml index 9d1fbd7cba..59c00b8f04 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105302.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3105302.xml @@ -17,81 +17,81 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -103,38 +103,38 @@ - - - - - + + + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3160302.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3160302.xml index 6af21ef56b..3a3f695b72 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3160302.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3160302.xml @@ -42,7 +42,7 @@
- + @@ -50,7 +50,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/324780010.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/324780010.xml index 3ee58c3a52..951bad27a4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/324780010.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/324780010.xml @@ -13,15 +13,15 @@ - + - + - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3368502.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3368502.xml index bf84aa5da5..5d542c3402 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3368502.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/3368502.xml @@ -20,7 +20,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/861.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/861.xml index 57fcb759cc..7166b44a84 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/861.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/861.xml @@ -4,7 +4,7 @@ 33715 - + @@ -14,13 +14,13 @@ - + - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/862.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/862.xml index 09eeecbf54..b39522e2f1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/862.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/862.xml @@ -7,21 +7,14 @@ - + - + - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/863.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/863.xml index 36e822a6c4..475a129074 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/863.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/863.xml @@ -6,6 +6,7 @@ + @@ -15,7 +16,7 @@ - + @@ -23,8 +24,8 @@ - - + + @@ -32,8 +33,8 @@ - - + + @@ -41,8 +42,8 @@ - - + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/870.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/870.xml index 2a6ff3f451..93cb231461 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/870.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/multisell/870.xml @@ -8,19 +8,19 @@ - + - + - + - + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html index 38abe8af39..d6ebe7d441 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html @@ -9,7 +9,7 @@ the area controlled by Devil Varos,
the area controlled by Demonic Weiss.
- + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-02.html new file mode 100644 index 0000000000..4786a46a5c --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-02.html @@ -0,0 +1,13 @@ +Atelia Refinery Teleport Device:
+A device for teleporting to Atelia Refinery settled by the Blackbird Clan.
+Choose your destination.

+
Places:
+Outside of Atelia Refinery,
+the area controlled by Death Pondus,
+the area controlled by Devil Varos,
+the area controlled by Demonic Weiss.
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-03.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-03.html new file mode 100644 index 0000000000..840fff7767 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441-03.html @@ -0,0 +1,15 @@ +Atelia Refinery Teleport Device:
+A device for teleporting to Atelia Refinery settled by the Blackbird Clan.
+Choose your destination.

+
Places:
+Outside of Atelia Refinery,
+Atelia Outlet,
+the area controlled by Death Pondus,
+the area controlled by Devil Varos,
+the area controlled by Demonic Weiss.
+ + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html index 3be1b0a176..4362f2f72a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html @@ -7,7 +7,7 @@ the area controlled by Death Pondus,
the area controlled by Devil Varos,
the area controlled by Demonic Weiss.
- + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java index 28d63997fa..17ce64d654 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java @@ -39,6 +39,7 @@ public class AteliaRefinery extends AbstractNpcAI new Location(-56096, 49688, -8729), // First Area new Location(-56160, 45406, -8847), // Second Area new Location(-56140, 41067, -8965), // Third Area + new Location(-51716, 60243, -3344), // Exit }; // Special Mobs private static final int HARKE = 24161; @@ -109,6 +110,12 @@ public class AteliaRefinery extends AbstractNpcAI htmltext = "34441-01.html"; break; } + case "exit": + { + player.teleToLocation(TELE_LOCATIONS[5]); + htmltext = "34441-01.html"; + break; + } } return htmltext; } @@ -136,11 +143,20 @@ public class AteliaRefinery extends AbstractNpcAI public String onFirstTalk(Npc npc, Player player) { String htmltext = null; + Location npcLoc = npc.getLocation(); final QuestState qs = player.getQuestState(Q10890_SaviorsPathHallOfEtina.class.getSimpleName()); - if (((qs != null) && qs.isCompleted())) + if (((qs != null) && qs.isCompleted()) && ((npcLoc.getX() == -59891) && (npcLoc.getY() == 52625))) + { + htmltext = "34441-03.html"; + } + else if (((qs != null) && qs.isCompleted())) { htmltext = "34441-00.html"; } + else if ((npcLoc.getX() == -59891) && (npcLoc.getY() == 52625)) + { + htmltext = "34441-02.html"; + } else { htmltext = "34441.html"; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java index a0af6ff9bd..396966fb42 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestEngine.java @@ -70,17 +70,27 @@ public class ConquestEngine extends AbstractNpcAI // Queries private static final String LOAD_CONQUEST_DATA = "SELECT current_cycle, conquest_season_end FROM conquest_data WHERE id = 0"; private static final String SAVE_CONQUEST_DATA = "INSERT INTO conquest_data (id, current_cycle, conquest_season_end) VALUES (0,?,?) ON DUPLICATE KEY UPDATE current_cycle=?, conquest_season_end=?"; - private static final String CLEAR_CONQUEST_PREVIOUS_RANKLIST = "DELETE FROM conquest_prev_season_ranklist;"; - private static final String SAVE_CONQUEST_PREVIOUS_RANKLIST = "INSERT INTO conquest_prev_season_ranklist (charId, char_name, personal_points) SELECT a.charId, a.val, b.val FROM character_variables a, character_variables b WHERE a.var=\"CONQUEST_NAME\" AND b.var=\"CONQUEST_PERSONAL_POINTS\" AND a.charId=b.charId;"; + private static final String CLEAR_CONQUEST_PREVIOUS_RANKLIST = "DELETE FROM conquest_prev_season_ranklist"; + private static final String SAVE_CONQUEST_PREVIOUS_RANKLIST = "INSERT INTO conquest_prev_season_ranklist (charId, char_name, personal_points) SELECT a.charId, a.val, b.val FROM character_variables a, character_variables b WHERE a.var=\"CONQUEST_NAME\" AND b.var=\"CONQUEST_PERSONAL_POINTS\" AND a.charId=b.charId"; + private static final String CLEAR_CONQUEST_PREVIOUS_PLAYER_DATA = "DELETE FROM character_variables WHERE var=?"; // Variables private static final String CONQUEST_AVAILABLE_VAR = "CONQUEST_AVAILABLE"; private static final String CONQUEST_CONNECTED_VAR = "CONQUEST_CONNECTED"; private static final String CONQUEST_SERVER_POINTS_VAR = "CONQUEST_SERVER_POINTS"; private static final String CONQUEST_PREV_SEASON_SERVER_POINTS_VAR = "CONQUEST_PREV_SEASON_SERVER_POINTS"; + private static final String CONQUEST_SERVER_SOUL_ORBS_VAR = "CONQUEST_SOUL_ORBS"; + private static final String CONQUEST_PREV_SEASON_SERVER_SOUL_ORBS_VAR = "CONQUEST_PREV_SEASON_SERVER_SOUL_ORBS"; + + // Zone Name Vars used only for reset points + private static final String CONQUEST_ZONE_ASA_VAR = "CONQUEST_ZONE_ASA_POINTS"; + private static final String CONQUEST_ZONE_ANIMA_VAR = "CONQUEST_ZONE_ANIMA_POINTS"; + private static final String CONQUEST_ZONE_NOX_VAR = "CONQUEST_ZONE_NOX_POINTS"; + private static final String CONQUEST_ZONE_VITA_VAR = "CONQUEST_ZONE_VITA_POINTS"; + private static final String CONQUEST_ZONE_IGNIS_VAR = "CONQUEST_ZONE_IGNIS_POINTS"; // Skills - private static final int FIRE_SOURCE_CENTER = 34490; + private static final int FIRE_SOURCE_CENTER_SKILL_ID = 34490; protected static boolean _isConquestAvailable = GlobalVariablesManager.getInstance().getBoolean(CONQUEST_AVAILABLE_VAR, false); protected int _currentCycle; @@ -408,6 +418,7 @@ public class ConquestEngine extends AbstractNpcAI saveConquestData(); saveConquestPrevSeasonRanklistData(); saveConquestPrevSeasonServerPoints(); + clearConquestPrevSeasonPlayerData(); _currentCycle++; setNewConquestSeasonEnd(); init(); @@ -442,7 +453,7 @@ public class ConquestEngine extends AbstractNpcAI { try (Connection con = DatabaseFactory.getConnection(); PreparedStatement ps1 = con.prepareStatement(CLEAR_CONQUEST_PREVIOUS_RANKLIST); - PreparedStatement ps2 = con.prepareStatement(SAVE_CONQUEST_PREVIOUS_RANKLIST)) + PreparedStatement ps2 = con.prepareStatement(SAVE_CONQUEST_PREVIOUS_RANKLIST);) { ps1.execute(); ps2.execute(); @@ -458,9 +469,44 @@ public class ConquestEngine extends AbstractNpcAI */ public void saveConquestPrevSeasonServerPoints() { + // Save previous season Server Points and Soul Orbs GlobalVariablesManager.getInstance().set(CONQUEST_PREV_SEASON_SERVER_POINTS_VAR, GlobalVariablesManager.getInstance().getLong(CONQUEST_SERVER_POINTS_VAR)); + GlobalVariablesManager.getInstance().set(CONQUEST_PREV_SEASON_SERVER_SOUL_ORBS_VAR, GlobalVariablesManager.getInstance().getLong(CONQUEST_SERVER_SOUL_ORBS_VAR)); + // Reset Server Points and Soul Orbs for next season GlobalVariablesManager.getInstance().set(CONQUEST_SERVER_POINTS_VAR, 0); - // Maybe add here soul orbs as well. + GlobalVariablesManager.getInstance().set(CONQUEST_SERVER_SOUL_ORBS_VAR, 0); + // Reset Zone Points for next season + GlobalVariablesManager.getInstance().set(CONQUEST_ZONE_ASA_VAR, 0); + GlobalVariablesManager.getInstance().set(CONQUEST_ZONE_ANIMA_VAR, 0); + GlobalVariablesManager.getInstance().set(CONQUEST_ZONE_NOX_VAR, 0); + GlobalVariablesManager.getInstance().set(CONQUEST_ZONE_VITA_VAR, 0); + GlobalVariablesManager.getInstance().set(CONQUEST_ZONE_IGNIS_VAR, 0); + GlobalVariablesManager.getInstance().storeMe(); + } + + public void clearConquestPrevSeasonPlayerData() + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement(CLEAR_CONQUEST_PREVIOUS_PLAYER_DATA);) + + { + ps.setString(1, PlayerVariables.CONQUEST_PERSONAL_POINTS); + ps.execute(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset Conquest Previous Season player data: " + e); + } + + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getVariables().remove(PlayerVariables.CONQUEST_PERSONAL_POINTS); + player.getVariables().storeMe(); + } + + LOGGER.info(ConquestEngine.class.getSimpleName() + ": Conquest Previous Season player data has been reset."); } /** @@ -474,7 +520,7 @@ public class ConquestEngine extends AbstractNpcAI { LOGGER.info(ConquestEngine.class.getSimpleName() + ": Attack Points updated for player: " + player.getName() + " from " + getAttackPoints(player) + " to " + (getAttackPoints(player) + attackPoints) + "."); } - player.getVariables().set("CONQUEST_ATTACK_POINTS", getAttackPoints(player) + attackPoints); + player.getVariables().set(PlayerVariables.CONQUEST_ATTACK_POINTS, getAttackPoints(player) + attackPoints); } /** @@ -488,7 +534,7 @@ public class ConquestEngine extends AbstractNpcAI { LOGGER.info(ConquestEngine.class.getSimpleName() + ": Life Points updated for player: " + player.getName() + " from " + getLifePoints(player) + " to " + (getLifePoints(player) + lifePoints) + "."); } - player.getVariables().set("CONQUEST_LIFE_POINTS", getLifePoints(player) + lifePoints); + player.getVariables().set(PlayerVariables.CONQUEST_LIFE_POINTS, getLifePoints(player) + lifePoints); } /** @@ -519,6 +565,20 @@ public class ConquestEngine extends AbstractNpcAI GlobalVariablesManager.getInstance().set(CONQUEST_SERVER_POINTS_VAR, getServerPoints() + serverPoints); } + /** + * Sets the Conquest Soul Orbs. + * @param player the activeChar + * @param serverSoulOrbs the server soul orbs amount to set + */ + public void setServerSoulOrbs(Player player, long serverSoulOrbs) + { + if (DEBUG) + { + LOGGER.info(ConquestEngine.class.getSimpleName() + ": Soul Orbs updated from " + getServerSoulOrbs() + " to " + (getServerSoulOrbs() + serverSoulOrbs) + "."); + } + GlobalVariablesManager.getInstance().set(CONQUEST_SERVER_SOUL_ORBS_VAR, getServerSoulOrbs() + serverSoulOrbs); + } + /** * Gets the Conquest Zone name by id. * @param zoneId the zone id @@ -575,11 +635,12 @@ public class ConquestEngine extends AbstractNpcAI * @param player the activeChar * @param personalPoints the personal points * @param serverPoints the server points + * @param serverSoulOrbs the server soul orbs * @param zonePoints the zone points * @param zoneId the zone id * @param useRates if {@code true} it will use Conquest rates multipliers */ - public synchronized void updatePoints(Player player, int personalPoints, int serverPoints, int zonePoints, int zoneId, boolean useRates) + public synchronized void updatePoints(Player player, int personalPoints, int serverPoints, int serverSoulOrbs, int zonePoints, int zoneId, boolean useRates) { if (!_isConquestAvailable) { @@ -588,15 +649,18 @@ public class ConquestEngine extends AbstractNpcAI long finalPersonalPoints = personalPoints; long finalServerPoints = serverPoints; + long finalServerSoulOrbs = serverSoulOrbs; int finalZonePoints = zonePoints; if (useRates) { finalPersonalPoints = personalPoints * Config.CONQUEST_RATE_PERSONAL_POINTS; finalServerPoints = serverPoints * Config.CONQUEST_RATE_SERVER_POINTS; + finalServerSoulOrbs = serverSoulOrbs * Config.CONQUEST_RATE_SERVER_SOUL_ORBS; finalZonePoints = zonePoints * Config.CONQUEST_RATE_ZONE_POINTS; } setPersonalPoints(player, finalPersonalPoints); setServerPoints(player, finalServerPoints); + setServerSoulOrbs(player, finalServerSoulOrbs); setZonePoints(zoneId, finalZonePoints); } @@ -607,7 +671,7 @@ public class ConquestEngine extends AbstractNpcAI */ public int getAttackPoints(Player player) { - return player.getVariables().getInt("CONQUEST_ATTACK_POINTS", Config.CONQUEST_ATTACK_POINTS); + return player.getVariables().getInt(PlayerVariables.CONQUEST_ATTACK_POINTS, Config.CONQUEST_ATTACK_POINTS); } /** @@ -617,7 +681,7 @@ public class ConquestEngine extends AbstractNpcAI */ public int getLifePoints(Player player) { - return player.getVariables().getInt("CONQUEST_LIFE_POINTS", Config.CONQUEST_LIFE_POINTS); + return player.getVariables().getInt(PlayerVariables.CONQUEST_LIFE_POINTS, Config.CONQUEST_LIFE_POINTS); } /** @@ -639,6 +703,15 @@ public class ConquestEngine extends AbstractNpcAI return GlobalVariablesManager.getInstance().getLong(CONQUEST_SERVER_POINTS_VAR, 0); } + /** + * Gets the Conquest soul orbs. + * @return the soul orbs amount + */ + public long getServerSoulOrbs() + { + return GlobalVariablesManager.getInstance().getLong(CONQUEST_SERVER_SOUL_ORBS_VAR, 0); + } + /** * Gets the Conquest zone points. * @param zoneId the zone id to get point for @@ -655,7 +728,7 @@ public class ConquestEngine extends AbstractNpcAI if (_isConquestAvailable) { final int npcId = npc.getId(); - updatePoints(killer, CONQUEST_POINT_DATA.getPersonalPointsAmount(npcId), CONQUEST_POINT_DATA.getServerPointsAmount(npcId), CONQUEST_POINT_DATA.getZonePointsAmount(npcId), CONQUEST_POINT_DATA.getZoneId(npcId), true); + updatePoints(killer, CONQUEST_POINT_DATA.getPersonalPointsAmount(npcId), CONQUEST_POINT_DATA.getServerPointsAmount(npcId), 1, CONQUEST_POINT_DATA.getZonePointsAmount(npcId), CONQUEST_POINT_DATA.getZoneId(npcId), true); } return super.onKill(npc, killer, isSummon); } @@ -664,16 +737,16 @@ public class ConquestEngine extends AbstractNpcAI @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) public void onPlayerPvPKill(OnPlayerPvPKill event) { - if (_isConquestAvailable && event.getPlayer().isInsideZone(ZoneId.CONQUEST) && event.getTarget().isInsideZone(ZoneId.CONQUEST) && !event.getPlayer().getEffectList().isAffectedBySkill(FIRE_SOURCE_CENTER)) + if (_isConquestAvailable && event.getPlayer().isInsideZone(ZoneId.CONQUEST) && event.getTarget().isInsideZone(ZoneId.CONQUEST) && !event.getPlayer().getEffectList().isAffectedBySkill(FIRE_SOURCE_CENTER_SKILL_ID)) { final Player attackerPlayer = event.getPlayer(); final Player targetPlayer = event.getTarget(); if (CONQUEST_POINT_DATA.getPvpPointsInfo().containsKey(targetPlayer.getLevel())) { - updatePoints(attackerPlayer, CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel()), CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel()), 0, 0, true); + updatePoints(attackerPlayer, CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel()), CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel()), 0, 0, 0, true); if ((getAttackPoints(attackerPlayer) >= 1) && (getLifePoints(targetPlayer) >= 1)) { - attackerPlayer.addItem("ConquestCoins", BLOODY_COIN, CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()), attackerPlayer, true); + attackerPlayer.addItem("ConquestCoins", BLOODY_COIN, CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()) * Config.CONQUEST_RATE_BLOODY_COINS, attackerPlayer, true); setAttackPoints(attackerPlayer, -1); setLifePoints(targetPlayer, -1); @@ -685,7 +758,7 @@ public class ConquestEngine extends AbstractNpcAI // Winner Message SystemMessage sm2 = new SystemMessage(SystemMessageId.YOU_HAVE_DEFEATED_C1_AND_GOT_BLOODY_COINS_X_S2_PERSONAL_CONQUEST_POINTS_X_S3_SERVER_CONQUEST_POINTS_X_S4_ATTACK_POINTS_1_TO_CHECK_THEIR_CURRENT_AMOUNT_ENTER_BLOODYCOIN_IN_YOUR_CHAT_WINDOW); sm2.addString(targetPlayer.getName()); - sm2.addString(Integer.toString(CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()))); + sm2.addString(Integer.toString(CONQUEST_POINT_DATA.getCoinsAmount(targetPlayer.getLevel()) * Config.CONQUEST_RATE_BLOODY_COINS)); sm2.addString(Long.toString(CONQUEST_POINT_DATA.getPvpPersonalPointsAmount(targetPlayer.getLevel()))); sm2.addString(Long.toString(CONQUEST_POINT_DATA.getPvpServerPointsAmount(targetPlayer.getLevel()))); attackerPlayer.sendPacket(sm2); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34596-01.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34596-01.html index dda665b0b5..4ce4bf4859 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34596-01.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34596-01.html @@ -1,9 +1,9 @@ Conquest Teleport Device:
Where would you like to go?
+ - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34597-01.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34597-01.html index 48566e126d..ac5bfce9e1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34597-01.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34597-01.html @@ -1,10 +1,10 @@ Conquest Teleport Device:
Where would you like to go?
- - - - - - - + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34661-01.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34661-01.html index 222386f117..7ed06fdb12 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34661-01.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/34661-01.html @@ -2,7 +2,7 @@ Those who have occupied Conquest may use the teleport function to teleport to important places in Conquest area.
(Only characters from the occupying Clan may use teleport.)
Where would you like to go?
- + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/ConquestTeleportDevice.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/ConquestTeleportDevice.java index c814e077ca..c2a22fa9b9 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/ConquestTeleportDevice.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/ConquestTeleportDevice/ConquestTeleportDevice.java @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.instancemanager.RankManager; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.clan.ClanMember; import ai.AbstractNpcAI; @@ -35,7 +36,16 @@ public class ConquestTeleportDevice extends AbstractNpcAI private static final int DEVICE2 = 34597; // Teleport Device 2 ( Water Side Teleporter) private static final int DEVICE3 = 34661; // Teleport Device 3 ( Fire Side Teleporter) - // Locations + // Enter Locations + private static final Location[] ENTER_LOCS = + { + // Water Area + new Location(-525, -201894, -3016), // Fire & Water Border (Water Side) + // Fire Area + new Location(446, -201800, -3000), // Fire & Water Border (Fire Side) + }; + + // Hunt Locations private static final Location[] HUNT_LOCS = { // Water Areas @@ -45,9 +55,7 @@ public class ConquestTeleportDevice extends AbstractNpcAI new Location(-2570, -213261, -3603), // Zone 3 - Nox new Location(-11731, -215556, -2800), // Zone 4 - Callide Hall new Location(-24036, -220963, -3511), // Eigis Seat - new Location(-525, -201894, -3016), // Fire & Water Border (Water Side) // Fire Areas - new Location(446, -201800, -3000), // Fire & Water Border (Fire Side) new Location(7515, -202872, -3184), // Fire Fortress new Location(21937, -225270, -3800), // Kellond's Secret Barracks new Location(10256, -217176, -3568), // Zone 1 - Vita (Lv. 124) @@ -80,86 +88,111 @@ public class ConquestTeleportDevice extends AbstractNpcAI checkPrivs(player); break; } - } - if (checkPrivs(player)) - { - switch (event) + case "waterZone0": { - case "waterZone1": + player.teleToLocation(ENTER_LOCS[0], 0, player.getInstanceWorld()); + break; + } + case "fireZone0": + { + player.teleToLocation(ENTER_LOCS[1], 0, player.getInstanceWorld()); + break; + } + case "waterZone1": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[0], 0, player.getInstanceWorld()); - break; } - case "waterZone2": + break; + } + case "waterZone2": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[1], 0, player.getInstanceWorld()); - break; } - case "waterZone3": + break; + } + case "waterZone3": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[2], 0, player.getInstanceWorld()); - break; } - case "waterZone4": + break; + } + case "waterZone4": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[3], 0, player.getInstanceWorld()); - break; } - case "waterZone5": + break; + } + case "waterZone5": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[4], 0, player.getInstanceWorld()); - break; } - case "waterZone6": + break; + } + case "waterZone6": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[5], 0, player.getInstanceWorld()); - break; } - case "waterZone7": + break; + } + case "fireZone1": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[6], 0, player.getInstanceWorld()); - break; } - case "fireZone1": + break; + } + case "fireZone2": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[7], 0, player.getInstanceWorld()); - break; } - case "fireZone2": + break; + } + case "fireZone3": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[8], 0, player.getInstanceWorld()); - break; } - case "fireZone3": + break; + } + case "fireZone4": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[9], 0, player.getInstanceWorld()); - break; } - case "fireZone4": + break; + } + case "fireZone5": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[10], 0, player.getInstanceWorld()); - break; } - case "fireZone5": + break; + } + case "fireZone6": + { + if (checkPrivs(player)) { player.teleToLocation(HUNT_LOCS[11], 0, player.getInstanceWorld()); - break; - } - case "fireZone6": - { - player.teleToLocation(HUNT_LOCS[12], 0, player.getInstanceWorld()); - break; - } - case "fireZone7": - { - player.teleToLocation(HUNT_LOCS[13], 0, player.getInstanceWorld()); - break; - } - default: - { - player.sendMessage("You can't use the teleport device."); - break; } + break; } } return htmltext; @@ -167,13 +200,28 @@ public class ConquestTeleportDevice extends AbstractNpcAI private boolean checkPrivs(Player player) { - final int prevSeasonConquerorId = RankManager.getInstance().getPreviousConquestRankList().get(1) != null ? RankManager.getInstance().getPreviousConquestRankList().get(1).getInt("charId") : 0; - if (Config.CONQUEST_TELEPORTS_FOR_ALL || (player.getClan().getLeaderId() == prevSeasonConquerorId)) + final int prevSeasonRank1Id = RankManager.getInstance().getPreviousConquestRankList().get(1) != null ? RankManager.getInstance().getPreviousConquestRankList().get(1).getInt("charId") : 0; + final int currentSeasonRank1Id = RankManager.getInstance().getCurrentConquestRankList().get(1) != null ? RankManager.getInstance().getCurrentConquestRankList().get(1).getInt("charId") : 0; + if (Config.CONQUEST_TELEPORTS_FOR_ALL) { player.sendMessage("You are free to use this teleport device."); return true; } - + // Check if rank 1 player id is in checker clan or not + else if (player.getClan() != null) + { + for (ClanMember member : player.getClan().getMembers()) + { + if ((member.getObjectId() == prevSeasonRank1Id) || (member.getObjectId() == (currentSeasonRank1Id))) + { + player.sendMessage("You are free to use this teleport device."); + return true; + } + player.sendMessage("You can't use this teleport device, because you don't belong to the conquest conqueror clan."); + return false; + } + } + // If no clan player.sendMessage("You can't use this teleport device, because you don't belong to the conquest conqueror clan."); return false; } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/Flowers/Flowers.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/Flowers/Flowers.java index 2c67d9503f..06e13196ef 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/Flowers/Flowers.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/Flowers/Flowers.java @@ -104,7 +104,7 @@ public class Flowers extends AbstractNpcAI // Notify to scripts. if (EventDispatcher.getInstance().hasListener(EventType.ON_CONQUEST_FLOWER_COLLECT)) { - EventDispatcher.getInstance().notifyEventAsync(new OnConquestFlowerCollect(player)); + EventDispatcher.getInstance().notifyEventAsync(new OnConquestFlowerCollect(player, npc.getId())); } if (player.isInventoryUnder90(false)) @@ -144,7 +144,7 @@ public class Flowers extends AbstractNpcAI } else { - player.getVariables().set(PlayerVariables.CONQUEST_PERSONAL_POINTS, player.getVariables().getLong(PlayerVariables.CONQUEST_PERSONAL_POINTS) + PERSONAL_POINTS_AMOUNT); + player.getVariables().set(PlayerVariables.CONQUEST_PERSONAL_POINTS, player.getVariables().getLong(PlayerVariables.CONQUEST_PERSONAL_POINTS, 0) + PERSONAL_POINTS_AMOUNT); player.sendPacket(SystemMessageId.YOU_HAVE_RECEIVED_PERSONAL_CONQUEST_POINTS); } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/SacredFire/SacredFire.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/SacredFire/SacredFire.java index 1f6198190e..057a50c280 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/SacredFire/SacredFire.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/SacredFire/SacredFire.java @@ -32,12 +32,14 @@ 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.Guard; +import org.l2jmobius.gameserver.model.events.EventDispatcher; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.model.events.ListenerRegisterType; import org.l2jmobius.gameserver.model.events.annotations.Id; import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; import org.l2jmobius.gameserver.model.events.annotations.RegisterType; import org.l2jmobius.gameserver.model.events.impl.OnServerStart; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonSacredFire; import org.l2jmobius.gameserver.model.events.impl.item.OnItemUse; import org.l2jmobius.gameserver.model.holders.ItemHolder; import org.l2jmobius.gameserver.model.holders.SkillHolder; @@ -352,6 +354,8 @@ public class SacredFire extends AbstractNpcAI sacredFire.getVariables().set("SLOT", sacredFireSlot); sacredFire.getVariables().set("SUMMON_TIME", System.currentTimeMillis()); + checkSummonSacredFireListener(player); + // Update owner current Sacred Fires count. player.getVariables().set(PlayerVariables.CONQUEST_SACRED_FIRE_SLOT_COUNT, player.getVariables().getInt(PlayerVariables.CONQUEST_SACRED_FIRE_SLOT_COUNT, 0) + 1); @@ -470,6 +474,15 @@ public class SacredFire extends AbstractNpcAI removeSacredFireVars(); } + private void checkSummonSacredFireListener(Player player) + { + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_SUMMON_SACRED_FIRE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSummonSacredFire(player, SACRED_FIRE)); + } + } + public static void main(String[] args) { new SacredFire(); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/conquestPoints.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/conquestPoints.xml index 4755a85237..fbceb687ee 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/conquestPoints.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Conquest/conquestPoints.xml @@ -8,7 +8,7 @@ - + @@ -17,112 +17,112 @@ - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -133,42 +133,42 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java index 7e7e0f4f08..03bc679ddc 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Heine/LionelHunter/LionelHunter.java @@ -58,10 +58,10 @@ public class LionelHunter extends AbstractNpcAI private static final int VITALITY_OF_THE_EXALTED_LV2 = 47855; private static final int DIGNITY_OF_THE_EXALTED_LV6 = 80970; private static final int FAVOR_OF_THE_EXLATED = 45870; - private static final int COMMON_BOX_PHYSCAL = 81207; + private static final int COMMON_BOX_PHYSICAL = 81207; private static final int COMMON_BOX_MAGIC = 81208; - private static final int SPECIAL_BOX_MAGIC = 81209; - private static final int SPECIAL_BOX_PHYSICAL = 81210; + private static final int SPECIAL_BOX_PHYSICAL = 81209; + private static final int SPECIAL_BOX_MAGIC = 81210; private LionelHunter() { @@ -98,28 +98,31 @@ public class LionelHunter extends AbstractNpcAI } case "getSupplyBox": { - if ((qs7 != null) && qs7.isCompleted()) + if (((qs7 != null) && !qs7.isCompleted()) || (qs7 == null)) { - if (player.isMageClass()) + htmltext = "33907-06-no.html"; + } + else if (qs7.isCompleted()) + { + if (player.getVariables().getBoolean("LIONEL_REWARD_RECEIVED", false) == true) { - giveItems(player, COMMON_BOX_MAGIC, 1); - giveItems(player, SPECIAL_BOX_MAGIC, 1); + htmltext = "33907-06-received.html"; } else { - giveItems(player, COMMON_BOX_PHYSCAL, 1); - giveItems(player, SPECIAL_BOX_PHYSICAL, 1); + if (player.isMageClass()) + { + giveItems(player, COMMON_BOX_MAGIC, 1); + giveItems(player, SPECIAL_BOX_MAGIC, 1); + } + else + { + giveItems(player, COMMON_BOX_PHYSICAL, 1); + giveItems(player, SPECIAL_BOX_PHYSICAL, 1); + } + player.getVariables().set("LIONEL_REWARD_RECEIVED", true); + player.getVariables().storeMe(); } - player.getVariables().set("LIONEL_REWARD_RECEIVED", true); - player.getVariables().storeMe(); - } - else if (player.getVariables().getBoolean("LIONEL_REWARD_RECEIVED", false)) - { - htmltext = "33907-06-received.html"; - } - else - { - htmltext = "33907-06-no.html"; } break; } @@ -234,7 +237,6 @@ public class LionelHunter extends AbstractNpcAI htmltext = "33907-not-completed.html"; } break; - } } return htmltext; @@ -250,4 +252,4 @@ public class LionelHunter extends AbstractNpcAI { new LionelHunter(); } -} \ No newline at end of file +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/areas/Rune/SwampOfScreams/SwampOfScreamsSiege.java new file mode 100644 index 0000000000..beaa3f26da --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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: 10-11 & 22-23 + private static final int[] DAY_TIME = + { + 10, + 00 + }; + private static final int[] NIGHT_TIME = + { + 22, + 00 + }; + private static final long DESPAWN_DELAY = 3600000; + private static boolean _daytime = false; + + private SwampOfScreamsSiege() + { + addKillId(SWAMP_MONSTERS); + scheduleDayTime(); + scheduleNightTime(); + LOGGER.info("Swamp of Screams siege starts from 10:00 to 11:00 and from 22:00 to 23: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.HERALD_S_ANNOUNCEMENT_10_00_11_00_MONSTERS_ARE_SPAWNING_IN_THE_SWAMP_OF_SCREAMS_KILL_THEM_ALL, 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.HERALD_S_ANNOUNCEMENT_10_00_P_M_11_00_P_M_MONSTERS_ARE_INVADING_THE_SWAMP_OF_SCREAMS_AT_NIGHT_TIME, 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.HERALD_S_ANNOUNCEMENT_10_P_M_11_00_P_M_MONSTERS_OF_THE_SWAMP_OF_SCREAMS_HAVE_FLED_AWAY, 2, 10000, true)); + } + else + { + World.getInstance().getPlayers().forEach(p -> showOnScreenMsg(p, NpcStringId.HERALD_S_ANNOUNCEMENT_10_00_11_00_MONSTERS_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_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AdenReconstructorManager.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AdenReconstructorManager.java index 84fc8a8360..ee8e2039c8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AdenReconstructorManager.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AdenReconstructorManager.java @@ -46,25 +46,9 @@ public class AdenReconstructorManager extends AbstractNpcAI { if (npc != null) { - switch (event) + if (event.equals("SPAM_TEXT")) { - case "SPAM_TEXT": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_LAND_OF_ADEN_IS_IN_NEED_OF_MATERIALS_TO_REBUILD_FROM_SHILLIEN_S_DESTRUCTION); - startQuestTimer("SPAM_TEXT2", 1000, npc, null); - break; - } - case "SPAM_TEXT2": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.PLEASE_DONATE_ANY_UNUSED_MATERIALS_YOU_HAVE_TO_HELP_REBUILD_ADEN); - startQuestTimer("SPAM_TEXT3", 1000, npc, null); - break; - } - case "SPAM_TEXT3": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_LL_RECEIVE_A_GIFT_FOR_ANY_APPLICABLE_DONATION); - break; - } + npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_LAND_OF_ADEN_IS_IN_NEED_OF_MATERIALS_TO_REBUILD_FROM_SHILLIEN_S_DESTRUCTION); } } return super.onAdvEvent(event, npc, player); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AetherDrops.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AetherDrops.java index 9149997c4e..e7cff46397 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AetherDrops.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/AetherDrops.java @@ -38,85 +38,84 @@ public class AetherDrops extends AbstractNpcAI // Monsters private static final int[] MONSTERS = { - 23487, // Magma Ailith + // Blazing Swamp 23488, // Magma Apophis - 23489, // Lava Wyrm - 23490, // Lava Drake - 23491, // Lava Wendigo - 23492, // Lava Stone Golem - 23493, // Lava Leviah + 23496, // Magma Ifrit + // Abandoned Coal Mines 24577, // Black Hammer Artisan 24578, // Black Hammer Collector 24579, // Black Hammer Protector - // Cemetery Lv.117 - 24844, // Royal Guard Captain - 24846, // Commander of Operations + // Cemetery Lv.118 24843, // Royal Guard + 24844, // Royal Guard Captain 24845, // Royal Field Officer - 24848, // Wizard Captain + 24846, // Commander of Operations 24847, // Elite Wizard - // Fields of Massacre Lv.115 + 24848, // Wizard Captain + // Fields of Massacre Lv.116 24488, // Doom Archer 24489, // Doom Scout 24490, // Doom Soldier 24487, // Graveyard Predator 24486, // Dismal Pole 24491, // Doom Knight - // Silent Valley 105 + // Silent Valley 106 24506, // Silence Witch 24507, // Silence Preacle 24508, // Silence Warrior 24509, // Silence Slave 24510, // Silence Hannibal - // Ivory Tower Crater Lv.105 + // Ivory Tower Crater Lv.106 24421, // Stone Gargoyle 24422, // Stone Golem 24423, // Monster Eye 24424, // Gargoyle Hunter 24425, // Steel Golem 24426, // Stone Cube - // Enchanted Valley Lv.103 + // Enchanted Valley Lv.104 + 23567, // Nymph Rose + 23568, // Nymph Lily 23569, // Nymph Lily + 23570, // Nymph Tulip 23571, // Nymph Tulip 23572, // Nymph Cosmos - 23567, // Nymph Rose + 23573, // Nymph Cosmos 23578, // Nymph Guardian - 19600, // Flower Bud 23581, // Apherus - // Forest of Mirrors Lv.109 + // Forest of Mirrors Lv.110 24461, // Forest Ghost 24462, // Bewildered Expedition Member 24463, // Bewildered Patrol 24464, // Bewildered Dwarf Adventurer 24465, // Forest Evil Spirit 24466, // Demonic Mirror - // Desert Query Lv.101 + // Desert Query Lv.102 23811, // Cantera Tanya 23812, // Cantera Deathmoz 23813, // Cantera Floxis 23814, // Cantera Belika 23815, // Cantera Bridget - // Beleth's Magic Circle Lv.101 + // Beleth's Magic Circle Lv.102 23354, // Decay Hannibal 23355, // Armor Beast 23356, // Klein Soldier 23357, // Disorder Warrior 23360, // Bizuard 23361, // Mutated Fly - // Phantasmal Ridge Lv.103 + // Phantasmal Ridge Lv.104 24511, // Lunatikan 24512, // Garion Neti 24513, // Desert Wendigo 24514, // Koraza 24515, // Kandiloth - // Wasteland Lv.117 + // Wasteland Lv.118 24500, // Sand Golem 24501, // Centaur Fighter 24502, // Centaur Marksman 24503, // Centaur Wizard 24504, // Centaur Warlord 24505, // Earth Elemental Lord - // Tanor Canyon Lv. 107 + // Tanor Canyon Lv. 108 24587, // Tanor Silenos 20936, // Tanor Silenos 20937, // Tanor Silenos Soldier @@ -124,25 +123,25 @@ public class AetherDrops extends AbstractNpcAI 20939, // Tanor Silenos Warrior 20942, // Nightmare Guide 20943, // Nightmare Watchman - // Alligator Island Lv.107 + // Alligator Island Lv.108 24373, // Dailaon Lad 24376, // Nos Lad 24377, // Swamp Tribe 24378, // Swamp Alligator 24379, // Swamp Warrior - // Field of Silence Lv.109 + // Field of Silence Lv.110 24517, // Kropiora 24520, // Krotania 24521, // Krophy 24522, // Spiz Krphy 24523, // Krotany - // Field of Whispers Lv.111 + // Field of Whispers Lv.112 24304, // Groz Kropiora 24305, // Groz Krotania 24306, // Groz Krophy 24307, // Groz Krotany 24308, // Groz Water Drake - // Isle of Prayer + // Isle of Prayer Lv.112 24445, // Lizardman Rouge 24446, // Island Guard 24447, // Niasis @@ -150,7 +149,7 @@ public class AetherDrops extends AbstractNpcAI 24449, // Lizardman Warrior 24450, // Lizardman Wizard 24451, // Lizardman Defender - // Fafurion Temple + // Fafurion Temple Lv.124 24318, // Temple Guard Captain 24321, // Temple Patrol Guard 24322, // Temple Knight Recruit @@ -169,62 +168,97 @@ public class AetherDrops extends AbstractNpcAI 23780, // Royal Templar Colonel 23781, // Royal Sharpshooter 23782, // Royal Archmage - // Breka's Stronghold Lv.113 + // Breka's Stronghold Lv.114 24415, // Breka Orc Scout 24416, // Breka Orc Scout Captain 24417, // Breka Orc Archer 24418, // Breka Orc Shaman 24419, // Breka Orc Slaughterer 24420, // Breka Orc prefect - // Dragon Valley Lv.124 - 24617, // Dragon Peltast - 24618, // Dragon Officer - 24619, // Behemoth Dragon - 24620, // Soul Hunter - // Swamp of Screams + // Swamp of Screams Lv.116 24570, // Dire Stakato Drone 24571, // Dire Stakato Berserker 24572, // Dire Stakato Shaman 24573, // Dire Stakato Witch - // Sel Mahum Training Grounds Lv.113 + // Sel Mahum Training Grounds Lv.114 24492, // Sel Mahum Soldier 24493, // Sel Mahum Squad Leader 24494, // Sel Mahum Warrior 24495, // Keltron - // Plains of the Lizardman Lv.113 + // Plains of the Lizardman Lv.114 24496, // Tanta Lizardman Warrior 24497, // Tanta Lizardman Archer 24498, // Tanta Lizardman Wizard 24499, // Priest Uguros - // Varka Silenos Barracks Lv.111 + // Varka Silenos Barracks Lv.114 24636, // Varka Silenos Magus 24637, // Varka Silenos Shaman 24638, // Varka Silenos Footman 24639, // Varka Silenos Seargeant 24640, // Varka Silenos Officer - // Ketra Orc Barracks Lv.111 + // Ketra Orc Barracks Lv.112 24631, // Ketra Orc Shaman 24632, // Ketra Orc Prophet 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Battalion Commander - // Wall of Argos Lv.115 + // Wall of Argos Lv.116 24606, // Captive Antelope 24607, // Captive Bandersnatch 24608, // Captive Buffalo 24609, // Captive Grendel 24610, // Eye of Watchman 24611, // Elder Homunculus - // Neutral Zone + // Neutral Zone Lv.110 24641, // Tel Mahum Wizard 24642, // Tel Mahum Legionary 24643, // Tel Mahum Footman 24644, // Tel Mahum Lieutenant - // Sea of Spores + // Sea of Spores Lv.116 24621, // Laikel 24622, // Harane 24623, // Lesatanas 24624, // Arbor + // Cruma Marshlands Lv.122 + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth Lv.122 + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base Lv.124 + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Dragon Valley West Lv.120 + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East Lv.122 + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree Lv.120 + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds Lv.126 + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; // Item private static final int AETHER = 81215; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java index 7c1cf411a3..8ab21a2de5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java @@ -42,10 +42,12 @@ import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.model.SkillLearn; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventDispatcher; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.model.events.ListenerRegisterType; import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLevelChanged; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin; @@ -266,6 +268,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader else { player.setNobleLevel(1); + checkNobleListener(player); player.broadcastUserInfo(); // TODO: SetOneTimeQuestFlag(talker, 10385, 1); htmltext = "test_server_helper025.html"; @@ -402,6 +405,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader if (data.isRewardNoblesse()) { player.setNobleLevel(1); + checkNobleListener(player); } // Give possible hero status reward. if (data.isRewardHero()) @@ -859,6 +863,7 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader if (data.isRewardNoblesse()) { player.setNobleLevel(1); + checkNobleListener(player); } // Give possible hero status reward. if (data.isRewardHero()) @@ -1170,6 +1175,15 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader return null; } + private void checkNobleListener(Player player) + { + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player)); + } + } + public static void main(String[] args) { new ClassMaster(); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/GreedyTreasureChests.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/GreedyTreasureChests.java index ce4c9405e7..22d5cf2751 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/GreedyTreasureChests.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/GreedyTreasureChests.java @@ -600,7 +600,7 @@ public class GreedyTreasureChests extends AbstractNpcAI else if (currentTime > GlobalVariablesManager.getInstance().getLong("TREASURE_CHEST_RESPAWN_NZ_2", 0)) { addSpawn(CHEST_LV110, npc, true, 0, true); - GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_FM_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET))); + GlobalVariablesManager.getInstance().set("TREASURE_CHEST_RESPAWN_NZ_2", Long.toString(currentTime + RESPAWN_DELAY + getRandom(RND_OFFSET))); } break; } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34641.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34641.html new file mode 100644 index 0000000000..a602ca161d --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34641.html @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + + + + +
+ "O Cantabile! + Your beautiful voice flows like a river!" +
+ Welcome, my friend! I am sure you will enjoy your stand in this wonderful place where exquisite music fills the air!
+ The town is divided into 3 zones and each one of them has its own features.
+ The first zone is overseen by Amoroso, the second by Delicato and the third by Comodo. Talk to them to learn more. +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34642.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34642.html new file mode 100644 index 0000000000..3df8e6e071 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34642.html @@ -0,0 +1,25 @@ + + + + + + + +
+ + + + + + + +
+ "O Amoroso! + Sing us your song of love and beauty!" +
+ My name is Amoroso, I oversee Adagio (Zone 1)! I train dancers who have 10-34 on their PK counter.
+ We are putting on an amazing, truly incredible concert! You must be dying of anticipation, right? Ha-ha! +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34643.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34643.html new file mode 100644 index 0000000000..9844339570 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34643.html @@ -0,0 +1,25 @@ + + + + + + + +
+ + + + + + + +
+ "O Delicato! + Your intrincate songs move and inspire us!" +
+ My name is Delicato, I oversee Andante (Zone 2). Lord Narcissus has asked me to look after Pomposo and Dolce.
+ Their petals are very valuable, but almost imposible to collect. Heroes who hace 35-39 on their PK counter can grow these flowers by bleeding over them. +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34644.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34644.html new file mode 100644 index 0000000000..da8fec9e47 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/34644.html @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + + + + +
+ "O Comodo! + Your mellow melodies please our ears and soothe our souls!" +
+ My name is Comodo, I oversee Allegro (Zone 3).
+ I've managed to find a Pure Crystal to offer as tribute to Narcissus, but then I learned that the poor Angel is possessed by evil spirits! Can you imagine?
+ It is possible to exorcize the spirits, but only the heroes who have 40+ on their Pk counter can do it. +
+
+
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java index 1dc6e07854..2634f960ad 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/PrisonManager/PrisonManager.java @@ -37,6 +37,16 @@ import ai.AbstractNpcAI; */ public class PrisonManager extends AbstractNpcAI { + // NPC + private static final int MORENDO = 34637; + private static final int POMPOSO = 34638; + private static final int DOLLOROSO = 34639; + private static final int DOLCE = 34640; + private static final int CANTABILE = 34641; + private static final int AMOROSO = 34642; + private static final int DELICATO = 34643; + private static final int COMODO = 34644; + // Misc private static final ScriptZone PRISON_ZONE_1 = ZoneManager.getInstance().getZoneById(26010, ScriptZone.class); private static final ScriptZone PRISON_ZONE_2 = ZoneManager.getInstance().getZoneById(26011, ScriptZone.class); private static final ScriptZone PRISON_ZONE_3 = ZoneManager.getInstance().getZoneById(26012, ScriptZone.class); @@ -48,8 +58,8 @@ public class PrisonManager extends AbstractNpcAI public PrisonManager() { - addFirstTalkId(34637, 34638, 34639, 34640); - addTalkId(34637, 34638, 34639, 34640); + addFirstTalkId(MORENDO, POMPOSO, DOLLOROSO, DOLCE, CANTABILE, AMOROSO, DELICATO, COMODO); + addTalkId(MORENDO, POMPOSO, DOLLOROSO, DOLCE, CANTABILE, AMOROSO, DELICATO, COMODO); addEnterZoneId(PRISON_ZONE_1.getId(), PRISON_ZONE_2.getId(), PRISON_ZONE_3.getId(), PRISON_ENTER_ZONE.getId(), PRISON_ENTER_ZONE2.getId()); addExitZoneId(PRISON_ZONE_1.getId(), PRISON_ZONE_2.getId(), PRISON_ZONE_3.getId(), PRISON_ENTER_ZONE2.getId()); } @@ -68,6 +78,10 @@ public class PrisonManager extends AbstractNpcAI case "34639-no.html": case "34640.html": case "34640-no.html": + case "34641.html": + case "34642.html": + case "34643.html": + case "34644.html": { htmltext = event; break; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/WaterDragonEliteSupplyDrops.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/WaterDragonEliteSupplyDrops.java index db1186a7a4..5ea3c6dee4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/WaterDragonEliteSupplyDrops.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/ai/others/WaterDragonEliteSupplyDrops.java @@ -38,16 +38,16 @@ public class WaterDragonEliteSupplyDrops extends AbstractNpcAI // Monsters private static final int[] MONSTERS = { - 24596, // Water Dragon's Elite Archer - 24597, // Water Dragon's Elite Mage 24598, // Water Dragon's Elite Raider 24599, // Water Dragon's Elite Swordsman 24600, // Water Dragon's Elite Wyrm - 24601, // Water Dragon's Shaman - 24602, // Water Dragon's Mage 24603, // Water Dragon's Pikeman 24604, // Water Dragon's Swordsman 24605, // Weakened Krotania + 24957, // Fafurion's Praetorian Knight + 24958, // Fafurion's Praetorian Pikeman + 24959, // Fafurion's Praetorian Swordsman + 24960 // Fafurion's Praetorian Water Dragon }; // Item private static final int WATER_DRAGON_ELITE_SUPPLIES = 81758; @@ -57,7 +57,7 @@ public class WaterDragonEliteSupplyDrops extends AbstractNpcAI private static final int DROP_DAILY = 100; private static final int DROP_MIN = 1; private static final int DROP_MAX = 1; - private static final double CHANCE = 10; + private static final double CHANCE = 7.2; private WaterDragonEliteSupplyDrops() { @@ -97,7 +97,7 @@ public class WaterDragonEliteSupplyDrops extends AbstractNpcAI } catch (Exception e) { - LOGGER.log(Level.SEVERE, "Could not reset Corroded Fields drop count: ", e); + LOGGER.log(Level.SEVERE, "Could not reset Ravaged Innadril drop count: ", e); } // Update data for online players. diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 2056d8c59a..c92f62bcce 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java index 4b43e2d3f0..c9ef3f3b35 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java @@ -291,7 +291,20 @@ public class Eraton extends AbstractNpcAI } takeItem(player, STONE_OF_DESTINY); - player.removeAllSkills(); + if (Config.ERATON_RETAINED_SKILLS.isEmpty()) + { + player.removeAllSkills(); + } + else + { + for (Skill skill : player.getAllSkills()) + { + if (!Config.ERATON_RETAINED_SKILLS.contains(skill.getId())) + { + player.removeSkill(skill); + } + } + } // Stop auto use. for (Shortcut shortcut : player.getAllShortCuts()) diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/EffectMasterHandler.java index 964934525b..a04e7270e8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -37,6 +37,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("AbnormalTimeChangeBySkillId", AbnormalTimeChangeBySkillId::new); EffectHandler.getInstance().registerHandler("AbsorbDamage", AbsorbDamage::new); EffectHandler.getInstance().registerHandler("Accuracy", Accuracy::new); + EffectHandler.getInstance().registerHandler("AddFireSourcePoints", AddFireSourcePoints::new); EffectHandler.getInstance().registerHandler("AddHate", AddHate::new); EffectHandler.getInstance().registerHandler("AddHomunculusPoints", AddHomunculusPoints::new); EffectHandler.getInstance().registerHandler("AddHuntingTime", AddHuntingTime::new); @@ -44,6 +45,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); @@ -204,6 +207,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("Ignition", Ignition::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); @@ -243,7 +247,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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java index a32c9ee9fb..6d4121edb0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 2e561149da..7fc45cfcd3 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -49,6 +49,10 @@ 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.Pet; +import org.l2jmobius.gameserver.model.events.EventDispatcher; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeExalted; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse; import org.l2jmobius.gameserver.model.html.PageBuilder; import org.l2jmobius.gameserver.model.html.PageResult; import org.l2jmobius.gameserver.model.skill.Skill; @@ -913,12 +917,22 @@ public class AdminEditChar implements IAdminCommandHandler { player.setNobleLevel(1); player.sendMessage("A GM added you nobless status!"); + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player)); + } break; } case 1: { player.setNobleLevel(2); player.sendMessage("A GM changed your nobless status to exalted!"); + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_EXALTED)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeExalted(player)); + } break; } case 2: diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddFireSourcePoints.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddFireSourcePoints.java new file mode 100644 index 0000000000..1cda99a381 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddFireSourcePoints.java @@ -0,0 +1,66 @@ +/* + * 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.Config; +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.events.AbstractScript; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.variables.PlayerVariables; + +/* + * @author CostyKiller + */ +public class AddFireSourcePoints extends AbstractEffect +{ + + public AddFireSourcePoints(StatSet params) + { + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, Item item) + { + if (!effected.isPlayable()) + { + return; + } + + final Player player = effected.getActingPlayer(); + if (AbstractScript.getRandom(100) < Config.CONQUEST_ABILITY_FIRE_SOURCE_UPGRADE_CHANCE) + { + player.getVariables().set(PlayerVariables.CONQUEST_ABILITY_FIRE_SOURCE_EXP, player.getVariables().getInt(PlayerVariables.CONQUEST_ABILITY_FIRE_SOURCE_EXP, 0) + Config.CONQUEST_ABILITY_FIRE_SOURCE_EXP_AMOUNT); + player.sendMessage("You have added Fire Source points."); + AbstractScript.showOnScreenMsg(player, "You have added Fire Source points.", 5000); + } + else + { + player.sendMessage("You have failed to add Fire Source points."); + AbstractScript.showOnScreenMsg(player, "You have failed to add Fire Source points.", 5000); + } + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index faca7879c5..ec320c5082 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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/ConquestFireCentralAreaReward.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/ConquestFireCentralAreaReward.java index b447028e78..0768580554 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/ConquestFireCentralAreaReward.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/ConquestFireCentralAreaReward.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.variables.PlayerVariables; import org.l2jmobius.gameserver.model.zone.ZoneType; +import org.l2jmobius.gameserver.network.SystemMessageId; /** * @author CostyKiller @@ -59,6 +60,8 @@ public class ConquestFireCentralAreaReward extends AbstractEffect if (AbstractScript.getRandom(100) < Config.CONQUEST_ABILITY_FIRE_SOURCE_UPGRADE_CHANCE) { player.getVariables().set(PlayerVariables.CONQUEST_ABILITY_FIRE_SOURCE_EXP, player.getVariables().getInt(PlayerVariables.CONQUEST_ABILITY_FIRE_SOURCE_EXP, 0) + Config.CONQUEST_ABILITY_FIRE_SOURCE_EXP_AMOUNT); + player.sendPacket(SystemMessageId.YOU_HAVE_RECEIVED_FIRE_SOURCE_POINTS); + AbstractScript.showOnScreenMsg(player, "You have received Fire Source points.", 5000); } } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 1f5992cc6a..efa3a0f694 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java index 8d6469ae61..27c5a18a16 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/RestoreSymbolSeal.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java index deead4a540..2ab5c27685 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java @@ -16,6 +16,11 @@ */ package handlers.effecthandlers; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + import org.l2jmobius.gameserver.data.xml.ExperienceData; import org.l2jmobius.gameserver.data.xml.NpcData; import org.l2jmobius.gameserver.enums.Race; @@ -33,11 +38,12 @@ import org.l2jmobius.gameserver.model.skill.Skill; /** * SummonMulti effect implementation. - * @author UnAfraid + * @author UnAfraid, Mobius */ public class SummonMulti extends AbstractEffect { private final int _npcId; + private final Map _levelTemplates; private final float _expMultiplier; private final ItemHolder _consumeItem; private final int _lifeTime; @@ -46,7 +52,21 @@ public class SummonMulti extends AbstractEffect public SummonMulti(StatSet params) { - _npcId = params.getInt("npcId"); + _npcId = params.getInt("npcId", 0); + if (_npcId > 0) + { + _levelTemplates = null; + } + else + { + final List summonerLevels = params.getIntegerList("summonerLevels"); + final List npcIds = params.getIntegerList("npcIds"); + _levelTemplates = new LinkedHashMap<>(npcIds.size()); + for (int i = 0; i < npcIds.size(); i++) + { + _levelTemplates.put(summonerLevels.get(i), npcIds.get(i)); + } + } _expMultiplier = params.getFloat("expMultiplier", 1); _consumeItem = new ItemHolder(params.getInt("consumeItemId", 0), params.getInt("consumeItemCount", 1)); _consumeItemInterval = params.getInt("consumeItemInterval", 0); @@ -80,7 +100,31 @@ public class SummonMulti extends AbstractEffect return; } - final NpcTemplate template = NpcData.getInstance().getTemplate(_npcId); + final NpcTemplate template; + if (_npcId > 0) + { + template = NpcData.getInstance().getTemplate(_npcId); + } + else + { + Entry levelTemplate = null; + for (Entry entry : _levelTemplates.entrySet()) + { + if ((levelTemplate == null) || (player.getLevel() >= entry.getKey())) + { + levelTemplate = entry; + } + } + if (levelTemplate != null) + { + template = NpcData.getInstance().getTemplate(levelTemplate.getValue()); + } + else // Should never happen. + { + template = NpcData.getInstance().getTemplate(_levelTemplates.keySet().stream().findFirst().get()); + } + } + final Servitor summon = new Servitor(template, player); final int consumeItemInterval = (_consumeItemInterval > 0 ? _consumeItemInterval : (template.getRace() != Race.SIEGE_WEAPON ? 240 : 60)) * 1000; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 1ae3ab2ae8..41fd35ba57 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java index 4e47c369a2..320ea1a78d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java @@ -34,6 +34,7 @@ public class TriggerSkillByBaseStat extends AbstractEffect private final BaseStat _baseStat; private final int _skillId; private final int _skillLevel; + private final int _skillSubLevel; private final int _min; private final int _max; @@ -42,6 +43,7 @@ public class TriggerSkillByBaseStat extends AbstractEffect _baseStat = params.getEnum("baseStat", BaseStat.class); _skillId = params.getInt("skillId", 0); _skillLevel = params.getInt("skillLevel", 1); + _skillSubLevel = params.getInt("skillSubLevel", 0); _min = params.getInt("min", 0); _max = params.getInt("max", 9999); } @@ -101,7 +103,7 @@ public class TriggerSkillByBaseStat extends AbstractEffect { if (!target.isAffectedBySkill(_skillId)) { - SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel)); + SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel)); } } else diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index b58c80876e..9a802942ba 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java index b5416f6f10..a355ce9ed0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java @@ -34,6 +34,7 @@ public class TriggerSkillByStat extends AbstractEffect private final Stat _stat; private final int _skillId; private final int _skillLevel; + private final int _skillSubLevel; private final int _min; private final int _max; @@ -42,6 +43,7 @@ public class TriggerSkillByStat extends AbstractEffect _stat = params.getEnum("stat", Stat.class); _skillId = params.getInt("skillId", 0); _skillLevel = params.getInt("skillLevel", 1); + _skillSubLevel = params.getInt("skillSubLevel", 0); _min = params.getInt("min", 0); _max = params.getInt("max", 9999); } @@ -63,7 +65,7 @@ public class TriggerSkillByStat extends AbstractEffect { if (!target.isAffectedBySkill(_skillId)) { - SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel)); + SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel)); } } else diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index e6aca114c0..479f697dcf 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index 52060ceef6..0909b1d0f6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetAttack.java index 56a0e14968..470470855c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_DON_T_HAVE_A_PET); return; } - final Pet pet = player.getPet(); if (pet.isUncontrollable()) { player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_SATIETY_REACHES_0_YOU_CANNOT_CONTROL_IT); + 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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetHold.java index 796e3890cb..e01838998c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetMove.java index 9922c8ae01..abcf541e93 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index 639e83e997..097fa4e677 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetStop.java index 843fe9cd0d..f00814772e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 1a9adbd92c..e6ba7b9145 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_DON_T_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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index 5770babd1f..2879dc6282 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index feeec57b16..bd74d78cf0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index a54e5f037a..fcdc5bdb2b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index 5a4d56e857..5a5629db67 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 6f7e11ac11..6e013c09f9 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index ec175a945f..981d23429a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index aba3571a99..5bca36e736 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java @@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR); } } + + @Override + public boolean isPetAction() + { + return true; + } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/skillconditionhandlers/CanUseSymbolSealIncreaseItemSkillCondition.java new file mode 100644 index 0000000000..3ab0d0bb69 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 9785766b0f..a23a6139ad 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index e836ebce13..acee337ee6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java index 73a94f9c12..fd0979380b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/ChamberOfProphecies/ChamberOfProphecies.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/IceQueensCastle/Freya.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/IceQueensCastle/Freya.java new file mode 100644 index 0000000000..4558870c36 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/IceQueensCastle/Freya.java @@ -0,0 +1,886 @@ +/* + * 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 instances.IceQueensCastle; + +import java.util.List; + +import org.l2jmobius.gameserver.enums.Movie; +import org.l2jmobius.gameserver.model.Party; +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.holders.ItemHolder; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; +import org.l2jmobius.gameserver.network.NpcStringId; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +import instances.AbstractInstance; + +/** + * @author Tanatos + * @URL https://www.youtube.com/watch?v=3l9JuxM5lk0&t + * @URL https://l2central.info/main/locations/instance_zones/party/ice_queen_castle/ + */ +public class Freya extends AbstractInstance +{ + // NPCs + private static final int BENUSTA = 34542; + private static final int FREYA_THRONE = 26511; + private static final int FREYA_WAITING = 26512; + private static final int FREYA_STAND = 26513; + private static final int GLAKIAS = 26514; + private static final int WINTER_CRYSTAL = 26518; + private static final int ICE_WALL = 26519; + private static final int HUGE_ICICLE = 26520; + // Skills + private static final SkillHolder ICE_BOLT = new SkillHolder(34437, 1); // Queen's Ice Bolt + private static final SkillHolder FREEZING_BOLT = new SkillHolder(34437, 2); // Queen's Freezing Bolt + private static final SkillHolder ICE_STORM = new SkillHolder(34438, 1); // Queen's Ice Storm + private static final SkillHolder FREEZING_STORM = new SkillHolder(34438, 2); // Queen's Freezing Storm + private static final SkillHolder ICE_HURRICANE = new SkillHolder(34439, 1); // Queen's Ice Hurricane + private static final SkillHolder FREEZING_HURRICANE = new SkillHolder(34439, 2); // Queen's Freezing Hurricane + private static final SkillHolder FREEZING_BLIZARD = new SkillHolder(34440, 1); // Queen's Freezing Blizzard + private static final SkillHolder FREEZING_QUEEN_WAVE = new SkillHolder(34441, 2); // Queen's Freezing Wave + private static final SkillHolder ETERNAL_BLIZZARD = new SkillHolder(34442, 1); // Eternal Blizzard + private static final SkillHolder FREEZING_STRIKE = new SkillHolder(34443, 1); // Freezing Strike + private static final SkillHolder FREEZING_SMASH = new SkillHolder(34444, 1); // Freezing Smash + private static final SkillHolder FREEZING_WAVE = new SkillHolder(34445, 1); // Freezing Wave + private static final SkillHolder FINAL_FREEZING = new SkillHolder(34447, 1); // Final Freezing Burst + private static final SkillHolder FREEZING_CHAIN = new SkillHolder(34449, 1); // Freezing Chain + private static final SkillHolder FREEZING_MASS_CHAIN = new SkillHolder(34449, 2); // Mass Freezing Chain + private static final SkillHolder FROSTY_COMMAND = new SkillHolder(34451, 1); // Frosty Command + private static final SkillHolder ICE_BOLTS = new SkillHolder(34452, 1); // Summon Ice Bolts + private static final SkillHolder FINAL_FREEZING_DISPLAY = new SkillHolder(6276, 1); // Final Freezing Burst Display + // Items + private static final ItemHolder JEWELRY_BOX = new ItemHolder(82497, 1); + private static final ItemHolder WARM_ENERGY = new ItemHolder(82491, 1); + private static final ItemHolder COOL_ENERGY = new ItemHolder(82492, 1); + private static final ItemHolder FREYAS_CLOAK = new ItemHolder(82493, 1); + private static final ItemHolder FREYAS_NECKLACE = new ItemHolder(82494, 1); + private static final ItemHolder FREYAS_STAFF = new ItemHolder(82495, 1); + private static final ItemHolder FREYAS_CROWN = new ItemHolder(82496, 1); + // Misc + private static final int TEMPLATE_ID = 323; + + public Freya() + { + super(TEMPLATE_ID); + addStartNpc(BENUSTA); + addAttackId(FREYA_THRONE, FREYA_STAND, GLAKIAS); + addKillId(FREYA_STAND); + addSpellFinishedId(HUGE_ICICLE, WINTER_CRYSTAL, FREYA_STAND); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "enterInstance": + { + final int templateId = TEMPLATE_ID; + if (player.isInParty()) + { + final Party party = player.getParty(); + if (!party.isLeader(player)) + { + player.sendPacket(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER); + return null; + } + + if (player.isInCommandChannel()) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_ENTER_AS_YOU_DON_T_MEET_THE_REQUIREMENTS); + return null; + } + + final List members = party.getMembers(); + for (Player member : members) + { + if (!member.isInsideRadius3D(npc, 1000)) + { + player.sendMessage("Player " + member.getName() + " must come closer."); + return null; + } + } + + for (Player member : members) + { + enterInstance(member, npc, templateId); + } + } + else if (player.isGM()) + { + enterInstance(player, npc, templateId); + } + else + { + player.sendPacket(SystemMessageId.YOU_ARE_NOT_IN_A_PARTY_SO_YOU_CANNOT_ENTER); + } + + if (player.getInstanceWorld() != null) + { + startQuestTimer("movie_opening", 5000, null, player); + } + break; + } + case "movie_opening": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + world.setStatus(1); + playMovie(world, Movie.SC_BOSS_FREYA_OPENING); + startQuestTimer("check_status", 53500, null, player); + break; + } + case "movie_freya_waiting": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + playMovie(world, Movie.SC_BOSS_FREYA_PHASECH_A); + startQuestTimer("movie_glakias", 13100, null, player); + break; + } + case "movie_glakias": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + world.setStatus(2); + world.getNpc(FREYA_THRONE).deleteMe(); + playMovie(world, Movie.SC_ICE_HEAVYKNIGHT_SPAWN); + startQuestTimer("check_status", 10000, null, player); + break; + } + case "movie_last_freya": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + world.setStatus(3); + world.getNpc(GLAKIAS).deleteMe(); + world.getNpc(FREYA_WAITING).deleteMe(); + world.getAliveNpcs(HUGE_ICICLE).forEach(icicle -> icicle.deleteMe()); + playMovie(world, Movie.SC_BOSS_FREYA_PHASECH_B); + startQuestTimer("check_status", 21500, null, player); + break; + } + case "movie_ending": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + playMovie(world, Movie.SC_BOSS_FREYA_ENDING_A); + break; + } + case "freya_rage": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 1) + { + for (int i = 0; i < 3; i++) + { + addSpawn(ICE_WALL, player.getX() + getRandom(-400, 400), player.getY() + getRandom(-400, 400), player.getZ() + 10, 0, false, 10000, false, world.getId()); + } + addSpawn(ICE_WALL, player.getX(), player.getY(), player.getZ() + 10, 0, false, 10000, false, world.getId()); + startQuestTimer("ice_hurricane_cast", 1000, null, player); + } + break; + } + case "glakias_rage": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 2) + { + showOnScreenMsg(world, NpcStringId.I_WILL_FREEZE_YOUR_HEART, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.spawnGroup("ICICLES_1"); + world.spawnGroup("ICICLES_2"); + world.spawnGroup("ICICLES_3"); + world.spawnGroup("ICICLES_4"); + startQuestTimer("ice_bolts_1", 1000, null, player); + startQuestTimer("ice_bolts_2", 1000, null, player); + startQuestTimer("ice_bolts_3", 7000, null, player); + startQuestTimer("ice_bolts_4", 7000, null, player); + } + break; + } + case "ice_bolts_1": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 2) + { + world.getNpcsOfGroup("ICICLES_1").forEach(icicle -> + { + if (icicle != null) + { + icicle.setDisplayEffect(1); + try + { + Thread.sleep(700); + } + catch (Exception e) + { + } + icicle.setDisplayEffect(2); + icicle.doCast(ICE_BOLTS.getSkill()); + } + }); + } + break; + } + case "ice_bolts_2": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 2) + { + world.getNpcsOfGroup("ICICLES_2").forEach(icicle -> + { + if (icicle != null) + { + icicle.setDisplayEffect(1); + try + { + Thread.sleep(810); + } + catch (Exception e) + { + } + icicle.setDisplayEffect(2); + icicle.doCast(ICE_BOLTS.getSkill()); + } + }); + } + break; + } + case "ice_bolts_3": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 2) + { + world.getNpcsOfGroup("ICICLES_3").forEach(icicle -> + { + if (icicle != null) + { + icicle.setDisplayEffect(1); + try + { + Thread.sleep(500); + } + catch (Exception e) + { + } + icicle.setDisplayEffect(2); + icicle.doCast(ICE_BOLTS.getSkill()); + } + }); + } + break; + } + case "ice_bolts_4": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 2) + { + world.getNpcsOfGroup("ICICLES_4").forEach(icicle -> + { + if (icicle != null) + { + icicle.setDisplayEffect(1); + try + { + Thread.sleep(578); + } + catch (Exception e) + { + } + icicle.setDisplayEffect(2); + icicle.doCast(ICE_BOLTS.getSkill()); + } + }); + } + break; + } + case "frosty_command": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 2) + { + final boolean commandCasted = world.getParameters().getBoolean("COMMAND_CASTED", false); + if (!commandCasted) + { + final Npc glakias = world.getNpc(GLAKIAS); + glakias.doCast(FROSTY_COMMAND.getSkill()); + world.getParameters().set("COMMAND_CASTED", true); + } + else + { + startQuestTimer("frosty_command", 1000, null, player); + } + } + break; + } + case "freezing_hurricane": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() < 4) + { + for (int i = 0; i < 5; i++) + { + addSpawn(ICE_WALL, player.getX() + getRandom(-800, 800), player.getY() + getRandom(-800, 800), player.getZ() + 10, 0, false, 10000, false, world.getId()); + } + addSpawn(ICE_WALL, player.getX(), player.getY(), player.getZ() + 10, 0, false, 10000, false, world.getId()); + startQuestTimer("freezing_hurricane_cast", 1000, null, player); + } + break; + } + case "freezing_blizzard": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() < 4) + { + for (int i = 0; i < 10; i++) + { + addSpawn(ICE_WALL, player.getX() + getRandom(-800, 800), player.getY() + getRandom(-800, 800), player.getZ() + 10, 0, false, 10000, false, world.getId()); + } + addSpawn(ICE_WALL, player.getX(), player.getY(), player.getZ() + 10, 0, false, 10000, false, world.getId()); + startQuestTimer("freezing_blizzard_cast", 1000, null, player); + } + break; + } + case "ice_hurricane_cast": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 1) + { + world.getAliveNpcs(ICE_WALL).forEach(wall -> + { + if (wall != null) + { + wall.doCast(ICE_HURRICANE.getSkill()); + + } + }); + startQuestTimer("freya_rage", 12000, null, player); + } + break; + } + case "freezing_hurricane_cast": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 3) + { + world.getAliveNpcs(ICE_WALL).forEach(wall -> + { + if (wall != null) + { + wall.doCast(FREEZING_HURRICANE.getSkill()); + + } + }); + startQuestTimer("freezing_hurricane", 20000, null, player); + } + break; + } + case "freezing_blizzard_cast": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 3) + { + world.getAliveNpcs(ICE_WALL).forEach(wall -> + { + if (wall != null) + { + wall.doCast(FREEZING_BLIZARD.getSkill()); + + } + }); + startQuestTimer("freezing_blizzard", 30000, null, player); + } + break; + } + case "eternal_blizzard": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if ((world.getStatus() == 3) && (world.getAliveNpcCount(WINTER_CRYSTAL) > 0)) + { + final Npc winterCrystal = world.getNpc(WINTER_CRYSTAL); + winterCrystal.doCast(ETERNAL_BLIZZARD.getSkill()); + } + break; + } + case "final_freezing_burst": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 3) + { + showOnScreenMsg(world, NpcStringId.REST_IN_PEACE_FOREVER, ExShowScreenMessage.TOP_CENTER, 10000, true); + final Npc freya = world.getNpc(FREYA_STAND); + freya.doCast(FINAL_FREEZING.getSkill()); + } + break; + } + case "summon_winter_crystal": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + if (world.getStatus() == 3) + { + world.spawnGroup("WINTER_CRYSTAL"); + startQuestTimer("eternal_blizzard", 1000, null, player); + } + break; + } + case "check_status": + { + final Instance world = player.getInstanceWorld(); + if (!isInInstance(world)) + { + return null; + } + + switch (world.getStatus()) + { + case 1: + { + final boolean freyaSpawned = world.getParameters().getBoolean("FREYA_SPAWNED", false); + if (!freyaSpawned) + { + world.spawnGroup("FREYA_STAGE_1"); + showOnScreenMsg(world, NpcStringId.YOU_WILL_PAY_FOR_BREAKING_THE_SILENCE_OF_THE_CASTLE_HIDDEN_IN_THE_EVERLASTING_ICE, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.getParameters().set("FREYA_SPAWNED", true); + } + break; + } + case 2: + { + final boolean glakiasSpawned = world.getParameters().getBoolean("GLAKIAS_SPAWNED", false); + if (!glakiasSpawned) + { + world.spawnGroup("GLAKIAS"); + world.spawnGroup("FREYA_STAGE_2"); + world.spawnGroup("KANNAS_KNIGHTS"); + showOnScreenMsg(world, NpcStringId.GLAKIAS_ALLEGIANCE_TO_ICE_QUEEN_WILL_INCREASE_IN_5_MINUTES, ExShowScreenMessage.TOP_CENTER, 10000, true); + startQuestTimer("frosty_command", 300000, null, player); + world.getParameters().set("GLAKIAS_SPAWNED", true); + world.getParameters().set("FREYA_SPAWNED", false); + } + break; + } + case 3: + { + + final boolean freyaSpawned = world.getParameters().getBoolean("FREYA_SPAWNED", false); + if (!freyaSpawned) + { + world.spawnGroup("FREYA_STAGE_3"); + world.getParameters().set("FREYA_SPAWNED", true); + } + break; + } + } + break; + } + } + return super.onAdvEvent(event, npc, player); + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + switch (npc.getId()) + { + case FREYA_THRONE: + { + final Creature mostHated = ((Attackable) npc).getMostHated(); + final boolean freya90 = world.getParameters().getBoolean("FREYA_90", false); + final boolean freya80 = world.getParameters().getBoolean("FREYA_80", false); + if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.9)) && !freya90) + { + showOnScreenMsg(world, NpcStringId.FEEL_THE_POWER_OF_MY_RAGE, ExShowScreenMessage.TOP_CENTER, 10000, true); + startQuestTimer("freya_rage", 100, null, attacker); + world.getParameters().set("FREYA_90", true); + } + else if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.8)) && !freya80) + { + startQuestTimer("movie_freya_waiting", 100, null, attacker); + world.getParameters().set("FREYA_80", true); + } + else + { + if (getRandom(100) < 40) + { + if (SkillCaster.checkUseConditions(npc, ICE_BOLT.getSkill())) + { + npc.setTarget(mostHated); + npc.doCast(ICE_BOLT.getSkill()); + } + } + else + { + if (SkillCaster.checkUseConditions(npc, ICE_STORM.getSkill())) + { + npc.doCast(ICE_STORM.getSkill()); + } + } + } + break; + } + + case GLAKIAS: + { + final Creature mostHated = ((Attackable) npc).getMostHated(); + final boolean glakias50 = world.getParameters().getBoolean("GLAKIAS_50", false); + final boolean glakias5 = world.getParameters().getBoolean("GLAKIAS_5", false); + if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.5)) && !glakias50) + { + startQuestTimer("glakias_rage", 100, null, attacker); + world.getParameters().set("GLAKIAS_50", true); + } + else if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.05)) && !glakias5) + { + startQuestTimer("movie_last_freya", 100, null, attacker); + world.getParameters().set("GLAKIAS_5", true); + } + else + { + if (getRandom(100) < 20) + { + if (SkillCaster.checkUseConditions(npc, FREEZING_STRIKE.getSkill())) + { + npc.setTarget(mostHated); + npc.doCast(FREEZING_STRIKE.getSkill()); + } + } + else if ((getRandom(100) < 40) && (getRandom(100) > 20)) + { + if (SkillCaster.checkUseConditions(npc, FREEZING_SMASH.getSkill())) + { + npc.doCast(FREEZING_SMASH.getSkill()); + } + } + else if ((getRandom(100) < 60) && (getRandom(100) > 40)) + { + if (SkillCaster.checkUseConditions(npc, FREEZING_WAVE.getSkill())) + { + npc.doCast(FREEZING_WAVE.getSkill()); + } + } + else if ((getRandom(100) < 80) && (getRandom(100) > 60)) + { + if (SkillCaster.checkUseConditions(npc, FREEZING_CHAIN.getSkill())) + { + npc.setTarget(mostHated); + npc.doCast(FREEZING_CHAIN.getSkill()); + } + } + else + { + if (SkillCaster.checkUseConditions(npc, FREEZING_MASS_CHAIN.getSkill())) + { + npc.setTarget(mostHated); + npc.doCast(FREEZING_MASS_CHAIN.getSkill()); + } + + } + } + break; + } + case FREYA_STAND: + { + final Creature mostHated = ((Attackable) npc).getMostHated(); + final boolean freya70 = world.getParameters().getBoolean("FREYA_70", false); + final boolean freya50 = world.getParameters().getBoolean("FREYA_50", false); + final boolean freya5 = world.getParameters().getBoolean("FREYA_5", false); + if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.9)) && !freya70) + { + startQuestTimer("freezing_hurricane", 1000, null, attacker); + startQuestTimer("freezing_blizzard", 5000, null, attacker); + world.getParameters().set("FREYA_70", true); + } + else if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.5)) && !freya50) + { + startQuestTimer("summon_winter_crystal", 100, null, attacker); + showOnScreenMsg(world, NpcStringId.ICE_QUEEN_S_POWER_WILL_PUT_YOU_THROUGH_THE_UNBEARABLE_SUFFERING, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.getParameters().set("FREYA_50", true); + } + else if ((npc.getCurrentHp() <= (npc.getMaxHp() * 0.05)) && !freya5) + { + startQuestTimer("summon_winter_crystal", 100, null, attacker); + showOnScreenMsg(world, NpcStringId.ENOUGH_FACE_YOU_DEATH_ICE_QUEEN_IS_HER_NAME, ExShowScreenMessage.TOP_CENTER, 10000, true); + world.getParameters().set("FREYA_5", true); + } + else if (npc.getCurrentHp() <= (npc.getMaxHp() * 0.01)) + { + startQuestTimer("final_freezing_burst", 100, null, attacker); + } + else + { + if (getRandom(100) < 33) + { + if (SkillCaster.checkUseConditions(npc, FREEZING_BOLT.getSkill())) + { + npc.setTarget(mostHated); + npc.doCast(FREEZING_BOLT.getSkill()); + } + } + else if ((getRandom(100) < 66) && (getRandom(100) > 33)) + { + if (SkillCaster.checkUseConditions(npc, FREEZING_STORM.getSkill())) + { + npc.doCast(FREEZING_STORM.getSkill()); + } + } + else + { + if (SkillCaster.checkUseConditions(npc, FREEZING_QUEEN_WAVE.getSkill())) + { + npc.doCast(FREEZING_QUEEN_WAVE.getSkill()); + } + } + } + break; + } + } + } + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onSpellFinished(Npc npc, Player player, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + switch (npc.getId()) + { + case HUGE_ICICLE: + { + if ((skill.getId() == ICE_BOLTS.getSkillId()) && (world.getStatus() == 2)) + { + npc.setDisplayEffect(3); + } + break; + } + case WINTER_CRYSTAL: + { + if ((skill.getId() == ETERNAL_BLIZZARD.getSkillId()) && (world.getStatus() == 3)) + { + npc.setDisplayEffect(3); + world.getNpc(WINTER_CRYSTAL).doDie(npc); + world.getNpc(FREYA_STAND).setCurrentHp(world.getNpc(FREYA_STAND).getMaxHp() * 0.70); + for (Player member : world.getPlayers()) + { + member.doDie(member); + } + } + break; + } + case FREYA_STAND: + { + if ((skill.getId() == FINAL_FREEZING.getSkillId()) && (world.getStatus() == 3)) + { + world.getNpc(FREYA_STAND).setCurrentHp(world.getNpc(FREYA_STAND).getMaxHp() * 0.20); + npc.doCast(FINAL_FREEZING_DISPLAY.getSkill()); + for (Player member : world.getPlayers()) + { + member.doDie(member); + } + } + break; + } + } + } + return super.onSpellFinished(npc, player, skill); + } + + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (isInInstance(world)) + { + if (npc.getId() == FREYA_STAND) + { + world.setStatus(4); + if (world.getAliveNpcCount(WINTER_CRYSTAL) > 0) + { + world.getNpc(WINTER_CRYSTAL).deleteMe(); + } + + startQuestTimer("movie_ending", 100, null, killer); + + for (Player member : world.getPlayers()) + { + if ((member.getParty() != null) || (member.isGM())) + { + giveItems(member, JEWELRY_BOX); + } + } + + for (Player member : world.getPlayers()) + { + if ((member.getParty() != null) || (member.isGM())) + { + switch (getRandom(7)) + { + case 0: + { + break; + } + case 1: + { + giveItems(member, WARM_ENERGY); + break; + } + case 2: + { + giveItems(member, COOL_ENERGY); + break; + } + case 3: + { + giveItems(member, FREYAS_CLOAK); + break; + } + case 4: + { + giveItems(member, FREYAS_NECKLACE); + break; + } + case 5: + { + giveItems(member, FREYAS_STAFF); + break; + } + case 6: + { + giveItems(member, FREYAS_CROWN); + break; + } + } + } + } + world.finishInstance(2); + } + } + return super.onKill(npc, killer, isSummon); + } + + public static void main(String[] args) + { + new Freya(); + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/IceQueensCastle/condNoEnter.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/IceQueensCastle/condNoEnter.html new file mode 100644 index 0000000000..6d472359c8 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/IceQueensCastle/condNoEnter.html @@ -0,0 +1,6 @@ +Benusta:
+The instance zone is inaccessible at the time.
+Only your party leader can ask me for the first-time visit to the instance zone. There is no other way to enter.
+Keep in mind that the party cannot move to an instance zone if there is a character in the party, which does not meet level requirements. Also teleportation will be impossible if any of the party members stand too far from me.
+Also you cannot enter an instance zone if other party is already in. Please, check the requirements once more. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java index 67e0abe38f..bde333c743 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/KrofinNest/KrofinNest.java @@ -487,7 +487,7 @@ public class KrofinNest extends AbstractInstance } final Npc dummy = world.getNpc(DUMMY); - if (!isInInstance(world)) + if ((dummy == null) || !isInInstance(world)) { return null; } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java index d1719a798c..ec4256d246 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java @@ -30,10 +30,7 @@ import instances.AbstractInstance; */ public class TimedHunting extends AbstractInstance { - // NPCs - private static final int PATROL_TELEPORTER = 34568; - private static final int PATROL_GUARD = 34569; - private static final int TELEPORT_SCOUT = 34549; + // Misc private static final int[] TEMPLATE_IDS = { @@ -47,9 +44,6 @@ public class TimedHunting extends AbstractInstance public TimedHunting() { super(TEMPLATE_IDS); - addStartNpc(PATROL_TELEPORTER, PATROL_GUARD, TELEPORT_SCOUT); - addTalkId(PATROL_TELEPORTER, PATROL_GUARD, TELEPORT_SCOUT); - addFirstTalkId(PATROL_TELEPORTER, PATROL_GUARD, TELEPORT_SCOUT); } @Override diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/MissingQuests.txt index b07c64b9f2..962317e0c4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/MissingQuests.txt @@ -50,10 +50,6 @@ 1901 Storm Isle - Furtive Deal 10595 The Dimensional Warp, Part 8 10596 The Dimensional Warp, Part 9 -10904 Journey to the Conquest World -10905 Hunting Time -10906 Chasing the Light -10907 Where Flowers Blossom 11028 Wind of Destiny - Encounter 11029 Wind of Destiny - Promise 11030 Wind of Destiny - Choice \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java index 75719091f5..7616d4bbf0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java @@ -51,7 +51,7 @@ public class Q00933_TombRaiders extends Quest private static final int TOMB_SOULTAKER = 24583; private static final int TOMB_PATROL = 24582; // Item - private static final int BENUSTA_REWARD_BOX = 81151; + private static final int BENUSTA_REWARD_BOX = 82453; // Misc private static final String KILL_COUNT_VAR = "KillCount"; // Zone @@ -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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10507_ObtainingNewPower/Q10507_ObtainingNewPower.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10507_ObtainingNewPower/Q10507_ObtainingNewPower.java index f1f87d30e4..549dcdca8b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10507_ObtainingNewPower/Q10507_ObtainingNewPower.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10507_ObtainingNewPower/Q10507_ObtainingNewPower.java @@ -167,12 +167,6 @@ public class Q10507_ObtainingNewPower extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -180,16 +174,22 @@ public class Q10507_ObtainingNewPower extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -197,13 +197,6 @@ public class Q10507_ObtainingNewPower extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -216,6 +209,13 @@ public class Q10507_ObtainingNewPower extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -223,6 +223,15 @@ public class Q10507_ObtainingNewPower extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -239,22 +248,6 @@ public class Q10507_ObtainingNewPower extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24480, // Dragon Legionnaire - 24482, // Dragon Officer - 24481, // Dragon Peltast - 24483, // Dragon Centurion - 24484, // Dragon Elite Guard - 24485, // Behemoth Dragon // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -268,15 +261,55 @@ public class Q10507_ObtainingNewPower extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10507_ObtainingNewPower() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10510_PowerHarmony/Q10510_PowerHarmony.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10510_PowerHarmony/Q10510_PowerHarmony.java index 1e27244d37..5df473a147 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10510_PowerHarmony/Q10510_PowerHarmony.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10510_PowerHarmony/Q10510_PowerHarmony.java @@ -170,12 +170,6 @@ public class Q10510_PowerHarmony extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -183,16 +177,22 @@ public class Q10510_PowerHarmony extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -200,13 +200,6 @@ public class Q10510_PowerHarmony extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -219,6 +212,13 @@ public class Q10510_PowerHarmony extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -226,6 +226,15 @@ public class Q10510_PowerHarmony extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -242,22 +251,6 @@ public class Q10510_PowerHarmony extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24480, // Dragon Legionnaire - 24482, // Dragon Officer - 24481, // Dragon Peltast - 24483, // Dragon Centurion - 24484, // Dragon Elite Guard - 24485, // Behemoth Dragon // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -271,15 +264,55 @@ public class Q10510_PowerHarmony extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10510_PowerHarmony() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java index 7544706976..7b4c393fd0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10591_NobleMaterial/Q10591_NobleMaterial.java @@ -25,6 +25,9 @@ import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventDispatcher; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBecomeNoblesse; import org.l2jmobius.gameserver.model.holders.ItemHolder; import org.l2jmobius.gameserver.model.holders.SkillHolder; import org.l2jmobius.gameserver.model.quest.Quest; @@ -209,6 +212,7 @@ public class Q10591_NobleMaterial extends Quest giveItems(player, WARRIOR_CICLET_BOX_LV5, 1); basicRewards(player); player.setNobleLevel(1); + checkNobleListener(player); player.broadcastInfo(); showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName()); player.doCast(NOBLESSE_PRESENTATION.getSkill()); @@ -225,6 +229,7 @@ public class Q10591_NobleMaterial extends Quest giveItems(player, WIZARD_CICLET_BOX_LV5, 1); basicRewards(player); player.setNobleLevel(1); + checkNobleListener(player); player.broadcastInfo(); showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName()); player.doCast(NOBLESSE_PRESENTATION.getSkill()); @@ -241,6 +246,7 @@ public class Q10591_NobleMaterial extends Quest giveItems(player, KNIGHT_CICLET_BOX_LV5, 1); basicRewards(player); player.setNobleLevel(1); + checkNobleListener(player); player.broadcastInfo(); showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_S1_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 10000, player.getName()); player.doCast(NOBLESSE_PRESENTATION.getSkill()); @@ -573,4 +579,13 @@ public class Q10591_NobleMaterial extends Quest } } } + + private void checkNobleListener(Player player) + { + // Notify to scripts. + if (EventDispatcher.getInstance().hasListener(EventType.ON_PLAYER_BECOME_NOBLESSE)) + { + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerBecomeNoblesse(player)); + } + } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10811_ExaltedOneWhoFacesTheLimit/Q10811_ExaltedOneWhoFacesTheLimit.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10811_ExaltedOneWhoFacesTheLimit/Q10811_ExaltedOneWhoFacesTheLimit.java index 2aa6629636..119b9fdae5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10811_ExaltedOneWhoFacesTheLimit/Q10811_ExaltedOneWhoFacesTheLimit.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10811_ExaltedOneWhoFacesTheLimit/Q10811_ExaltedOneWhoFacesTheLimit.java @@ -163,12 +163,6 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -176,16 +170,22 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -193,13 +193,6 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -212,6 +205,13 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -219,6 +219,15 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -235,20 +244,6 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24617, // Dragon Peltast - 24618, // Dragon Officer - 24619, // Behemoth Dragon - 24620, // Soul Hunter // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -262,15 +257,55 @@ public class Q10811_ExaltedOneWhoFacesTheLimit extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10811_ExaltedOneWhoFacesTheLimit() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10817_ExaltedOneWhoOvercomesTheLimit/Q10817_ExaltedOneWhoOvercomesTheLimit.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10817_ExaltedOneWhoOvercomesTheLimit/Q10817_ExaltedOneWhoOvercomesTheLimit.java index 4639462ada..056a84b2ba 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10817_ExaltedOneWhoOvercomesTheLimit/Q10817_ExaltedOneWhoOvercomesTheLimit.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10817_ExaltedOneWhoOvercomesTheLimit/Q10817_ExaltedOneWhoOvercomesTheLimit.java @@ -167,12 +167,6 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -180,16 +174,22 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -197,13 +197,6 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -216,6 +209,13 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -223,6 +223,15 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -239,20 +248,6 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24617, // Dragon Peltast - 24618, // Dragon Officer - 24619, // Behemoth Dragon - 24620, // Soul Hunter // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -266,15 +261,55 @@ public class Q10817_ExaltedOneWhoOvercomesTheLimit extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10817_ExaltedOneWhoOvercomesTheLimit() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10823_ExaltedOneWhoShattersTheLimit/Q10823_ExaltedOneWhoShattersTheLimit.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10823_ExaltedOneWhoShattersTheLimit/Q10823_ExaltedOneWhoShattersTheLimit.java index c5079a74f1..7f7838492a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10823_ExaltedOneWhoShattersTheLimit/Q10823_ExaltedOneWhoShattersTheLimit.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10823_ExaltedOneWhoShattersTheLimit/Q10823_ExaltedOneWhoShattersTheLimit.java @@ -174,12 +174,6 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -187,16 +181,22 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -204,13 +204,6 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -223,6 +216,13 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -230,6 +230,15 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -246,20 +255,6 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24617, // Dragon Peltast - 24618, // Dragon Officer - 24619, // Behemoth Dragon - 24620, // Soul Hunter // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -273,15 +268,55 @@ public class Q10823_ExaltedOneWhoShattersTheLimit extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10823_ExaltedOneWhoShattersTheLimit() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10873_ExaltedReachingAnotherLevel/Q10873_ExaltedReachingAnotherLevel.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10873_ExaltedReachingAnotherLevel/Q10873_ExaltedReachingAnotherLevel.java index 8f46d43003..3c06ec65b3 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10873_ExaltedReachingAnotherLevel/Q10873_ExaltedReachingAnotherLevel.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10873_ExaltedReachingAnotherLevel/Q10873_ExaltedReachingAnotherLevel.java @@ -166,12 +166,6 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -179,16 +173,22 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -196,13 +196,6 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -215,6 +208,13 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -222,6 +222,15 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -238,20 +247,6 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24617, // Dragon Peltast - 24618, // Dragon Officer - 24619, // Behemoth Dragon - 24620, // Soul Hunter // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -265,15 +260,55 @@ public class Q10873_ExaltedReachingAnotherLevel extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10873_ExaltedReachingAnotherLevel() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10879_ExaltedGuideToPower/Q10879_ExaltedGuideToPower.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10879_ExaltedGuideToPower/Q10879_ExaltedGuideToPower.java index fc55423e19..f04a9018bb 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10879_ExaltedGuideToPower/Q10879_ExaltedGuideToPower.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10879_ExaltedGuideToPower/Q10879_ExaltedGuideToPower.java @@ -166,12 +166,6 @@ public class Q10879_ExaltedGuideToPower extends Quest 24633, // Ketra Orc Warrior 24634, // Ketra Orc Lieutenant 24635, // Ketra Orc Battalion Commander - // Varka Silenos Barracks - 24636, // Varka Silenos Magus - 24637, // Varka Silenos Shaman - 24638, // Varka Silenos Footman - 24639, // Varka Silenos Sergeant - 24640, // Varka Silenos Officer // Breka's Stronghold 24420, // Breka Orc Prefect 24416, // Breka Orc Scout Captain @@ -179,16 +173,22 @@ public class Q10879_ExaltedGuideToPower extends Quest 24415, // Breka Orc Scout 24417, // Breka Orc Archer 24418, // Breka Orc Shaman - // Sel Mahum Training Grounds - 24492, // Sel Mahum Soldier - 24494, // Sel Mahum Warrior - 24493, // Sel Mahum Squad Leader - 24495, // Keltron // Plains of the Lizardmen 24496, // Tanta Lizardman Warrior 24498, // Tanta Lizardman Wizard 24499, // Priest Ugoros 24497, // Tanta Lizardman Archer + // Varka Silenos Barracks + 24636, // Varka Silenos Magus + 24637, // Varka Silenos Shaman + 24638, // Varka Silenos Footman + 24639, // Varka Silenos Sergeant + 24640, // Varka Silenos Officer + // Sel Mahum Training Grounds + 24492, // Sel Mahum Soldier + 24494, // Sel Mahum Warrior + 24493, // Sel Mahum Squad Leader + 24495, // Keltron // Fields of Massacre 24486, // Dismal Pole 24487, // Graveyard Predator @@ -196,13 +196,6 @@ public class Q10879_ExaltedGuideToPower extends Quest 24491, // Doom Knight 24490, // Doom Soldier 24488, // Doom Archer - // Wall of Argos - 24606, // Captive Antelope - 24607, // Captive Bandersnatch - 24608, // Captive Buffalo - 24609, // Captive Grendel - 24610, // Eye of Watchman - 24611, // Elder Homunculus // Sea Of Spores 24226, // Aranea 24227, // Keros @@ -215,6 +208,13 @@ public class Q10879_ExaltedGuideToPower extends Quest 24236, // Tergus 24237, // Skeletus 24238, // Atrofine + // Wall of Argos + 24606, // Captive Antelope + 24607, // Captive Bandersnatch + 24608, // Captive Buffalo + 24609, // Captive Grendel + 24610, // Eye of Watchman + 24611, // Elder Homunculus // Wasteland 24501, // Centaur Fighter 24504, // Centaur Warlord @@ -222,6 +222,15 @@ public class Q10879_ExaltedGuideToPower extends Quest 24503, // Centaur Wizard 24500, // Sand Golem 24502, // Centaur Marksman + // Beast Farm + 24651, // Red Kookaburra + 24652, // Blue Kookaburra + 24653, // White Cougar + 24654, // Cougar + 24655, // Black Buffalo + 24656, // White Buffalo + 24657, // Grandel + 24658, // Black Grandel // Cemetery 19455, // Aden Raider 19456, // Te Ochdumann @@ -238,20 +247,6 @@ public class Q10879_ExaltedGuideToPower extends Quest 23298, // Royal Quartermaster 23299, // Operations Chief of the 7th Division 23300, // Commander of Operations - // Fafurion Temple - 24329, // Starving Water Dragon - 24318, // Temple Guard Captain - 24325, // Temple Wizard - 24324, // Temple Guardian Warrior - 24326, // Temple Guardian Wizard - 24323, // Temple Guard - 24321, // Temple Patrol Guard - 24322, // Temple Knight Recruit - // Dragon Valley - 24617, // Dragon Peltast - 24618, // Dragon Officer - 24619, // Behemoth Dragon - 24620, // Soul Hunter // Valley of Saints 24876, // Guide of Splendor 24877, // Herald of Splendor @@ -265,15 +260,55 @@ public class Q10879_ExaltedGuideToPower extends Quest 24884, // Springs Dwarf Berserker 24885, // Springs Dwarf Priest 24886, // Springs Yeti - // Beast Farm - 24651, // Red Kookaburra - 24652, // Blue Kookaburra - 24653, // White Cougar - 24654, // Cougar - 24655, // Black Buffalo - 24656, // White Buffalo - 24657, // Grandel - 24658, // Black Grandel + // Cruma Marshlands + 24930, // Black Demon Knight + 24931, // Black Demon Warrior + 24932, // Black Demon Scout + 24933, // Black Demon Wizard + // Frozen Labyrinth + 24934, // Frozen Soldier + 24935, // Frozen Defender + 24936, // Ice Knight + 24937, // Glacier Golem + 24938, // Ice Fairy + // Sel Mahum Base + 24961, // Sel Mahum Footman + 24962, // Sel Mahum Elite Soldier + 24963, // Sel Mahum Shaman + 24964, // Sel Mahum Wizard + // Fafurion Temple + 24329, // Starving Water Dragon + 24318, // Temple Guard Captain + 24325, // Temple Wizard + 24324, // Temple Guardian Warrior + 24326, // Temple Guardian Wizard + 24323, // Temple Guard + 24321, // Temple Patrol Guard + 24322, // Temple Knight Recruit + // Dragon Valley West + 24664, // Graveyard Death Lich + 24665, // Graveyard Death Berserker + 24666, // Graveyard Death Soldier + 24667, // Graveyard Death Knight + // Dragon Valley East + 24669, // Dragon Officer + 24670, // Dragon Beast + 24671, // Dragon Centurion + 24672, // Elite Dragon Guard + // Shadow Of The Mother Tree + 24965, // Creeper Rampike + 24966, // Fila Aprias + 24967, // Flush Teasle + 24968, // Treant Blossom + 24969, // Arsos Butterfly + // Execution Grounds + 24673, // Zombie Orc + 24674, // Zombie Dark Elf + 24675, // Zombie Dwarf + 24676, // Schnabel Stalker + 24677, // Henker Hacker + 24678, // Schnabel Doctor + 24679, // Henker Anatomist }; public Q10879_ExaltedGuideToPower() diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm index 6d2bd2036f..9a6b1c5b8b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-01.htm +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.htm new file mode 100644 index 0000000000..e7fc7b5818 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-02.html deleted file mode 100644 index aa6affb7f6..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.htm new file mode 100644 index 0000000000..32f35f5524 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-03.html deleted file mode 100644 index e1b7125a91..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.htm deleted file mode 100644 index ec59d1c19e..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-04.html new file mode 100644 index 0000000000..30f55b94dd --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/34057-05.html deleted file mode 100644 index 549cf956f1..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Message.html deleted file mode 100644 index 07644194b9..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java index 2bc2bd71d5..377cc0827d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10885_SaviorsPathDiscovery/Q10885_SaviorsPathDiscovery.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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, 90638, 82); 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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html index 8369fc1b4a..0475175b73 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10886_SaviorsPathSearchTheRefinery/34425-04.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-00.html new file mode 100644 index 0000000000..c9012038ad --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-00.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+I don't see any invitation from Conquest Guide Chloe, make sure you bring that to me. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-01.htm new file mode 100644 index 0000000000..cb3365b298 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-01.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you brought the invitation that Conquest Guide Chloe gave you? + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-02.html new file mode 100644 index 0000000000..a079e26eae --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-02.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Oh! Let me see if it's genuine, come back later.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-03.htm new file mode 100644 index 0000000000..6fb447dcef --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Checking the invitation...
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-04.html new file mode 100644 index 0000000000..673c255fff --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34599-04.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Great! You have brought the right one, here is your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-00.html new file mode 100644 index 0000000000..27ec4acf46 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-00.html @@ -0,0 +1,5 @@ +Conquest Guide Chloe:
+Hello, adventurer!
+I have no news for you. There's nothing I can tell you.
+(Available to characters of Lv. 110+.)
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-01.htm new file mode 100644 index 0000000000..e1ffb19ff5 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Chloe:
+Hello, adventurer!
+The most upstanding warriors receive an invitation to visit a new world - the Conquest.
+To learn more, go to Conquest Town and talk to Entropy.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-02.html new file mode 100644 index 0000000000..69730173ee --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/34600-02.html @@ -0,0 +1,4 @@ +Conquest Guide Chloe:
+You can go now,
+you must give the invitation to Conquest Guide Entropy, in the Conquest Town.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/Q10904_JourneyToTheConquestWorld.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/Q10904_JourneyToTheConquestWorld.java new file mode 100644 index 0000000000..a720ce3330 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10904_JourneyToTheConquestWorld/Q10904_JourneyToTheConquestWorld.java @@ -0,0 +1,144 @@ +/* + * 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 quests.Q10904_JourneyToTheConquestWorld; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +/** + * @author CostyKiller + */ +public class Q10904_JourneyToTheConquestWorld extends Quest +{ + // NPCs + private static final int ENTROPY = 34599; + private static final int CHLOE = 34600; + // Items + private static final int CONQUEST_NAME_CHANGE_COUPON = 81979; + private static final int CHLOE_INVITATION = 82176; + // Misc + private static final int MIN_LEVEL = 110; + + public Q10904_JourneyToTheConquestWorld() + { + super(10904); + addStartNpc(CHLOE); + addTalkId(CHLOE, ENTROPY); + addCondMinLevel(MIN_LEVEL, "34600-00.html"); + registerQuestItems(CHLOE_INVITATION); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34600-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + giveItems(player, CHLOE_INVITATION, 1); + htmltext = event; + } + break; + } + case "34599-02.html": + { + if (qs.isCond(1) && (hasQuestItems(player, CHLOE_INVITATION))) + { + takeItems(player, -1, CHLOE_INVITATION); + qs.setCond(2); + htmltext = event; + } + break; + } + case "34599-04.html": + { + if (qs.isCond(2)) + { + giveItems(player, CONQUEST_NAME_CHANGE_COUPON, 1); + qs.exitQuest(false, true); + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == CHLOE) + { + htmltext = "34600-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case CHLOE: + { + if (qs.isCond(1)) + { + htmltext = "34600-02.html"; + } + break; + } + case ENTROPY: + { + if (qs.isCond(1)) + { + htmltext = "34599-01.htm"; + } + else if (qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-00.html new file mode 100644 index 0000000000..975f1f53b9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-00.html @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-01.htm new file mode 100644 index 0000000000..b5b1ebc72a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+You must learn about Conquest World, there are three zones out there and you must hunt in each one of them.
+Defeat the specified number of monsters in each of the following zones: 600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).
+Monsters to hunt: all monsters in water hunting zones of the Conquest world.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-02.html new file mode 100644 index 0000000000..1641d5e7f1 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-02.html @@ -0,0 +1,5 @@ +Conquest Guide Entropy:
+Defeat the specified number of monsters in each of the following zones: 600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).
+Monsters to hunt: all monsters in water hunting zones of the Conquest world.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-03.htm new file mode 100644 index 0000000000..94fd846b39 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you killed all the monsters?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-04.html new file mode 100644 index 0000000000..fe78df4a7a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-04.html @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+Don't try to foul me...
+Defeat the specified number of monsters in each of the following zones: 600 in the Outer Lands, 600 in Zone 1 (Asa), 600 in Zone 2 (Anima) and 600 in Zone 3 (Nox).
+Monsters to hunt: all monsters in water hunting zones of the Conquest world.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-05.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-05.html new file mode 100644 index 0000000000..d3902cf585 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/34599-05.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/Q10905_HuntingTime.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/Q10905_HuntingTime.java new file mode 100644 index 0000000000..dbaa7de9ce --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10905_HuntingTime/Q10905_HuntingTime.java @@ -0,0 +1,345 @@ +/* + * 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 quests.Q10905_HuntingTime; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10905_HuntingTime extends Quest +{ + // NPC + private static final int ENTROPY = 34599; + // Monsters + private static final int[] MONSTERS_OUTER_CASTLE = + { + // Daril's Water Source (Lv. 112) + 27701, // Daril + 27702, // Atron + 27703, // Seo + 27704, // Craigo + 27705, // Kiku + 27706, // Floato + // Daril Phran's Water Source (Lv. 116) + 27707, // Daril Phran + 27708, // Atron Phran + 27709, // Seo Phran + 27710, // Craigo Phran + 27711, // Kiku Phran + 27712, // Floato Phran + }; + private static final int[] MONSTERS_ASA = + { + // Asa Area 1 (Lv. 116) + 27713, // Daril Asa Ar + 27714, // Seo Asa Ar + 27715, // Floato Asa Ar + 27716, // Asa Ar Hunter + 27717, // Asa Ar Sorceress + 27718, // Saida Asa Ar + 19830, // Luminous Soul + // Asa Area 2 (Lv. 120) + 27719, // Atron Asa Mide + 27720, // Craigo Asa Mide + 27721, // Kerberos Asa Mide + 27722, // Asa Mide Hunter + 27723, // Asa Mide Sorceress + 27724, // Saida Asa Mide + 27725, // Asa Mide Blader + // Asa Area 3 (Lv. 124) + 27726, // Atron Asa Telro + 27727, // Craigo Asa Telro + 27728, // Beor Asa Telro + 27729, // Asa Telro Hunter + 27730, // Asa Telro Sorceress + 27731, // Saida Asa Telro + 27732, // Asa Telro Blader + 27733, // Asa Telro Guard + }; + private static final int[] MONSTERS_ANIMA = + { + // Anima Area 1 (Lv. 116) + 27755, // Daril Anima Ar + 27756, // Seo Anima Ar + 27757, // Floato Anima Ar + 27758, // Anima Ar Hunter + 27759, // Anima Ar Sorceress + 27760, // Saida Anima Ar + // Anima Area 2 (Lv. 120) + 27761, // Atron Anima Mide + 27762, // Craigo Anima Mide + 27763, // Kerberos Anima Mide + 27764, // Anima Mide Hunter + 27765, // Anima Mide Sorceress + 27766, // Saida Anima Mide + 27767, // Anima Mide Blader + // Anima Area 3 (Lv. 124) + 27768, // Atron Anima Telro + 27769, // Craigo Anima Telro + 27770, // Beor Anima Telro + 27771, // Anima Telro Hunter + 27772, // Anima Telro Sorceress + 27773, // Saida Anima Telro + 27774, // Anima Telro Blader + 27775, // Anima Telro Guard + }; + private static final int[] MONSTERS_NOX = + { + // Nox Area 1 (Lv. 116) + 27734, // Daril Nox Ar + 27735, // Seo Nox Ar + 27736, // Floato Nox Ar + 27737, // Nox Ar Hunter + 27738, // Nox Ar Sorceress + 27739, // Saida Nox Ar + // Nox Area 2 (Lv. 120) + 27740, // Atron Nox Mide + 27741, // Craigo Nox Mide + 27742, // Kerberos Nox Mide + 27743, // Nox Mide Hunter + 27744, // Nox Mide Sorceress + 27745, // Saida Nox Mide + 27746, // Nox Mide Blader + // Nox Area 3 (Lv. 124) + 27747, // Atron Nox Telro + 27748, // Craigo Nox Telro + 27749, // Beor Nox Telro + 27750, // Nox Telro Hunter + 27751, // Nox Telro Sorceress + 27752, // Saida Nox Telro + 27753, // Nox Telro Blader + 27754, // Nox Telro Guard + }; + // Misc + private static final int MIN_LEVEL = 110; + private static final String KILL_COUNT_VAR_OUTER_CASTLE = "KillCountOuterCastle"; + private static final String KILL_COUNT_VAR_ASA = "KillCountAsa"; + private static final String KILL_COUNT_VAR_ANIMA = "KillCountAnima"; + private static final String KILL_COUNT_VAR_NOX = "KillCountNox"; + // Monsters Kill Target + private static final int MAX_KILLED_MOBS_OUTER_CASTLE = 600; + private static final int MAX_KILLED_MOBS_ASA = 600; + private static final int MAX_KILLED_MOBS_ANIMA = 600; + private static final int MAX_KILLED_MOBS_NOX = 600; + + public Q10905_HuntingTime() + { + super(10905); + addStartNpc(ENTROPY); + addTalkId(ENTROPY); + addKillId(MONSTERS_OUTER_CASTLE); + addKillId(MONSTERS_ASA); + addKillId(MONSTERS_ANIMA); + addKillId(MONSTERS_NOX); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html"); + addCondMinLevel(MIN_LEVEL, "34599-00.html"); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34599-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34599-05.html": + { + if (qs.isCond(2)) + { + addExpAndSp(player, 26617381116L, 23955643); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34599-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ENTROPY) + { + htmltext = "34599-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ENTROPY: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + final Party party = killer.getParty(); + if (party != null) + { + for (Player member : party.getMembers()) + { + final QuestState qs = getQuestState(member, false); + if (qs != null) + { + processKill(npc, member); + } + } + } + else + { + processKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void processKill(Npc npc, Player killer) + { + final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc); + if (qs != null) + { + final Player player = qs.getPlayer(); + final int killCountOuterCastle = qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE); + final int killCountAsa = qs.getInt(KILL_COUNT_VAR_ASA); + final int killCountAnima = qs.getInt(KILL_COUNT_VAR_ANIMA); + final int killCountNox = qs.getInt(KILL_COUNT_VAR_NOX); + + if (CommonUtil.contains(MONSTERS_OUTER_CASTLE, npc.getId())) + { + if (killCountOuterCastle < MAX_KILLED_MOBS_OUTER_CASTLE) + { + qs.set(KILL_COUNT_VAR_OUTER_CASTLE, killCountOuterCastle + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_ASA, npc.getId())) + { + if (killCountAsa < MAX_KILLED_MOBS_ASA) + { + qs.set(KILL_COUNT_VAR_ASA, killCountAsa + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_ANIMA, npc.getId())) + { + if (killCountAnima < MAX_KILLED_MOBS_ANIMA) + { + qs.set(KILL_COUNT_VAR_ANIMA, killCountAnima + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_NOX, npc.getId())) + { + if (killCountNox < MAX_KILLED_MOBS_NOX) + { + qs.set(KILL_COUNT_VAR_NOX, killCountNox + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + + sendNpcLogList(player); + } + } + + private void checkKillProgress(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE) >= MAX_KILLED_MOBS_OUTER_CASTLE) && (qs.getInt(KILL_COUNT_VAR_ASA) >= MAX_KILLED_MOBS_ASA) && (qs.getInt(KILL_COUNT_VAR_ANIMA) >= MAX_KILLED_MOBS_ANIMA) && (qs.getInt(KILL_COUNT_VAR_NOX) >= MAX_KILLED_MOBS_NOX)) + { + qs.setCond(2, true); + playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE); + } + } + + @Override + public Set getNpcLogList(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_OUTER_CASTLE.getId(), true, qs.getInt(KILL_COUNT_VAR_OUTER_CASTLE))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_ASA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_ASA))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_ANIMA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_ANIMA))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_NOX_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_NOX))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-00.html new file mode 100644 index 0000000000..975f1f53b9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-00.html @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-01.htm new file mode 100644 index 0000000000..18c376a9c8 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+You must learn about a new way to succeed in conquering the Conquest world.
+Defeat 30 Luminous Souls that can be encountered in certain zones of the Conquest world, and collect their fragments.
+Monster to hunt: Luminous Soul.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-02.html new file mode 100644 index 0000000000..714d176159 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-02.html @@ -0,0 +1,5 @@ +Conquest Guide Entropy:
+Defeat 30 Luminous Souls that can be encountered in certain zones of the Conquest world, and collect their fragments.
+Monster to hunt: Luminous Soul.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-03.htm new file mode 100644 index 0000000000..375c0e8783 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you collected all the required luminous soul fragments?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-04.html new file mode 100644 index 0000000000..52892111fa --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-04.html @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+Don't try to foul me...
+Defeat 30 Luminous Souls that can be encountered in certain zones of the Conquest world, and collect their fragments.
+Monster to hunt: Luminous Soul.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-05.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-05.html new file mode 100644 index 0000000000..d3902cf585 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/34599-05.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/Q10906_ChasingTheLight.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/Q10906_ChasingTheLight.java new file mode 100644 index 0000000000..8fa1226328 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10906_ChasingTheLight/Q10906_ChasingTheLight.java @@ -0,0 +1,164 @@ +/* + * 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 quests.Q10906_ChasingTheLight; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10906_ChasingTheLight extends Quest +{ + // NPC + private static final int ENTROPY = 34599; + // Monsters + private static final int[] MONSTERS = + { + 19830, // Luminous Soul - Asa Area 1 (Lv. 116) + 19832, // Luminous Soul - Anima Area 1 (Lv. 116) + 19831, // Luminous Soul - Nox Area 1 (Lv. 116) + }; + // Item + private static final int LUMINOUS_SOUL_FRAGMENT = 82177; + // Misc + private static final int MIN_LEVEL = 110; + private static final int LUMINOUS_SOUL_FRAGMENT_NEEDED = 30; + + public Q10906_ChasingTheLight() + { + super(10906); + addStartNpc(ENTROPY); + addTalkId(ENTROPY); + addKillId(MONSTERS); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html"); + addCondMinLevel(MIN_LEVEL, "34599-00.html"); + registerQuestItems(LUMINOUS_SOUL_FRAGMENT); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34599-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34599-05.html": + { + if (qs.isCond(2)) + { + takeItems(player, LUMINOUS_SOUL_FRAGMENT, 30); + addExpAndSp(player, 8872460372L, 7985214); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34599-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ENTROPY) + { + htmltext = "34599-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ENTROPY: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + executeForEachPlayer(player, npc, isSummon, true, false); + return super.onKill(npc, player, isSummon); + } + + @Override + public void actionForEachPlayer(Player player, Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE)) + { + if (getQuestItemsCount(player, LUMINOUS_SOUL_FRAGMENT) < LUMINOUS_SOUL_FRAGMENT_NEEDED) + { + giveItems(player, LUMINOUS_SOUL_FRAGMENT, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (getQuestItemsCount(player, LUMINOUS_SOUL_FRAGMENT) >= LUMINOUS_SOUL_FRAGMENT_NEEDED) + { + qs.setCond(2, true); + } + } + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-00.html new file mode 100644 index 0000000000..975f1f53b9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-00.html @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-01.htm new file mode 100644 index 0000000000..0b29b2dda9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+I need you to bring me petals of the special flowers that grow only in the Conquest world.
+Defeat 120 Soul Flowers that sometimes appear while hunting monsters in the Conquest world, and gather their petals.
+Monster to hunt: Soul Flower.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-02.html new file mode 100644 index 0000000000..c715627758 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-02.html @@ -0,0 +1,5 @@ +Conquest Guide Entropy:
+Defeat 120 Soul Flowers that sometimes appear while hunting monsters in the Conquest world, and gather their petals.
+Monster to hunt: Soul Flower.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-03.htm new file mode 100644 index 0000000000..800061b434 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-03.htm @@ -0,0 +1,4 @@ +Conquest Guide Entropy:
+Have you gathered all the required flower petals?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-04.html new file mode 100644 index 0000000000..376cf18f5e --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-04.html @@ -0,0 +1,6 @@ +Conquest Guide Entropy:
+Don't try to foul me...
+Defeat 120 Soul Flowers that sometimes appear while hunting monsters in the Conquest world, and gather their petals.
+Monster to hunt: Soul Flower.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-05.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-05.html new file mode 100644 index 0000000000..d3902cf585 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/34599-05.html @@ -0,0 +1,3 @@ +Conquest Guide Entropy:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/Q10907_WhereFlowersBlossom.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/Q10907_WhereFlowersBlossom.java new file mode 100644 index 0000000000..bf7448011d --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10907_WhereFlowersBlossom/Q10907_WhereFlowersBlossom.java @@ -0,0 +1,172 @@ +/* + * 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 quests.Q10907_WhereFlowersBlossom; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10907_WhereFlowersBlossom extends Quest +{ + // NPC + private static final int ENTROPY = 34599; + // Monsters + private static final int[] MONSTERS = + { + 19818, // Soul Flower - Asa Area 1 (Lv. 116) + 19819, // Soul Flower - Asa Area 2 (Lv. 120) + 19820, // Soul Flower - Asa Area 3 (Lv. 124) + 19824, // Soul Flower - Anima Area 1 (Lv. 116) + 19825, // Soul Flower - Anima Area 2 (Lv. 120) + 19826, // Soul Flower - Anima Area 3 (Lv. 124) + 19821, // Soul Flower - Nox Area 1 (Lv. 116) + 19822, // Soul Flower - Nox Area 2 (Lv. 120) + 19823, // Soul Flower - Nox Area 3 (Lv. 124) + 19840, // Soul Flower - Vita (Lv. 124) + 19841, // Soul Flower - Ignis (Lv. 128) + }; + // Item + private static final int SOUL_FLOWER_PETAL = 82178; + // Misc + private static final int MIN_LEVEL = 110; + private static final int SOUL_FLOWER_PETAL_NEEDED = 120; + + public Q10907_WhereFlowersBlossom() + { + super(10907); + addStartNpc(ENTROPY); + addTalkId(ENTROPY); + addKillId(MONSTERS); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34599-00.html"); + addCondMinLevel(MIN_LEVEL, "34599-00.html"); + registerQuestItems(SOUL_FLOWER_PETAL); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34599-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34599-05.html": + { + if (qs.isCond(2)) + { + takeItems(player, SOUL_FLOWER_PETAL, 120); + addExpAndSp(player, 8872460372L, 7985214); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34599-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ENTROPY) + { + htmltext = "34599-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ENTROPY: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34599-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + executeForEachPlayer(player, npc, isSummon, true, false); + return super.onKill(npc, player, isSummon); + } + + @Override + public void actionForEachPlayer(Player player, Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE)) + { + if (getQuestItemsCount(player, SOUL_FLOWER_PETAL) < SOUL_FLOWER_PETAL_NEEDED) + { + giveItems(player, SOUL_FLOWER_PETAL, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (getQuestItemsCount(player, SOUL_FLOWER_PETAL) >= SOUL_FLOWER_PETAL_NEEDED) + { + qs.setCond(2, true); + } + } + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-00.html new file mode 100644 index 0000000000..27ec4acf46 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-00.html @@ -0,0 +1,5 @@ +Conquest Guide Chloe:
+Hello, adventurer!
+I have no news for you. There's nothing I can tell you.
+(Available to characters of Lv. 110+.)
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-01.htm new file mode 100644 index 0000000000..cad13d8640 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-01.htm @@ -0,0 +1,6 @@ +Conquest Guide Chloe:
+Hello, adventurer!
+The most upstanding warriors receive an invitation to visit a new world - the Conquest Fire Area
+To learn more, go to Fire Fortress and talk to Guide Casgard.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-02.html new file mode 100644 index 0000000000..eb87e9665e --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34600-02.html @@ -0,0 +1,4 @@ +Conquest Guide Chloe:
+You can go now,
+you must give the invitation to Fire Fortress Guide Casgard, in the Fire Fortress.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-00.html new file mode 100644 index 0000000000..ed6e89dcd1 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-00.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Casgard:
+I don't see any invitation from Conquest Guide Chloe, make sure you bring that to me. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-01.htm new file mode 100644 index 0000000000..295ddd1b68 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-01.htm @@ -0,0 +1,4 @@ +Fire Fortress Guide Casgard:
+Have you brought the invitation that Conquest Guide Chloe gave you? + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-02.html new file mode 100644 index 0000000000..bba2b323eb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-02.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Casgard:
+Oh! Let me see if it's genuine, come back later.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-03.htm new file mode 100644 index 0000000000..91f09b0aad --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-03.htm @@ -0,0 +1,4 @@ +Fire Fortress Guide Casgard:
+Checking the invitation...
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-04.html new file mode 100644 index 0000000000..cb882ecfff --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/34668-04.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Casgard:
+Great! You have brought the right one, here is your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/Q10908_DarkSunPrimordialFlame.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/Q10908_DarkSunPrimordialFlame.java new file mode 100644 index 0000000000..92e604b84c --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10908_DarkSunPrimordialFlame/Q10908_DarkSunPrimordialFlame.java @@ -0,0 +1,151 @@ +/* + * 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 quests.Q10908_DarkSunPrimordialFlame; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10908_DarkSunPrimordialFlame extends Quest +{ + // NPCs + private static final int CASGARD = 34668; + private static final int CHLOE = 34600; + // Items + private static final int SACRED_FIRE_SUMMON_SCROLL = 82614; + private static final int CHLOE_INVITATION = 82661; + // Misc + private static final int MIN_LEVEL = 110; + + public Q10908_DarkSunPrimordialFlame() + { + super(10908); + addStartNpc(CHLOE); + addTalkId(CHLOE, CASGARD); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34600-00.html"); + addCondMinLevel(MIN_LEVEL, "34600-00.html"); + registerQuestItems(CHLOE_INVITATION); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34600-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + giveItems(player, CHLOE_INVITATION, 1); + htmltext = event; + } + break; + } + case "34668-02.html": + { + if (qs.isCond(1) && (hasQuestItems(player, CHLOE_INVITATION))) + { + takeItems(player, -1, CHLOE_INVITATION); + qs.setCond(2); + htmltext = event; + } + else + { + htmltext = "34668-00.html"; + } + break; + } + case "34668-04.html": + { + if (qs.isCond(2)) + { + giveItems(player, SACRED_FIRE_SUMMON_SCROLL, 1); + qs.exitQuest(false, true); + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == CHLOE) + { + htmltext = "34600-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case CHLOE: + { + if (qs.isCond(1)) + { + htmltext = "34600-02.html"; + } + break; + } + case CASGARD: + { + if (qs.isCond(1)) + { + htmltext = "34668-01.htm"; + } + else if (qs.isCond(2)) + { + htmltext = "34668-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-00.html new file mode 100644 index 0000000000..15967486be --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-00.html @@ -0,0 +1,4 @@ +Fire Fortress Guide Casgard:
+You are not ready for this yet.
+(This quest is for characters Lv. 110 and higher who have completed the Journey to the Conquest World quest.) + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-01.htm new file mode 100644 index 0000000000..7e42b4d722 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-01.htm @@ -0,0 +1,6 @@ +Fire Fortress Guide Casgard:
+It's high time for you to hunt monsters in the Fire Conquest area.
+Defeat monsters in the following zones: 600 in the Fiery Field, 600 in the Garden of Flames, 600 in Zone 1 - Vita and 600 in Zone 2 - Ignis.
+Monsters to hunt: all monsters in the Fire Conquest area.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-02.html new file mode 100644 index 0000000000..6acd98a608 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-02.html @@ -0,0 +1,5 @@ +Fire Fortress Guide Casgard:
+Defeat monsters in the following zones: 600 in the Fiery Field, 600 in the Garden of Flames, 600 in Zone 1 - Vita and 600 in Zone 2 - Ignis.
+Monsters to hunt: all monsters in the Fire Conquest area.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-03.htm new file mode 100644 index 0000000000..b11b6b60cb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-03.htm @@ -0,0 +1,4 @@ +Fire Fortress Guide Casgard:
+Have you killed all the monsters?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-04.html new file mode 100644 index 0000000000..93013f6ba1 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-04.html @@ -0,0 +1,6 @@ +Fire Fortress Guide Casgard:
+Don't try to foul me...
+Defeat monsters in the following zones: 600 in the Fiery Field, 600 in the Garden of Flames, 600 in Zone 1 - Vita and 600 in Zone 2 - Ignis.
+Monsters to hunt: all monsters in the Fire Conquest area.
+When you are done come back to me, to get your reward.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-05.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-05.html new file mode 100644 index 0000000000..9e4762d7db --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/34668-05.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Casgard:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/Q10909_FlameHunting.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/Q10909_FlameHunting.java new file mode 100644 index 0000000000..1acc1f00c6 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10909_FlameHunting/Q10909_FlameHunting.java @@ -0,0 +1,293 @@ +/* + * 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 quests.Q10909_FlameHunting; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author Mobius + */ +public class Q10909_FlameHunting extends Quest +{ + + // NPC + private static final int CASGARD = 34668; + + // Monsters + private static final int[] MONSTERS_FIERY_FIELD = + { + // Fiery Field (no PvP) (Lv. 116) + 27801, // Seo Agel + 27802, // Craigo Agel + 27803, // Catshi Agel Wizard + 27804, // Catshi Agel Archer + 27805, // Catshi Agel Warrior + 27806, // Catshi Agel Knight + }; + private static final int[] MONSTERS_GARDEN_OF_FLAMES = + { + // Garden of Flames (no PvP) (Lv. 120) + 27794, // Delia Gof + 27795, // Aselon Gof + 27796, // Retel Gof + 27797, // Catshi Gof Wizard + 27798, // Catshi Gof Archer + 27799, // Catshi Gof Warrior + }; + private static final int[] MONSTERS_VITA = + { + // Vita Area 1 (Lv. 124) + 27808, // Renard Vita + 27810, // Catshi Vita Wizard + 27811, // Catshi Vita Archer + 27812, // Catshi Vita Warrior + 27813, // Catshi Vita Knight + 27814, // Vita Sorceress + 27815, // Vita Seeker + 27816, // Vita Reaper + }; + private static final int[] MONSTERS_IGNIS = + { + // Ignis Area 1 (Lv. 128) + 27817, // Beor Ignis + 27819, // Catshi Ignis Wizard + 27820, // Catshi Ignis Archer + 27821, // Ignis Sorceress + 27822, // Ignis Seeker + 27823, // Ignis Reaper + 27824, // Ignis Swordsman + 27825, // Ignis Guardian + }; + // Misc + private static final int MIN_LEVEL = 110; + private static final String KILL_COUNT_VAR_FIERY_FIELD = "KillCountFF"; + private static final String KILL_COUNT_VAR_GARDEN_OF_FLAMES = "KillCountGoF"; + private static final String KILL_COUNT_VAR_VITA = "KillCountVita"; + private static final String KILL_COUNT_VAR_IGNIS = "KillCountIgnis"; + + // Monsters Kill Target + private static final int MAX_KILLED_MOBS_FIERY_FIELD = 600; + private static final int MAX_KILLED_MOBS_GARDEN_OF_FLAMES = 600; + private static final int MAX_KILLED_MOBS_VITA = 600; + private static final int MAX_KILLED_MOBS_IGNIS = 600; + + public Q10909_FlameHunting() + { + super(10909); + addStartNpc(CASGARD); + addTalkId(CASGARD); + addKillId(MONSTERS_FIERY_FIELD); + addKillId(MONSTERS_GARDEN_OF_FLAMES); + addKillId(MONSTERS_VITA); + addKillId(MONSTERS_IGNIS); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34668-00.html"); + addCondMinLevel(MIN_LEVEL, "34668-00.html"); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34668-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = event; + } + break; + } + case "34668-05.html": + { + if (qs.isCond(2)) + { + addExpAndSp(player, 26617381116L, 23955643); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34668-04.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == CASGARD) + { + htmltext = "34668-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case CASGARD: + { + if ((qs.isCond(1) & qs.isMemoState(1)) || qs.isCond(2)) + { + htmltext = "34668-03.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + final Party party = killer.getParty(); + if (party != null) + { + for (Player member : party.getMembers()) + { + final QuestState qs = getQuestState(member, false); + if (qs != null) + { + processKill(npc, member); + } + } + } + else + { + processKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void processKill(Npc npc, Player killer) + { + final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc); + if (qs != null) + { + final Player player = qs.getPlayer(); + + int killCountFieryField = qs.getInt(KILL_COUNT_VAR_FIERY_FIELD); + int killCountGardenOfFlames = qs.getInt(KILL_COUNT_VAR_GARDEN_OF_FLAMES); + int killCountVita = qs.getInt(KILL_COUNT_VAR_VITA); + int killCountIgnis = qs.getInt(KILL_COUNT_VAR_IGNIS); + + if (CommonUtil.contains(MONSTERS_FIERY_FIELD, npc.getId())) + { + if (killCountFieryField < MAX_KILLED_MOBS_FIERY_FIELD) + { + qs.set(KILL_COUNT_VAR_FIERY_FIELD, killCountFieryField + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_GARDEN_OF_FLAMES, npc.getId())) + { + if (killCountGardenOfFlames < MAX_KILLED_MOBS_GARDEN_OF_FLAMES) + { + qs.set(KILL_COUNT_VAR_GARDEN_OF_FLAMES, killCountGardenOfFlames + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_VITA, npc.getId())) + { + if (killCountVita < MAX_KILLED_MOBS_VITA) + { + qs.set(KILL_COUNT_VAR_VITA, killCountVita + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + if (CommonUtil.contains(MONSTERS_IGNIS, npc.getId())) + { + if (killCountIgnis < MAX_KILLED_MOBS_IGNIS) + { + qs.set(KILL_COUNT_VAR_IGNIS, killCountIgnis + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkKillProgress(killer); + } + } + sendNpcLogList(player); + } + } + + private void checkKillProgress(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs.getInt(KILL_COUNT_VAR_FIERY_FIELD) >= MAX_KILLED_MOBS_FIERY_FIELD) && (qs.getInt(KILL_COUNT_VAR_GARDEN_OF_FLAMES) >= MAX_KILLED_MOBS_GARDEN_OF_FLAMES) && (qs.getInt(KILL_COUNT_VAR_VITA) >= MAX_KILLED_MOBS_VITA) && (qs.getInt(KILL_COUNT_VAR_IGNIS) >= MAX_KILLED_MOBS_IGNIS)) + { + qs.setCond(2, true); + playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE); + } + } + + @Override + public Set getNpcLogList(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_FIERY_FIELD.getId(), true, qs.getInt(KILL_COUNT_VAR_FIERY_FIELD))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_GARDEN_OF_FLAMES.getId(), true, qs.getInt(KILL_COUNT_VAR_GARDEN_OF_FLAMES))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_VITA_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_VITA))); + holder.add(new NpcLogListHolder(NpcStringId.MONSTERS_IN_THE_IGNIS_ZONE.getId(), true, qs.getInt(KILL_COUNT_VAR_IGNIS))); + return holder; + } + return super.getNpcLogList(player); + } +} \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-01.htm new file mode 100644 index 0000000000..2dd363696a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-01.htm @@ -0,0 +1,5 @@ +Fire Power Zealot:
+Hello stranger!
+So, Fire Fortress Guide Ishrin sent you to see me? + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-02.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-02.htm new file mode 100644 index 0000000000..1aefb9cf46 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-02.htm @@ -0,0 +1,4 @@ +Fire Power Zealot:
+Ok! Conquest Guide Ishrin has promised me that he'll introduce someone to a Fire Conquest area expert like me. I will tell you all you need to know about Sacred Fires.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-03.htm new file mode 100644 index 0000000000..7ffb06a313 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-03.htm @@ -0,0 +1,9 @@ +Fire Power Zealot:
+Sacred Fire can only be summoned in the common area of the Fire Source in Conquest's Fire Area (after entering the area your character will turn into a rabbit).
+To extinguish a Sacred Fire that has been lit by a another player, you need to either steal it or destroy it.
+If a Sacred Fire hasn't been extinguished for 25 minutes, the character that has summoned it will receive Divine Fire with 100% chance.
+To protect the Sacred Fire for 25 minutes, you should use Flame Essence and Flame Guardian that are sold in the special Conquest store.
+Flame Essence increases the Sacred Fire's HP while Flame Guardian prevents other players from stealing your Sacred Fire for 25 minutes.

+Did you understood what I've told you until now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-04.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-04.htm new file mode 100644 index 0000000000..0cb16f3d11 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-04.htm @@ -0,0 +1,13 @@ +Fire Power Zealot:
+Ok, good...
+There can be up to 3 Sacred Fires lit at the same time.
+To check the status of the Sacred Fire, press the flame icon in the upper part of the Fire category in the ability enhancement UI.
+If the summoned Sacred Fire has been extinguished, you may summon a new one.

+Summoned Sacred Fire will disappear if it's successfully protected, destroyed, stolen or if the character that summoned it leaves the world of Conquest.
+If your inventory is more than 90% full, you will not be able to receive the reward and your Sacred Fire will be extinguished.

+Sacred Fire summoned by characters from other servers or through different means can be stolen.
+Each attempt costs 900 Conquest points and 400,000 SP.
+The price is paid even if the attempt ends in a failure.

+Are you ready to hear the rewards part?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-05.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-05.htm new file mode 100644 index 0000000000..9cf7a91485 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-05.htm @@ -0,0 +1,17 @@ +Fire Power Zealot:
+Rewards that are available after summoning Sacred Fire are listed below. +If the Sacred Fire that you summoned is stolen or destroyed, you may receive a Soul-imbued Flower with a certain chance.
+Successful defense:
+(all rewards guaranteed)

+1 x Divine Fire
+2 x Seed of Fire
+1 x Soul-imbued Flower

+Successful theft:
+(one of the rewards with a certain chance)

+1 x Sealed Fire Source
+1 x Divine Fire
+1 x Soul-imbued Flower
+1 x Seed of Fire
+Now you can go try summon a Sacred Fire!
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-06.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-06.html new file mode 100644 index 0000000000..14d6e4f162 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-06.html @@ -0,0 +1,3 @@ +Fire Power Zealot:
+Fine, let's see if you got it right.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-07.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-07.htm new file mode 100644 index 0000000000..f5001ca8bd --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-07.htm @@ -0,0 +1,4 @@ +Fire Power Zealot:
+Did you managed to spawn the Sacred Fire?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-08.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-08.html new file mode 100644 index 0000000000..95db43f26c --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-08.html @@ -0,0 +1,3 @@ +Fire Power Zealot:
+It seems you didn't, try again harder.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-09.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-09.html new file mode 100644 index 0000000000..33a71bd2f8 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34663-09.html @@ -0,0 +1,4 @@ +Fire Power Zealot:
+Fine, you got it right.
+Now go back to Guide Ishrin and tell him what you've learned.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-00.html new file mode 100644 index 0000000000..7976f37be6 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-00.html @@ -0,0 +1,5 @@ +Fire Fortress Guide Ishrin:
+Hello, adventurer!
+I have no news for you. There's nothing I can tell you.
+(Available to characters of Lv. 110+.)
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-01.htm new file mode 100644 index 0000000000..0f72047be1 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-01.htm @@ -0,0 +1,6 @@ +Fire Fortress Guide Ishrin:
+I have come to the Conquest world following the rumors about mysterious fires in the Fire Conquest area. Orcs revere these fires and even worship them.
+The story has caught my interest, and I decided to investigate the Sacred Fires. Unfortunately, these fires are too few, so I need your help.
+ For start, go find Fire Power Zealot in the Fire Source.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-02.html new file mode 100644 index 0000000000..d00d13c59b --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-02.html @@ -0,0 +1,4 @@ +Fire Fortress Guide Ishrin:
+You can go now,
+you must find Fire Power Zealot in Fire Source Common Area, he will tell you all you need to know about Sacred Fires.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-03.htm new file mode 100644 index 0000000000..fc50b2f8c5 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-03.htm @@ -0,0 +1,5 @@ +Fire Fortress Guide Ishrin:
+So, did you managed to find Fire Power Zealot?
+He told you everything about Sacred Fires? + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-04.html new file mode 100644 index 0000000000..104141490a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/34669-04.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Ishrin:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/Q10910_InSearchOfTheFireSource.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/Q10910_InSearchOfTheFireSource.java new file mode 100644 index 0000000000..c48cbbd4fb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10910_InSearchOfTheFireSource/Q10910_InSearchOfTheFireSource.java @@ -0,0 +1,227 @@ +/* + * 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 quests.Q10910_InSearchOfTheFireSource; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.Containers; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.ListenerRegisterType; +import org.l2jmobius.gameserver.model.events.annotations.Id; +import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonSacredFire; +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author Mobius + */ +public class Q10910_InSearchOfTheFireSource extends Quest +{ + // NPCs + private static final int ISHRIN = 34669; + private static final int FIRE_POWER_ZEALOT = 34663; + private static final int SACRED_FIRE = 34658; + // Items + private static final int SACRED_FIRE_SUMMON_SCROLL = 82614; + // Misc + private static final int MIN_LEVEL = 110; + private static final String SUMMON_COUNT_VAR = "SummonCount"; + + public Q10910_InSearchOfTheFireSource() + { + super(10910); + addStartNpc(ISHRIN); + addTalkId(ISHRIN, FIRE_POWER_ZEALOT); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34663-00.html"); + addCondMinLevel(MIN_LEVEL, "34663-00.html"); + addSummonSpawnId(SACRED_FIRE); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34669-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + htmltext = event; + Containers.Global().addListener(new ConsumerEventListener(player, EventType.ON_PLAYER_SUMMON_SACRED_FIRE, (OnPlayerSummonSacredFire eventListener) -> onPlayerSummonSacredFire(eventListener), this)); + } + break; + } + case "34669-04.html": + { + if (qs.isCond(3)) + { + addExpAndSp(player, 8872460372L, 7985214); + qs.exitQuest(false, true); + Containers.Global().removeListener(new ConsumerEventListener(player, EventType.ON_PLAYER_SUMMON_SACRED_FIRE, (OnPlayerSummonSacredFire eventListener) -> onPlayerSummonSacredFire(eventListener), this)); + htmltext = event; + } + break; + } + case "34663-02.htm": + case "34663-03.htm": + case "34663-04.htm": + case "34663-05.htm": + { + htmltext = event; + break; + } + case "34663-06.html": + { + if (qs.isCond(1)) + { + qs.setCond(2); + htmltext = event; + } + break; + } + case "34663-09.html": + { + if (qs.isCond(3)) + { + htmltext = event; + } + else + { + htmltext = "34663-08.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == ISHRIN) + { + htmltext = "34669-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ISHRIN: + { + if (qs.isCond(1) || qs.isCond(2)) + { + htmltext = "34669-02.html"; + } + else if (qs.isCond(3)) + { + htmltext = "34669-03.htm"; + } + break; + } + case FIRE_POWER_ZEALOT: + { + if (qs.isCond(1)) + { + htmltext = "34663-01.htm"; + } + else if (qs.isCond(2) || qs.isCond(3)) + { + htmltext = "34663-07.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @RegisterEvent(EventType.ON_PLAYER_SUMMON_SACRED_FIRE) + @RegisterType(ListenerRegisterType.ITEM) + @Id(SACRED_FIRE_SUMMON_SCROLL) + public void onPlayerSummonSacredFire(OnPlayerSummonSacredFire event) + { + if (event.getNpcId() != SACRED_FIRE) + { + return; + } + final Player player = event.getPlayer(); + if (player == null) + { + return; + } + final QuestState qs = getQuestState(player, true); + int summonCount = qs.getInt(SUMMON_COUNT_VAR); + if (summonCount < 5) + { + qs.set(SUMMON_COUNT_VAR, summonCount + 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + sendNpcLogList(player); + } + if (summonCount >= 4) + { + qs.setCond(3, true); + } + } + + @Override + public Set getNpcLogList(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(2)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.SUMMON_THE_SACRED_FIRE.getId(), true, qs.getInt(SUMMON_COUNT_VAR))); + return holder; + } + return super.getNpcLogList(player); + } +} \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-00.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-00.html new file mode 100644 index 0000000000..b925fd42b3 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-00.html @@ -0,0 +1,5 @@ +Fire Fortress Guide Casgard:
+Hello, adventurer!
+I have no news for you. There's nothing I can tell you.
+(Available to characters of Lv. 110+.)
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-01.htm new file mode 100644 index 0000000000..0807ed8af9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-01.htm @@ -0,0 +1,7 @@ +Fire Fortress Guide Casgard:
+Hi again!
+It seems that you are a great hunter, do you know that there are other things to do in the Conquest world beside hunting monsters?
+My colleague who is studying amazing flowers that grow here can tell more about them.
+Go to the Fire Fortress Guide Ishrin to learn more.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-02.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-02.html new file mode 100644 index 0000000000..077c0b811b --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34668-02.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Casgard:
+Go to the Fire Fortress Guide Ishrin to learn more about special flowers that bloom in the Fire Conquest area.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-01.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-01.htm new file mode 100644 index 0000000000..27a0986b27 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-01.htm @@ -0,0 +1,5 @@ +Fire Fortress Guide Ishrin:
+Hello stranger!
+So, Fire Fortress Guide Casgard sent you to see me? + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-02.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-02.htm new file mode 100644 index 0000000000..a57e207ebe --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-02.htm @@ -0,0 +1,7 @@ +Fire Fortress Guide Ishrin:
+Ok! Conquest Guide Casgard has told you that I'm studying the amazing flowers that grow in the Fire Conquest area.
+There are 3 types of flowers: Power Flower, Life Flower, Fire Flower.
+Fire Flowers grow only in the central area of Fire Source, while Life Flowers and Power Flowers can be found all over the Fire Area.
+You want to know more?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-03.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-03.htm new file mode 100644 index 0000000000..482bbd1889 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-03.htm @@ -0,0 +1,8 @@ +Fire Fortress Guide Ishrin:
+More it is then:
+- To collect the Flowers, you will need 1000 HP and 500,000 SP.
+- When you collect the Flowers you might receive the following items with a certain chance: Seed of Fire, Ghost Soul, personal Conquest points, server Conquest points, Fire Source points, Sacred Fire Summon Scroll and Eigis Armor Fragment.
+- When you collect Fire Flowers, you may also receive Divine Flower that is needed to enhance the Flame Spark Primordial Fire Source ability.

+Now if you understood everything, I need you to get me something.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-04.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-04.htm new file mode 100644 index 0000000000..2dd301b9a0 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-04.htm @@ -0,0 +1,7 @@ +Fire Fortress Guide Ishrin:
+Ok, then...

+These special flowers that bloom in the Fire Conquest area, are said to grant certain abilities.
+I want you to bring me Bright Scarlet Petals of Power Flowers and Life Flowers that grow in the hunting zones, and also Ardent Scarlet Petals of Fire Flowers that grow only in central area of Fire Source.
+Target: Power Flower, Life Flower, Fire Flower.
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-05.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-05.html new file mode 100644 index 0000000000..1808dd55be --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-05.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Ishrin:
+Fine, make sure you bring me those petals.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-06.htm b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-06.htm new file mode 100644 index 0000000000..f801d70285 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-06.htm @@ -0,0 +1,4 @@ +Fire Fortress Guide Ishrin:
+Did you gathered all the petals?
+ + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-07.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-07.html new file mode 100644 index 0000000000..942d06bff2 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-07.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Ishrin:
+It seems you didn't, try again harder.
+ \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-08.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-08.html new file mode 100644 index 0000000000..104141490a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/34669-08.html @@ -0,0 +1,3 @@ +Fire Fortress Guide Ishrin:
+Congratulations. You have completed all the tasks. + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/Q10911_FireSmell.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/Q10911_FireSmell.java new file mode 100644 index 0000000000..f2d826f729 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q10911_FireSmell/Q10911_FireSmell.java @@ -0,0 +1,212 @@ +/* + * 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 quests.Q10911_FireSmell; + +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.Containers; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.ListenerRegisterType; +import org.l2jmobius.gameserver.model.events.annotations.Id; +import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.conquest.OnConquestFlowerCollect; +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; + +/** + * @author CostyKiller + */ +public class Q10911_FireSmell extends Quest +{ + // NPCs + private static final int CASGARD = 34668; + private static final int ISHRIN = 34669; + // Flowers + private static final int FIRE_FLOWER = 34655; + private static final int LIFE_FLOWER = 34656; + private static final int POWER_FLOWER = 34657; + // Items + private static final int BRIGHT_SCARLET_PETAL = 82662; + private static final int ARDENT_SCARLET_PETAL = 82663; + // Misc + private static final int MIN_LEVEL = 110; + private static final int BRIGHT_PETALS_NEEDED = 30; + private static final int ARDENT_PETALS_NEEDED = 30; + + public Q10911_FireSmell() + { + super(10911); + addStartNpc(CASGARD); + addTalkId(CASGARD, ISHRIN); + addCondCompletedQuest(Q10904_JourneyToTheConquestWorld.class.getSimpleName(), "34668-00.html"); + addCondMinLevel(MIN_LEVEL, "34668-00.html"); + registerQuestItems(BRIGHT_SCARLET_PETAL, ARDENT_SCARLET_PETAL); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "34668-02.html": + { + if ((player.getLevel() >= MIN_LEVEL)) + { + qs.startQuest(); + htmltext = event; + Containers.Global().addListener(new ConsumerEventListener(player, EventType.ON_CONQUEST_FLOWER_COLLECT, (OnConquestFlowerCollect eventListener) -> onConquestFlowerCollect(eventListener), this)); + } + break; + } + case "34669-02.htm": + case "34669-03.htm": + case "34669-04.htm": + { + htmltext = event; + break; + } + case "34669-05.html": + { + if (qs.isCond(1)) + { + qs.setCond(2); + htmltext = event; + } + break; + } + case "34669-08.html": + { + if (qs.isCond(3)) + { + addExpAndSp(player, 8872460372L, 7985214); + Containers.Global().removeListener(new ConsumerEventListener(player, EventType.ON_CONQUEST_FLOWER_COLLECT, (OnConquestFlowerCollect eventListener) -> onConquestFlowerCollect(eventListener), this)); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = "34669-07.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == CASGARD) + { + htmltext = "34668-01.htm"; + } + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case CASGARD: + { + htmltext = "34668-02.html"; + break; + } + case ISHRIN: + { + if (qs.isCond(1)) + { + htmltext = "34669-01.htm"; + } + else if (qs.isCond(2) || qs.isCond(3)) + { + htmltext = "34669-06.htm"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @RegisterEvent(EventType.ON_CONQUEST_FLOWER_COLLECT) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + @Id(FIRE_FLOWER) + @Id(LIFE_FLOWER) + @Id(POWER_FLOWER) + private void onConquestFlowerCollect(OnConquestFlowerCollect event) + { + final Player player = event.getPlayer(); + if ((player.getLevel() < MIN_LEVEL)) + { + return; + } + if (event.getNpcId() == FIRE_FLOWER) + { + if (getQuestItemsCount(player, ARDENT_SCARLET_PETAL) < ARDENT_PETALS_NEEDED) + { + giveItems(player, ARDENT_SCARLET_PETAL, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkQuestProgress(player); + } + } + else if ((event.getNpcId() == LIFE_FLOWER) || (event.getNpcId() == POWER_FLOWER)) + { + if (getQuestItemsCount(player, BRIGHT_SCARLET_PETAL) < BRIGHT_PETALS_NEEDED) + { + giveItems(player, BRIGHT_SCARLET_PETAL, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + checkQuestProgress(player); + } + } + } + + private void checkQuestProgress(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((getQuestItemsCount(player, BRIGHT_SCARLET_PETAL) >= BRIGHT_PETALS_NEEDED) && (getQuestItemsCount(player, ARDENT_SCARLET_PETAL) >= ARDENT_PETALS_NEEDED)) + { + qs.setCond(3, true); + playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE); + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java index b05fcbec85..d32965c2a7 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11025_PathOfDestinyProving/Q11025_PathOfDestinyProving.java @@ -614,7 +614,7 @@ public class Q11025_PathOfDestinyProving extends Quest holder.add(new NpcLogListHolder(NpcStringId.KILL_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_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java index 87b0fdae8c..3a17382c3f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11026_PathOfDestinyConviction/Q11026_PathOfDestinyConviction.java @@ -312,7 +312,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT1); } - htmltext = event; break; } case "teleport2": @@ -321,7 +320,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT2); } - htmltext = event; break; } case "teleport3": @@ -330,7 +328,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT3); } - htmltext = event; break; } case "teleport4": @@ -339,7 +336,6 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT4); } - htmltext = event; break; } case "teleport5": @@ -348,10 +344,8 @@ public class Q11026_PathOfDestinyConviction extends Quest { player.teleToLocation(TRAINING_GROUNDS_TELEPORT5); } - htmltext = event; break; } - } return htmltext; } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html index e02efa765d..e0c6752097 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/Q11027_PathOfDestinyOvercome/33932-04.html +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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.
\ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/QuestMasterHandler.java index dd2b43e1fb..961128a663 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -60,6 +60,14 @@ import quests.Q10887_SaviorsPathDemonsAndAtelia.Q10887_SaviorsPathDemonsAndAteli import quests.Q10888_SaviorsPathDefeatTheEmbryo.Q10888_SaviorsPathDefeatTheEmbryo; import quests.Q10889_SaviorsPathFallenEmperorsThrone.Q10889_SaviorsPathFallenEmperorsThrone; import quests.Q10890_SaviorsPathHallOfEtina.Q10890_SaviorsPathHallOfEtina; +import quests.Q10904_JourneyToTheConquestWorld.Q10904_JourneyToTheConquestWorld; +import quests.Q10905_HuntingTime.Q10905_HuntingTime; +import quests.Q10906_ChasingTheLight.Q10906_ChasingTheLight; +import quests.Q10907_WhereFlowersBlossom.Q10907_WhereFlowersBlossom; +import quests.Q10908_DarkSunPrimordialFlame.Q10908_DarkSunPrimordialFlame; +import quests.Q10909_FlameHunting.Q10909_FlameHunting; +import quests.Q10910_InSearchOfTheFireSource.Q10910_InSearchOfTheFireSource; +import quests.Q10911_FireSmell.Q10911_FireSmell; import quests.Q11024_PathOfDestinyBeginning.Q11024_PathOfDestinyBeginning; import quests.Q11025_PathOfDestinyProving.Q11025_PathOfDestinyProving; import quests.Q11026_PathOfDestinyConviction.Q11026_PathOfDestinyConviction; @@ -75,10 +83,6 @@ import quests.not_done.Q01900_StormIsleSecretSpot; import quests.not_done.Q01901_StormIsleFurtiveDeal; import quests.not_done.Q10595_TheDimensionalWarpPart8; import quests.not_done.Q10596_TheDimensionalWarpPart9; -import quests.not_done.Q10904_JourneyToTheConquestWorld; -import quests.not_done.Q10905_HuntingTime; -import quests.not_done.Q10906_ChasingTheLight; -import quests.not_done.Q10907_WhereFlowersBlossom; import quests.not_done.Q11028_WindOfDestinyEncounter; import quests.not_done.Q11029_WindOfDestinyPromise; import quests.not_done.Q11030_WindOfDestinyChoice; @@ -144,10 +148,14 @@ public class QuestMasterHandler Q10888_SaviorsPathDefeatTheEmbryo.class, Q10889_SaviorsPathFallenEmperorsThrone.class, Q10890_SaviorsPathHallOfEtina.class, - Q10904_JourneyToTheConquestWorld.class, // TODO: Not done. - Q10905_HuntingTime.class, // TODO: Not done. - Q10906_ChasingTheLight.class, // TODO: Not done. - Q10907_WhereFlowersBlossom.class, // TODO: Not done. + Q10904_JourneyToTheConquestWorld.class, + Q10905_HuntingTime.class, + Q10906_ChasingTheLight.class, + Q10907_WhereFlowersBlossom.class, + Q10908_DarkSunPrimordialFlame.class, + Q10909_FlameHunting.class, + Q10910_InSearchOfTheFireSource.class, + Q10911_FireSmell.class, Q11028_WindOfDestinyEncounter.class, // TODO: Not done. Q11029_WindOfDestinyPromise.class, // TODO: Not done. Q11030_WindOfDestinyChoice.class, // TODO: Not done. diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10904_JourneyToTheConquestWorld.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10904_JourneyToTheConquestWorld.java deleted file mode 100644 index 7e4ec90e82..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10904_JourneyToTheConquestWorld.java +++ /dev/null @@ -1,36 +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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10904_JourneyToTheConquestWorld extends Quest -{ - private static final int START_NPC = 34600; - - public Q10904_JourneyToTheConquestWorld() - { - super(10904); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10905_HuntingTime.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10905_HuntingTime.java deleted file mode 100644 index 2f59155944..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10905_HuntingTime.java +++ /dev/null @@ -1,36 +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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10905_HuntingTime extends Quest -{ - private static final int START_NPC = 34599; - - public Q10905_HuntingTime() - { - super(10905); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10906_ChasingTheLight.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10906_ChasingTheLight.java deleted file mode 100644 index 140a7a339b..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10906_ChasingTheLight.java +++ /dev/null @@ -1,36 +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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10906_ChasingTheLight extends Quest -{ - private static final int START_NPC = 34599; - - public Q10906_ChasingTheLight() - { - super(10906); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10907_WhereFlowersBlossom.java b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10907_WhereFlowersBlossom.java deleted file mode 100644 index c8e2cff6a1..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/scripts/quests/not_done/Q10907_WhereFlowersBlossom.java +++ /dev/null @@ -1,36 +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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10907_WhereFlowersBlossom extends Quest -{ - private static final int START_NPC = 34599; - - public Q10907_WhereFlowersBlossom() - { - super(10907); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/skillTrees/ErtheiaClass/Eviscerator.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/skillTrees/ErtheiaClass/Eviscerator.xml index 4a0e04235f..7dc95c7f1d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/skillTrees/ErtheiaClass/Eviscerator.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/skillTrees/ErtheiaClass/Eviscerator.xml @@ -390,5 +390,9 @@ + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlands.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlands.xml index 1c3d697e79..26b0e188b0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlands.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlands.xml @@ -1,421 +1,7 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlandsMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlandsMonsters.xml new file mode 100644 index 0000000000..e15450e7e2 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/CrumaMarshlandsMonsters.xml @@ -0,0 +1,883 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortress.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortress.xml index f87d093888..ac7d75c741 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortress.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortress.xml @@ -1,2303 +1,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortressMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortressMonsters.xml new file mode 100644 index 0000000000..32a0c0978a --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Dion/GuillotineFortressMonsters.xml @@ -0,0 +1,736 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTree.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTree.xml index 9c89017396..e0361d3060 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTree.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTree.xml @@ -1,523 +1,9 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTreeMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTreeMonsters.xml new file mode 100644 index 0000000000..71d75d061e --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Elven/ShadowOfTheMotherTreeMonsters.xml @@ -0,0 +1,627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/BrekasStrongholdMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/BrekasStrongholdMonsters.xml index df083b62ae..450259f629 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/BrekasStrongholdMonsters.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/BrekasStrongholdMonsters.xml @@ -1,1053 +1,373 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + - - - - - + - - - - - + + - + - - - - - + + - + - - - - - + + - + - - - - - + + - + - - - - - + + - + - - - - - + + - + - - - - - + + - + - - - - - + + - + - - - - - + + - - - - - + - - - - - + + - - - - - + - - - - - + + - - - - - + - - - - - + + - - - - - + - - - - - + + - - - - - + - - - - - + + - - - - - + - - - - - + + - - - - - + - - - - - + + - - - - - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValley.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValley.xml index 885750fdb2..3ad3e2de78 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValley.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValley.xml @@ -1,766 +1,9 @@  - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValleyMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValleyMonsters.xml new file mode 100644 index 0000000000..7dbb414ed9 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Giran/DragonValleyMonsters.xml @@ -0,0 +1,1066 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Gludio/SelMahumBaseMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Gludio/SelMahumBaseMonsters.xml new file mode 100644 index 0000000000..a5a699d354 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Gludio/SelMahumBaseMonsters.xml @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml index cba073c8ce..1727034a88 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/ForestOfTheDeadMonsters.xml @@ -425,33 +425,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -698,24 +671,4 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml index 8fcdecc411..435334304c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Rune/SwampOfScreamsMonsters.xml @@ -1,1183 +1,636 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Schuttgart/FrozenLabyrinth.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Schuttgart/FrozenLabyrinth.xml new file mode 100644 index 0000000000..fffeeebe62 --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Schuttgart/FrozenLabyrinth.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Schuttgart/FrozenLabyrinthMonsters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Schuttgart/FrozenLabyrinthMonsters.xml new file mode 100644 index 0000000000..e1b07b47dd --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/spawns/Schuttgart/FrozenLabyrinthMonsters.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/armorsets/Visual_Sets.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/armorsets/Visual_Sets.xml index 0f2bd15610..3b09c6985b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/armorsets/Visual_Sets.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/armorsets/Visual_Sets.xml @@ -47,4 +47,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipment.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipment.xml index ca7de06da8..5aaea52f69 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipment.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipment.xml @@ -170,8 +170,5 @@ - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipmentEvent.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipmentEvent.xml index 08750def50..7e5b5aa231 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipmentEvent.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/initialEquipmentEvent.xml @@ -2,9 +2,12 @@ - - - + + + + + + @@ -12,183 +15,218 @@ - + + + - - - + + + + + + - + - - - + + + + + + - - + + + - - - + + + + + + - + - - - + + + + + + - - + + + - - - + + + + + + - + - - - + + + + + + - - + - - - + + + + + + - + - - - - + + + + + + - + - - - + + + + + + - - + - - - + + + + + + - - + - - - + + + + + + - - - - + + + + + + - - - - + + + + + + - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/46200-46299.xml index 971a62a4c1..87358a65ed 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/46200-46299.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/46200-46299.xml @@ -796,14 +796,19 @@ + + + - - - + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48600-48699.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48600-48699.xml index 2a46c772c3..43140f9b1b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48600-48699.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48600-48699.xml @@ -919,7 +919,7 @@ - + 202 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48800-48899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48800-48899.xml index f80c5077c9..b6e2bd25f1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48800-48899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/48800-48899.xml @@ -562,7 +562,7 @@ - + 151 @@ -911,7 +911,7 @@ - + 101 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60300-60399.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60300-60399.xml index 7e97cbc051..72c79ce86d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60300-60399.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60300-60399.xml @@ -333,6 +333,7 @@ + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60400-60499.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60400-60499.xml index 6e031ef443..a91b4a6106 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60400-60499.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60400-60499.xml @@ -1141,9 +1141,18 @@ - + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60500-60599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60500-60599.xml index 70ade91c3e..9e34330e7d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60500-60599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/60500-60599.xml @@ -120,6 +120,7 @@ + @@ -130,6 +131,7 @@ + @@ -140,6 +142,7 @@ + @@ -150,6 +153,7 @@ + @@ -160,6 +164,7 @@ + @@ -230,6 +235,7 @@ + @@ -238,6 +244,7 @@ + @@ -246,6 +253,7 @@ + @@ -254,6 +262,7 @@ + @@ -262,6 +271,7 @@ + @@ -270,6 +280,7 @@ + @@ -278,6 +289,7 @@ + @@ -286,6 +298,7 @@ + @@ -294,6 +307,7 @@ + @@ -302,6 +316,7 @@ + @@ -310,6 +325,7 @@ + @@ -318,6 +334,7 @@ + @@ -326,6 +343,7 @@ + @@ -375,6 +393,7 @@ + @@ -448,6 +467,7 @@ + @@ -459,6 +479,7 @@ + @@ -469,6 +490,7 @@ + @@ -479,6 +501,7 @@ + @@ -489,6 +512,7 @@ + @@ -499,6 +523,7 @@ + @@ -510,6 +535,7 @@ + @@ -521,6 +547,7 @@ + @@ -533,6 +560,7 @@ + @@ -544,6 +572,7 @@ + @@ -555,6 +584,7 @@ + @@ -566,6 +596,7 @@ + @@ -577,6 +608,7 @@ + @@ -670,6 +702,7 @@ + @@ -678,6 +711,7 @@ + @@ -686,6 +720,7 @@ + @@ -694,6 +729,7 @@ + @@ -702,6 +738,7 @@ + @@ -710,6 +747,7 @@ + @@ -718,6 +756,7 @@ + @@ -726,6 +765,7 @@ + @@ -734,6 +774,7 @@ + @@ -742,6 +783,7 @@ + @@ -750,6 +792,7 @@ + @@ -758,6 +801,7 @@ + @@ -766,6 +810,7 @@ + @@ -1451,82 +1496,152 @@ - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + @@ -1535,6 +1650,7 @@ + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80300-80399.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80300-80399.xml index 8ddbb9184a..1a69e3fd63 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80300-80399.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80300-80399.xml @@ -482,7 +482,7 @@ - + 292 @@ -498,7 +498,7 @@ - + 219 @@ -514,7 +514,7 @@ - + 146 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80500-80599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80500-80599.xml index 1ac3725071..aa5400d1a7 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80500-80599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80500-80599.xml @@ -382,6 +382,13 @@ + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80800-80899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80800-80899.xml index 740195d340..321b01ab13 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80800-80899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/80800-80899.xml @@ -242,6 +242,7 @@ + @@ -263,6 +264,7 @@ + @@ -284,6 +286,7 @@ + @@ -299,6 +302,7 @@ + @@ -307,6 +311,7 @@ + @@ -323,7 +328,24 @@ + + + + + + + + + + + + + + + + + @@ -439,25 +461,21 @@ + + - - - - - - - - - - + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81000-81099.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81000-81099.xml index 7c0be03d25..643b84c687 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81000-81099.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81000-81099.xml @@ -260,8 +260,15 @@ + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81200-81299.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81200-81299.xml index e140317d9c..7491a1901f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81200-81299.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81200-81299.xml @@ -218,7 +218,7 @@ - + 202 @@ -237,7 +237,7 @@ - + 151 @@ -255,7 +255,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81300-81399.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81300-81399.xml index d2c47e7586..5b59e7733a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81300-81399.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81300-81399.xml @@ -799,7 +799,7 @@ - + @@ -1024,7 +1024,7 @@ - + @@ -1045,7 +1045,7 @@ - + @@ -1066,7 +1066,7 @@ - + @@ -1127,7 +1127,7 @@ - + @@ -1146,7 +1146,7 @@ - + @@ -1165,7 +1165,7 @@ - + @@ -1184,7 +1184,7 @@ - + @@ -1203,7 +1203,7 @@ - + @@ -1222,7 +1222,7 @@ - + @@ -1241,7 +1241,7 @@ - + @@ -1260,7 +1260,7 @@ - + @@ -1279,7 +1279,7 @@ - + @@ -1298,7 +1298,7 @@ - + @@ -1317,7 +1317,7 @@ - + @@ -1336,7 +1336,7 @@ - + @@ -1355,7 +1355,7 @@ - + @@ -1374,7 +1374,7 @@ - + @@ -1393,7 +1393,7 @@ - + @@ -1412,7 +1412,7 @@ - + @@ -1431,7 +1431,7 @@ - + @@ -1450,7 +1450,7 @@ - + @@ -1472,7 +1472,7 @@ - + @@ -1494,7 +1494,7 @@ - + @@ -1516,7 +1516,7 @@ - + @@ -1538,7 +1538,7 @@ - + @@ -1560,7 +1560,7 @@ - + @@ -1582,7 +1582,7 @@ - + @@ -1604,7 +1604,7 @@ - + 101 @@ -1623,7 +1623,7 @@ - + 101 @@ -1642,7 +1642,7 @@ - + 101 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81600-81699.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81600-81699.xml index 5440382601..b92e2877b7 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81600-81699.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81600-81699.xml @@ -1080,6 +1080,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81700-81799.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81700-81799.xml index 638ea349a9..82374199a0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81700-81799.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81700-81799.xml @@ -1257,7 +1257,7 @@ - + 202 @@ -1273,7 +1273,7 @@ - + @@ -1292,7 +1292,7 @@ - + @@ -1311,7 +1311,7 @@ - + @@ -1330,7 +1330,7 @@ - + 151 @@ -1346,7 +1346,7 @@ - + @@ -1365,7 +1365,7 @@ - + @@ -1384,7 +1384,7 @@ - + @@ -1403,7 +1403,7 @@ - + 101 @@ -1419,7 +1419,7 @@ - + @@ -1438,7 +1438,7 @@ - + @@ -1457,7 +1457,7 @@ - + @@ -1479,7 +1479,7 @@ - + 202 @@ -1498,7 +1498,7 @@ - + @@ -1520,7 +1520,7 @@ - + @@ -1542,7 +1542,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81800-81899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81800-81899.xml index 0223862096..012b1c16cf 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81800-81899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81800-81899.xml @@ -14,7 +14,7 @@ - + 151 @@ -33,7 +33,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -99,7 +99,7 @@ - + 101 @@ -118,7 +118,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -879,7 +879,7 @@ - + 205 @@ -896,7 +896,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81900-81999.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81900-81999.xml index 339035ac6d..b944007004 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81900-81999.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/81900-81999.xml @@ -266,7 +266,7 @@ - + 114 @@ -281,7 +281,7 @@ - + @@ -298,7 +298,7 @@ - + @@ -316,7 +316,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82000-82099.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82000-82099.xml index d40a5382ed..fecd69837c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82000-82099.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82000-82099.xml @@ -701,7 +701,7 @@ - + 226 79 @@ -719,7 +719,7 @@ - + 170 59 @@ -737,7 +737,7 @@ - + 170 59 @@ -755,7 +755,7 @@ - + 114 46 @@ -773,7 +773,7 @@ - + 114 46 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82100-82199.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82100-82199.xml index 566fcb4bc8..c860e47f98 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82100-82199.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82100-82199.xml @@ -840,34 +840,63 @@ - + + + + + + + + - + + + + + + + + + - + + + + + + + + + - + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82200-82299.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82200-82299.xml index 55fd947693..d8fd4e6da1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82200-82299.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82200-82299.xml @@ -1460,7 +1460,7 @@ - + @@ -1475,7 +1475,7 @@ - + @@ -1655,8 +1655,15 @@ + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82500-82599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82500-82599.xml index 800ce41de9..7d21906074 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82500-82599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82500-82599.xml @@ -344,7 +344,7 @@ - + 114 @@ -363,7 +363,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -407,7 +407,7 @@ - + @@ -429,7 +429,7 @@ - + 114 @@ -448,7 +448,7 @@ - + @@ -470,7 +470,7 @@ - + @@ -492,7 +492,7 @@ - + @@ -514,7 +514,7 @@ - + @@ -546,7 +546,7 @@ - + @@ -579,7 +579,7 @@ - + @@ -612,7 +612,7 @@ - + @@ -645,7 +645,7 @@ - + @@ -677,7 +677,7 @@ - + @@ -710,7 +710,7 @@ - + @@ -743,7 +743,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82600-82699.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82600-82699.xml index 2080daeb22..f15682b796 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82600-82699.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/items/82600-82699.xml @@ -888,17 +888,17 @@ - + - - - - + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/19800-19899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/19800-19899.xml index 03e00b772f..9d3544c4f1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/19800-19899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/19800-19899.xml @@ -279,7 +279,7 @@ ETC FEMALE - + @@ -316,9 +316,14 @@ FEMALE - + + + + + + @@ -348,9 +353,14 @@ FEMALE - + + + + + + @@ -380,9 +390,14 @@ FEMALE - + + + + + + @@ -461,7 +476,7 @@ FEMALE - + @@ -543,8 +558,13 @@ - + + + + + + @@ -623,9 +643,14 @@ FEMALE - + + + + + + @@ -704,7 +729,7 @@ FEMALE - + @@ -786,8 +811,13 @@ - + + + + + + @@ -866,9 +896,14 @@ FEMALE - + + + + + + @@ -947,7 +982,7 @@ FEMALE - + @@ -1028,9 +1063,14 @@ FEMALE - - + + + + + + + @@ -1116,9 +1156,14 @@ FEMALE - - + + + + + + + @@ -1156,9 +1201,14 @@ FEMALE - - + + + + + + + @@ -1196,9 +1246,14 @@ FEMALE - - + + + + + + + @@ -1229,9 +1284,14 @@ FEMALE - + + + + + + @@ -1261,9 +1321,14 @@ FEMALE - + + + + + + @@ -1293,9 +1358,14 @@ FEMALE - + + + + + + @@ -1461,9 +1531,14 @@ FEMALE - - + + + + + + + @@ -1542,9 +1617,14 @@ FEMALE - - - + + + + + + + + @@ -1630,9 +1710,14 @@ FEMALE - - + + + + + + + @@ -1670,9 +1755,14 @@ FEMALE - - - + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24600-24699.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24600-24699.xml index 8d6db6734e..8922c5fe82 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24600-24699.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24600-24699.xml @@ -3101,391 +3101,1958 @@ - - - ETC - FEMALE + + UNDEAD + MALE - + + + + + + + + - - + 600 - + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + DRAGON + MALE - + + + + + + + + - - + 600 - + + + + + + + + + + + + - - - ETC - FEMALE + + DRAGON + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + DRAGON + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + DRAGON + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + DRAGON + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + HUMANOID + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE - + + + + + + + + - - + 600 - + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE - + + + + + + + + - - + 600 - + + + + + + + + + + + + - - - ETC - FEMALE + + UNDEAD + MALE - + + + - - + 600 - + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24900-24999.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24900-24999.xml index b5a7b36305..f45c803604 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24900-24999.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/24900-24999.xml @@ -1150,14 +1150,18 @@ - DEMONIC MALE - - + + + + + + + @@ -1191,14 +1195,18 @@ - DEMONIC MALE - - + + + + + + + @@ -1232,15 +1240,19 @@ - DEMONIC MALE - - + + + + + + + @@ -1274,14 +1286,18 @@ - DEMONIC MALE - - + + + + + + + @@ -1315,14 +1331,18 @@ - HUMANOID MALE - - + + + + + + + @@ -1330,6 +1350,11 @@ 600 + + + FROZEN_LAB + + @@ -1356,14 +1381,18 @@ - HUMANOID MALE - - + + + + + + + @@ -1371,6 +1400,11 @@ 600 + + + FROZEN_LAB + + @@ -1397,14 +1431,18 @@ - HUMANOID MALE - - + + + + + + + @@ -1412,6 +1450,11 @@ 600 + + + FROZEN_LAB + + @@ -1438,14 +1481,18 @@ - ELEMENTAL MALE - - + + + + + + + @@ -1453,6 +1500,11 @@ 600 + + + FROZEN_LAB + + @@ -1479,14 +1531,18 @@ - ELEMENTAL MALE - - + + + + + + + @@ -1494,6 +1550,11 @@ 600 + + + FROZEN_LAB + + @@ -2327,99 +2388,254 @@ - - - ETC - FEMALE + + PLANT + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + MOTHER_TREE + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + PLANT + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + MOTHER_TREE + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + PLANT + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + MOTHER_TREE + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + BEAST + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + MOTHER_TREE + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + BUG + MALE + - + + + + + + + + - - + 600 - + + + + + + + + + + MOTHER_TREE + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/26500-26599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/26500-26599.xml index ef60487a6b..8f9f4fc7d9 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/26500-26599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/26500-26599.xml @@ -209,12 +209,54 @@ - - + + + + + + HUMANOID + FEMALE + + + + + + + + + 600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ETC FEMALE - + @@ -222,75 +264,108 @@ - + - - - ETC + + + + + + + HUMANOID FEMALE + - + + + - - + 600 + + + + + - - - - - - - - - ETC - FEMALE - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - ETC - FEMALE - - + + + + + + + + HUMANOID + MALE + + + + - - + + - - + 600 + + + + + - + + + + + + + + + + + + + + + + - - + ETC FEMALE - + @@ -304,12 +379,11 @@ - - + ETC FEMALE - + @@ -323,13 +397,12 @@ - - + ETC FEMALE - + @@ -343,69 +416,84 @@ - - - ETC + + CONSTRUCT FEMALE - + + + - - + + - - + 600 + + + + + - + + true + + + + + + + + + + - - - ETC + + CONSTRUCT FEMALE - + - - + + - - - - - - - - - ETC - FEMALE - - - - - - - - - - + + true - - + + CONSTRUCT + FEMALE + + + + + + + + + + + true + + + + + + ETC FEMALE - + @@ -413,18 +501,17 @@ - + - - + ETC FEMALE - + @@ -432,18 +519,17 @@ - + - - + ETC FEMALE - + @@ -451,18 +537,17 @@ - + - - + ETC FEMALE - + @@ -470,7 +555,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/27700-27799.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/27700-27799.xml index 27b742e3d3..8793e16e72 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/27700-27799.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/27700-27799.xml @@ -8,6 +8,11 @@ + + + + + @@ -92,6 +97,11 @@ + + + + + @@ -176,6 +186,11 @@ + + + + + @@ -260,6 +275,11 @@ + + + + + @@ -344,6 +364,11 @@ + + + + + @@ -428,6 +453,11 @@ + + + + + @@ -512,6 +542,11 @@ + + + + + @@ -596,6 +631,11 @@ + + + + + @@ -680,6 +720,11 @@ + + + + + @@ -764,6 +809,11 @@ + + + + + @@ -848,6 +898,11 @@ + + + + + @@ -932,6 +987,11 @@ + + + + + @@ -1016,6 +1076,11 @@ + + + + + @@ -1100,6 +1165,11 @@ + + + + + @@ -1184,6 +1254,11 @@ + + + + + @@ -1269,6 +1344,11 @@ + + + + + @@ -1353,6 +1433,11 @@ + + + + + @@ -1437,6 +1522,11 @@ + + + + + @@ -1521,6 +1611,11 @@ + + + + + @@ -1605,6 +1700,11 @@ + + + + + @@ -1689,6 +1789,11 @@ + + + + + @@ -1774,6 +1879,11 @@ + + + + + @@ -1858,6 +1968,11 @@ + + + + + @@ -1942,6 +2057,11 @@ + + + + + @@ -2026,6 +2146,11 @@ + + + + + @@ -2110,6 +2235,11 @@ + + + + + @@ -2194,6 +2324,11 @@ + + + + + @@ -2278,6 +2413,11 @@ + + + + + @@ -2363,6 +2503,11 @@ + + + + + @@ -2447,6 +2592,11 @@ + + + + + @@ -2531,6 +2681,11 @@ + + + + + @@ -2615,6 +2770,11 @@ + + + + + @@ -2699,6 +2859,11 @@ + + + + + @@ -2783,6 +2948,11 @@ + + + + + @@ -2867,6 +3037,11 @@ + + + + + @@ -2951,6 +3126,11 @@ + + + + + @@ -3036,6 +3216,11 @@ + + + + + @@ -3120,6 +3305,11 @@ + + + + + @@ -3204,6 +3394,11 @@ + + + + + @@ -3288,6 +3483,11 @@ + + + + + @@ -3372,6 +3572,11 @@ + + + + + @@ -3456,6 +3661,11 @@ + + + + + @@ -3541,6 +3751,11 @@ + + + + + @@ -3625,6 +3840,11 @@ + + + + + @@ -3709,6 +3929,11 @@ + + + + + @@ -3793,6 +4018,11 @@ + + + + + @@ -3877,6 +4107,11 @@ + + + + + @@ -3961,6 +4196,11 @@ + + + + + @@ -4045,6 +4285,11 @@ + + + + + @@ -4130,6 +4375,11 @@ + + + + + @@ -4214,6 +4464,11 @@ + + + + + @@ -4298,6 +4553,11 @@ + + + + + @@ -4382,6 +4642,11 @@ + + + + + @@ -4466,6 +4731,11 @@ + + + + + @@ -4550,6 +4820,11 @@ + + + + + @@ -4634,6 +4909,11 @@ + + + + + @@ -4718,6 +4998,11 @@ + + + + + @@ -4803,6 +5088,11 @@ + + + + + @@ -4887,6 +5177,11 @@ + + + + + @@ -4971,6 +5266,11 @@ + + + + + @@ -5055,6 +5355,11 @@ + + + + + @@ -5139,6 +5444,11 @@ + + + + + @@ -5223,6 +5533,11 @@ + + + + + @@ -5308,6 +5623,11 @@ + + + + + @@ -5392,6 +5712,11 @@ + + + + + @@ -5476,6 +5801,11 @@ + + + + + @@ -5559,6 +5889,11 @@ + + + + + @@ -5643,6 +5978,11 @@ + + + + + @@ -5727,6 +6067,11 @@ + + + + + @@ -5811,6 +6156,11 @@ + + + + + @@ -5895,6 +6245,11 @@ + + + + + @@ -5979,6 +6334,11 @@ + + + + + @@ -6063,6 +6423,11 @@ + + + + + @@ -6147,6 +6512,11 @@ + + + + + @@ -6231,6 +6601,11 @@ + + + + + @@ -6314,6 +6689,11 @@ + + + + + @@ -6338,6 +6718,11 @@ + + + + + @@ -6362,6 +6747,11 @@ + + + + + @@ -6387,6 +6777,11 @@ + + + + + @@ -6411,6 +6806,11 @@ + + + + + @@ -6434,6 +6834,11 @@ + + + + + @@ -6458,6 +6863,11 @@ + + + + + @@ -6482,6 +6892,11 @@ + + + + + @@ -6506,6 +6921,11 @@ + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/33900-33999.xml index ba116a57c5..3c332485f9 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/33900-33999.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/33900-33999.xml @@ -3776,9 +3776,9 @@ - - - + + + @@ -3789,7 +3789,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34000-34099.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34000-34099.xml index ade07cb46a..b136067478 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34000-34099.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34000-34099.xml @@ -39,7 +39,7 @@ - + FRIEND FEMALE @@ -58,7 +58,7 @@ - + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34600-34699.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34600-34699.xml index 99a9a8a59a..d72b4c5e44 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34600-34699.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/npcs/34600-34699.xml @@ -359,7 +359,7 @@ - + ETC FEMALE @@ -474,7 +474,7 @@ - + ETC FEMALE @@ -513,7 +513,7 @@ - + ETC FEMALE @@ -552,7 +552,7 @@ - + ETC FEMALE @@ -591,7 +591,7 @@ - + ETC FEMALE @@ -631,7 +631,7 @@ - + ETC FEMALE @@ -900,7 +900,7 @@ - + ETC FEMALE @@ -920,7 +920,7 @@ - + ETC FEMALE diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/06200-06299.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/06200-06299.xml index eed79a70f9..cb3bb32416 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/06200-06299.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/06200-06299.xml @@ -1546,11 +1546,9 @@ -1000 WATER 180 - 10000 + 100 85 A1 - 10000 - TURN_FLEE;KNOCKDOWN;DEPORT;SILENCE;PARALYZE;ABSORB;DISARM;SILENCE_PHYSICAL;SILENCE_ALL;CHANGEBODY;TURN_STONE;DERANGEMENT;AIRBIND;SLEEP;OBLIVION;MIRAGE;MIRAGE_TRAP;ROOT_MAGICALLY;ROOT_PHYSICALLY;STUN;PUBLIC_SLOT -5 true SELF diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/10500-10599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/10500-10599.xml index 2cebaf4b28..d2a456d658 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/10500-10599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/10500-10599.xml @@ -848,6 +848,8 @@ 9832 10268 10704 + 10704 + 10704 365 true diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/12800-12899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/12800-12899.xml index e278cf1583..792b52aafd 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/12800-12899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/12800-12899.xml @@ -17,7 +17,6 @@ - @@ -42,7 +41,6 @@ - @@ -67,7 +65,6 @@ - @@ -92,7 +89,6 @@ - @@ -117,7 +113,6 @@ - @@ -142,7 +137,6 @@ - @@ -167,7 +161,6 @@ - @@ -192,7 +185,6 @@ - diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/13900-13999.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/13900-13999.xml index 0743659057..83a244d5dc 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/13900-13999.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/13900-13999.xml @@ -2891,14 +2891,6 @@ P SELF - - -10 - PK - - - -10 - ENEMY_ALL - 3 STR @@ -2931,6 +2923,17 @@ 3 CHA + + 5 + + + -10 + PK + + + -10 + ENEMY_ALL + 10 FIRE diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/16300-16399.xml index 16b0528f51..5d65fce993 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/16300-16399.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/16300-16399.xml @@ -801,6 +801,22 @@ 5000 -150 true + 80 + 900 + PHYSICAL + ENEMY + SINGLE + PULL + + + + 100 + + + 600 + 600 + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18400-18499.xml index f8a59c8c96..515ab275b1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18400-18499.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18400-18499.xml @@ -885,8 +885,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_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18500-18599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18500-18599.xml index 76a5c79136..ce37cc4e3c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18500-18599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/18500-18599.xml @@ -803,10 +803,12 @@ SKILL_IGNORE ABNORMAL_INVINCIBILITY + ABNORMAL_INVINCIBILITY 2 3 + 4 7 1000 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22500-22599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22500-22599.xml index 568df94b3b..dff2b09ea8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22500-22599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22500-22599.xml @@ -1578,7 +1578,7 @@ 22883 22884 - 22885 + 22885 1 3600000 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22700-22799.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22700-22799.xml index 8762c2da22..0d58b56f20 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22700-22799.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/22700-22799.xml @@ -297,7 +297,7 @@ 23338 23339 - 23340 + 23340 1 3600000 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/27500-27599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/27500-27599.xml index 5ae51341a2..dd36622d95 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/27500-27599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/27500-27599.xml @@ -2735,10 +2735,12 @@ SKILL_IGNORE ABNORMAL_INVINCIBILITY + ABNORMAL_INVINCIBILITY 2 3 + 4 7 1000 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/29500-29599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/29500-29599.xml index 67754aab4a..3f062045a0 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/29500-29599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/29500-29599.xml @@ -546,92 +546,236 @@ icon.sigil_of_protection - A1 + P icon.sigil_of_protection - A1 + P + + + 1 + MEN + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT,DEX + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT,DEX,INT,STR + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT,DEX,INT,STR,CHA,LUC + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT,DEX,INT,STR,CHA,LUC + + + 50 + FIRE,WATER,WIND,EARTH,HOLY,DARK + + + 50 + + + 50 + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT,DEX,INT,STR,CHA,LUC + + + 70 + FIRE,WATER,WIND,EARTH,HOLY,DARK + + + 80 + + + 80 + + icon.sigil_of_protection - A1 + P + + + 1 + MEN,CON,WIT,DEX,INT,STR,CHA,LUC + + + 100 + FIRE,WATER,WIND,EARTH,HOLY,DARK + + + 120 + + + 120 + + BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE BranchSys3.Icon.g_shape_shifting_sigil A1 + 5 + 0 + 1 + 2 + ITEM + SINGLE diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30000-30099.xml index ded0fef00d..924fc6d5fe 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30000-30099.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30000-30099.xml @@ -2037,8 +2037,8 @@ P 85 - - 550 + + 350 DIFF diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30700-30799.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30700-30799.xml index b1a01808ea..c7a6e2c617 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30700-30799.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30700-30799.xml @@ -3207,6 +3207,7 @@ 90 95 110 + 110 NONE 5 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30800-30899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30800-30899.xml index 83c33cb173..fb5bea055f 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30800-30899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/30800-30899.xml @@ -2269,7 +2269,7 @@ H_DEBUFF_SELF_B_AVE 110 - 115 + 115 5 AU diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31000-31099.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31000-31099.xml index 0e6ddb0394..57bc7721f2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31000-31099.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31000-31099.xml @@ -2757,6 +2757,7 @@ 1 2 + 3 PER 0 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31100-31199.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31100-31199.xml index e473f81e09..b84735fe63 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31100-31199.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/31100-31199.xml @@ -1068,7 +1068,7 @@ -716 20000 5 - 38773 + 1785 3 @@ -2493,7 +2493,6 @@ 5 ENEMY_ALL - PER 31174 diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/34400-34499.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/34400-34499.xml index 2c7b0f5b43..c8b78fa712 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/34400-34499.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/34400-34499.xml @@ -188,42 +188,264 @@ icon.skill0000 A1 + 1 + 2000 + 2200 + 300 + -704 + ENEMY + SINGLE + ATTACK + + + + 553 + 685 + + + icon.skill0000 A1 + 6-12 + 400 + 1 + 4500 + 500 + -731 + SELF + POINT_BLANK + NOT_FRIEND + + + + 553 + 685 + + + icon.ev_magic_flame_game_wind2 - A1 + A2 + 1 + 10 + AIRBIND + ASTATINE_WATER + 100 + 20 + NONE + AIRBIND + 150 + 3000 + 200 + -708 + STUN;TURN_FLEE + 5 + 120 + true + 2 + SELF + POINT_BLANK + NOT_FRIEND + + + + 13565;35190;27548;1904;1912;10517;30868;19573;10279;11264;30516;30017;30018 + + + 100 + 100 + 100 + 100 + 100 + 100 + 100 + 100 + + icon.skill1237 - A1 + A2 + 1 + 20 + FREEZING + FREEZING2 + 100 + 20 + NONE + 150 + 3000 + 200 + -708 + 5 + 120 + true + 2 + SELF + POINT_BLANK + NOT_FRIEND + true + false + + + icon.skill6274 - A1 + A2 + 1 + 20 + BLEEDING + 120 + MAGIC + DERANGEMENT + 120 + 20 + 800 + 600 + 2200 + 300 + 1 + -704 + 5 + true + ENEMY + SQUARE + NOT_FRIEND + 0;0;500;600 + 5-12 + + + + 553 + 685 + + + + -80 + DIFF + + + -30 + PER + + + -30 + PER + + + 20 + PER + 0 + + + 20 + PER + 1 + + + 20 + PER + 22 + + icon.skill0000 A1 + 6-12 + 400 + 10500 + 1 + -731 + 5 + 120 + SELF + POINT_BLANK + NOT_FRIEND icon.skill0000 A1 + 120 + 350 + 500 + 1200 + 300 + -712 + 10 + 1 + ENEMY + SINGLE + + + 553 + + icon.skill0000 A1 + 6-12 + 400 + 4500 + 1 + -731 + 5 + 120 + SELF + POINT_BLANK + NOT_FRIEND + + + 553 + + icon.oasis_feel - A1 + A2 + 1 + 5 + KNOCKDOWN + 5 + 120 + 4500 + -731 + NONE + true + 100 + 20 + KNOCKDOWN + 400 + KNOCKDOWN + SELF + POINT_BLANK + NOT_FRIEND + + + 200 + 400 + true + + + 100 + 100 + 100 + 100 + 100 + + + 13542;13565;35190;27548;1904;1912;10517;30868;19573;10279;11264;30516;30017;30018 + + icon.skill0000 @@ -232,6 +454,16 @@ icon.skill0000 A1 + 6-12 + 400 + 10500 + 1 + -731 + 5 + 120 + SELF + POINT_BLANK + NOT_FRIEND icon.skill0000 @@ -240,12 +472,86 @@ icon.skill10015 - A1 + A2 + + 1 + 2 + + + 2 + 1 + + STUN + + STUN + + + 2200 + 1000 + + 100 + 20 + PHYSICAL + 5 + 120 + + 2000 + 900 + + 2200 + + 1000 + 1500 + + 500 + -2161 + 0 + PULL + true + + ENEMY + SELF + + + SINGLE + RANGE + + NOT_FRIEND + + + + 100 + + + 600 + 650 + + + 10279;10517;10025;10776;11770;1904;11264;11093;13314;1912;7002;18721;18722;28203;30516;35190 + + + icon.skill1001 - A1 + A2 + 1 + 300 + PA_UP + 120 + 5 + A2 + NONE + 0 + SELF + SINGLE + + + 100 + PER + + @@ -253,17 +559,54 @@ icon.skill1399 icon.skill0000 - A1 + A2 + 1 + 3 + KNOCKDOWN + 5 + 120 + 5000 + -731 + NONE + true + 100 + 20 + KNOCKDOWN + 200 + KNOCKDOWN + SELF + POINT_BLANK + NOT_FRIEND + + + 553 + + + 200 + 400 + true + + + 100 + 100 + 100 + 100 + 100 + + + 13542;13565;35190;27548;1904;1912;10517;30868;19573;10279;11264;30516;30017;30018 + + icon.skillboss - A1 + P icon.skill6301 - A1 + P diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39100-39199.xml index b16aa0ff47..85ecb9f5d9 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39100-39199.xml @@ -52,12 +52,14 @@ 2 3 4 + 5 3600 7200 21600 28800 + 28800 CHANGEBODY CHANGESHAPE_TRANSFORM diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39200-39299.xml index 9b791482c2..deb2dd8418 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39200-39299.xml @@ -46,6 +46,7 @@ icon.bm_dragon_posion_special A2 2 + 1000 500 300000 GLOWING_DRAGON_POTION @@ -115,8 +116,10 @@ - 30 - 50 + + 30 + 50 + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39400-39499.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39400-39499.xml index c290c69e4a..5a885bad2c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39400-39499.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39500-39599.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39500-39599.xml index 56a4e1751a..7d12757a17 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39500-39599.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39500-39599.xml @@ -170,6 +170,8 @@ true true true + -5 + false 25 @@ -232,6 +234,26 @@ PER 1 + + -15 + PER + 0 + + + -15 + PER + 3 + + + -15 + PER + 2 + + + -15 + PER + 22 + 100 DIFF @@ -252,7 +274,7 @@ 22 - MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL + MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL;BUFF_SPECIAL_CLASS 100 @@ -265,8 +287,113 @@ icon.soul_spirit1 A2 100 - 2000 100 + BUFF_SPECIAL_CLASS + NONE + 5 + 85 + 1 + 420 + 2 + 2000 + SELF + SINGLE + + + 22 + PER + + + 40 + PER + + + 45 + PER + + + 15 + PER + + + 100 + PER + + + 100 + PER + + + 70 + PER + + + 10 + PER + + + 15 + PER + + + 50 + PER + + + 30 + PER + + + -15 + PER + 1 + + + -15 + PER + 0 + + + -15 + PER + 3 + + + -15 + PER + 2 + + + -15 + PER + 22 + + + -20 + PER + 1 + + + -20 + PER + 0 + + + -20 + PER + 22 + + + 30833 + + + MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL;BUFF_SPECIAL_CLASS + 100 + + + MULTI_BUFF;DANCE_OF_BLADESTORM;SONG_OF_CHAMPION;SONG_OF_EARTH;SONG_OF_HUNTER;SONG_OF_LIFE;SONG_OF_MEDITATION;SONG_OF_RENEWAL;SONG_OF_VENGEANCE;SONG_OF_VITALITY;SONG_OF_WARDING;SONG_OF_WATER;SONG_OF_WIND;DANCE_OF_BERSERKER;DANCE_OF_CONCENTRATION;DANCE_OF_FIRE;DANCE_OF_FURY;DANCE_OF_INSPIRATION;DANCE_OF_MYSTIC;DANCE_OF_SIREN;DANCE_OF_VAMPIRE;DANCE_OF_WARRIOR;SONG_OF_PURIFICATION;WISPERING_OF_BATTLE;SONG_OF_WINDSTORM;MOTION_OF_DEFENCE;INSTINCT;BERSERKER;PA_PD_UP;IMPROVE_SHIELD_RATE_DEFENCE_UP;SHIELD_PROB_UP;SHIELD_DEFENCE_UP;CANCEL_PROB_DOWN;MA_UP_SPECIAL;BUFF_SPECIAL_CLASS + + @@ -298,6 +425,8 @@ true true true + -5 + false 10 @@ -357,19 +486,81 @@ icon.bm_special_cocktail_of_king_p - A1 + A2 + + 3600 + 14400 + 28800 + + 1 + NONE + 7 + -2 + -2 + 2 + SELF + SINGLE + true + true + true + -5 + false 5000 + + + BUFF_SPECIAL_CLASS;DITTY;BUFF_SPECIAL_ATTACK;BUFF_SPECIAL_AURA;ARMOR_ELEMENT_ALL + 100 + + + 39514 + 1 + + + 39517 + 1 + + + 39766 + 1 + + + 39771 + 1 + + + 39772 + 1 + + + + + BUFF_SPECIAL_CLASS;DITTY;BUFF_SPECIAL_ATTACK;BUFF_SPECIAL_AURA;ARMOR_ELEMENT_ALL + 100 + + icon.bm_special_cocktail_of_king_p - A1 + A2 + 3600 + 1 + NONE + 7 + -2 + -2 + 22 + SELF + SINGLE + true + true + true 5000 icon.bm_special_cocktail_of_king_p - A1 + A2 5000 @@ -1189,11 +1380,16 @@ icon.armor_t2000_b_i00 - A1 + A2 + 86400 + CGRADE_CHANGE 4 1500 5000 780 + 1 + 81016 + true diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39700-39799.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39700-39799.xml index bec8fef8b2..8a57d5bca4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39700-39799.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39700-39799.xml @@ -1067,6 +1067,11 @@ PER 3 + + -10 + PER + 22 + 9 30 @@ -1193,6 +1198,16 @@ PER 0 + + -22 + PER + 2 + + + -22 + PER + 22 + 8 30 @@ -1515,7 +1530,33 @@ icon.bless_scroll - A1 + A2 + 1 + 1800 + FREYA_SCROLL_VIT + 82295 + 1 + 4 + SELF + SINGLE + true + + + 100 + + + 150 + + + 150 + + + -100 + + + EXP_SPECIAL,-1;DANDY_CHALLENGE,-1;SANTIAGO_SCROLL,-1 + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39800-39899.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39800-39899.xml index 10efa496ee..7998c32abd 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39800-39899.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/39800-39899.xml @@ -116,7 +116,50 @@ icon.elemental_earth_stone_i00 - A1 + A2 + 2 + 1800 + BR_EVENT_BUF1 + false + 5 + SELF + SINGLE + 1000 + 300000 + 1 + 2 + true + true + + + 150 + + + 150 + + + 3 + STR + + + 3 + INT + + + 3 + CON + + + 7 + DIFF + + + 10 + + + 10 + + @@ -147,9 +190,21 @@ icon.ev_19th_cake A1 + 1 icon.skill0000 A1 + 1 + 4 + 5 + 0 + SELF + SINGLE + 1 + 82658 + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/documentation.txt index 3766a361c3..ecfc3ba221 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/stats/skills/documentation.txt @@ -7,11 +7,14 @@ AbstractStatAddEffect: Abstract class for managing stat adding. AbstractStatEffect: Abstract class for managing stats. AbstractStatPercentEffect: Abstract class for managing stat percentages. (l2jmobius) Accuracy: P. Accuracy stat. +AddFireSourcePoints: Conquest effect to add Fire Source points. (l2jmobius) AddHate: Instant effect that increases target's hate towards you. 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. @@ -170,11 +173,12 @@ 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. Ignition: Transforms sword to Death Knight's Flame Sword. (l2jmobius) 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. @@ -213,7 +217,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. @@ -278,6 +281,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_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/AteliaRefineryTeleportDevice2.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/AteliaRefineryTeleportDevice2.xml deleted file mode 100644 index b253305a59..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/AteliaRefineryTeleportDevice2.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/InvestigatorsTeleporter.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/InvestigatorsTeleporter.xml deleted file mode 100644 index da543cd3e3..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/InvestigatorsTeleporter.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/InvestigatorsTeleporterMines.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/InvestigatorsTeleporterMines.xml deleted file mode 100644 index ac2ee3ef4f..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/InvestigatorsTeleporterMines.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/OverseerTeleporter.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/OverseerTeleporter.xml deleted file mode 100644 index 22bde46b15..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/OverseerTeleporter.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/PatrolTeleporter.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/PatrolTeleporter.xml deleted file mode 100644 index 72bb39b9f7..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/PatrolTeleporter.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/PrimevalIsle.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/PrimevalIsle.xml deleted file mode 100644 index 93cf31d10a..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/PrimevalIsle.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/SearchTeamTeleporter.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/SearchTeamTeleporter.xml deleted file mode 100644 index 06f20e3409..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/SearchTeamTeleporter.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/SessionZonesTeleporters.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/SessionZonesTeleporters.xml new file mode 100644 index 0000000000..cf3ebec6bb --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/SessionZonesTeleporters.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/TeleporterScoutToi.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/TeleporterScoutToi.xml deleted file mode 100644 index 2de8046479..0000000000 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/teleporters/others/TeleporterScoutToi.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/LimitShop.xsd index 2ef0e76e84..77f1bb3a5d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/LimitShop.xsd +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/LimitShop.xsd @@ -24,6 +24,7 @@ + @@ -40,6 +41,7 @@ + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/skills.xsd b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/skills.xsd index 21e6cb21be..39b93b6883 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/xsd/skills.xsd @@ -710,6 +710,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2752,6 +2782,9 @@ + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/zones/conquest.xml b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/zones/conquest.xml index 29dff74a30..8a119c9905 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/zones/conquest.xml +++ b/L2J_Mobius_11.1_TheSourceOfFlame/dist/game/data/zones/conquest.xml @@ -16,7 +16,7 @@ - + @@ -107,13 +107,844 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/Config.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/Config.java index 15e1c2abc1..d951ee43cb 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/Config.java @@ -611,6 +611,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 AbnormalVisualEffect BLUE_TEAM_ABNORMAL_EFFECT; public static AbnormalVisualEffect RED_TEAM_ABNORMAL_EFFECT; @@ -841,6 +842,9 @@ public class Config public static boolean HARDIN_ENABLE_ERTHEIAS; public static Map> HARDIN_REMOVED_SKILLS; + // Eraton + public static Set ERATON_RETAINED_SKILLS = new HashSet<>(); + // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -848,6 +852,7 @@ public class Config public static int STARTING_VITALITY_POINTS; public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; + public static float RATE_VITALITY_EXP_PREMIUM_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -1154,6 +1159,7 @@ public class Config public static int CONQUEST_RATE_SERVER_POINTS; public static int CONQUEST_RATE_SERVER_SOUL_ORBS; public static int CONQUEST_RATE_ZONE_POINTS; + public static int CONQUEST_RATE_BLOODY_COINS; public static int CONQUEST_ATTACK_POINTS; public static int CONQUEST_LIFE_POINTS; public static boolean CONQUEST_PVP_ZONE; @@ -1466,6 +1472,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; @@ -1953,6 +1960,15 @@ public class Config HARDIN_REMOVED_SKILLS.get(classId).add(Integer.parseInt(classInfo[i])); } } + ERATON_RETAINED_SKILLS.clear(); + final String eratonRetainedSkills = characterConfig.getString("EratonRetainedSkills", "").trim(); + if (!eratonRetainedSkills.isEmpty()) + { + for (String id : eratonRetainedSkills.split(",")) + { + ERATON_RETAINED_SKILLS.add(Integer.parseInt(id)); + } + } ENABLE_VITALITY = characterConfig.getBoolean("EnableVitality", true); STARTING_VITALITY_POINTS = characterConfig.getInt("StartingVitalityPoints", 140000); RAIDBOSS_USE_VITALITY = characterConfig.getBoolean("RaidbossUseVitality", true); @@ -2176,6 +2192,7 @@ public class Config CONQUEST_RATE_SERVER_POINTS = conquestConfig.getInt("ConquestRateServerPoints", 1); CONQUEST_RATE_SERVER_SOUL_ORBS = conquestConfig.getInt("ConquestRateServerSoulOrbs", 100); CONQUEST_RATE_ZONE_POINTS = conquestConfig.getInt("ConquestRateZonePoints", 1); + CONQUEST_RATE_BLOODY_COINS = conquestConfig.getInt("ConquestRateBloodyCoins", 1); CONQUEST_ATTACK_POINTS = conquestConfig.getInt("ConquestCharacterAttackPoints", 100); CONQUEST_LIFE_POINTS = conquestConfig.getInt("ConquestCharacterLifePoints", 20); CONQUEST_PVP_ZONE = conquestConfig.getBoolean("ConquestIsPvpZone", false); @@ -2694,6 +2711,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); BLUE_TEAM_ABNORMAL_EFFECT = null; final String blueTeamAve = generalConfig.getString("BlueTeamAbnormalEffect", "").trim(); if (!blueTeamAve.isEmpty()) @@ -2822,6 +2840,7 @@ public class Config MONSTER_EXP_MAX_LEVEL_DIFFERENCE = ratesConfig.getInt("MonsterExpMaxLevelDifference", 11); RATE_RAIDBOSS_POINTS = ratesConfig.getFloat("RateRaidbossPointsReward", 1); RATE_VITALITY_EXP_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpMultiplier", 2); + RATE_VITALITY_EXP_PREMIUM_MULTIPLIER = ratesConfig.getFloat("RateVitalityExpPremiumMultiplier", 3); VITALITY_MAX_ITEMS_ALLOWED = ratesConfig.getInt("VitalityMaxItemsAllowed", 999); RATE_VITALITY_LOST = ratesConfig.getFloat("RateVitalityLost", 1); RATE_VITALITY_GAIN = ratesConfig.getFloat("RateVitalityGain", 1); @@ -3889,6 +3908,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/ai/SummonAI.java index dc9c2e80f1..783e998673 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index 33a5ef7906..117eb95754 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/ActionData.java index ee8748fe16..1583360766 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index e33a1b0efa..337ac6dd99 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java index 5bc59aa442..e6f94bf829 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java @@ -126,7 +126,9 @@ public class LimitShopCraftData implements IXmlReader boolean announce3 = false; boolean announce4 = false; boolean announce5 = false; + int enchant = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -217,6 +219,7 @@ public class LimitShopCraftData implements IXmlReader count = parseLong(attrs, "count", 1L); chance = parseFloat(attrs, "chance", 100f); announce = parseBoolean(attrs, "announce", false); + enchant = parseInteger(attrs, "enchant", 0); productionId2 = parseInteger(attrs, "id2", 0); count2 = parseLong(attrs, "count2", 1L); chance2 = parseFloat(attrs, "chance2", 100f); @@ -233,6 +236,7 @@ public class LimitShopCraftData implements IXmlReader count5 = parseLong(attrs, "count5", 1L); announce5 = parseBoolean(attrs, "announce5", false); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -244,7 +248,7 @@ public class LimitShopCraftData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, enchant, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java index 19176d0ee5..7303b86055 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java @@ -109,6 +109,7 @@ public class LimitShopData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -197,6 +198,7 @@ public class LimitShopData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -208,7 +210,7 @@ public class LimitShopData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/SkillData.java index a9c180af05..239c2d0a00 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 290c9084cc..320e04a0a7 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index 47d701f12b..45772454be 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 46f12b32ae..34ca89e316 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 33e61fdf2f..a0a521fa8a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -139,6 +139,11 @@ public class DailyTaskManager resetHuntPass(); } + if (calendar.get(Calendar.DAY_OF_MONTH) == 1) + { + resetMontlyLimitShopData(); + } + // Daily tasks. resetAttendanceRewards(); resetDailySkills(); @@ -820,6 +825,31 @@ public class DailyTaskManager LOGGER.info("LimitShopData has been reset."); } + private void resetMontlyLimitShopData() + { + for (LimitShopProductHolder holder : LimitShopData.getInstance().getProducts()) + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement("DELETE FROM account_gsdata WHERE var=?")) + { + ps.setString(1, AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + ps.executeUpdate(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset LimitShopData: " + e); + } + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getAccountVariables().remove(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + player.getAccountVariables().storeMe(); + } + } + LOGGER.info("LimitShopData has been resetted."); + } + private void resetHuntPass() { // Update data for offline players. diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index ed13229014..272c1e6add 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/ShortCuts.java index b4cd9646dc..83fc87bdab 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Creature.java index a279bbaa27..a457303a3a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1298,7 +1298,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)) @@ -2826,7 +2826,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); } @@ -2839,177 +2839,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Player.java index 105d6ddd60..f7b2f29d49 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -331,6 +331,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoAbnormalVisualEf import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoCubic; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoEquipSlot; import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import org.l2jmobius.gameserver.network.serverpackets.ExVitalityEffectInfo; import org.l2jmobius.gameserver.network.serverpackets.GetOnVehicle; import org.l2jmobius.gameserver.network.serverpackets.HennaInfo; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; @@ -4696,7 +4697,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8712,9 +8713,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; + } } } } @@ -10054,6 +10059,7 @@ public class Player extends Playable sendPacket(new ExUserBoostStat(this, BonusExpType.VITALITY)); sendPacket(new ExUserBoostStat(this, BonusExpType.BUFFS)); sendPacket(new ExUserBoostStat(this, BonusExpType.PASSIVE)); + sendPacket(new ExVitalityEffectInfo(this)); _userBoostStatTask = null; }, 300); } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Summon.java index 8ec5ccbc85..9552cddeff 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 3e5ebd7c98..38b04a0109 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index 647f398100..b5d228678e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index 55f1307036..fb56d30ce1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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<>(); @@ -883,15 +882,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()); } } } @@ -902,8 +899,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. @@ -912,7 +913,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()) { @@ -985,45 +986,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java index 16208f0ee7..c4a4f1fb0a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java @@ -482,7 +482,11 @@ public class PlayerStat extends PlayableStat public double getVitalityExpBonus() { - return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0; + if (getVitalityPoints() > 0) + { + return getMul(Stat.VITALITY_EXP_RATE, 1) * (getActiveChar().hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER); + } + return 0; } public void setVitalityPoints(int value) diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 61623cf473..d53b9c3c09 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 1a95ccb397..8b59c5c95e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index ba44f05690..6e90aa435c 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 49e27ac3e4..aea3f1b7b2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index afa13f0b6c..e3dd26b44a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/effects/EffectType.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/effects/EffectType.java index c090a0d846..e35490546b 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/effects/EffectType.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/effects/EffectType.java @@ -64,5 +64,6 @@ public enum EffectType TELEPORT_TO_TARGET, ABNORMAL_SHIELD, DUAL_RANGE, + RESTORE_SYMBOL_SEAL, VITALITY_POINT_UP } \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index 42cc74c313..0609afdb42 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/EventType.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/EventType.java index 8751edde94..e1cdc844f6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/EventType.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/EventType.java @@ -116,6 +116,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSkillL import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSocialAction; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSubChange; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonAgathion; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonSacredFire; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonSpawn; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonTalk; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerTakeHero; @@ -296,6 +297,7 @@ public enum EventType ON_PLAYER_QUEST_COMPLETE(OnPlayerQuestComplete.class, void.class), ON_PLAYER_SUMMON_AGATHION(OnPlayerSummonAgathion.class, void.class), ON_PLAYER_UNSUMMON_AGATHION(OnPlayerUnsummonAgathion.class, void.class), + ON_PLAYER_SUMMON_SACRED_FIRE(OnPlayerSummonSacredFire.class, void.class), // Trap events ON_TRAP_ACTION(OnTrapAction.class, void.class), diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/conquest/OnConquestFlowerCollect.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/conquest/OnConquestFlowerCollect.java index 1ea7c23731..720388c4dc 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/conquest/OnConquestFlowerCollect.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/conquest/OnConquestFlowerCollect.java @@ -26,10 +26,12 @@ import org.l2jmobius.gameserver.model.events.impl.IBaseEvent; public class OnConquestFlowerCollect implements IBaseEvent { private final Player _player; + private final int _npcId; - public OnConquestFlowerCollect(Player player) + public OnConquestFlowerCollect(Player player, int npcId) { _player = player; + _npcId = npcId; } public Player getPlayer() @@ -37,6 +39,11 @@ public class OnConquestFlowerCollect implements IBaseEvent return _player; } + public int getNpcId() + { + return _npcId; + } + @Override public EventType getType() { diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerSummonSacredFire.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerSummonSacredFire.java new file mode 100644 index 0000000000..e73f6e4bda --- /dev/null +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerSummonSacredFire.java @@ -0,0 +1,52 @@ +/* + * 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.model.events.impl.creature.player; + +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.IBaseEvent; + +/** + * @author CostyKiller + */ +public class OnPlayerSummonSacredFire implements IBaseEvent +{ + private final Player _player; + private final int _npcId; + + public OnPlayerSummonSacredFire(Player player, int npcId) + { + _player = player; + _npcId = npcId; + } + + public Player getPlayer() + { + return _player; + } + + public int getNpcId() + { + return _npcId; + } + + @Override + public EventType getType() + { + return EventType.ON_PLAYER_SUMMON_SACRED_FIRE; + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java index 425bca897b..4e00472bdf 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java @@ -32,6 +32,7 @@ public class LimitShopProductHolder private final long _count; private final float _chance; private final boolean _announce; + private final int _enchant; private final int _productionId2; private final long _count2; private final float _chance2; @@ -48,9 +49,10 @@ public class LimitShopProductHolder private final long _count5; private final boolean _announce5; private final int _accountDailyLimit; + private final int _accountMontlyLimit; private final int _accountBuyLimit; - public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountBuyLimit) + public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int enchant, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountMontlyLimit, int accountBuyLimit) { _id = id; _category = category; @@ -63,6 +65,7 @@ public class LimitShopProductHolder _count = count; _chance = chance; _announce = announce; + _enchant = enchant; _productionId2 = productionId2; _count2 = count2; _chance2 = chance2; @@ -79,6 +82,7 @@ public class LimitShopProductHolder _count5 = count5; _announce5 = announce5; _accountDailyLimit = accountDailyLimit; + _accountMontlyLimit = accountMontlyLimit; _accountBuyLimit = accountBuyLimit; } @@ -137,6 +141,11 @@ public class LimitShopProductHolder return _announce; } + public int getEnchant() + { + return _enchant; + } + public int getProductionId2() { return _productionId2; @@ -217,6 +226,11 @@ public class LimitShopProductHolder return _accountDailyLimit; } + public int getAccountMontlyLimit() + { + return _accountMontlyLimit; + } + public int getAccountBuyLimit() { return _accountBuyLimit; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/item/instance/Item.java index af732fc058..2c7f028186 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemEnchantAdd; 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; @@ -1074,11 +1079,14 @@ public class Item extends WorldObject */ public boolean setAugmentation(VariationInstance augmentation, boolean updateDatabase) { - // there shall be no previous augmentation.. + // Remove previous augmentation. if (_augmentation != null) { - LOGGER.info("Warning: Augment set for (" + getObjectId() + ") " + getName() + " owner: " + _ownerId); - return false; + if (isEquipped()) + { + _augmentation.removeBonus(getActingPlayer()); + } + removeAugmentation(); } _augmentation = augmentation; @@ -1652,7 +1660,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); @@ -2581,6 +2591,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); @@ -2605,6 +2620,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); @@ -2630,6 +2647,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 33209934f3..14b7972972 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -757,7 +757,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; @@ -909,7 +910,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 2a6b4713b9..83498fdbd8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -686,7 +686,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(); } @@ -709,7 +709,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(); } @@ -744,7 +744,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/Stat.java index 785b468e3d..a85ebaa1db 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -97,6 +97,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"), @@ -137,7 +138,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()), DEFENCE_CRITICAL_RATE("defCritRate"), DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"), diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index fc25054af9..a0eed6cc19 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index 89b7db15e1..6c561fc7cd 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 33f96df6cd..a1ef8d0a85 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index 923fe865f0..1179922621 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java index 320c51638a..66b859c14d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java @@ -45,6 +45,7 @@ public class AccountVariables extends AbstractVariables public static final String PRIME_SHOP_PRODUCT_DAILY_COUNT = "PSPDailyCount"; public static final String LCOIN_SHOP_PRODUCT_COUNT = "LCSCount"; public static final String LCOIN_SHOP_PRODUCT_DAILY_COUNT = "LCSDailyCount"; + public static final String LCOIN_SHOP_PRODUCT_MONTLY_COUNT = "LCSMontlyCount"; private final String _accountName; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/ZoneType.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/ZoneType.java index 69530d1955..6301c52fc8 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/ZoneType.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/ZoneType.java @@ -36,6 +36,8 @@ import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneEnter; import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneExit; import org.l2jmobius.gameserver.model.instancezone.Instance; import org.l2jmobius.gameserver.model.interfaces.ILocational; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; /** @@ -215,6 +217,10 @@ public abstract class ZoneType extends ListenersContainer // Check level if ((creature.getLevel() < _minLevel) || (creature.getLevel() > _maxLevel)) { + if (creature.isPlayer()) + { + creature.getActingPlayer().sendPacket(new ExShowScreenMessage(SystemMessageId.YOU_CANNOT_ENTER_AS_YOUR_LEVEL_DOES_NOT_MEET_THE_REQUIREMENTS, ExShowScreenMessage.TOP_CENTER, 10000)); + } return false; } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java index a6eaf014dc..df6cec9f99 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.model.zone.type; +import org.l2jmobius.gameserver.enums.InstanceType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.zone.ZoneType; @@ -32,6 +33,7 @@ public class TeleportZone extends ZoneType public TeleportZone(int id) { super(id); + setTargetType(InstanceType.Player); // Default only player. } @Override diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index 2a8203d7ef..49dfb839a3 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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) { @@ -681,7 +686,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index f57765cd74..c58d605857 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 05934422b3..a35d839832 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 91ac9b3eec..2b8723cb91 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -225,21 +225,21 @@ public class UseItem implements ClientPacket if (CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId())) { - // Death Knight class unequip shields. + // Unequip shields. if ((player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND) != null) && (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND).getItemType() == ArmorType.SHIELD)) { player.disarmShield(); } - // Prevent Death Knight class to equip shields. + // Prevent equipping shields. if (item.getItemType() == ArmorType.SHIELD) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; } - // Prevent Death Knight class to equip other weapons. - if (item.isWeapon() && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND)))) + // Prevent equipping other weapons. + if (item.isWeapon() && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index a140c01f0e..c366a156ba 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneConnectCastle.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneConnectCastle.java index d9517e2201..4a460777ae 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneConnectCastle.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneConnectCastle.java @@ -16,7 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets.dethrone; -import org.l2jmobius.Config; import org.l2jmobius.commons.network.ReadablePacket; import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; import org.l2jmobius.gameserver.model.actor.Player; @@ -56,11 +55,11 @@ public class RequestExDethroneConnectCastle implements ClientPacket GlobalVariablesManager.getInstance().set("CONQUEST_CONNECTED", true); final long serverPoints = GlobalVariablesManager.getInstance().getLong("CONQUEST_SERVER_POINTS", 0L); - final long soulOrbScore = serverPoints * Config.CONQUEST_RATE_SERVER_SOUL_ORBS; // Custom value. + final long serverSoulOrbs = GlobalVariablesManager.getInstance().getLong("CONQUEST_SERVER_SOUL_ORBS", 0L); final boolean _bAdenCastleOwner = (player.getClan() != null) && (player.getObjectId() == player.getClan().getLeaderId()) && (player.getClan().getCastleId() == 5); // Aden Castle Id is 5 _bConnected = true player.sendPacket(new ExDethroneConnectCastle(true)); - player.sendPacket(new ExDethroneServerInfo(serverPoints, soulOrbScore, _bAdenCastleOwner, true)); + player.sendPacket(new ExDethroneServerInfo(serverPoints, serverSoulOrbs, _bAdenCastleOwner, true)); player.sendPacket(SystemMessageId.THE_CONNECTION_TO_THE_CONQUEST_WORLD_WAS_MADE); } else // Already connected. diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneDisconnectCastle.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneDisconnectCastle.java index 2b0a9ee98a..7cc7d24fce 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneDisconnectCastle.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneDisconnectCastle.java @@ -16,7 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets.dethrone; -import org.l2jmobius.Config; import org.l2jmobius.commons.network.ReadablePacket; import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; import org.l2jmobius.gameserver.model.actor.Player; @@ -55,11 +54,11 @@ public class RequestExDethroneDisconnectCastle implements ClientPacket player.sendMessage("Conquest connection is inactive."); final long serverPoints = GlobalVariablesManager.getInstance().getLong("CONQUEST_SERVER_POINTS", 0); - final long soulOrbScore = (serverPoints * Config.CONQUEST_RATE_SERVER_SOUL_ORBS); // Custom value. + final long serverSoulOrbs = GlobalVariablesManager.getInstance().getLong("CONQUEST_SERVER_SOUL_ORBS", 0L); final boolean adenCastleOwner = (player.getClan() != null) && (player.getObjectId() == player.getClan().getLeaderId()) && (player.getClan().getCastleId() == 5); // Aden Castle Id is 5 _bConnected = true GlobalVariablesManager.getInstance().set("CONQUEST_CONNECTED", false); player.sendPacket(new ExDethroneDisconnectCastle(false)); - player.sendPacket(new ExDethroneServerInfo(serverPoints, soulOrbScore, adenCastleOwner, false)); + player.sendPacket(new ExDethroneServerInfo(serverPoints, serverSoulOrbs, adenCastleOwner, false)); player.sendPacket(SystemMessageId.THE_CONNECTION_TO_THE_CONQUEST_WORLD_IS_LOST); } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethronePrevSeasonInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethronePrevSeasonInfo.java index e8da3ec0d2..228d6607f6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethronePrevSeasonInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethronePrevSeasonInfo.java @@ -16,7 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets.dethrone; -import org.l2jmobius.Config; import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.network.GameClient; @@ -38,7 +37,7 @@ public class RequestExDethronePrevSeasonInfo implements ClientPacket } final long prevServerPoints = GlobalVariablesManager.getInstance().getLong("CONQUEST_PREV_SEASON_SERVER_POINTS", 0); - final long prevSoulOrbsScore = prevServerPoints * Config.CONQUEST_RATE_SERVER_SOUL_ORBS; // Custom value. - player.sendPacket(new ExDethronePrevSeasonInfo(player, prevServerPoints, prevSoulOrbsScore)); + final long prevServerSoulOrbs = GlobalVariablesManager.getInstance().getLong("CONQUEST_PREV_SEASON_SERVER_SOUL_ORBS", 0); + player.sendPacket(new ExDethronePrevSeasonInfo(player, prevServerPoints, prevServerSoulOrbs)); } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneServerInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneServerInfo.java index cd13051439..e4a74d6253 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneServerInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/dethrone/RequestExDethroneServerInfo.java @@ -16,7 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets.dethrone; -import org.l2jmobius.Config; import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.network.GameClient; @@ -38,9 +37,9 @@ public class RequestExDethroneServerInfo implements ClientPacket } final long serverPoints = GlobalVariablesManager.getInstance().getLong("CONQUEST_SERVER_POINTS", 0); - final long soulOrbScore = serverPoints * Config.CONQUEST_RATE_SERVER_SOUL_ORBS; // Custom value. + final long serverSoulOrbs = GlobalVariablesManager.getInstance().getLong("CONQUEST_SERVER_SOUL_ORBS", 0L); final boolean adenOwner = (player.getClan() != null) && (player.getObjectId() == player.getClan().getLeaderId()) && (player.getClan().getCastleId() == 5); // Aden Castle Id is 5 final boolean connected = GlobalVariablesManager.getInstance().getBoolean("CONQUEST_CONNECTED", false); - player.sendPacket(new ExDethroneServerInfo(serverPoints, soulOrbScore, adenOwner, connected)); + player.sendPacket(new ExDethroneServerInfo(serverPoints, serverSoulOrbs, adenOwner, connected)); } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java index ab3db559b5..16743b2882 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java @@ -99,10 +99,6 @@ public class RequestEnchantItem implements ClientPacket player.removeRequest(request.getClass()); return; } - if (item.getEnchantLevel() != request.getEnchantLevel()) - { - item.setEnchantLevel(request.getEnchantLevel()); - } // Template for scroll. final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/ensoul/RequestItemEnsoul.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/ensoul/RequestItemEnsoul.java index a7fc5582d2..0d7e79cdab 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/ensoul/RequestItemEnsoul.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/ensoul/RequestItemEnsoul.java @@ -126,8 +126,12 @@ public class RequestItemEnsoul implements ClientPacket final ItemTemplate template = item.getTemplate(); if ((_type == 1) && (template.getEnsoulSlots() == 0)) { - PacketLogger.warning("Player: " + player + " attempting to ensoul non ensoulable item: " + item + "!"); - return; + // We use special ensoul slots for jewels. + if ((template.getType1() != ItemTemplate.TYPE1_WEAPON_RING_EARRING_NECKLACE) || (template.getSpecialEnsoulSlots() == 0)) + { + PacketLogger.warning("Player: " + player + " attempting to ensoul non ensoulable item: " + item + "!"); + return; + } } if ((_type == 2) && (template.getSpecialEnsoulSlots() == 0)) { diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java index 0a4493f6b8..d0a6c170f4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/herobook/RequestHeroBookEnchant.java @@ -29,7 +29,7 @@ public class RequestHeroBookEnchant implements ClientPacket @Override public void run(GameClient client) { - Player player = client.getPlayer(); + final Player player = client.getPlayer(); if (player == null) { return; diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java index 31afc31530..6deff5dad1 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java @@ -112,26 +112,9 @@ public class RequestHuntPassReward implements ClientPacket return; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); huntPass.setRewardAlert(false); player.sendPacket(new HuntPassInfo(player, _huntPassType)); @@ -157,4 +140,39 @@ public class RequestHuntPassReward implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java index 8e8cef3fb4..2b0476f4ed 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java @@ -115,26 +115,9 @@ public class RequestHuntPassRewardAll implements ClientPacket break REWARD_LOOP; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); } if (!inventoryLimitReached) @@ -165,4 +148,39 @@ public class RequestHuntPassRewardAll implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index 226946f767..7bf9ea60a4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -147,6 +147,25 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket return; } } + else if (_product.getAccountMontlyLimit() > 0) + { + final long amount = _product.getAccountMontlyLimit() * _amount; + if (amount < 1) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + if (player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) >= amount) + { + player.sendMessage("You have reached your montly limit."); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + + } else if (_product.getAccountBuyLimit() > 0) // Count limit. { final long amount = _product.getAccountBuyLimit() * _amount; @@ -168,7 +187,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket } // Check existing items. - final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), _product.getAccountDailyLimit())); + final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), Math.max(_product.getAccountDailyLimit(), _product.getAccountMontlyLimit()))); for (int i = 0; i < _product.getIngredientIds().length; i++) { if (_product.getIngredientIds()[i] == 0) @@ -315,7 +334,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket if (Rnd.get(100) < _product.getChance()) { rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount()); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -362,7 +381,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket else if (Rnd.get(100) < _product.getChance()) { rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0)); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -374,6 +393,10 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), 0) + _amount); } + if (_product.getAccountMontlyLimit() > 0) + { + player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) + _amount); + } else if (_product.getAccountBuyLimit() > 0) { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), 0) + _amount); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java index bc77da99e4..d19439926d 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java @@ -63,21 +63,20 @@ public class ExApplyVariationOption implements ClientPacket return; } - // Remove the augmentation if any (286). - if (targetItem.isAugmented()) - { - targetItem.getAugmentation().removeBonus(player); - targetItem.removeAugmentation(); - } - targetItem.setAugmentation(augment, true); player.sendPacket(new ApplyVariationOption(1, _enchantedObjectId, _option1, _option2)); - // apply new augment - targetItem.getAugmentation().applyBonus(player); - // Recalculate all stats + + // Apply new augment. + if (targetItem.isEquipped()) + { + targetItem.getAugmentation().applyBonus(player); + } + + // Recalculate all stats. player.getStat().recalculateStats(true); + player.sendItemList(); player.removeRequest(VariationRequest.class); } } \ No newline at end of file diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index 48381a5b81..189fda4a5a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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,129 +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, 95, 96, 97, - 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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java index 7efc7cbfe5..aa9b671522 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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()) { @@ -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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java index 1f18c09ee2..c7e257331e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExUserBoostStat.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.network.serverpackets; +import org.l2jmobius.Config; import org.l2jmobius.gameserver.enums.BonusExpType; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.stats.Stat; @@ -45,31 +46,10 @@ public class ExUserBoostStat extends ServerPacket { case VITALITY: { - final int currentVitalityPoints = _player.getStat().getVitalityPoints(); - if (currentVitalityPoints > 105000) + if (_player.getStat().getVitalityPoints() > 0) { - count = 1; - bonus = 300; - } - else if (currentVitalityPoints > 70000) - { - count = 1; - bonus = 250; - } - else if (currentVitalityPoints > 35000) - { - count = 1; - bonus = 200; - } - else if (currentVitalityPoints > 0) - { - count = 1; - bonus = 100; - } - if (bonus > 0) - { - count += (int) _player.getStat().getValue(Stat.VITALITY_SKILLS, 0); - bonus += (int) ((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); + count = (int) (_player.getStat().getValue(Stat.VITALITY_SKILLS, 0) + 1); + bonus = (int) (((_player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (_player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100d); } break; } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java index d12bd00c3d..ce14ebc858 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ExVitalityEffectInfo.java @@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets; import org.l2jmobius.Config; import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.stats.Stat; import org.l2jmobius.gameserver.network.ServerPackets; /** @@ -26,13 +27,15 @@ import org.l2jmobius.gameserver.network.ServerPackets; public class ExVitalityEffectInfo extends ServerPacket { private final int _vitalityBonus; + private final int _vitalityAddBonus; private final int _vitalityItemsRemaining; private final int _points; public ExVitalityEffectInfo(Player player) { _points = player.getVitalityPoints(); - _vitalityBonus = (int) player.getStat().getVitalityExpBonus() * 100; + _vitalityBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) + (player.hasPremiumStatus() ? Config.RATE_VITALITY_EXP_PREMIUM_MULTIPLIER : Config.RATE_VITALITY_EXP_MULTIPLIER)) * 100; + _vitalityAddBonus = (int) ((player.getStat().getMul(Stat.VITALITY_EXP_RATE, 1) - 1) * 100); _vitalityItemsRemaining = Config.VITALITY_MAX_ITEMS_ALLOWED - player.getVitalityItemsUsed(); } @@ -42,7 +45,7 @@ public class ExVitalityEffectInfo extends ServerPacket ServerPackets.EX_VITALITY_EFFECT_INFO.writeId(this); writeInt(_points); writeInt(_vitalityBonus); // Vitality Bonus - writeShort(0); // Vitality additional bonus in % + writeShort(_vitalityAddBonus); // Vitality additional bonus in % writeShort(_vitalityItemsRemaining); // How much vitality items remaining for use writeShort(Config.VITALITY_MAX_ITEMS_ALLOWED); // Max number of items for use } diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index 4dee5efb84..3c298a3a2a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java index 1d4d2509c7..b78f4d0bb2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java @@ -118,7 +118,7 @@ public class MultiSellList extends AbstractItemPacket } writeLong(_list.getProductCount(product)); writeShort(product.getEnchantmentLevel() > 0 ? product.getEnchantmentLevel() : displayItemEnchantment != null ? displayItemEnchantment.getEnchantLevel() : 0); // enchant level - writeInt((int) product.getChance() * 1000000); // chance + writeInt((int) (product.getChance() * 1000000)); // chance writeItemAugment(displayItemEnchantment); writeItemElemental(displayItemEnchantment); writeItemEnsoulOptions(displayItemEnchantment); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index aad9e27c0a..2fab07ef44 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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); @@ -170,7 +170,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); @@ -330,9 +330,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)) { @@ -350,11 +350,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()); } @@ -378,9 +378,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)) { @@ -410,7 +410,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_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java similarity index 95% rename from L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java rename to L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java index b08ae18acf..a5cc36da6f 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java @@ -1,201 +1,200 @@ -/* - * 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.Config; -import org.l2jmobius.gameserver.enums.Team; -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 - writeByte(0); // 286 - 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(); - final Team team = (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) && (Config.RED_TEAM_ABNORMAL_EFFECT != null) ? _summon.getTeam() : Team.NONE; - writeShort(aves.size() + (_summon.isInvisible() ? 1 : 0) + (team != Team.NONE ? 1 : 0)); // Confirmed - for (AbnormalVisualEffect ave : aves) - { - writeShort(ave.getClientId()); // Confirmed - } - if (_summon.isInvisible()) - { - writeShort(AbnormalVisualEffect.STEALTH.getClientId()); - } - if (team == Team.BLUE) - { - if (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) - { - writeShort(Config.BLUE_TEAM_ABNORMAL_EFFECT.getClientId()); - } - } - else if ((team == Team.RED) && (Config.RED_TEAM_ABNORMAL_EFFECT != null)) - { - writeShort(Config.RED_TEAM_ABNORMAL_EFFECT.getClientId()); - } - 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.Config; +import org.l2jmobius.gameserver.enums.Team; +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 + writeShort(_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(); + final Team team = (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) && (Config.RED_TEAM_ABNORMAL_EFFECT != null) ? _summon.getTeam() : Team.NONE; + writeShort(aves.size() + (_summon.isInvisible() ? 1 : 0) + (team != Team.NONE ? 1 : 0)); // Confirmed + for (AbnormalVisualEffect ave : aves) + { + writeShort(ave.getClientId()); // Confirmed + } + if (_summon.isInvisible()) + { + writeShort(AbnormalVisualEffect.STEALTH.getClientId()); + } + if (team == Team.BLUE) + { + if (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) + { + writeShort(Config.BLUE_TEAM_ABNORMAL_EFFECT.getClientId()); + } + } + else if ((team == Team.RED) && (Config.RED_TEAM_ABNORMAL_EFFECT != null)) + { + writeShort(Config.RED_TEAM_ABNORMAL_EFFECT.getClientId()); + } + writeByte(_statusMask); + } +} diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index e88df6a6c3..142634a205 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 77c19e8bcb..d3dd7e1eb6 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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,14 +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); // item augment id - writeInt(0); // 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: diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 209a163197..c2cf957f35 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index b2f166baa5..3b93f1af4a 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java @@ -68,7 +68,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); @@ -149,7 +149,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()) { @@ -249,9 +249,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)) { @@ -269,11 +269,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()); } @@ -297,9 +297,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)) @@ -330,7 +329,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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethronePrevSeasonInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethronePrevSeasonInfo.java index 3fca427cb5..281fc1c9f2 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethronePrevSeasonInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethronePrevSeasonInfo.java @@ -34,14 +34,14 @@ public class ExDethronePrevSeasonInfo extends ServerPacket { private final Player _player; private final Long _previousSeasonServerPoints; - private final Long _previousSeasonSoulOrbsScore; + private final Long _previousSeasonServerSoulOrbs; private final Map _previousConquestPlayerList; - public ExDethronePrevSeasonInfo(Player player, Long prevServerPoints, Long prevSoulOrbsScore) + public ExDethronePrevSeasonInfo(Player player, Long prevServerPoints, Long prevServerSoulOrbs) { _player = player; _previousSeasonServerPoints = prevServerPoints; - _previousSeasonSoulOrbsScore = prevSoulOrbsScore; + _previousSeasonServerSoulOrbs = prevServerSoulOrbs; _previousConquestPlayerList = RankManager.getInstance().getPreviousConquestRankList(); } @@ -81,13 +81,13 @@ public class ExDethronePrevSeasonInfo extends ServerPacket writeInt(Config.SERVER_ID); // server id writeLong(_previousSeasonServerPoints); // Server points - writeLong(_previousSeasonSoulOrbsScore); // Total Soul Orbs + writeLong(_previousSeasonServerSoulOrbs); // Total Soul Orbs writeLong(_previousSeasonServerPoints); // Server points // Personal Reward if (personalPoints > Config.CONQUEST_PERSONAL_REWARD_MIN_POINTS) { - int rewardRank = 0; + int rewardRank = 0; // rank percent formula double rankPercent = ((rank * 100) / (RankManager.getInstance().getPreviousConquestRankList().size())); diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethroneServerInfo.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethroneServerInfo.java index 34860905bf..62156fb5c7 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethroneServerInfo.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/dethrone/ExDethroneServerInfo.java @@ -26,14 +26,14 @@ import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; public class ExDethroneServerInfo extends ServerPacket { private final long _serverPoints; - private final long _soulOrbScore; + private final long _serverSoulOrbs; private final boolean _adenCastleOwner; private final boolean _connected; - public ExDethroneServerInfo(long serverPoints, long soulOrbScore, boolean adenCastleOwner, boolean connected) + public ExDethroneServerInfo(long serverPoints, long serverSoulOrbs, boolean adenCastleOwner, boolean connected) { _serverPoints = serverPoints; - _soulOrbScore = soulOrbScore; + _serverSoulOrbs = serverSoulOrbs; _adenCastleOwner = adenCastleOwner; _connected = connected; } @@ -70,7 +70,7 @@ public class ExDethroneServerInfo extends ServerPacket writeInt(1); // server rank 1 writeInt(Config.SERVER_ID); // server id 4 - writeLong(_soulOrbScore); // server score 4 + writeLong(_serverSoulOrbs); // server score 4 // Connection List Array // this number must match the number of server in both arrays diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java index 8e5c5f7765..22eb4ac7d4 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java @@ -83,6 +83,17 @@ public class ExPurchaseLimitShopItemListNew extends ServerPacket writeInt(product.getAccountDailyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + product.getProductionId(), 0)); } } + else if (product.getAccountMontlyLimit() > 0) + { + if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0) >= product.getAccountMontlyLimit()) + { + writeInt(0); + } + else + { + writeInt(product.getAccountMontlyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0)); + } + } else if (product.getAccountBuyLimit() > 0) // Count limit. { if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + product.getProductionId(), 0) >= product.getAccountBuyLimit()) diff --git a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 691aba1edc..eb6d2f2c51 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index f5fca084b1..c005beeb7e 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/util/Util.java index dde351d51a..d004f93d57 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_11.1_TheSourceOfFlame/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_11.1_TheSourceOfFlame/readme.txt b/L2J_Mobius_11.1_TheSourceOfFlame/readme.txt index 86b1a2433c..34a2f73be5 100644 --- a/L2J_Mobius_11.1_TheSourceOfFlame/readme.txt +++ b/L2J_Mobius_11.1_TheSourceOfFlame/readme.txt @@ -140,8 +140,10 @@ Master Class Chapter 3: https://eu.4game.com/patchnotes/lineage2/417/ The Source of Flame: https://eu.4game.com/patchnotes/lineage2/427/ -Dethrone Shop -Fire Conquest area +-Water Conquest area -Primordial Fire Source Abilities -Krofin's Nest instance changes +-Freya instance changes Events: diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/account_gsdata.sql index d2da07b194..db5cb35ce2 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/account_gsdata.sql @@ -3,4 +3,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/announcements.sql index 686ce7db92..4ea4114b97 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/announcements.sql @@ -7,7 +7,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction.sql index 2c2ced0587..d4b72187c8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction.sql @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `auction` ( endDate decimal(20,0) NOT NULL default '0', PRIMARY KEY (`itemType`,`itemId`,`itemObjectId`), KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `auction` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_bid.sql index 6a2d15bf7c..d622ad2377 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_bid.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS auction_bid ( time_bid decimal(20,0) 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_watch.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_watch.sql index 8854db77d8..0e61578f9e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_watch.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auction_watch.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS auction_watch ( charObjId INT NOT NULL default 0, auctionId INT NOT NULL default 0, PRIMARY KEY (charObjId, 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat.sql index 0c326c979d..2cfb2bb55a 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat.sql @@ -4,7 +4,7 @@ CREATE TABLE `auto_chat` ( `npcId` INT NOT NULL default '0', `chatDelay` BIGINT NOT NULL default '-1', PRIMARY KEY (`groupId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `auto_chat` VALUES diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat_text.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat_text.sql index f6b375474c..a68983e6a5 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat_text.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/auto_chat_text.sql @@ -3,7 +3,7 @@ CREATE TABLE `auto_chat_text` ( `groupId` INT NOT NULL default '0', `chatText` VARCHAR(255) NOT NULL default '', PRIMARY KEY (`groupId`,`chatText`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `auto_chat_text` VALUES (1,'%player_cabal_loser%! All is lost! Prepare to meet the goddess of death!'), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/bbs_favorite.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/bbs_favorite.sql index e353929990..57506eee67 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/bbs_favorite.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/bbs_favorite.sql @@ -6,4 +6,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/buffer_schemes.sql index b8a7293cf9..ebe63fe38e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/buffer_schemes.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `object_id` INT UNSIGNED NOT NULL DEFAULT '0', `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle.sql index 128f7ba369..978be6dd2d 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS castle ( siegeHourOfDay INT NOT NULL default 20, 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',0,0,0,7,20), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_door.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_door.sql index a5b61c2c14..e46648ef31 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_door.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_door.sql @@ -20,7 +20,7 @@ CREATE TABLE castle_door ( mDef INT NOT NULL default 0, PRIMARY KEY (id), KEY id (castleId) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `castle_door` (`castleId`, `id`, `name`, `x`, `y`, `z`, `range_xmin`, `range_ymin`, `range_zmin`, `range_xmax`, `range_ymax`, `range_zmax`, `hp`, `pDef`, `mDef`) VALUES (1,19210001,'Gludio_outer_001',-18481,113065,-2774,-18481,113058,-2799,-18350,113072,-2479,316500,644,518), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_doorupgrade.sql index 2fd123e5be..3322471cb6 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_doorupgrade.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS castle_doorupgrade ( pDef INT NOT NULL default 0, mDef INT 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_procure.sql index 688b7e163f..05050a39e2 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_procure.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` ( `reward_type` int(11) NOT NULL DEFAULT '0', `period` INT NOT NULL DEFAULT '1', PRIMARY KEY (`castle_id`,`crop_id`,`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_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_production.sql index eec0457130..1ab857a52e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_manor_production.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` ( `seed_price` int(11) NOT NULL DEFAULT '0', `period` INT NOT NULL DEFAULT '1', PRIMARY KEY (`castle_id`,`seed_id`,`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_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_siege_guards.sql index e95b8ce89f..eef6a8e5b8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/castle_siege_guards.sql @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS castle_siege_guards ( isHired INT 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_friends.sql index 99533ba429..705ee6f69c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_friends.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` ( `friend_id` INT UNSIGNED NOT NULL DEFAULT 0, `relation` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`char_id`,`friend_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_hennas.sql index 655dc5256c..29816c803c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_hennas.sql @@ -4,4 +4,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` ( `slot` INT NOT NULL DEFAULT 0, `class_index` INT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`char_obj_id`,`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 (char_obj_id, class_index); + +# DELETE_CHAR_HENNA +CREATE INDEX idx_charId_slot_classIndex ON character_hennas (char_obj_id, slot, class_index); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_macroses.sql index c5e0f6cb57..b3e5bef177 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_macroses.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` ( `acronym` VARCHAR(4) , `commands` VARCHAR(255) , PRIMARY KEY (`char_obj_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_mail.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_mail.sql index 2ec52edf41..73c49ea2f5 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_mail.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_mail.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_mail` ( `sentDate` timestamp NULL default NULL, `unread` smallint(1) default 1, PRIMARY KEY (`letterId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_offline_trade.sql index 9991c1c092..1bf92a11ef 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_offline_trade.sql @@ -5,7 +5,7 @@ CREATE TABLE `character_offline_trade` ( `type` tinyint(4) NOT NULL DEFAULT '0', `title` varchar(100) DEFAULT NULL, PRIMARY KEY (`charId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; drop table IF EXISTS `character_offline_trade_items`; CREATE TABLE `character_offline_trade_items` ( @@ -14,4 +14,4 @@ CREATE TABLE `character_offline_trade_items` ( `count` int(20) NOT NULL DEFAULT '0', `price` int(20) NOT NULL DEFAULT '0', `enchant` int(20) 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_quests.sql index d6ceaf2c7a..92d12392d9 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_quests.sql @@ -6,5 +6,9 @@ CREATE TABLE IF NOT EXISTS `character_quests` ( `name` VARCHAR(40) NOT NULL DEFAULT '', `var` VARCHAR(20) NOT NULL DEFAULT '', `value` VARCHAR(255) , - PRIMARY KEY (`char_id`,`name`,`var`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file + PRIMARY KEY (`char_id`,`name`,`var`) +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE INDEX idx_charId_name ON character_quests (char_id, name); +CREATE INDEX idx_charId_var ON character_quests (char_id, var); +CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (char_id, name, var); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_raid_points.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_raid_points.sql index 0ba8ff2c75..bfcc537fd3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_raid_points.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_raid_points.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_raid_points` ( `boss_id` INT UNSIGNED NOT NULL DEFAULT 0, `points` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`boss_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recipebook.sql index ace8137ce1..c83b68b578 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recipebook.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS character_recipebook ( id decimal(11) NOT NULL default 0, type INT NOT NULL default 0, PRIMARY KEY (id,char_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recommends.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recommends.sql index 29b78c3039..3f203d7b39 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recommends.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_recommends.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS character_recommends ( char_id INT NOT NULL default 0, target_id INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (char_id,target_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_shortcuts.sql index acec4e4aed..314711c829 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_shortcuts.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS character_shortcuts ( `class_index` int(1) NOT NULL default '0', PRIMARY KEY (char_obj_id,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills.sql index d1a70eb512..ada4b43d37 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills.sql @@ -8,4 +8,10 @@ CREATE TABLE IF NOT EXISTS character_skills ( skill_name varchar(40), `class_index` INT(1) NOT NULL DEFAULT 0, PRIMARY KEY (char_obj_id,skill_id,`class_index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS +CREATE INDEX idx_charId_classIndex ON character_skills (char_obj_id, class_index); + +# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR +CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, char_obj_id, class_index); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills_save.sql index d9d081523e..7fccf4ee88 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_skills_save.sql @@ -13,4 +13,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 (char_obj_id,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; + +# ADD_SKILL_SAVE, DELETE_SKILL_SAVE +CREATE INDEX idx_charId_classIndex ON character_skills_save (char_obj_id, class_index); + +# RESTORE_SKILL_SAVE +CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (char_obj_id, class_index, buff_index); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_subclasses.sql index fe042e903b..7654a2ea68 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_subclasses.sql @@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` ( `level` int(2) NOT NULL default '40', `class_index` int(1) NOT NULL default '0', PRIMARY KEY (`char_obj_id`,`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 (char_obj_id, class_index); + +# CharSelectionInfo +CREATE INDEX idx_charId_classId ON character_subclasses (char_obj_id, class_id); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_variables.sql index e843d01ebd..f42eaecdbc 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/character_variables.sql @@ -2,4 +2,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/characters.sql index 34817f15e2..9d1dcf4e14 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/characters.sql @@ -88,4 +88,9 @@ CREATE TABLE IF NOT EXISTS characters ( aio_end decimal(20,0) NOT NULL DEFAULT 0, PRIMARY KEY (charId), 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; + +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); + diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_data.sql index d5a8518eab..6b5789bec7 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_data.sql @@ -24,4 +24,4 @@ CREATE TABLE IF NOT EXISTS clan_data ( PRIMARY KEY (clan_id), KEY `leader_id` (`leader_id`), KEY `ally_id` (`ally_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_privs.sql index 28b13ba6da..892d11f4be 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_privs.sql @@ -4,4 +4,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_skills.sql index 356bdc6fbc..e65d71352e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_skills.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS clan_skills ( skill_level int(5) NOT NULL default 0, skill_name varchar(26) default NULL, PRIMARY KEY (`clan_id`,`skill_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_subpledges.sql index f455158d7e..95395bb7ea 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_subpledges.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS clan_subpledges ( name varchar(45), leader_name varchar(35), PRIMARY KEY (`clan_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_wars.sql index a62317f6de..3dff03b61d 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clan_wars.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` ( `wantspeace1` decimal(1,0) NOT NULL default '0', `wantspeace2` decimal(1,0) 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall.sql index fdead358cf..8cbf19ec01 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS `clanhall` ( `Grade` decimal(1,0) NOT NULL default '0', `paid` int( 1 ) NOT NULL default '0', PRIMARY KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_functions.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_functions.sql index e6f9e4950e..21446a08b0 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_functions.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_functions.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_functions` ( `rate` decimal(20,0) NOT NULL default '0', `endTime` decimal(20,0) NOT NULL default '0', PRIMARY KEY (`hall_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_siege.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_siege.sql index 440863e832..c1486aa222 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_siege.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/clanhall_siege.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `clanhall_siege` ( `name` varchar(40) NOT NULL, `siege_data` decimal(20,0) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/crests.sql index b3e6dd8b67..04146da77a 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/crests.sql @@ -3,4 +3,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_droplist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_droplist.sql index 14e11ab0d6..673107e4ae 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_droplist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_droplist.sql @@ -32,4 +32,4 @@ CREATE TABLE `custom_droplist` ( `chance` INT NOT NULL DEFAULT '0', PRIMARY KEY (`mobId`,`itemId`,`category`), KEY `key_mobId` (`mobId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/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_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_buylists.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_buylists.sql index 43419a5689..6f1bee732b 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_buylists.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_buylists.sql @@ -12,4 +12,4 @@ CREATE TABLE custom_merchant_buylists ( time INT NOT NULL DEFAULT '0', savetimer DECIMAL(20,0) NOT NULL DEFAULT '0', PRIMARY KEY (shop_id,`order`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_shopids.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_shopids.sql index b696f282a7..3b524ec5d2 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_shopids.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_merchant_shopids.sql @@ -6,4 +6,4 @@ CREATE TABLE custom_merchant_shopids ( shop_id decimal(9,0) NOT NULL default '0', npc_id varchar(9) default NULL, PRIMARY KEY (shop_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_notspawned.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_notspawned.sql index 47ef1cfd93..49beda727e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_notspawned.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_notspawned.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `custom_notspawned` ( `id` int(11) NOT NULL, `isCustom` int(1) 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_npc.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_npc.sql index 1354f12c67..ca787818c7 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_npc.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_npc.sql @@ -46,7 +46,7 @@ CREATE TABLE `custom_npc`( `absorb_level` decimal(2,0) default 0, `absorb_type` enum('FULL_PARTY','LAST_HIT','PARTY_ONE_RANDOM') DEFAULT 'LAST_HIT' NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT ignore INTO custom_npc values ('500', '7115', 'Jurek', '1', 'Faction Manager', '1', 'NPC.a_mageguild_master_MHuman', '8.00', '24.00', '70', 'male', 'Folk', '40', '3862', '1493', '11.85', '2.78', '40', '43', '30', '21', '20', '10', '0', '0', '1314', '470', '780', '382', '278', '0', '333', '0', '0', '0', '55', '132', null, '0', '1', '0', 'LAST_HIT'), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_spawnlist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_spawnlist.sql index c3d8af9169..3b5878f440 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_spawnlist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_spawnlist.sql @@ -19,4 +19,4 @@ CREATE TABLE `custom_spawnlist` ( `periodOfDay` decimal(2,0) default '0', PRIMARY KEY (id), KEY `key_npc_templateid` (`npc_templateid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_teleport.sql index dc5a694a3a..a98504b528 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/custom_teleport.sql @@ -11,4 +11,4 @@ CREATE TABLE custom_teleport ( price decimal(6,0) default NULL, fornoble int(1) NOT NULL default '0', 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/dimensional_rift.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/dimensional_rift.sql index 1d7b0b8697..0bb1d714cc 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/dimensional_rift.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/dimensional_rift.sql @@ -16,7 +16,7 @@ CREATE TABLE `dimensional_rift` ( `zT` int(11) NOT NULL, `boss` tinyint(1) NOT NULL default '0', PRIMARY KEY (`type`,`room_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------- -- Records for table dimensional_rift diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/droplist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/droplist.sql index 8b82f8260c..9d68ca7d78 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/droplist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/droplist.sql @@ -32,7 +32,7 @@ CREATE TABLE `droplist` ( `chance` INT NOT NULL DEFAULT '0', PRIMARY KEY (`mobId`,`itemId`,`category`), KEY `key_mobId` (`mobId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `droplist` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/enchant_skill_trees.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/enchant_skill_trees.sql index 8eca2a2776..880fc0d985 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/enchant_skill_trees.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/enchant_skill_trees.sql @@ -14,7 +14,7 @@ CREATE TABLE `enchant_skill_trees` ( `success_rate79` int(3) NOT NULL DEFAULT '0', `success_rate80` int(3) NOT NULL DEFAULT '0', PRIMARY KEY (`skill_id`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `enchant_skill_trees` VALUES ('1', '101', 'Triple Slash', '37', '+1 Power', '306000', '3060000', '37', '82', '92', '97', '97', '97'); INSERT INTO `enchant_skill_trees` VALUES ('1', '102', 'Triple Slash', '37', '+2 Power', '315000', '3150000', '101', '80', '90', '95', '95', '95'); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/engrave.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/engrave.sql index 6a899a544e..bfcbe06d76 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/engrave.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/engrave.sql @@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `engraved_items` ( `object_id` int(11) NOT NULL, `item_id` int(11) NOT NULL, `engraver_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; CREATE TABLE IF NOT EXISTS `engraved_log` ( @@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `engraved_log` ( `itemName` varchar(64) NOT NULL, `form_char` varchar(64) NOT NULL, `to_char` varchar(64) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fake_players.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fake_players.sql index 8613cf5322..f208fcd8ff 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fake_players.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fake_players.sql @@ -39,4 +39,4 @@ CREATE TABLE IF NOT EXISTS `fake_players` ( `max_rnd_enchant` int(7) NOT NULL default '0', KEY `spawn` (`spawn`), KEY `template` (`template`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fishing_skill_trees.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fishing_skill_trees.sql index 662583ca93..47ae7c3008 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fishing_skill_trees.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fishing_skill_trees.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS `fishing_skill_trees` ( `cost` int(10) NOT NULL default '0', `isfordwarf` int(1) NOT NULL default '0', PRIMARY KEY (`skill_id`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Records for table fishing_skill_trees diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort.sql index 70a3f0b4b8..72dd8c4a6e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort.sql @@ -9,7 +9,7 @@ CREATE TABLE `fort` ( `siegeHourOfDay` int(11) NOT NULL default '20', `owner` int(11) NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_door.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_door.sql index c045fece64..26091a0055 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_door.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_door.sql @@ -20,7 +20,7 @@ CREATE TABLE fort_door ( mDef INT NOT NULL default 0, PRIMARY KEY(id), KEY id (fortId) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `fort_door` VALUES (101,18220001,'Gate_of_fort',-50796,155913,-2102,0,0,0,0,0,0,67884,644,518), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_doorupgrade.sql index 8d10d75303..5e933eac6b 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_doorupgrade.sql @@ -8,4 +8,4 @@ CREATE TABLE `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_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_siege_guards.sql index bb5d1b9fdc..dca419e88c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fort_siege_guards.sql @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` ( `isHired` INT 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 diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fortsiege_clans.sql index 5576d58bae..03532b5822 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/fortsiege_clans.sql @@ -7,4 +7,4 @@ CREATE TABLE `fortsiege_clans` ( `type` int(1) default NULL, `fort_owner` int(1) default NULL, 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/forums.sql index 3794026842..786325a423 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/forums.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `forums` ( `forum_perm` int(8) NOT NULL default '0', `forum_owner_id` int(8) NOT NULL default '0', UNIQUE KEY `forum_id` (`forum_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql index 4101c98ca2..8208a8a0a3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql @@ -14,7 +14,7 @@ CREATE TABLE `four_sepulchers_spawnlist` ( `key_npc_id` int(9) NOT NULL DEFAULT '0', `spawntype` int(9) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `four_sepulchers_spawnlist` VALUES ('1', '', '1', '31468', '182074', '-85579', '-7216', '0', '0', '-32600', '3600', '31921', '0'), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_tasks.sql index 79e1d942fe..1cc3d87be0 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_tasks.sql @@ -11,4 +11,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_variables.sql index b53c539dba..56102b09e9 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/global_variables.sql @@ -2,4 +2,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_data.sql index da16aa6ecf..9f3df9bf28 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_data.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS grandboss_data ( `currentMP` DECIMAL(8,0) DEFAULT NULL, `status` TINYINT 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` VALUES (29019, 185708,114298,-8221,32768, 0, 13090000, 22197, 0), -- Antharas diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_list.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_list.sql index e580000739..4bd0d4c570 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_list.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/grandboss_list.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS grandboss_list `player_id` decimal(11,0) NOT NULL, `zone` decimal(11,0) NOT NULL, PRIMARY KEY (`player_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/helper_buff_list.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/helper_buff_list.sql index d0a4daf74d..1aa7a832b3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/helper_buff_list.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/helper_buff_list.sql @@ -11,7 +11,7 @@ CREATE TABLE `helper_buff_list` ( `upper_level` int(10) unsigned NOT NULL default '0', `is_magic_class` varchar(5) default NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; #---------------------------- # Records for table helper_buff_list diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/heroes.sql index 6f5a71f7a0..3939a66f9d 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/heroes.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes` ( `count` decimal(3,0) NOT NULL default '0', `played` decimal(1,0) NOT NULL default '0', 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/items.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/items.sql index f2d09bae91..ae4214a920 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/items.sql @@ -20,4 +20,12 @@ CREATE TABLE IF NOT EXISTS items ( KEY `key_loc` (`loc`), KEY `key_item_id` (`item_id`), KEY `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_C4_ScionsOfDestiny/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/itemsonground.sql index 6ce5e530ca..9d6806baa8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/itemsonground.sql @@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` ( `drop_time` decimal(20,0) default NULL, `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_C4_ScionsOfDestiny/dist/db_installer/sql/game/locations.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/locations.sql index d3f1b0b31c..7c0af21014 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/locations.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/locations.sql @@ -11,7 +11,7 @@ CREATE TABLE `locations` ( `proc` int(3) NOT NULL default '0', PRIMARY KEY (`loc_id`,`loc_x`,`loc_y`), KEY `proc` (`proc`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `locations` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/lottery.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/lottery.sql index 0e6cc924d5..32608ce0ab 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/lottery.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/lottery.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS lottery ( enddate decimal(20,0) NOT NULL default 0, finished INT NOT NULL default 0, PRIMARY KEY (`id`,`idnr`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/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_C4_ScionsOfDestiny/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/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_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_areas_list.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_areas_list.sql index 52a8a5e47d..5c1370c66f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_areas_list.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_areas_list.sql @@ -8,7 +8,7 @@ CREATE TABLE `merchant_areas_list` ( `tax` double(3,2) unsigned NOT NULL default '0.00', `Chaotic` int(11) NOT NULL default '0', PRIMARY KEY (`merchant_area_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchant_areas_list` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_buylists.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_buylists.sql index 1bea118076..e2a90a0c2d 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_buylists.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_buylists.sql @@ -12,7 +12,7 @@ CREATE TABLE merchant_buylists ( time INT NOT NULL DEFAULT '0', savetimer DECIMAL(20,0) NOT NULL DEFAULT '0', PRIMARY KEY (shop_id,`order`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchant_buylists` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_lease.sql index e69f59449e..79e57cb028 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_lease.sql @@ -8,4 +8,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_shopids.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_shopids.sql index b96a2ce47e..d4e763e80b 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_shopids.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchant_shopids.sql @@ -6,7 +6,7 @@ CREATE TABLE merchant_shopids ( shop_id decimal(9,0) NOT NULL default '0', npc_id varchar(9) default NULL, PRIMARY KEY (shop_id) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchant_shopids` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchants.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchants.sql index 99ba7ccf3e..500d95176c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchants.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/merchants.sql @@ -6,7 +6,7 @@ CREATE TABLE `merchants` ( `npc_id` int(11) NOT NULL default '0', `merchant_area_id` tinyint(4) default NULL, PRIMARY KEY (`npc_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchants` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/minions.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/minions.sql index 7e4fcb317c..2ed4bffb34 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/minions.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/minions.sql @@ -9,7 +9,7 @@ CREATE TABLE `minions` ( `amount_min` int(4) NOT NULL default '0', `amount_max` int(4) NOT NULL default '0', PRIMARY KEY (`boss_id`,`minion_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `minions` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mods_wedding.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mods_wedding.sql index d043fbacbf..109c1efdb8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mods_wedding.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/mods_wedding.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS `mods_wedding` ( `weddingDate` decimal(20,0) default '0', `coupleType` int(11) NOT NULL default '0', 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/npc.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npc.sql index ec0fa09539..8cea61bf8f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npc.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npc.sql @@ -47,7 +47,7 @@ CREATE TABLE `npc` ( `absorb_level` decimal(2,0) DEFAULT '0', `absorb_type` enum('FULL_PARTY','LAST_HIT','PARTY_ONE_RANDOM') NOT NULL DEFAULT 'LAST_HIT', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npcskills.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npcskills.sql index 64973cdaad..4a3e869fb8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npcskills.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/npcskills.sql @@ -7,7 +7,7 @@ CREATE TABLE npcskills ( skillid int(11) NOT NULL default '0', level int(11) NOT NULL default '0', PRIMARY KEY (npcid,skillid,level) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `npcskills` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_data.sql index 4a4edfb193..852ab89513 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_data.sql @@ -6,4 +6,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_nobles.sql index 5bc38ad0fc..fc01facc34 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/olympiad_nobles.sql @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` ( `competitions_lost` decimal(3,0) NOT NULL default '0', `competitions_drawn` decimal(3,0) NOT NULL default '0', PRIMARY KEY (`charId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` ( `charId` decimal(11,0) NOT NULL default '0', @@ -20,4 +20,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` ( `competitions_lost` decimal(3,0) NOT NULL default '0', `competitions_drawn` decimal(3,0) NOT NULL default '0', 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_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets.sql index 14f80587d6..c8b17fd393 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets.sql @@ -13,4 +13,4 @@ CREATE TABLE IF NOT EXISTS pets ( pkkills decimal(11) , fed decimal(11) , PRIMARY KEY (item_obj_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets_stats.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets_stats.sql index ef3d0bf826..2de3d2d2aa 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets_stats.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pets_stats.sql @@ -27,7 +27,7 @@ CREATE TABLE `pets_stats` ( `mpregen` int(11) NOT NULL default '0', `owner_exp_taken` DECIMAL(3,2) DEFAULT '0' NOT NULL, PRIMARY KEY (`typeID`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; #---------------------------- # Records for table pets_stats diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pledge_skill_trees.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pledge_skill_trees.sql index 0c9b23f8f0..ac5cfe7d4c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pledge_skill_trees.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/pledge_skill_trees.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `pledge_skill_trees` ( `Description` varchar(255) default NULL, `repCost` int(11) default NULL, `itemId` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/posts.sql index 14040ac89b..0ec4e9d50f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/posts.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `posts` ( `post_topic_id` int(8) NOT NULL default '0', `post_forum_id` int(8) NOT NULL default '0', `post_txt` 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; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/raidboss_spawnlist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/raidboss_spawnlist.sql index d1d2f2e929..0154762fa9 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/raidboss_spawnlist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/raidboss_spawnlist.sql @@ -15,7 +15,7 @@ CREATE TABLE raidboss_spawnlist ( currentHp decimal(8,0) default NULL, currentMp decimal(8,0) default NULL, PRIMARY KEY (boss_id,loc_x,loc_y,loc_z) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `raidboss_spawnlist` VALUES (25001,1,-54416,146480,-2887,0,43200,129600,0,95986,545), -- Greyclaw Kutus (23) diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn.sql index 4fc993097d..96c7dae57f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn.sql @@ -12,7 +12,7 @@ CREATE TABLE random_spawn ( broadcastSpawn VARCHAR(5) NOT NULL default 'false', randomSpawn VARCHAR(5) NOT NULL default 'true', PRIMARY KEY (groupId) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `random_spawn` VALUES (1,30556,1,-1,1800000,1800000,'false','true'), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn_loc.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn_loc.sql index 2d9ef072dc..85baaefbc9 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn_loc.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/random_spawn_loc.sql @@ -6,7 +6,7 @@ CREATE TABLE `random_spawn_loc` ( `z` int(11) NOT NULL default '0', `heading` int(11) NOT NULL default '-1', PRIMARY KEY (`groupId`,`x`,`y`,`z`,`heading`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `l2jdb`.`random_spawn_loc` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/rebirth_manager.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/rebirth_manager.sql index 298f084384..10bbe3e5a9 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/rebirth_manager.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/rebirth_manager.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `rebirth_manager`( `playerId` int(20) NOT NULL, `rebirthCount` int(2) NOT NULL, PRIMARY KEY (`playerId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs.sql index 0093e22b8d..8fe6dff30a 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `seven_signs` ( `ancient_adena_amount` DECIMAL(20,0) NOT NULL default '0', `contribution_score` DECIMAL(20,0) NOT NULL default '0', PRIMARY KEY (`char_obj_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_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_festival.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_festival.sql index eefce920e2..84c8cf7dfe 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_festival.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_festival.sql @@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `seven_signs_festival` ( `score` int(5) NOT NULL default '0', `members` varchar(255) NOT NULL default '', PRIMARY KEY (`festivalId`,`cabal`,`cycle`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT IGNORE INTO `seven_signs_festival` VALUES (0, "dawn", 1, 0, 0, ""), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_status.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_status.sql index 3a167d21d8..78cab9f717 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_status.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/seven_signs_status.sql @@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS `seven_signs_status` ( `accumulated_bonus3` int(10) NOT NULL default '0', `accumulated_bonus4` int(10) NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT IGNORE INTO `seven_signs_status` VALUES (0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/siege_clans.sql index 3f8ae839a4..f5e5c1456f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/siege_clans.sql @@ -4,4 +4,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_learn.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_learn.sql index 4f0cef8999..847e0989f3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_learn.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_learn.sql @@ -6,7 +6,7 @@ CREATE TABLE skill_learn ( npc_id int(11) NOT NULL default '0', class_id int(11) NOT NULL default '0', PRIMARY KEY (npc_id,class_id) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `skill_learn` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_spellbooks.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_spellbooks.sql index 583a4acb79..af390674db 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_spellbooks.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_spellbooks.sql @@ -6,7 +6,7 @@ CREATE TABLE `skill_spellbooks` ( `skill_id` int(11) NOT NULL default '-1', `item_id` int(11) NOT NULL default '-1', KEY `skill_id` (`skill_id`,`item_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `skill_spellbooks` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_trees.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_trees.sql index 7960b31cff..8cb6a5ac9f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_trees.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/skill_trees.sql @@ -7,7 +7,7 @@ CREATE TABLE skill_trees ( sp int(10) unsigned NOT NULL default '0', min_level int(10) unsigned NOT NULL default '0', PRIMARY KEY (class_id,skill_id,level) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `skill_trees` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/spawnlist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/spawnlist.sql index 97e43da4f6..6b094f1875 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/spawnlist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/spawnlist.sql @@ -18,7 +18,7 @@ CREATE TABLE `spawnlist` ( `periodOfDay` decimal(2,0) default '0', PRIMARY KEY (id), KEY `key_npc_templateid` (`npc_templateid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `spawnlist` diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/teleport.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/teleport.sql index ad6e5b65d7..2c5356837c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/teleport.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/teleport.sql @@ -11,7 +11,7 @@ CREATE TABLE `teleport` ( `price` decimal(6,0) DEFAULT NULL, `fornoble` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records of teleport diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/topic.sql index 6a3afcef2e..972b016377 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/topic.sql @@ -7,4 +7,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_C4_ScionsOfDestiny/dist/db_installer/sql/game/vanhalter_spawnlist.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/vanhalter_spawnlist.sql index 79ae69dfc8..6b5803228f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/vanhalter_spawnlist.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/game/vanhalter_spawnlist.sql @@ -15,7 +15,7 @@ CREATE TABLE `vanhalter_spawnlist` ( `periodOfDay` DECIMAL(2,0) DEFAULT 0, PRIMARY KEY (`id`), KEY `key_npc_templateid` (`npc_templateid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `vanhalter_spawnlist` VALUES ('1','Pagan Temple','1','32051','-14670','-54846','-10629','0','0','16384','60','0','0'), diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/account_data.sql index 17c65c39a8..27da42723e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/account_data.sql @@ -6,4 +6,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_C4_ScionsOfDestiny/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/accounts.sql index d301d143ed..d1fe9a90c1 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/accounts.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS `accounts` ( `lastIP` CHAR(15) NULL DEFAULT NULL, `lastServer` TINYINT DEFAULT 1, 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_C4_ScionsOfDestiny/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/gameservers.sql index f49ecfdc0a..3fab170880 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/sql/login/gameservers.sql @@ -3,7 +3,7 @@ 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; -- ---------------------------- -- Records of gameservers diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/AutoPlay.ini b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/AutoPlay.ini index 9580f01952..de5fcc3ae8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/AutoPlay.ini +++ b/L2J_Mobius_C4_ScionsOfDestiny/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 + # List of skills that cannot be added to auto play selection menu, separated by commas. DisabledSkillIds = diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java index da5ecdd7ab..93dc8252cf 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java @@ -550,6 +550,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 Set DISABLED_AUTO_SKILLS = new HashSet<>(); public static Set DISABLED_AUTO_ITEMS = new HashSet<>(); public static String AUTO_PLAY_LOGIN_MESSAGE; @@ -1802,6 +1803,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); DISABLED_AUTO_SKILLS.clear(); final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", ""); if (!disabledSkills.isEmpty()) diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 7c65077aa9..433514d7f0 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/item/instance/Item.java @@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.model.DropProtection; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; +import org.l2jmobius.gameserver.model.WorldRegion; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.knownlist.NullKnownList; @@ -1046,10 +1047,11 @@ public class Item extends WorldObject // Set the x,y,z position of the Item dropped and update its _worldregion setSpawned(true); getLocation().setXYZ(x, y, z); - setWorldRegion(World.getInstance().getRegion(getLocation())); + final WorldRegion region = World.getInstance().getRegion(getLocation()); + setWorldRegion(region); // Add the Item dropped to _visibleObjects of its WorldRegion - getWorldRegion().addVisibleObject(this); + region.addVisibleObject(this); } setDropTime(System.currentTimeMillis()); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index f12fbc358e..655c43fbc3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/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.WorldObject; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Player; @@ -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,12 @@ public class AutoPlayTaskManager // We take granted that mage classes do not auto hit. if (isMageCaster(player)) { + // Logic adjustment for summons not attacking. + final Summon summon = player.getPet(); + if ((summon != null) && 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 +129,32 @@ public class AutoPlayTaskManager final Weapon weapon = player.getActiveWeaponItem(); if (weapon != null) { - final boolean ranged = weapon.getItemType() == WeaponType.BOW; - 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.getTemplate().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() == WeaponType.BOW; + 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.getTemplate().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 +162,9 @@ public class AutoPlayTaskManager } } + // Reset idle count. + IDLE_COUNT.remove(player); + // Pickup. if (player.getAutoPlaySettings().doPickup()) { @@ -183,41 +204,61 @@ public class AutoPlayTaskManager // Find target. Creature creature = null; - double closestDistance = Double.MAX_VALUE; - TARGET: for (Creature nearby : player.getKnownList().getKnownCharactersInRadius(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()) { - if (nearby == null) + if (Util.calculateDistance(leader, player, true) < (Config.ALT_PARTY_RANGE * 2 /* 2? */)) { - continue; + final WorldObject leaderTarget = leader.getTarget(); + if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.getPartyMembers().contains(leaderTarget)))) + { + creature = (Creature) leaderTarget; + } + else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled()) + { + player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader); + } } - - // Skip unavailable creatures. - if (nearby.isAlikeDead()) + } + else + { + double closestDistance = Double.MAX_VALUE; + TARGET: for (Creature nearby : player.getKnownList().getKnownCharactersInRadius(player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400)) { - continue TARGET; - } - // Check creature target. - if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player)) - { - final Summon summon = player.getPet(); - if ((summon != null) && (summon.getObjectId() == nearby.getTarget().getObjectId())) + if (nearby == null) + { + continue; + } + + // Skip unavailable creatures. + if (nearby.isAlikeDead()) { 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.getInstanceId())) - { - final double creatureDistance = player.calculateDistance2D(nearby); - if (creatureDistance < closestDistance) + // Check creature target. + if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player)) { - creature = nearby; - closestDistance = creatureDistance; + final Summon summon = player.getPet(); + if ((summon != null) && (summon.getObjectId() == 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.getInstanceId())) + { + final double creatureDistance = player.calculateDistance2D(nearby); + if (creatureDistance < closestDistance) + { + creature = nearby; + closestDistance = creatureDistance; + } } } } @@ -310,6 +351,7 @@ public class AutoPlayTaskManager { summon.followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/account_gsdata.sql index d2da07b194..db5cb35ce2 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/account_gsdata.sql @@ -3,4 +3,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_C6_Interlude/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/announcements.sql index 686ce7db92..4ea4114b97 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/announcements.sql @@ -7,7 +7,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_C6_Interlude/dist/db_installer/sql/game/auction.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction.sql index 15494aeb2c..5151aabcf7 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction.sql @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `auction` ( endDate decimal(20,0) NOT NULL default '0', PRIMARY KEY (`itemType`,`itemId`,`itemObjectId`), KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `auction` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_bid.sql index 6a2d15bf7c..d622ad2377 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_bid.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS auction_bid ( time_bid decimal(20,0) 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_C6_Interlude/dist/db_installer/sql/game/auction_watch.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_watch.sql index 8854db77d8..0e61578f9e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_watch.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auction_watch.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS auction_watch ( charObjId INT NOT NULL default 0, auctionId INT NOT NULL default 0, PRIMARY KEY (charObjId, 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_C6_Interlude/dist/db_installer/sql/game/augmentations.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/augmentations.sql index e962a93717..c3f2b4d2f7 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/augmentations.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/augmentations.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS augmentations ( skill int(11) default 0, level int(11) default 0, PRIMARY KEY (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_C6_Interlude/dist/db_installer/sql/game/auto_chat.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat.sql index 0c326c979d..2cfb2bb55a 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat.sql @@ -4,7 +4,7 @@ CREATE TABLE `auto_chat` ( `npcId` INT NOT NULL default '0', `chatDelay` BIGINT NOT NULL default '-1', PRIMARY KEY (`groupId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `auto_chat` VALUES diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat_text.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat_text.sql index f6b375474c..a68983e6a5 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat_text.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/auto_chat_text.sql @@ -3,7 +3,7 @@ CREATE TABLE `auto_chat_text` ( `groupId` INT NOT NULL default '0', `chatText` VARCHAR(255) NOT NULL default '', PRIMARY KEY (`groupId`,`chatText`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `auto_chat_text` VALUES (1,'%player_cabal_loser%! All is lost! Prepare to meet the goddess of death!'), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/bbs_favorite.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/bbs_favorite.sql index e353929990..57506eee67 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/bbs_favorite.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/bbs_favorite.sql @@ -6,4 +6,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_C6_Interlude/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/buffer_schemes.sql index b8a7293cf9..ebe63fe38e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/buffer_schemes.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `object_id` INT UNSIGNED NOT NULL DEFAULT '0', `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle.sql index e5358c6037..4dc858e93c 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS castle ( siegeHourOfDay INT NOT NULL default 20, 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',0,0,0,7,20), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_door.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_door.sql index a5b61c2c14..e46648ef31 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_door.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_door.sql @@ -20,7 +20,7 @@ CREATE TABLE castle_door ( mDef INT NOT NULL default 0, PRIMARY KEY (id), KEY id (castleId) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `castle_door` (`castleId`, `id`, `name`, `x`, `y`, `z`, `range_xmin`, `range_ymin`, `range_zmin`, `range_xmax`, `range_ymax`, `range_zmax`, `hp`, `pDef`, `mDef`) VALUES (1,19210001,'Gludio_outer_001',-18481,113065,-2774,-18481,113058,-2799,-18350,113072,-2479,316500,644,518), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql index 2fd123e5be..3322471cb6 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS castle_doorupgrade ( pDef INT NOT NULL default 0, mDef INT 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_C6_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql index 688b7e163f..05050a39e2 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_procure` ( `reward_type` int(11) NOT NULL DEFAULT '0', `period` INT NOT NULL DEFAULT '1', PRIMARY KEY (`castle_id`,`crop_id`,`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_C6_Interlude/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_manor_production.sql index eec0457130..1ab857a52e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_manor_production.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `castle_manor_production` ( `seed_price` int(11) NOT NULL DEFAULT '0', `period` INT NOT NULL DEFAULT '1', PRIMARY KEY (`castle_id`,`seed_id`,`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_C6_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql index 01023fee95..35acc1f249 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS castle_siege_guards ( isHired INT 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_C6_Interlude/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_friends.sql index 99533ba429..705ee6f69c 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_friends.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` ( `friend_id` INT UNSIGNED NOT NULL DEFAULT 0, `relation` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`char_id`,`friend_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_C6_Interlude/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_hennas.sql index 655dc5256c..29816c803c 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_hennas.sql @@ -4,4 +4,10 @@ CREATE TABLE IF NOT EXISTS `character_hennas` ( `slot` INT NOT NULL DEFAULT 0, `class_index` INT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`char_obj_id`,`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 (char_obj_id, class_index); + +# DELETE_CHAR_HENNA +CREATE INDEX idx_charId_slot_classIndex ON character_hennas (char_obj_id, slot, class_index); diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_macroses.sql index c5e0f6cb57..b3e5bef177 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_macroses.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` ( `acronym` VARCHAR(4) , `commands` VARCHAR(255) , PRIMARY KEY (`char_obj_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_C6_Interlude/dist/db_installer/sql/game/character_mail.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_mail.sql index 2ec52edf41..73c49ea2f5 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_mail.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_mail.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `character_mail` ( `sentDate` timestamp NULL default NULL, `unread` smallint(1) default 1, PRIMARY KEY (`letterId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_offline_trade.sql index 9991c1c092..1bf92a11ef 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_offline_trade.sql @@ -5,7 +5,7 @@ CREATE TABLE `character_offline_trade` ( `type` tinyint(4) NOT NULL DEFAULT '0', `title` varchar(100) DEFAULT NULL, PRIMARY KEY (`charId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; drop table IF EXISTS `character_offline_trade_items`; CREATE TABLE `character_offline_trade_items` ( @@ -14,4 +14,4 @@ CREATE TABLE `character_offline_trade_items` ( `count` int(20) NOT NULL DEFAULT '0', `price` int(20) NOT NULL DEFAULT '0', `enchant` int(20) 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_C6_Interlude/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_quests.sql index d6ceaf2c7a..92d12392d9 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_quests.sql @@ -6,5 +6,9 @@ CREATE TABLE IF NOT EXISTS `character_quests` ( `name` VARCHAR(40) NOT NULL DEFAULT '', `var` VARCHAR(20) NOT NULL DEFAULT '', `value` VARCHAR(255) , - PRIMARY KEY (`char_id`,`name`,`var`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file + PRIMARY KEY (`char_id`,`name`,`var`) +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE INDEX idx_charId_name ON character_quests (char_id, name); +CREATE INDEX idx_charId_var ON character_quests (char_id, var); +CREATE UNIQUE INDEX idx_charId_name_var ON character_quests (char_id, name, var); diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_raid_points.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_raid_points.sql index 0ba8ff2c75..bfcc537fd3 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_raid_points.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_raid_points.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_raid_points` ( `boss_id` INT UNSIGNED NOT NULL DEFAULT 0, `points` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`boss_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_C6_Interlude/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_recipebook.sql index ace8137ce1..c83b68b578 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_recipebook.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS character_recipebook ( id decimal(11) NOT NULL default 0, type INT NOT NULL default 0, PRIMARY KEY (id,char_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_C6_Interlude/dist/db_installer/sql/game/character_recommends.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_recommends.sql index 29b78c3039..3f203d7b39 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_recommends.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_recommends.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS character_recommends ( char_id INT NOT NULL default 0, target_id INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (char_id,target_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_C6_Interlude/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_shortcuts.sql index acec4e4aed..314711c829 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_shortcuts.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS character_shortcuts ( `class_index` int(1) NOT NULL default '0', PRIMARY KEY (char_obj_id,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_C6_Interlude/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills.sql index d1a70eb512..ada4b43d37 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills.sql @@ -8,4 +8,10 @@ CREATE TABLE IF NOT EXISTS character_skills ( skill_name varchar(40), `class_index` INT(1) NOT NULL DEFAULT 0, PRIMARY KEY (char_obj_id,skill_id,`class_index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +# RESTORE_SKILLS_FOR_CHAR, DELETE_CHAR_SKILLS +CREATE INDEX idx_charId_classIndex ON character_skills (char_obj_id, class_index); + +# UPDATE_CHARACTER_SKILL_LEVEL, ADD_NEW_SKILLS, DELETE_SKILL_FROM_CHAR +CREATE INDEX idx_skillId_charId_classIndex ON character_skills (skill_id, char_obj_id, class_index); diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills_save.sql index d9d081523e..7fccf4ee88 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_skills_save.sql @@ -13,4 +13,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 (char_obj_id,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; + +# ADD_SKILL_SAVE, DELETE_SKILL_SAVE +CREATE INDEX idx_charId_classIndex ON character_skills_save (char_obj_id, class_index); + +# RESTORE_SKILL_SAVE +CREATE INDEX idx_charId_classIndex_buffIndex ON character_skills_save (char_obj_id, class_index, buff_index); diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_subclasses.sql index fe042e903b..7654a2ea68 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_subclasses.sql @@ -9,4 +9,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` ( `level` int(2) NOT NULL default '40', `class_index` int(1) NOT NULL default '0', PRIMARY KEY (`char_obj_id`,`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 (char_obj_id, class_index); + +# CharSelectionInfo +CREATE INDEX idx_charId_classId ON character_subclasses (char_obj_id, class_id); diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_variables.sql index e843d01ebd..f42eaecdbc 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/character_variables.sql @@ -2,4 +2,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_C6_Interlude/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/characters.sql index 34817f15e2..9d1dcf4e14 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/characters.sql @@ -88,4 +88,9 @@ CREATE TABLE IF NOT EXISTS characters ( aio_end decimal(20,0) NOT NULL DEFAULT 0, PRIMARY KEY (charId), 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; + +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); + diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_data.sql index d5a8518eab..6b5789bec7 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_data.sql @@ -24,4 +24,4 @@ CREATE TABLE IF NOT EXISTS clan_data ( PRIMARY KEY (clan_id), KEY `leader_id` (`leader_id`), KEY `ally_id` (`ally_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_C6_Interlude/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_privs.sql index 28b13ba6da..892d11f4be 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_privs.sql @@ -4,4 +4,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_C6_Interlude/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_skills.sql index 356bdc6fbc..e65d71352e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_skills.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS clan_skills ( skill_level int(5) NOT NULL default 0, skill_name varchar(26) default NULL, PRIMARY KEY (`clan_id`,`skill_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_C6_Interlude/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_subpledges.sql index f455158d7e..95395bb7ea 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_subpledges.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS clan_subpledges ( name varchar(45), leader_name varchar(35), PRIMARY KEY (`clan_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_C6_Interlude/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_wars.sql index a62317f6de..3dff03b61d 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clan_wars.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` ( `wantspeace1` decimal(1,0) NOT NULL default '0', `wantspeace2` decimal(1,0) 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_C6_Interlude/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall.sql index 0a0ed745dd..caf98acd98 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS `clanhall` ( `Grade` decimal(1,0) NOT NULL default '0', `paid` int( 1 ) NOT NULL default '0', PRIMARY KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_functions.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_functions.sql index e6f9e4950e..21446a08b0 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_functions.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_functions.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_functions` ( `rate` decimal(20,0) NOT NULL default '0', `endTime` decimal(20,0) NOT NULL default '0', PRIMARY KEY (`hall_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_C6_Interlude/dist/db_installer/sql/game/clanhall_siege.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_siege.sql index 440863e832..c1486aa222 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_siege.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/clanhall_siege.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `clanhall_siege` ( `name` varchar(40) NOT NULL, `siege_data` decimal(20,0) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/crests.sql index b3e6dd8b67..04146da77a 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/crests.sql @@ -3,4 +3,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_C6_Interlude/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/cursed_weapons.sql index e4aa1ac884..f43b252722 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/cursed_weapons.sql @@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` ( `nbKills` INT DEFAULT 0, `endTime` DECIMAL(20,0) DEFAULT 0, 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; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_droplist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_droplist.sql index 14e11ab0d6..673107e4ae 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_droplist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_droplist.sql @@ -32,4 +32,4 @@ CREATE TABLE `custom_droplist` ( `chance` INT NOT NULL DEFAULT '0', PRIMARY KEY (`mobId`,`itemId`,`category`), KEY `key_mobId` (`mobId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_C6_Interlude/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_C6_Interlude/dist/db_installer/sql/game/custom_merchant_buylists.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_buylists.sql index 43419a5689..6f1bee732b 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_buylists.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_buylists.sql @@ -12,4 +12,4 @@ CREATE TABLE custom_merchant_buylists ( time INT NOT NULL DEFAULT '0', savetimer DECIMAL(20,0) NOT NULL DEFAULT '0', PRIMARY KEY (shop_id,`order`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_shopids.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_shopids.sql index b696f282a7..3b524ec5d2 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_shopids.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_merchant_shopids.sql @@ -6,4 +6,4 @@ CREATE TABLE custom_merchant_shopids ( shop_id decimal(9,0) NOT NULL default '0', npc_id varchar(9) default NULL, PRIMARY KEY (shop_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_C6_Interlude/dist/db_installer/sql/game/custom_notspawned.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_notspawned.sql index 47ef1cfd93..49beda727e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_notspawned.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_notspawned.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `custom_notspawned` ( `id` int(11) NOT NULL, `isCustom` int(1) 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_C6_Interlude/dist/db_installer/sql/game/custom_npc.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_npc.sql index 2efad91993..e137223ee3 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_npc.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_npc.sql @@ -46,7 +46,7 @@ CREATE TABLE `custom_npc`( `absorb_level` decimal(2,0) default 0, `absorb_type` enum('FULL_PARTY','LAST_HIT','PARTY_ONE_RANDOM') DEFAULT 'LAST_HIT' NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT ignore INTO custom_npc values ('500', '30115', 'Jurek', '1', 'Faction Manager', '1', 'NPC.a_mageguild_master_MHuman', '8.00', '24.00', '70', 'male', 'Folk', '40', '3862', '1493', '11.85', '2.78', '40', '43', '30', '21', '20', '10', '0', '0', '1314', '470', '780', '382', '278', '0', '333', '0', '0', '0', '55', '132', null, '0', '1', '0', 'LAST_HIT'), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_spawnlist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_spawnlist.sql index c3d8af9169..3b5878f440 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_spawnlist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_spawnlist.sql @@ -19,4 +19,4 @@ CREATE TABLE `custom_spawnlist` ( `periodOfDay` decimal(2,0) default '0', PRIMARY KEY (id), KEY `key_npc_templateid` (`npc_templateid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_teleport.sql index dc5a694a3a..a98504b528 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/custom_teleport.sql @@ -11,4 +11,4 @@ CREATE TABLE custom_teleport ( price decimal(6,0) default NULL, fornoble int(1) NOT NULL default '0', 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_C6_Interlude/dist/db_installer/sql/game/dimensional_rift.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/dimensional_rift.sql index 1d7b0b8697..0bb1d714cc 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/dimensional_rift.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/dimensional_rift.sql @@ -16,7 +16,7 @@ CREATE TABLE `dimensional_rift` ( `zT` int(11) NOT NULL, `boss` tinyint(1) NOT NULL default '0', PRIMARY KEY (`type`,`room_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------- -- Records for table dimensional_rift diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/droplist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/droplist.sql index 8b82f8260c..9d68ca7d78 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/droplist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/droplist.sql @@ -32,7 +32,7 @@ CREATE TABLE `droplist` ( `chance` INT NOT NULL DEFAULT '0', PRIMARY KEY (`mobId`,`itemId`,`category`), KEY `key_mobId` (`mobId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `droplist` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql index 8eca2a2776..880fc0d985 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql @@ -14,7 +14,7 @@ CREATE TABLE `enchant_skill_trees` ( `success_rate79` int(3) NOT NULL DEFAULT '0', `success_rate80` int(3) NOT NULL DEFAULT '0', PRIMARY KEY (`skill_id`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `enchant_skill_trees` VALUES ('1', '101', 'Triple Slash', '37', '+1 Power', '306000', '3060000', '37', '82', '92', '97', '97', '97'); INSERT INTO `enchant_skill_trees` VALUES ('1', '102', 'Triple Slash', '37', '+2 Power', '315000', '3150000', '101', '80', '90', '95', '95', '95'); diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/engrave.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/engrave.sql index 6a899a544e..bfcbe06d76 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/engrave.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/engrave.sql @@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `engraved_items` ( `object_id` int(11) NOT NULL, `item_id` int(11) NOT NULL, `engraver_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; CREATE TABLE IF NOT EXISTS `engraved_log` ( @@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `engraved_log` ( `itemName` varchar(64) NOT NULL, `form_char` varchar(64) NOT NULL, `to_char` varchar(64) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fake_players.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fake_players.sql index 8613cf5322..f208fcd8ff 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fake_players.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fake_players.sql @@ -39,4 +39,4 @@ CREATE TABLE IF NOT EXISTS `fake_players` ( `max_rnd_enchant` int(7) NOT NULL default '0', KEY `spawn` (`spawn`), KEY `template` (`template`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_championship.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_championship.sql index 92eb395a20..3d0be5f153 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_championship.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_championship.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `fishing_championship` ( `player_name` VARCHAR(35) NOT NULL, `fish_length` DOUBLE(10,3) NOT NULL, `rewarded` INT(1) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_skill_trees.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_skill_trees.sql index 662583ca93..47ae7c3008 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_skill_trees.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fishing_skill_trees.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS `fishing_skill_trees` ( `cost` int(10) NOT NULL default '0', `isfordwarf` int(1) NOT NULL default '0', PRIMARY KEY (`skill_id`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Records for table fishing_skill_trees diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort.sql index 70a3f0b4b8..72dd8c4a6e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort.sql @@ -9,7 +9,7 @@ CREATE TABLE `fort` ( `siegeHourOfDay` int(11) NOT NULL default '20', `owner` int(11) NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_door.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_door.sql index c045fece64..26091a0055 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_door.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_door.sql @@ -20,7 +20,7 @@ CREATE TABLE fort_door ( mDef INT NOT NULL default 0, PRIMARY KEY(id), KEY id (fortId) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `fort_door` VALUES (101,18220001,'Gate_of_fort',-50796,155913,-2102,0,0,0,0,0,0,67884,644,518), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql index 8d10d75303..5e933eac6b 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql @@ -8,4 +8,4 @@ CREATE TABLE `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_C6_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql index bb5d1b9fdc..dca419e88c 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `fort_siege_guards` ( `isHired` INT 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 diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql index 5576d58bae..03532b5822 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql @@ -7,4 +7,4 @@ CREATE TABLE `fortsiege_clans` ( `type` int(1) default NULL, `fort_owner` int(1) default NULL, 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_C6_Interlude/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/forums.sql index 3794026842..786325a423 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/forums.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `forums` ( `forum_perm` int(8) NOT NULL default '0', `forum_owner_id` int(8) NOT NULL default '0', UNIQUE KEY `forum_id` (`forum_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_C6_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql index 4101c98ca2..8208a8a0a3 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql @@ -14,7 +14,7 @@ CREATE TABLE `four_sepulchers_spawnlist` ( `key_npc_id` int(9) NOT NULL DEFAULT '0', `spawntype` int(9) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `four_sepulchers_spawnlist` VALUES ('1', '', '1', '31468', '182074', '-85579', '-7216', '0', '0', '-32600', '3600', '31921', '0'), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_tasks.sql index 79e1d942fe..1cc3d87be0 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_tasks.sql @@ -11,4 +11,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_C6_Interlude/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_variables.sql index b53c539dba..56102b09e9 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/global_variables.sql @@ -2,4 +2,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_C6_Interlude/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_data.sql index da16aa6ecf..9f3df9bf28 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_data.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS grandboss_data ( `currentMP` DECIMAL(8,0) DEFAULT NULL, `status` TINYINT 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` VALUES (29019, 185708,114298,-8221,32768, 0, 13090000, 22197, 0), -- Antharas diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_list.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_list.sql index e580000739..4bd0d4c570 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_list.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/grandboss_list.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS grandboss_list `player_id` decimal(11,0) NOT NULL, `zone` decimal(11,0) NOT NULL, PRIMARY KEY (`player_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_C6_Interlude/dist/db_installer/sql/game/helper_buff_list.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/helper_buff_list.sql index a5c13ad09d..7a33fd9c18 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/helper_buff_list.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/helper_buff_list.sql @@ -11,7 +11,7 @@ CREATE TABLE `helper_buff_list` ( `upper_level` int(10) unsigned NOT NULL default '0', `is_magic_class` varchar(5) default NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; #---------------------------- # Records for table helper_buff_list diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/heroes.sql index 6f5a71f7a0..3939a66f9d 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/heroes.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `heroes` ( `count` decimal(3,0) NOT NULL default '0', `played` decimal(1,0) NOT NULL default '0', 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_C6_Interlude/dist/db_installer/sql/game/items.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/items.sql index f2d09bae91..ae4214a920 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/items.sql @@ -20,4 +20,12 @@ CREATE TABLE IF NOT EXISTS items ( KEY `key_loc` (`loc`), KEY `key_item_id` (`item_id`), KEY `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_C6_Interlude/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/itemsonground.sql index 6ce5e530ca..9d6806baa8 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/itemsonground.sql @@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `itemsonground` ( `drop_time` decimal(20,0) default NULL, `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_C6_Interlude/dist/db_installer/sql/game/locations.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/locations.sql index d3f1b0b31c..7c0af21014 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/locations.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/locations.sql @@ -11,7 +11,7 @@ CREATE TABLE `locations` ( `proc` int(3) NOT NULL default '0', PRIMARY KEY (`loc_id`,`loc_x`,`loc_y`), KEY `proc` (`proc`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `locations` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/lottery.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/lottery.sql index 0e6cc924d5..32608ce0ab 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/lottery.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/lottery.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS lottery ( enddate decimal(20,0) NOT NULL default 0, finished INT NOT NULL default 0, PRIMARY KEY (`id`,`idnr`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_C6_Interlude/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_C6_Interlude/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_C6_Interlude/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_C6_Interlude/dist/db_installer/sql/game/merchant_areas_list.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_areas_list.sql index 52a8a5e47d..5c1370c66f 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_areas_list.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_areas_list.sql @@ -8,7 +8,7 @@ CREATE TABLE `merchant_areas_list` ( `tax` double(3,2) unsigned NOT NULL default '0.00', `Chaotic` int(11) NOT NULL default '0', PRIMARY KEY (`merchant_area_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchant_areas_list` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_buylists.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_buylists.sql index 1bea118076..e2a90a0c2d 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_buylists.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_buylists.sql @@ -12,7 +12,7 @@ CREATE TABLE merchant_buylists ( time INT NOT NULL DEFAULT '0', savetimer DECIMAL(20,0) NOT NULL DEFAULT '0', PRIMARY KEY (shop_id,`order`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchant_buylists` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_lease.sql index e69f59449e..79e57cb028 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_lease.sql @@ -8,4 +8,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_C6_Interlude/dist/db_installer/sql/game/merchant_shopids.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_shopids.sql index b96a2ce47e..d4e763e80b 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_shopids.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchant_shopids.sql @@ -6,7 +6,7 @@ CREATE TABLE merchant_shopids ( shop_id decimal(9,0) NOT NULL default '0', npc_id varchar(9) default NULL, PRIMARY KEY (shop_id) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchant_shopids` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchants.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchants.sql index 99ba7ccf3e..500d95176c 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchants.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/merchants.sql @@ -6,7 +6,7 @@ CREATE TABLE `merchants` ( `npc_id` int(11) NOT NULL default '0', `merchant_area_id` tinyint(4) default NULL, PRIMARY KEY (`npc_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `merchants` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/minions.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/minions.sql index 7e4fcb317c..2ed4bffb34 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/minions.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/minions.sql @@ -9,7 +9,7 @@ CREATE TABLE `minions` ( `amount_min` int(4) NOT NULL default '0', `amount_max` int(4) NOT NULL default '0', PRIMARY KEY (`boss_id`,`minion_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `minions` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mods_wedding.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mods_wedding.sql index d043fbacbf..109c1efdb8 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mods_wedding.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/mods_wedding.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS `mods_wedding` ( `weddingDate` decimal(20,0) default '0', `coupleType` int(11) NOT NULL default '0', 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_C6_Interlude/dist/db_installer/sql/game/npc.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npc.sql index d23a17e614..b6014df772 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npc.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npc.sql @@ -47,7 +47,7 @@ CREATE TABLE `npc` ( `absorb_level` decimal(2,0) DEFAULT '0', `absorb_type` enum('FULL_PARTY','LAST_HIT','PARTY_ONE_RANDOM') NOT NULL DEFAULT 'LAST_HIT', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npcskills.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npcskills.sql index 64973cdaad..4a3e869fb8 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npcskills.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/npcskills.sql @@ -7,7 +7,7 @@ CREATE TABLE npcskills ( skillid int(11) NOT NULL default '0', level int(11) NOT NULL default '0', PRIMARY KEY (npcid,skillid,level) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `npcskills` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_data.sql index 4a4edfb193..852ab89513 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_data.sql @@ -6,4 +6,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_C6_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql index 5bc38ad0fc..fc01facc34 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` ( `competitions_lost` decimal(3,0) NOT NULL default '0', `competitions_drawn` decimal(3,0) NOT NULL default '0', PRIMARY KEY (`charId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` ( `charId` decimal(11,0) NOT NULL default '0', @@ -20,4 +20,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` ( `competitions_lost` decimal(3,0) NOT NULL default '0', `competitions_drawn` decimal(3,0) NOT NULL default '0', 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_C6_Interlude/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pets.sql index 14f80587d6..c8b17fd393 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pets.sql @@ -13,4 +13,4 @@ CREATE TABLE IF NOT EXISTS pets ( pkkills decimal(11) , fed decimal(11) , PRIMARY KEY (item_obj_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_C6_Interlude/dist/db_installer/sql/game/pets_stats.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pets_stats.sql index ef3d0bf826..2de3d2d2aa 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pets_stats.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pets_stats.sql @@ -27,7 +27,7 @@ CREATE TABLE `pets_stats` ( `mpregen` int(11) NOT NULL default '0', `owner_exp_taken` DECIMAL(3,2) DEFAULT '0' NOT NULL, PRIMARY KEY (`typeID`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; #---------------------------- # Records for table pets_stats diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pledge_skill_trees.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pledge_skill_trees.sql index 0c9b23f8f0..ac5cfe7d4c 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pledge_skill_trees.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/pledge_skill_trees.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `pledge_skill_trees` ( `Description` varchar(255) default NULL, `repCost` int(11) default NULL, `itemId` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- ---------------------------- -- Records diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/posts.sql index 14040ac89b..0ec4e9d50f 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/posts.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `posts` ( `post_topic_id` int(8) NOT NULL default '0', `post_forum_id` int(8) NOT NULL default '0', `post_txt` 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; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql index d1d2f2e929..0154762fa9 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql @@ -15,7 +15,7 @@ CREATE TABLE raidboss_spawnlist ( currentHp decimal(8,0) default NULL, currentMp decimal(8,0) default NULL, PRIMARY KEY (boss_id,loc_x,loc_y,loc_z) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `raidboss_spawnlist` VALUES (25001,1,-54416,146480,-2887,0,43200,129600,0,95986,545), -- Greyclaw Kutus (23) diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn.sql index 4fc993097d..96c7dae57f 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn.sql @@ -12,7 +12,7 @@ CREATE TABLE random_spawn ( broadcastSpawn VARCHAR(5) NOT NULL default 'false', randomSpawn VARCHAR(5) NOT NULL default 'true', PRIMARY KEY (groupId) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `random_spawn` VALUES (1,30556,1,-1,1800000,1800000,'false','true'), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql index 2d9ef072dc..85baaefbc9 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql @@ -6,7 +6,7 @@ CREATE TABLE `random_spawn_loc` ( `z` int(11) NOT NULL default '0', `heading` int(11) NOT NULL default '-1', PRIMARY KEY (`groupId`,`x`,`y`,`z`,`heading`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `l2jdb`.`random_spawn_loc` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/rebirth_manager.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/rebirth_manager.sql index 298f084384..10bbe3e5a9 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/rebirth_manager.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/rebirth_manager.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `rebirth_manager`( `playerId` int(20) NOT NULL, `rebirthCount` int(2) NOT NULL, PRIMARY KEY (`playerId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs.sql index 0093e22b8d..8fe6dff30a 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `seven_signs` ( `ancient_adena_amount` DECIMAL(20,0) NOT NULL default '0', `contribution_score` DECIMAL(20,0) NOT NULL default '0', PRIMARY KEY (`char_obj_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_C6_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql index eefce920e2..84c8cf7dfe 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql @@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `seven_signs_festival` ( `score` int(5) NOT NULL default '0', `members` varchar(255) NOT NULL default '', PRIMARY KEY (`festivalId`,`cabal`,`cycle`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT IGNORE INTO `seven_signs_festival` VALUES (0, "dawn", 1, 0, 0, ""), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_status.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_status.sql index 3a167d21d8..78cab9f717 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_status.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/seven_signs_status.sql @@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS `seven_signs_status` ( `accumulated_bonus3` int(10) NOT NULL default '0', `accumulated_bonus4` int(10) NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT IGNORE INTO `seven_signs_status` VALUES (0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/siege_clans.sql index 3f8ae839a4..f5e5c1456f 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/siege_clans.sql @@ -4,4 +4,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_C6_Interlude/dist/db_installer/sql/game/skill_learn.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_learn.sql index 4f0cef8999..847e0989f3 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_learn.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_learn.sql @@ -6,7 +6,7 @@ CREATE TABLE skill_learn ( npc_id int(11) NOT NULL default '0', class_id int(11) NOT NULL default '0', PRIMARY KEY (npc_id,class_id) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `skill_learn` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_spellbooks.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_spellbooks.sql index 583a4acb79..af390674db 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_spellbooks.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_spellbooks.sql @@ -6,7 +6,7 @@ CREATE TABLE `skill_spellbooks` ( `skill_id` int(11) NOT NULL default '-1', `item_id` int(11) NOT NULL default '-1', KEY `skill_id` (`skill_id`,`item_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `skill_spellbooks` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_trees.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_trees.sql index c4257f73e0..ccda4788e6 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_trees.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/skill_trees.sql @@ -7,7 +7,7 @@ CREATE TABLE skill_trees ( sp int(10) unsigned NOT NULL default '0', min_level int(10) unsigned NOT NULL default '0', PRIMARY KEY (class_id,skill_id,level) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `skill_trees` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/spawnlist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/spawnlist.sql index 61e904e42d..728fc6e118 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/spawnlist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/spawnlist.sql @@ -18,7 +18,7 @@ CREATE TABLE `spawnlist` ( `periodOfDay` decimal(2,0) default '0', PRIMARY KEY (id), KEY `key_npc_templateid` (`npc_templateid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `spawnlist` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/teleport.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/teleport.sql index 60497fe1ef..49f62d7751 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/teleport.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/teleport.sql @@ -11,7 +11,7 @@ CREATE TABLE teleport ( price decimal(6,0) default NULL, fornoble int(1) NOT NULL default '0', PRIMARY KEY (id) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `teleport` diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/topic.sql index 6a3afcef2e..972b016377 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/topic.sql @@ -7,4 +7,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_C6_Interlude/dist/db_installer/sql/game/vanhalter_spawnlist.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/vanhalter_spawnlist.sql index 79ae69dfc8..6b5803228f 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/vanhalter_spawnlist.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/game/vanhalter_spawnlist.sql @@ -15,7 +15,7 @@ CREATE TABLE `vanhalter_spawnlist` ( `periodOfDay` DECIMAL(2,0) DEFAULT 0, PRIMARY KEY (`id`), KEY `key_npc_templateid` (`npc_templateid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `vanhalter_spawnlist` VALUES ('1','Pagan Temple','1','32051','-14670','-54846','-10629','0','0','16384','60','0','0'), diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/account_data.sql index 17c65c39a8..27da42723e 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/account_data.sql @@ -6,4 +6,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_C6_Interlude/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/accounts.sql index d301d143ed..d1fe9a90c1 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/accounts.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS `accounts` ( `lastIP` CHAR(15) NULL DEFAULT NULL, `lastServer` TINYINT DEFAULT 1, 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_C6_Interlude/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/gameservers.sql index f49ecfdc0a..3fab170880 100644 --- a/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/sql/login/gameservers.sql @@ -3,7 +3,7 @@ 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; -- ---------------------------- -- Records of gameservers diff --git a/L2J_Mobius_C6_Interlude/dist/game/config/custom/AutoPlay.ini b/L2J_Mobius_C6_Interlude/dist/game/config/custom/AutoPlay.ini index 9580f01952..de5fcc3ae8 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/config/custom/AutoPlay.ini +++ b/L2J_Mobius_C6_Interlude/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 + # List of skills that cannot be added to auto play selection menu, separated by commas. DisabledSkillIds = diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java index 4a4b362246..f7adeb0737 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java @@ -581,6 +581,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 Set DISABLED_AUTO_SKILLS = new HashSet<>(); public static Set DISABLED_AUTO_ITEMS = new HashSet<>(); public static String AUTO_PLAY_LOGIN_MESSAGE; @@ -1862,6 +1863,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); DISABLED_AUTO_SKILLS.clear(); final String disabledSkills = autoPlayConfig.getString("DisabledSkillIds", ""); if (!disabledSkills.isEmpty()) diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 6ba2bb8076..156998aff8 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java @@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.model.DropProtection; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; +import org.l2jmobius.gameserver.model.WorldRegion; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.knownlist.NullKnownList; @@ -1107,10 +1108,11 @@ public class Item extends WorldObject // Set the x,y,z position of the Item dropped and update its _worldregion setSpawned(true); getLocation().setXYZ(x, y, z); - setWorldRegion(World.getInstance().getRegion(getLocation())); + final WorldRegion region = World.getInstance().getRegion(getLocation()); + setWorldRegion(region); // Add the Item dropped to _visibleObjects of its WorldRegion - getWorldRegion().addVisibleObject(this); + region.addVisibleObject(this); } setDropTime(System.currentTimeMillis()); diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index f12fbc358e..655c43fbc3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_C6_Interlude/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.WorldObject; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Player; @@ -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,12 @@ public class AutoPlayTaskManager // We take granted that mage classes do not auto hit. if (isMageCaster(player)) { + // Logic adjustment for summons not attacking. + final Summon summon = player.getPet(); + if ((summon != null) && 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 +129,32 @@ public class AutoPlayTaskManager final Weapon weapon = player.getActiveWeaponItem(); if (weapon != null) { - final boolean ranged = weapon.getItemType() == WeaponType.BOW; - 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.getTemplate().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() == WeaponType.BOW; + 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.getTemplate().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 +162,9 @@ public class AutoPlayTaskManager } } + // Reset idle count. + IDLE_COUNT.remove(player); + // Pickup. if (player.getAutoPlaySettings().doPickup()) { @@ -183,41 +204,61 @@ public class AutoPlayTaskManager // Find target. Creature creature = null; - double closestDistance = Double.MAX_VALUE; - TARGET: for (Creature nearby : player.getKnownList().getKnownCharactersInRadius(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()) { - if (nearby == null) + if (Util.calculateDistance(leader, player, true) < (Config.ALT_PARTY_RANGE * 2 /* 2? */)) { - continue; + final WorldObject leaderTarget = leader.getTarget(); + if ((leaderTarget != null) && (leaderTarget.isAttackable() || (leaderTarget.isPlayable() && !party.getPartyMembers().contains(leaderTarget)))) + { + creature = (Creature) leaderTarget; + } + else if ((player.getAI().getIntention() != CtrlIntention.AI_INTENTION_FOLLOW) && !player.isDisabled()) + { + player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, leader); + } } - - // Skip unavailable creatures. - if (nearby.isAlikeDead()) + } + else + { + double closestDistance = Double.MAX_VALUE; + TARGET: for (Creature nearby : player.getKnownList().getKnownCharactersInRadius(player.getAutoPlaySettings().isShortRange() && (targetMode != 2 /* Characters */) ? 600 : 1400)) { - continue TARGET; - } - // Check creature target. - if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player)) - { - final Summon summon = player.getPet(); - if ((summon != null) && (summon.getObjectId() == nearby.getTarget().getObjectId())) + if (nearby == null) + { + continue; + } + + // Skip unavailable creatures. + if (nearby.isAlikeDead()) { 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.getInstanceId())) - { - final double creatureDistance = player.calculateDistance2D(nearby); - if (creatureDistance < closestDistance) + // Check creature target. + if (player.getAutoPlaySettings().isRespectfulHunting() && !nearby.isPlayable() && (nearby.getTarget() != null) && (nearby.getTarget() != player)) { - creature = nearby; - closestDistance = creatureDistance; + final Summon summon = player.getPet(); + if ((summon != null) && (summon.getObjectId() == 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.getInstanceId())) + { + final double creatureDistance = player.calculateDistance2D(nearby); + if (creatureDistance < closestDistance) + { + creature = nearby; + closestDistance = creatureDistance; + } } } } @@ -310,6 +351,7 @@ public class AutoPlayTaskManager { summon.followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/account_gsdata.sql index d2da07b194..db5cb35ce2 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/account_gsdata.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/announcements.sql index 686ce7db92..4ea4114b97 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/announcements.sql @@ -7,7 +7,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_CT_0_Interlude/dist/db_installer/sql/game/auction.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction.sql index 5d307b8ec7..0446601374 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction.sql @@ -13,4 +13,4 @@ CREATE TABLE IF NOT EXISTS `auction` ( `endDate` bigint(13) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`itemType`,`itemId`,`itemObjectId`), 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_CT_0_Interlude/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction_bid.sql index 31fdbd466c..0aca65f92a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction_bid.sql @@ -8,4 +8,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_CT_0_Interlude/dist/db_installer/sql/game/auction_watch.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction_watch.sql index 5834f4e511..97aa7c020f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction_watch.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/auction_watch.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `auction_watch` ( `charObjId` INT NOT NULL DEFAULT 0, `auctionId` INT NOT NULL DEFAULT 0, PRIMARY KEY (`charObjId`,`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_CT_0_Interlude/dist/db_installer/sql/game/bbs_favorite.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/bbs_favorite.sql index e353929990..57506eee67 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/bbs_favorite.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/bbs_favorite.sql @@ -6,4 +6,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_CT_0_Interlude/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/buffer_schemes.sql index 55eb836dbb..2d7a14e81f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/buffer_schemes.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL, PRIMARY KEY (`object_id`,`scheme_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_CT_0_Interlude/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/buylists.sql index ea76140994..291a4ac88f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/buylists.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle.sql index 0f2cc1f5c4..9e34e1bdc8 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle.sql @@ -10,7 +10,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',0,0,0,'true',0,'false',0), diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql index 467549c7f3..f2ae13d23c 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_functions.sql index b111fb4bb7..48f019f7e3 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_functions.sql @@ -6,4 +6,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_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql index 6f081a435e..aa29107f01 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_production.sql index 4b0fefcf9e..42ac40d507 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_manor_production.sql @@ -6,4 +6,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_CT_0_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql index b16306c804..ab5e5e2051 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_contacts.sql index b242905114..1c84187b03 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_contacts.sql @@ -2,4 +2,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_CT_0_Interlude/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_friends.sql index 7e5fc9ffa3..8ac7e449e2 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_friends.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_friends` ( `friendId` INT UNSIGNED NOT NULL DEFAULT 0, `relation` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`friendId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_hennas.sql index b274ca90ee..b5f10d2462 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_hennas.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_instance_time.sql index 4b9efb912a..f9b0cfa7d4 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_instance_time.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql index 43f531deb2..79433cbbab 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql @@ -5,4 +5,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_CT_0_Interlude/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_macroses.sql index 06e83eddff..07e83a1adb 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_macroses.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade.sql index 0fd9522890..69b18fbfdf 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql index 5fcd5653e8..317fc42bf7 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql @@ -5,4 +5,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_CT_0_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql index 98a58b9c62..e01871070e 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql @@ -5,4 +5,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_CT_0_Interlude/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_quests.sql index c683185655..e33ff5ba97 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_quests.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/character_raid_points.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_raid_points.sql index 0ba8ff2c75..bfcc537fd3 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_raid_points.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_raid_points.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_raid_points` ( `boss_id` INT UNSIGNED NOT NULL DEFAULT 0, `points` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`boss_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_CT_0_Interlude/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recipebook.sql index 6edd20fd88..2acaa26250 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recipebook.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql index 3b6aed2a9c..4ea37c5249 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/character_recommends.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recommends.sql index 17c71144fc..bee300c7d9 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recommends.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_recommends.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `character_recommends` ( `charId` INT UNSIGNED NOT NULL default 0, `target_id` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`target_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_CT_0_Interlude/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_shortcuts.sql index 06a3f14d72..a2349f79c3 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_shortcuts.sql @@ -8,4 +8,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_CT_0_Interlude/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_skills.sql index ca20cda6a6..a26b62cfcc 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_skills.sql @@ -4,4 +4,10 @@ CREATE TABLE IF NOT EXISTS `character_skills` ( `skill_level` INT(3) NOT NULL DEFAULT 1, `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_CT_0_Interlude/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_skills_save.sql index 23297a4724..ab821f45de 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_skills_save.sql @@ -9,4 +9,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_CT_0_Interlude/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_subclasses.sql index a2bdbb93b8..af152623f7 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_subclasses.sql @@ -6,4 +6,10 @@ CREATE TABLE IF NOT EXISTS `character_subclasses` ( `level` int(2) NOT NULL DEFAULT 40, `class_index` int(1) NOT NULL DEFAULT 0, 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_CT_0_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql index 69f5f276b1..7dbb8268d6 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_summons.sql index bde6cd28bf..500cd4363a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_summons.sql @@ -5,4 +5,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`,`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_CT_0_Interlude/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_variables.sql index e843d01ebd..f42eaecdbc 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/character_variables.sql @@ -2,4 +2,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_CT_0_Interlude/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql index 57b7796bc9..c0088b1a0b 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql @@ -65,4 +65,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_CT_0_Interlude/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_data.sql index 70d48ca49f..c9f8f13cb1 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_data.sql @@ -22,4 +22,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_CT_0_Interlude/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_notices.sql index b28a79dd62..e725586084 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_notices.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_privs.sql index 6da0d19b15..57461b9e54 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_privs.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_skills.sql index 0bc644e66e..be13835749 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_skills.sql @@ -5,4 +5,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_CT_0_Interlude/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_subpledges.sql index cf8144cbf2..3bee2d38f8 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_subpledges.sql @@ -5,4 +5,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_CT_0_Interlude/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_wars.sql index 59492a6542..31ee2db1f4 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clan_wars.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `clan_wars` ( `wantspeace1` decimal(1,0) NOT NULL DEFAULT '0', `wantspeace2` decimal(1,0) 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_CT_0_Interlude/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall.sql index 41a06cac48..f55afb8c14 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `clanhall` ( `paid` int( 1 ) NOT NULL DEFAULT '0', PRIMARY KEY `id` (`id`), KEY `ownerId` (`ownerId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT IGNORE INTO `clanhall` VALUES ('22','Moonstone Hall','0','500000','Clan hall located in the Town of Gludio','Gludio','0','2','0'), diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_functions.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_functions.sql index 28cf4d0a8e..7ebed4ca53 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_functions.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_functions.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_functions` ( `rate` decimal(20,0) NOT NULL DEFAULT '0', `endTime` bigint(13) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`hall_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_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_attackers.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_attackers.sql index 16c4216bfe..dc27ded096 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_attackers.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_attackers.sql @@ -1,4 +1,4 @@ CREATE TABLE IF NOT EXISTS `clanhall_siege_attackers` ( `clanhall_id` int(3) NOT NULL DEFAULT '0', `attacker_id` int(10) 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_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_guards.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_guards.sql index b334f13a9e..60d14d1640 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_guards.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/clanhall_siege_guards.sql @@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `clanhall_siege_guards` ( `respawnDelay` mediumint(5) NOT NULL DEFAULT '0', `isSiegeBoss` enum('false','true') NOT NULL DEFAULT 'false', KEY `clanHallId` (`clanHallId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `clanhall_siege_guards` VALUES -- Devasted Castle diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/crests.sql index b3e6dd8b67..04146da77a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/crests.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/cursed_weapons.sql index dc7a921a83..c18f76bbee 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/cursed_weapons.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/custom_teleport.sql index 96dad1f9fc..c472e6d75b 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/custom_teleport.sql @@ -8,4 +8,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_CT_0_Interlude/dist/db_installer/sql/game/dimensional_rift.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/dimensional_rift.sql index 1e01f688cf..4e2f248d62 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/dimensional_rift.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/dimensional_rift.sql @@ -13,7 +13,7 @@ CREATE TABLE `dimensional_rift` ( `zT` mediumint(6) NOT NULL, `boss` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`type`,`room_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `dimensional_rift` VALUES (0, 0, -115440, -114160, -182160, -178048, -6816, -6240, -114790, -180576, -6752, 0), -- peace zone (waiting room) diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql index 8eca2a2776..880fc0d985 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/enchant_skill_trees.sql @@ -14,7 +14,7 @@ CREATE TABLE `enchant_skill_trees` ( `success_rate79` int(3) NOT NULL DEFAULT '0', `success_rate80` int(3) NOT NULL DEFAULT '0', PRIMARY KEY (`skill_id`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `enchant_skill_trees` VALUES ('1', '101', 'Triple Slash', '37', '+1 Power', '306000', '3060000', '37', '82', '92', '97', '97', '97'); INSERT INTO `enchant_skill_trees` VALUES ('1', '102', 'Triple Slash', '37', '+2 Power', '315000', '3150000', '101', '80', '90', '95', '95', '95'); diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/fishing_championship.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/fishing_championship.sql index aa9ffef1ee..646424bd2b 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/fishing_championship.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/fishing_championship.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `fishing_championship` ( `player_name` VARCHAR(35) NOT NULL, `fish_length` DOUBLE(10,3) NOT NULL, `rewarded` INT(1) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/forums.sql index fede0432b9..f565baebfa 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/forums.sql @@ -8,7 +8,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_CT_0_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql index 4ae82c0039..ef44b39cf4 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/four_sepulchers_spawnlist.sql @@ -14,7 +14,7 @@ CREATE TABLE `four_sepulchers_spawnlist` ( `key_npc_id` smallint(5) unsigned NOT NULL DEFAULT '0', `spawntype` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `four_sepulchers_spawnlist` VALUES ('1', '', '1', '31468', '182074', '-85579', '-7216', '0', '0', '-32600', '3600', '31921', '0'), diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_tasks.sql index 33fe875e44..8be95c521f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_tasks.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_variables.sql index 86cabd2d0f..b5f04d1339 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/global_variables.sql @@ -2,6 +2,6 @@ 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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; REPLACE INTO `global_variables` VALUES ('HBLevel', '11'); REPLACE INTO `global_variables` VALUES ('HBTrust', '4000000'); diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_data.sql index c0666646a9..726901699f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_data.sql @@ -9,7 +9,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 (40) diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_list.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_list.sql index 3de82ecdb8..cba2ad418e 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_list.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/grandboss_list.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `grandboss_list` ( `player_id` decimal(11,0) NOT NULL, `zone` decimal(11,0) NOT NULL, PRIMARY KEY (`player_id`,`zone`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/herb_droplist_groups.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/herb_droplist_groups.sql index 91029fb985..a5e524415c 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/herb_droplist_groups.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/herb_droplist_groups.sql @@ -24,7 +24,7 @@ CREATE TABLE `herb_droplist_groups` ( `chance` mediumint(7) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`groupId`,`itemId`,`category`), KEY `key_mobId` (`groupId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `herb_droplist_groups` VALUES -- default group diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes.sql index 593b5b3c72..f66ed313ee 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes.sql @@ -6,4 +6,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_CT_0_Interlude/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes_diary.sql index 3540726e4b..b87f1ec2b3 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/heroes_diary.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/item_attributes.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_attributes.sql index 787e4e6c07..933267af4e 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_attributes.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_attributes.sql @@ -2,4 +2,6 @@ CREATE TABLE IF NOT EXISTS `item_attributes` ( `itemId` int(11) NOT NULL DEFAULT 0, `augAttributes` int(11) NOT NULL DEFAULT -1, 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_attributes (itemId); diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction.sql index 6ac2d3deb9..49a9229f57 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction.sql @@ -6,4 +6,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_CT_0_Interlude/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction_bid.sql index 5ac2a00221..283ccfad6e 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/item_auction_bid.sql @@ -3,4 +3,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_CT_0_Interlude/dist/db_installer/sql/game/items.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/items.sql index 3fc23ea75b..64c3a59c5e 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/items.sql @@ -16,4 +16,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_CT_0_Interlude/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/itemsonground.sql index d87a1f6777..71962e9cdd 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/itemsonground.sql @@ -9,4 +9,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_CT_0_Interlude/dist/db_installer/sql/game/lottery.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/lottery.sql index e9f02cd64a..1bd9f73b19 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/lottery.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/lottery.sql @@ -11,4 +11,4 @@ CREATE TABLE IF NOT EXISTS `lottery` ( `enddate` bigint(13) unsigned NOT NULL DEFAULT '0', `finished` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`,`idnr`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/merchant_lease.sql index 931744d3ce..7b74a60806 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/merchant_lease.sql @@ -5,4 +5,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_CT_0_Interlude/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/messages.sql index 1af8e44845..381e442e41 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/messages.sql @@ -14,4 +14,4 @@ CREATE TABLE IF NOT EXISTS `messages` ( `sendBySystem` tinyint(1) NOT NULL DEFAULT 0, `isReturned` enum('true','false') DEFAULT 'false' NOT NULL, 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_CT_0_Interlude/dist/db_installer/sql/game/mods_wedding.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mods_wedding.sql index 3d9f409d69..01c6506ca6 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mods_wedding.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/mods_wedding.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `mods_wedding` ( PRIMARY KEY (`id`), KEY `player1Id` (`player1Id`), KEY `player2Id` (`player2Id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_data.sql index 4a4edfb193..852ab89513 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_data.sql @@ -6,4 +6,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_CT_0_Interlude/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_fights.sql index d0016dcd28..9a9f98bfac 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_fights.sql @@ -9,4 +9,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_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql index ce32bbf800..3609ae84f0 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles` ( `competitions_lost` decimal(3,0) NOT NULL default 0, `competitions_drawn` decimal(3,0) 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_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql index ababd5fe67..afe36b3125 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_nobles_eom` ( `competitions_lost` decimal(3,0) NOT NULL default 0, `competitions_drawn` decimal(3,0) 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_CT_0_Interlude/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/petition_feedback.sql index a00d9d507a..096d2429f3 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/petition_feedback.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/pets.sql index 7f36bc7498..b83073d6fe 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/pets.sql @@ -11,4 +11,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_CT_0_Interlude/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/posts.sql index d11bf6aa92..aec8325bdd 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/posts.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/prime_shop_transactions.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/prime_shop_transactions.sql index 5cd9ceb4cd..96cb20bdf4 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/prime_shop_transactions.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/prime_shop_transactions.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `prime_shop_transactions` ( `productId` INT NOT NULL DEFAULT 0, `quantity` INT NOT NULL DEFAULT 1, `transactionTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/punishments.sql index 30a22f0e5f..ce5130fc23 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/punishments.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql index 61ff85a6cc..97b33dc7eb 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/raidboss_spawnlist.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `raidboss_spawnlist` ( `currentHp` decimal(8,0) DEFAULT NULL, `currentMp` decimal(8,0) DEFAULT NULL, PRIMARY KEY (`boss_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT IGNORE INTO `raidboss_spawnlist` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`heading`,`respawn_delay`,`respawn_random`,`currentHp`,`currentMp`) VALUES (25001,-54416,146480,-2887,0,86400,43200,95986,514), -- Greyclaw Kutus (23) @@ -82,18 +82,18 @@ INSERT IGNORE INTO `raidboss_spawnlist` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`head (25170,26064,121808,-3738,0,86400,43200,195371,994), -- Lizardmen Leader Hellion (38) (25173,75968,110784,-2512,0,86400,43200,288415,1355), -- Tiger King Karuta (45) -- (25176,92544,115232,-3200,0,86400,43200,451391,1975), -- Black Lily (55) (Not spawned anymore in H5) -(25179,167152,53120,-4148,0,86400,43200,526218,2301), -- Guardian Of The Statue Of Giant Karum (60) +(25179,181814,52379,-4344,0,86400,43200,526218,2301), -- Guardian Of The Statue Of Giant Karum (60) (25182,41966,215417,-3728,0,86400,43200,512194,2235), -- Demon Kurikups (59) -(25185,99732,204331,-3784,0,86400,43200,165289,893), -- Tasaba Patriarch Hellena (35) +(25185,88123,166312,-3412,0,86400,43200,165289,893), -- Tasaba Patriarch Hellena (35) (25188,127544,215264,-2960,0,86400,43200,255564,731), -- Apepi (30) -(25189,127837,200661,-3792,0,86400,43200,156584,860), -- Cronos's Servitor Mumu (34) +(25189,68832,203024,-3547,0,86400,43200,156584,860), -- Cronos's Servitor Mumu (34) (25192,125920,190208,-3291,0,86400,43200,258849,1237), -- Earth Protector Panathen (43) (25198,102656,157424,-3735,0,86400,43200,1777317,2987), -- Fafurion's Herald Lokness (70) (25199,108096,157408,-3688,0,86400,43200,912634,3130), -- Water Dragon Seer Sheshark (72) (25202,119760,157392,-3744,0,86400,43200,935092,3274), -- Krokian Padisha Sobekk (74) (25205,123808,153408,-3671,0,86400,43200,956490,3420), -- Ocean Flame Ashakiel (76) -(25208,109663,213615,-3624,0,86400,43200,218810,1062), -- Water Couatle Ateka (40) -(25211,113456,198118,-3689,0,86400,43200,174646,927), -- Sebek (36) +(25208,73776,201552,-3760,0,86400,43200,218810,1062), -- Water Couatle Ateka (40) +(25211,76352,193216,-3648,0,86400,43200,174646,927), -- Sebek (36) (25214,111582,209341,-3687,0,86400,43200,218810,1062), -- Fafurion's Page Sika (40) -- (25217,89904,105712,-3292,0,86400,43200,369009,1660), -- Cursed Clara (50) (Not spawned anymore in H5) (25220,113551,17083,-2120,0,86400,43200,924022,3202), -- Death Lord Hallate (73) @@ -122,7 +122,7 @@ INSERT IGNORE INTO `raidboss_spawnlist` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`head -- (25273,23800,119500,-8976,0,86400,43200,507285,2104), -- Carnamakos (50) (Spawn by Quest) (25276,154088,-14116,-3736,0,86400,43200,1891801,3347), -- Death Lord Ipos (75) (25277,54651,180269,-4976,0,86400,43200,507285,1660), -- Lilith's Witch Marilion (50) -(25280,85622,88766,-5120,0,86400,43200,1248928,1975), -- Pagan Watcher Cerberon (55) +(25280,-12621,-240437,-8160,0,86400,43200,1248928,1975), -- Pagan Watcher Cerberon (55) (25281,151053,88124,-5424,0,86400,43200,1777317,2987), -- Anakim's Nemesis Zakaron (70) (25282,179311,-7632,-4896,0,86400,43200,1891801,3347), -- Death Lord Shax (75) -- (25283,184410,-10111,-5488,0,86400,43200,1639146,3793), -- Lilith (80) (Spawn by Seven Signs) @@ -170,7 +170,7 @@ INSERT IGNORE INTO `raidboss_spawnlist` (`boss_id`,`loc_x`,`loc_y`,`loc_z`,`head (25388,40128,101920,-1241,0,86400,43200,165289,893), -- Red Eye Captain Trakia (35) (25391,45600,120592,-2455,0,86400,43200,297015,827), -- Nurka's Messenger (33) (25392,29928,107160,-3708,0,86400,43200,141034,795), -- Captain Of Queen's Royal Guards (32) -(25394,129481,219722,-3600,0,86400,43200,390743,994), -- Premo Prime (38) +(25394,101888,200224,-3708,0,86400,43200,390743,994), -- Premo Prime (38) (25395,15000,119000,-11900,0,86400,43200,288415,1355), -- Archon Suscepter (45) (25398,5000,189000,-3728,0,86400,43200,165289,893), -- Eye Of Beleth (35) (25401,117808,102880,-3600,0,86400,43200,141034,795), -- Skyla (32) diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/rainbowsprings_attacker_list.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/rainbowsprings_attacker_list.sql index ec166bff70..03250f25e7 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/rainbowsprings_attacker_list.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/rainbowsprings_attacker_list.sql @@ -2,4 +2,4 @@ CREATE TABLE IF NOT EXISTS `rainbowsprings_attacker_list` ( `clanId` int(10) DEFAULT NULL, `war_decrees_count` double(20,0) DEFAULT NULL, KEY `clanid` (`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_CT_0_Interlude/dist/db_installer/sql/game/random_spawn.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn.sql index fd99673627..bdec18101e 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn.sql @@ -9,7 +9,7 @@ CREATE TABLE `random_spawn` ( `broadcastSpawn` enum('true','false') NOT NULL DEFAULT 'false', `randomSpawn` enum('true','false') NOT NULL DEFAULT 'true', PRIMARY KEY (`groupId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `random_spawn` VALUES (11,31113,1,-1,-1,-1,'true','true'), -- Merchant of Mammon diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql index 86f7dd77fe..471d8df84d 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/random_spawn_loc.sql @@ -6,7 +6,7 @@ CREATE TABLE `random_spawn_loc` ( `z` mediumint(6) NOT NULL, `heading` mediumint(6) NOT NULL DEFAULT '0', PRIMARY KEY (`groupId`,`x`,`y`,`z`,`heading`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `random_spawn_loc` VALUES -- Merchant of Mammon diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs.sql index ef94a10582..cec3ff4a4d 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `seven_signs` ( `ancient_adena_amount` DECIMAL(20,0) NOT NULL DEFAULT 0, `contribution_score` DECIMAL(20,0) NOT NULL DEFAULT 0, 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_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql index 7683fa8467..5d2925a98f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_festival.sql @@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `seven_signs_festival` ( `score` int(5) NOT NULL DEFAULT '0', `members` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`festivalId`,`cabal`,`cycle`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT IGNORE INTO `seven_signs_festival` VALUES (0, "dawn", 1, 0, 0, ""), diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_status.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_status.sql index bf65f25901..3cc137bec4 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_status.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/seven_signs_status.sql @@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS `seven_signs_status` ( `accumulated_bonus3` int(10) NOT NULL DEFAULT '0', `accumulated_bonus4` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT IGNORE INTO `seven_signs_status` VALUES (0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_clanhall.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_clanhall.sql index e38b1792ee..a49e90db7a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_clanhall.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_clanhall.sql @@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `siegable_clanhall` ( `schedule_config` varchar(20) DEFAULT NULL, PRIMARY KEY (`clanHallId`), KEY `ownerId` (`ownerId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT IGNORE INTO `siegable_clanhall` (`clanHallId`, `name`, `ownerId`, `desc`, `location`, `nextSiege`, `siegeLength`, `schedule_config`) VALUES (21, 'Fortress of Resistance', 0, 'Contestable Clan Hall', 'Dion', 0, 3600000, '14;0;0;12;00'), diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers.sql index 2d5a1d60c4..9ce6060577 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `siegable_hall_flagwar_attackers` ( PRIMARY KEY (`flag`), KEY `hall_id` (`hall_id`), KEY `clan_id` (`clan_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_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers_members.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers_members.sql index 63e0270430..566a64fb10 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers_members.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siegable_hall_flagwar_attackers_members.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `siegable_hall_flagwar_attackers_members` ( KEY `hall_id` (`hall_id`), KEY `clan_id` (`clan_id`), KEY `object_id` (`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_CT_0_Interlude/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siege_clans.sql index a583deb0a7..65b7738285 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/siege_clans.sql @@ -4,4 +4,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_CT_0_Interlude/dist/db_installer/sql/game/teleport.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/teleport.sql index e3a5680d16..c84faa92d7 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/teleport.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/teleport.sql @@ -10,7 +10,7 @@ CREATE TABLE `teleport` ( `itemId` smallint(5) unsigned NOT NULL DEFAULT '57', PRIMARY KEY (`id`), KEY `itemId` (`itemId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `teleport` VALUES ('DE Village -> Town of Gludio',1,-12787,122779,-3112,10000,0,57), diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/topic.sql index 005d87b4e0..d7147c830f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/topic.sql @@ -7,4 +7,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_CT_0_Interlude/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/gameservers.sql index c6f6c5ee36..d2a3e1ee5d 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/AutoPlay.ini index 9a4fd4bf2e..6e9d9628be 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/AutoPlay.ini +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_CT_0_Interlude/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_CT_0_Interlude/dist/game/config/General.ini b/L2J_Mobius_CT_0_Interlude/dist/game/config/General.ini index 2680eb1cb4..aa63bae2f0 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/config/General.ini +++ b/L2J_Mobius_CT_0_Interlude/dist/game/config/General.ini @@ -417,8 +417,8 @@ ChatFilterChars = ^_^ # MPCC_ROOM # NPC_GENERAL # NPC_SHOUT -# Default: GENERAL;SHOUT;TRADE;HERO_VOICE -BanChatChannels = GENERAL;SHOUT;TRADE;HERO_VOICE +# Default: GENERAL;SHOUT;TRADE;HERO_VOICE;WHISPER +BanChatChannels = GENERAL;SHOUT;TRADE;HERO_VOICE;WHISPER # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/config/GrandBoss.ini b/L2J_Mobius_CT_0_Interlude/dist/game/config/GrandBoss.ini index 337f133638..9660080217 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/config/GrandBoss.ini +++ b/L2J_Mobius_CT_0_Interlude/dist/game/config/GrandBoss.ini @@ -64,6 +64,16 @@ IntervalOfQueenAntSpawn = 36 # Random interval. Range 1-192 RandomOfQueenAntSpawn = 8 +# --------------------------------------------------------------------------- +# Zaken +# --------------------------------------------------------------------------- + +# Interval time of Zaken. Value is hour. Range 1-480 +IntervalOfZakenSpawn = 60 + +# Random interval. Range 1-192 +RandomOfZakenSpawn = 8 + # --------------------------------------------------------------------------- # Frintezza # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/Doors.xml b/L2J_Mobius_CT_0_Interlude/dist/game/data/Doors.xml index 7a77058c12..248c7de845 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/Doors.xml +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/Doors.xml @@ -227,7 +227,7 @@ - + diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/WorldAreas/AdenTerritory.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/WorldAreas/AdenTerritory.htm index 59d662e7d3..94b456a156 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/WorldAreas/AdenTerritory.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/WorldAreas/AdenTerritory.htm @@ -18,24 +18,17 @@ Plains of Glory Fields of Massacre War-Torn Plains -Isle of Souls -Mimir's Forest -Hills of Gold
Dungeons Tower of Insolence The Giant's Cave Catacomb of the Forbidden Path Catacomb of the Witch The Disciple's Necropolis -Nornil's Garden
Towns Town of Aden Hunters Village
Castle Aden Castle
-Starting -Kamael Village -Nornil's Cave
Fortresses Narsell Fortress Bayou Fortress @@ -49,6 +42,5 @@ Eastern Border Outpost Narsell Lake Western Border Outpost -Cave of Souls \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_30.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_30.htm index b086785b0e..db5fb6a8b6 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_30.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_30.htm @@ -24,23 +24,23 @@ Corsair Captain Kylon (33) Breka Warlock Pastu (34) Stakato Queen Zyrnna (34) -Cronos's Servitor Mumu (34) +Cronos's Servitor Mumu (34) Revenant of Sir Calibus (34) Remmel (35) Chertuba of Great Soul (35) Sejarr's Servitor (35) Guilotine, Warden of the Execution Grounds (35) Flame Lord Shadar (35) -Tasaba Patriarch Hellena (35) +Tasaba Patriarch Hellena (35) Soul Collector Acheron (35) Gargoyle Lord Sirocco (35) Red Eye Captain Trakia (35) Eye of Beleth (35) -Sebek (36) +Sebek (36) Evil Spirit Tempest (36) Rayito The Looter (37) Lizardmen Leader Hellion (38) -Premo Prime (38) +Premo Prime (38) Leader of Cat Gang (39) Nellis' Vengeful Spirit (39) \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_40.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_40.htm index 2dc66fc8ff..94cec7ae49 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_40.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_40.htm @@ -10,11 +10,13 @@

+Gwindorr (40) +Water Spirit Lian (40) Wizard of Storm Teruk (40) Icarus Sample 1 (40) Leto Chief Talkin (40) Shaman King Selu (40) -Water Couatle Ateka (40) +Water Couatle Ateka (40) Fafurion's Page Sika (40) Road Scavenger Leader (40) Nakondas (40) @@ -35,6 +37,7 @@ Evil Spirit Cyrion (45) Fafurion's Henchman Istary (45) Barion (47) +Necrosentinel Royal Guard (47) King Tarlk (48) Orfen's Handmaiden (48) Katu Van Leader Atui (49) diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_50.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_50.htm index 0006f7f63b..70c62db529 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_50.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_50.htm @@ -14,6 +14,7 @@ Ghost of Peasant Leader (50) Messenger of Fairy Queen Berun (50) Carnage Lord Gato (50) +Cursed Clara (50) Lilith's Witch Marilion (50) Zaken's Chief Mate Tillion (50) Verfa (51) @@ -23,15 +24,17 @@ Gigantic Chaos Golem (52) Fafurion's Envoy Pingolpin (52) Atraiban (53) +Dark Shaman Varangka (53) Magus Kenishee (53) Paniel The Unicorn (54) Furious Thieles (55) Enchanted Forest Watcher Ruell (55) Sorcerer Isirr (55) Beleth's Seer Sephia (55) +Black Lily (55) Harit Hero Tamash (55) Zaken's Butcher Krantz (55) -Pagan Watcher Cerberon (55) +Pagan Watcher Cerberon (55) Bandit Leader Barda (55) Ghost Knight Kabed (55) Eva's Spirit Niniel (55) diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_60.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_60.htm index d94bca9a76..5a264bf680 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_60.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_60.htm @@ -11,11 +11,15 @@
The 3rd Underwater Guardian (60) -Guardian of the Statue of Giant Karum (60) +Guardian of the Statue of Giant Karum (60) Taik High Prefect Arak (60) +Ancient Weird Drake (60) +Lord Ishka (60) Fairy Queen Timiniel (60) +Giant Marpanak (60) Roaring Lord Kastor (62) Ghost of the Well Lidia (63) +Gorgolos (64) Eva's Guardian Millenu (65) Rahha (65) Fierce Tiger King Angel (65) @@ -23,8 +27,11 @@ Gargoyle Lord Tiphon (65) Enmity Ghost Ramdal (65) Shilen's Priest Hisilrome (65) +Hekaton Prime (65) +Last Titan Utenus (66) Demon's Agent Falston (66) Abyss Brukunt (67) Kernon's Faithful Servant Kelone (67) +Bloody Priest Rudelto (69) Spirit of Andras, The Betrayer (69)
\ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_70.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_70.htm index f6cc482bd0..8fbb65b8c0 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_70.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_70.htm @@ -26,6 +26,7 @@ Doom Blade Tanatos (72) Death Lord Hallate (73) Plague Golem (73) +Antharas Priest Cloe (74) Krokian Padisha Sobekk (74) Icicle Emperor Bumbalump (74) Kernon (75) diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_80.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_80.htm index a78f2a8631..b94d165bec 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_80.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/teleports/raid/raid_80.htm @@ -12,34 +12,22 @@
Ketra's Hero Hekaton (80) Varka's Hero Shadith (80) -Ketra's Commander Tayr (80) -Varka's Commander Mos (80) -Ember (80) -Uruka (80) -Ketra's Chief Brakki (80) -Varka's Chief Horus (80) -Soul Of Fire Nastron (80) -Soul Of Water Ashutar (80) -Andreas Van Halter (80) -Sailren (80) -Shadow of Halisha (80) -Shadow of Halisha (80) -Shadow of Halisha (80) -Shadow of Halisha (80) -Darnel (81) -Kechi (82) -Giant Marpanak (82) -Gorgolos (82) -Tears (83) -Demon Prince (83) -Ranku (83) -Tully (83) -Gwindorr (83) -Last Titan Utenus (83) -Hekaton Prime (83) -Anais (84) -Queen Shyeed (84) -Water Spirit Lian (84) -Wings of Flame Ixion (84) +Queen Shyeed (80) +Shadow of Halisha (81) +Shadow of Halisha (81) +Shadow of Halisha (81) +Shadow of Halisha (81) +Ketra's Commander Tayr (84) +Varka's Commander Mos (84) +Ember (85) +Wings of Flame Ixion (85) +Uruka (86) +Ketra's Chief Brakki (87) +Varka's Chief Horus (87) +Soul Of Fire Nastron (87) +Soul Of Water Ashutar (87) +Sailren (87) +Anais (87) +Andreas Van Halter (87)
\ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/bosses/DrChaos/DrChaos.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/bosses/DrChaos/DrChaos.java index 2dbddb7d68..53cf0d9b9f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/bosses/DrChaos/DrChaos.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/bosses/DrChaos/DrChaos.java @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.instancemanager.GrandBossManager; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.World; +import org.l2jmobius.gameserver.model.actor.Attackable; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.instance.GrandBoss; @@ -50,6 +51,10 @@ public class DrChaos extends AbstractNpcAI private static final byte NORMAL = 0; // Dr. Chaos is in NPC form. private static final byte CRAZY = 1; // Dr. Chaos entered on golem form. private static final byte DEAD = 2; // Dr. Chaos has been killed and has not yet spawned. + private static final int CHAOS_X = 96320; + private static final int CHAOS_Y = -110912; + private static final int CHAOS_Z = -3328; + private static final int CHAOS_HEAD = 8191; private long _lastAttackVsGolem = 0; private int _pissedOffTimer; @@ -76,7 +81,7 @@ public class DrChaos extends AbstractNpcAI { // The time has already expired while the server was offline. Delete the saved time and // immediately spawn Dr. Chaos. Also the state need to be changed for NORMAL - addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); + addSpawn(DOCTOR_CHAOS, CHAOS_X, CHAOS_Y, CHAOS_Z, CHAOS_HEAD, false, 0, false); GrandBossManager.getInstance().setStatus(CHAOS_GOLEM, NORMAL); } } @@ -109,84 +114,115 @@ public class DrChaos extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, Player player) { - if (event.equalsIgnoreCase("reset_drchaos")) + switch (event) { - GrandBossManager.getInstance().setStatus(CHAOS_GOLEM, NORMAL); - addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); - } - // despawn the live Dr. Chaos after 30 minutes of inactivity - else if (event.equalsIgnoreCase("golem_despawn")) - { - if ((npc.getId() == CHAOS_GOLEM) && ((_lastAttackVsGolem + 1800000) < System.currentTimeMillis())) + case "reset_drchaos": { - final Npc chaos = addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); // spawn Dr. Chaos - GrandBossManager.getInstance().setStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more - cancelQuestTimer("golem_despawn", chaos, null); + GrandBossManager.getInstance().setStatus(CHAOS_GOLEM, NORMAL); + addSpawn(DOCTOR_CHAOS, CHAOS_X, CHAOS_Y, CHAOS_Z, CHAOS_HEAD, false, 0, false); + break; + } + case "golem_despawn": // despawn the live Dr. Chaos after 30 minutes of inactivity + { + if ((npc.getId() == CHAOS_GOLEM) && ((_lastAttackVsGolem + 1800000) < System.currentTimeMillis())) + { + final Npc chaos = addSpawn(DOCTOR_CHAOS, CHAOS_X, CHAOS_Y, CHAOS_Z, CHAOS_HEAD, false, 0, false); // spawn Dr. Chaos + GrandBossManager.getInstance().setStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more + cancelQuestTimer("golem_despawn", chaos, null); + cancelQuestTimers("DISTANCE_CHECK"); + + // Despawn the war golem. + npc.deleteMe(); + } + break; + } + case "1": + { + npc.broadcastPacket(new SocialAction(npc.getObjectId(), 2)); + npc.broadcastPacket(new SpecialCamera(npc, 1, -200, 15, 5500, 1000, 13500, 0, 0, 0, 0, 0)); + break; + } + case "2": + { + npc.broadcastPacket(new SocialAction(npc.getObjectId(), 3)); + break; + } + case "3": + { + npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1)); + break; + } + case "4": + { + npc.broadcastPacket(new SpecialCamera(npc, 1, -150, 10, 3500, 1000, 5000, 0, 0, 0, 0, 0)); + npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(95928, -110671, -3340, 0)); + break; + } + case "5": + { + final GrandBoss golem = (GrandBoss) addSpawn(CHAOS_GOLEM, 96080, -110822, -3343, 0, false, 0, false); + GrandBossManager.getInstance().addBoss(golem); + startQuestTimer("DISTANCE_CHECK", 10000, golem, null, true); + golem.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0)); + golem.broadcastPacket(new SocialAction(npc.getObjectId(), 1)); + golem.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0)); - // Despawn the war golem. + // start monitoring Dr. Chaos's inactivity + _lastAttackVsGolem = System.currentTimeMillis(); + startQuestTimer("golem_despawn", 60000, golem, null, true); + + // Delete Dr. Chaos after spawned the war golem. npc.deleteMe(); + break; } - } - else if (event.equalsIgnoreCase("1")) - { - npc.broadcastPacket(new SocialAction(npc.getObjectId(), 2)); - npc.broadcastPacket(new SpecialCamera(npc, 1, -200, 15, 5500, 1000, 13500, 0, 0, 0, 0, 0)); - } - else if (event.equalsIgnoreCase("2")) - { - npc.broadcastPacket(new SocialAction(npc.getObjectId(), 3)); - } - else if (event.equalsIgnoreCase("3")) - { - npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1)); - } - else if (event.equalsIgnoreCase("4")) - { - npc.broadcastPacket(new SpecialCamera(npc, 1, -150, 10, 3500, 1000, 5000, 0, 0, 0, 0, 0)); - npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(95928, -110671, -3340, 0)); - } - else if (event.equalsIgnoreCase("5")) - { - final GrandBoss golem = (GrandBoss) addSpawn(CHAOS_GOLEM, 96080, -110822, -3343, 0, false, 0, false); - GrandBossManager.getInstance().addBoss(golem); - - golem.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0)); - golem.broadcastPacket(new SocialAction(npc.getObjectId(), 1)); - golem.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0)); - - // start monitoring Dr. Chaos's inactivity - _lastAttackVsGolem = System.currentTimeMillis(); - startQuestTimer("golem_despawn", 60000, golem, null, true); - - // Delete Dr. Chaos after spawned the war golem. - npc.deleteMe(); - } - // Check every sec if someone is in range, if found, launch one task to decrease the timer. - else if (event.equalsIgnoreCase("paranoia_activity") && (GrandBossManager.getInstance().getStatus(CHAOS_GOLEM) == NORMAL)) - { - for (Player obj : World.getInstance().getVisibleObjectsInRange(npc, Player.class, 500)) + case "paranoia_activity": { - if (obj.isDead()) + if (GrandBossManager.getInstance().getStatus(CHAOS_GOLEM) == NORMAL) { - continue; + for (Player obj : World.getInstance().getVisibleObjectsInRange(npc, Player.class, 500)) + { + if (obj.isDead()) + { + continue; + } + + _pissedOffTimer -= 1; + + // Make him speak. + if (_pissedOffTimer == 15) + { + npc.broadcastSay(ChatType.NPC_GENERAL, "How dare you trespass into my territory! Have you no fear?"); + } + + // That was "too much" for that time. + if (_pissedOffTimer <= 0) + { + crazyMidgetBecomesAngry(npc); + } + } } - - _pissedOffTimer -= 1; - - // Make him speak. - if (_pissedOffTimer == 15) + if (npc.calculateDistance2D(CHAOS_X, CHAOS_Y, CHAOS_Z) > 2000) { - npc.broadcastSay(ChatType.NPC_GENERAL, "How dare you trespass into my territory! Have you no fear?"); + ((Attackable) npc).clearAggroList(); + npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(CHAOS_X, CHAOS_Y, CHAOS_Z, 0)); } - - // That was "too much" for that time. - if (_pissedOffTimer <= 0) + break; + } + case "DISTANCE_CHECK": + { + if ((npc == null) || npc.isDead()) { - crazyMidgetBecomesAngry(npc); + cancelQuestTimers("DISTANCE_CHECK"); } + else if (npc.calculateDistance2D(npc.getSpawn()) > 10000) + { + ((Attackable) npc).clearAggroList(); + // npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(CHAOS_X, CHAOS_Y, CHAOS_Z, 0)); + npc.teleToLocation(npc.getSpawn(), false); + } + break; } } - return super.onAdvEvent(event, npc, player); } @@ -225,6 +261,10 @@ public class DrChaos extends AbstractNpcAI // Initialization of the paranoia. startQuestTimer("paranoia_activity", 1000, npc, null, true); + + cancelQuestTimer("DISTANCE_CHECK", npc, null); + startQuestTimer("DISTANCE_CHECK", 10000, npc, null, true); + return null; } @@ -243,6 +283,10 @@ public class DrChaos extends AbstractNpcAI final StatSet info = GrandBossManager.getInstance().getStatSet(CHAOS_GOLEM); info.set("respawn_time", System.currentTimeMillis() + respawnTime); GrandBossManager.getInstance().setStatSet(CHAOS_GOLEM, info); + + // Stop distance check task. + cancelQuestTimers("DISTANCE_CHECK"); + return null; } diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieHelper/NewbieHelper.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieHelper/NewbieHelper.java new file mode 100644 index 0000000000..ec70ae0c53 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieHelper/NewbieHelper.java @@ -0,0 +1,78 @@ +/* + * 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.others.NewbieHelper; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; + +import ai.AbstractNpcAI; +import quests.Q00255_Tutorial.Q00255_Tutorial; + +/** + * @author Mobius + */ +public class NewbieHelper extends AbstractNpcAI +{ + private static final int SOULSHOT_NOVICE = 5789; + private static final int SPIRITSHOT_NOVICE = 5790; + private static final int TOKEN = 8542; + private static final int SCROLL = 8594; + private static final int SCROLL_REWARD_CHANCE = 100; // 0 to disable. + + public NewbieHelper() + { + addStartNpc(30598, 30599, 30600, 30601, 30602); + addTalkId(30598, 30599, 30600, 30601, 30602); + addFirstTalkId(30598, 30599, 30600, 30601, 30602); + } + + @Override + public String onFirstTalk(Npc npc, Player player) + { + if (!Config.DISABLE_TUTORIAL) + { + final QuestState qs1 = getQuestState(player, true); + if (!qs1.isCompleted() && (player.getLevel() < 18)) + { + final QuestState qs2 = player.getQuestState(Q00255_Tutorial.class.getSimpleName()); + if (((qs2 != null) && (qs2.getInt("Ex") == 4))) + { + final boolean isMage = player.isMageClass(); + final boolean isOrcMage = player.getClassId().getId() == 49; + qs1.playTutorialVoice(isMage && !isOrcMage ? "tutorial_voice_027" : "tutorial_voice_026"); + giveItems(player, isMage && !isOrcMage ? SPIRITSHOT_NOVICE : SOULSHOT_NOVICE, isMage && !isOrcMage ? 100 : 200); + giveItems(player, TOKEN, 12); + if (getRandom(100) < SCROLL_REWARD_CHANCE) // Old C6 had this at 50%. + { + giveItems(player, SCROLL, 2); + } + qs1.setState(State.COMPLETED); + } + } + } + npc.showChatWindow(player); + return null; + } + + public static void main(String[] args) + { + new NewbieHelper(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30598.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30598.htm index 58ebb1080f..72baedb189 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30598.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30598.htm @@ -3,5 +3,4 @@ Dwarven Village - 1 Newbie Travel Token
Elven Village - 1 Newbie Travel Token
Orc Village - 1 Newbie Travel Token
-Kamael Village - 1 Newbie Travel Token \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30599.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30599.htm index a88c1e9ab3..7e032d50d5 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30599.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30599.htm @@ -3,5 +3,4 @@ Dwarven Village - 1 Newbie Travel Token
Talking Island - 1 Newbie Travel Token
Orc Village - 1 Newbie Travel Token
-Kamael Village - 1 Newbie Travel Token \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30600.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30600.htm index a7577f73e7..a5afa45351 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30600.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30600.htm @@ -3,5 +3,4 @@ Talking Island - 1 Newbie Travel Token
Elven Village - 1 Newbie Travel Token
Orc Village - 1 Newbie Travel Token
-Kamael Village - 1 Newbie Travel Token \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30601.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30601.htm index a659d85aac..aae1c19d3f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30601.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30601.htm @@ -3,5 +3,4 @@ Talking Island - 1 Newbie Travel Token
Elven Village - 1 Newbie Travel Token
Orc Village - 1 Newbie Travel Token
-Kamael Village - 1 Newbie Travel Token \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30602.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30602.htm index 8518890ff8..86837edfdd 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30602.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NewbieTravelToken/30602.htm @@ -3,5 +3,4 @@ Dwarven Village - 1 Newbie Travel Token
Talking Island - 1 Newbie Travel Token
Elven Village - 1 Newbie Travel Token
-Kamael Village - 1 Newbie Travel Token \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NpcBuffers/impl/CabaleBuffer.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NpcBuffers/impl/CabaleBuffer.java index a87d477061..3df4e5bd81 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NpcBuffers/impl/CabaleBuffer.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/ai/others/NpcBuffers/impl/CabaleBuffer.java @@ -240,7 +240,7 @@ public class CabaleBuffer extends AbstractNpcAI */ private boolean handleCast(Player player, int skillId) { - if (player.isDead() || !player.isSpawned() || !_npc.isInsideRadius2D(player, DISTANCE_TO_WATCH_OBJECT)) + if (player.isDead() || !player.isSpawned() || !_npc.isInsideRadius3D(player, DISTANCE_TO_WATCH_OBJECT)) { return false; } diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index aa42ef6a9d..24a2dfdd05 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_CT_0_Interlude/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; @@ -259,6 +260,8 @@ public class TvT extends Event world.setInstance(InstanceManager.getInstance().createDynamicInstance(INSTANCE_ID)); InstanceManager.getInstance().addWorld(world); PVP_WORLD = world; + // 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_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 28391d6a41..ecb82b0bcc 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -170,14 +170,14 @@ public class DropSearchBoard implements IParseBoardHandler final int itemId = Integer.parseInt(params[1]); int page = Integer.parseInt(params[2]); final List list = DROP_INDEX_CACHE.get(itemId); - int pages = list.size() / 14; + int pages = list.size() / 4; if (pages == 0) { pages++; } - final int start = (page - 1) * 14; - final int end = Math.min(list.size() - 1, start + 14); + final int start = (page - 1) * 4; + final int end = Math.min(list.size() - 1, start + 4); final StringBuilder builder = new StringBuilder(); for (int index = start; index <= end; index++) { @@ -347,7 +347,7 @@ public class DropSearchBoard implements IParseBoardHandler limit++; } - if (limit == 14) + if (limit == 6) { break; } @@ -396,9 +396,9 @@ public class DropSearchBoard implements IParseBoardHandler builder.append(""); } - if (line < 7) + if (line < 6) { - for (i = 0; i < (7 - line); i++) + for (i = 0; i < (6 - line); i++) { builder.append(""); } diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index f6317f35d2..7264ecc085 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -33,7 +33,6 @@ import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.data.sql.ClanTable; -import org.l2jmobius.gameserver.data.xml.BuyListData; import org.l2jmobius.gameserver.data.xml.ExperienceData; import org.l2jmobius.gameserver.data.xml.MultisellData; import org.l2jmobius.gameserver.data.xml.SkillData; @@ -46,9 +45,8 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.Summon; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.zone.ZoneId; -import org.l2jmobius.gameserver.network.serverpackets.BuyList; -import org.l2jmobius.gameserver.network.serverpackets.ItemList; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; +import org.l2jmobius.gameserver.network.serverpackets.SellList; import org.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -165,9 +163,7 @@ public class HomeBoard implements IParseBoardHandler { final String page = command.replace("_bbssell;", ""); returnHtml = HtmCache.getInstance().getHtm(player, "data/html/CommunityBoard/Custom/" + page + ".html"); - // final BuyListHolder buyList = BuyListData.getInstance().getBuyList(423); - player.sendPacket(new BuyList(BuyListData.getInstance().getBuyList(423), player.getAdena(), 0)); - player.sendPacket(new ItemList(player, true)); + player.sendPacket(new SellList(player)); } else if (command.startsWith("_bbsteleport")) { diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/06.html b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/06.html index 42f701f842..ca74c3da97 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/06.html +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/06.html @@ -5,7 +5,6 @@ Which region's monster would you like you see?
Near the Dark Elf Village.
Near the Orc Village.
Near the Dwarven Village.
-Near Kamael Village.
Gludio Territory.
Dion Territory.
Giran Territory.
diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/13a.html b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/13a.html deleted file mode 100644 index 34e26dccb2..0000000000 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/13a.html +++ /dev/null @@ -1,4 +0,0 @@ -Fishing Guild Member:
-Near Kamael Village, if you hunt the Dominant Grey Keltir, the Dominant Black Wolf, Green Goblin, Mountain Fungus, Mountain Werewolf, Chief of the Mountain Werewolf, Colossus, Crimson Spider, Grotto Golem, Grotto Puma or Grotto Grizzly, you can obtain a sweet liquid much favored by the Spirit of Water.
-Back. - \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00604_DaimonTheWhiteEyedPart2/Q00604_DaimonTheWhiteEyedPart2.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00604_DaimonTheWhiteEyedPart2/Q00604_DaimonTheWhiteEyedPart2.java index ccfcb2282d..e5407abd3f 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00604_DaimonTheWhiteEyedPart2/Q00604_DaimonTheWhiteEyedPart2.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00604_DaimonTheWhiteEyedPart2/Q00604_DaimonTheWhiteEyedPart2.java @@ -17,10 +17,10 @@ package quests.Q00604_DaimonTheWhiteEyedPart2; import org.l2jmobius.Config; -import org.l2jmobius.gameserver.data.SpawnTable; import org.l2jmobius.gameserver.enums.ChatType; import org.l2jmobius.gameserver.enums.QuestSound; 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.quest.Quest; @@ -265,6 +265,6 @@ public class Q00604_DaimonTheWhiteEyedPart2 extends Quest private static boolean isDaimonSpawned() { - return SpawnTable.getInstance().getAnySpawn(DAIMON_THE_WHITE_EYED) != null; + return World.getInstance().getVisibleObjects().stream().anyMatch(object -> object.getId() == DAIMON_THE_WHITE_EYED); } } diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java index 96dbacaa97..f68f98dee6 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00625_TheFinestIngredientsPart2/Q00625_TheFinestIngredientsPart2.java @@ -17,9 +17,9 @@ package quests.Q00625_TheFinestIngredientsPart2; import org.l2jmobius.Config; -import org.l2jmobius.gameserver.data.SpawnTable; 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; @@ -121,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 @@ -137,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 @@ -155,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": @@ -182,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 { @@ -222,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 @@ -265,17 +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(Config.ALT_PARTY_RANGE, npc, killer, true) && (npc.getSummoner() == killer)) + 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(qs.getPlayer(), SPECIAL_YETI_MEAT); + giveItems(player, SPECIAL_YETI_MEAT); } - return super.onKill(npc, killer, isSummon); } private static boolean isBumbalumpSpawned() { - return SpawnTable.getInstance().getAnySpawn(ICICLE_EMPEROR_BUMBALUMP) != null; + return World.getInstance().getVisibleObjects().stream().anyMatch(object -> object.getId() == ICICLE_EMPEROR_BUMBALUMP); } } \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java index cb2825c12a..750958df2b 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java @@ -218,7 +218,7 @@ public class Q00638_SeekersOfTheHolyGrail extends Quest final DropInfo info = MOBS_DROP_CHANCES.get(npc.getId()); if (giveItemRandomly(qs.getPlayer(), npc, info.getId(), 1, 0, info.getChance(), true) && (info.getKeyId() > 0) && (getRandom(100) < info.getKeyChance())) { - npc.dropItem(qs.getPlayer(), info.getKeyId(), info.getKeyCount()); + giveItems(qs.getPlayer(), info.getKeyId(), info.getKeyCount()); } } return super.onKill(npc, killer, isSummon); diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-01.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-01.htm new file mode 100644 index 0000000000..7ed476480e --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-01.htm @@ -0,0 +1,4 @@ +Priest Dominic:
+Do you know of a place called the Monastery of Silence? It may call itself a monastery, but it is more like a social club; few are admitted, and they are inclined to attack anyone they suspect of intruding upon that which they protect, that which Saint Solina left behind.
+"What did Saint Solina leave behind?" + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-01.html b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-01.html deleted file mode 100644 index 71a938aab4..0000000000 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-01.html +++ /dev/null @@ -1,3 +0,0 @@ -Priest Dominic:
-Ahhh... that mission has been.. satisfied. It's time for a new mission. - \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-02.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-02.htm new file mode 100644 index 0000000000..687c6d435c --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-02.htm @@ -0,0 +1,5 @@ +Priest Dominic:
+Have you heard tell of a place called the Monastery of Silence? Well, they are suspicious of strangers and quick to attack intruders. Why? Well, there's a reason...
+But hold. I think it would be better to tell you this later on, when you have grown stronger and more skillful.
+(This quest may only be undertaken by a character of level 73 and above.) + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-03.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-03.htm new file mode 100644 index 0000000000..f50fd02b9c --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-03.htm @@ -0,0 +1,4 @@ +Priest Dominic:
+Well, that's not really important for you to know, is it? I'm sorry, but that's a secret I'm sworn to keep. Suffice it to say that it is something my order needs enough to hire you to get it. Sadly, the monastery is just as intent on keeping it, and their resistance was stronger than we expected. We failed to get it, and so I am here asking you to succeed where we have failed. You will have to defeat them totally; nothing less will allow my order to retrieve what we need from them.
+Tell him you will do it. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-04.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-04.htm new file mode 100644 index 0000000000..0db4685aec --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-04.htm @@ -0,0 +1,4 @@ +Priest Dominic:
+Very good! Then go to the Monastery of Silence and defeat its monks. I will give you a reward if you bring me the Scripture of Monk as proof that you eliminated them.
+Oh, yes...one more thing. We have a man on the inside, an agent named Gremory who infiltrated the Monastery of Silence. He has done brave work, and if you can help him to escape, that would be best. He can be of great assistance to you. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-05.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-05.htm new file mode 100644 index 0000000000..fc89e6dd6e --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-05.htm @@ -0,0 +1,5 @@ +Priest Dominic:
+Fine work. Haha! Thank you for eliminating those pesky monks. So, would you like to collect your just reward?
+Don't collect the reward now.
+Get the reward in exchange for the Scripture of Monk you brought. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-06.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-06.htm new file mode 100644 index 0000000000..d6dc4a96ed --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-06.htm @@ -0,0 +1,6 @@ +Priest Dominic:
+Here's the quest: Go to the Monastery of Silence and vanquish the monks. I will give you a reward if you bring me the Scripture of Monk as proof that you have defeated them. I hope, of course, that they surrender to you, but if they do not, you may kill them in good conscience; we will pray for their souls.
+Oh, here's something that may help you: we have a man on the inside. Our brave Gremory has managed to infiltrate the monastery, a task many had thought impossible. Please help him to escape if possible; the poor man has done more than enough, and he may be of help to you.
+Continue the job.
+Quit the job. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-07.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-07.htm new file mode 100644 index 0000000000..b3ede3fb84 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-07.htm @@ -0,0 +1,3 @@ +Priest Dominic:
+Fine, then. Keep up the good work... until we retake from those pestilent monks what is ours by right! + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-08.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-08.htm new file mode 100644 index 0000000000..4f42201b6e --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-08.htm @@ -0,0 +1,3 @@ +Priest Dominic:
+Here, then, is your payment. You have done excellent work. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-09.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-09.htm new file mode 100644 index 0000000000..e0d96eef4e --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/31350-09.htm @@ -0,0 +1,4 @@ +Priest Dominic:
+Oh, very well. I can't make you do it. But do be careful, now; I wouldn't want to see you side with those pestilential monks. Who knows what might happen to you if you did? You might just...die, of remorse and shame. Heh.
+If you change your mind, you know where to find me. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-01.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-01.htm new file mode 100644 index 0000000000..af880da083 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-01.htm @@ -0,0 +1,5 @@ +Priest Gremory:
+Curses! I've been unmasked! How did you find me, damn you? My disguise was perfect. Well, question me all you like; my lips are sealed.
+What? Dominic sent you? Oh, thank the gods. For a moment I feared the worst!
+"Why are you here?" + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-02.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-02.htm new file mode 100644 index 0000000000..47b4053a27 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-02.htm @@ -0,0 +1,6 @@ +Priest Gremory:
+I infiltrated this order to find the Grail of Splendor they keep hidden here in the Monastery of Silence. Now that's a mission for a man! I wouldn't blame you for envying me.
+Wait - if you were sent by Dominic, then you report to me now! Hahaha! Yes, I've been expecting this. I have served here so long, so very long... the pressures, you wouldn't understand them. You couldn't. And now he finally recognizes my service and my abilities!
+Very well, servant. Your first task will be to massage my shoulders. I'm weary from hiding in this narrow space for so long...
+"I'm not your underling. I'm here to help you fulfill your mission." + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-03.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-03.htm new file mode 100644 index 0000000000..9ac271762f --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-03.htm @@ -0,0 +1,6 @@ +Priest Gremory:
+What? Damn it all! I have needed an underling for so long...
+Well, never mind that now. Let's talk business. In my searches within the monastery, I have found a broken bridge. Across the bridge, there is a chamber called the Room of Splendor.
+I don't know what that name means, but... they say the Holy Grail lies within. That's the place to go.
+"A broken bridge? How do I cross it?" + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-04.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-04.htm new file mode 100644 index 0000000000..21a8304ae9 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-04.htm @@ -0,0 +1,5 @@ +Priest Gremory:
+The broken bridge? It is simply an optical illusion. Just step out onto it and you'll find the bridge is intact and whole. I have a fear of heights, so I cannot manage the crossing myself. It has been my one and only failure as an agent.
+Get me that Grail, and I will trade you some unique items which form a part of the Scripture of Monk that you are collecting. Do we have a deal?
+"OK, what do I have to do?" + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-05.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-05.htm new file mode 100644 index 0000000000..2735d5e64d --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-05.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Then we understand each other. Go to the Room of Splendor and pour water into the Holy Grail. Then pour that water back into a jar and bring it to me. Thus can we verify the genuineness of the Holy Grail. Be careful, though; the Grail may be guarded.
+One more thing: the Room of Splendor is locked. You will need a key to enter there. Some monks have such keys to perform their duties, so I suggest that you overcome one of them and take his key. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-06.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-06.htm new file mode 100644 index 0000000000..0151c3200a --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-06.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Go to the Room of Splendor and pour a measure of water into the Holy Grail. Then pour the water back into a jar and bring it to me. We can test the water to determine if the Grail is the real thing or not. Be careful when you do this; the room may be guarded.
+Oh, another thing. The Room of Splendor is locked, and you'll need a key to enter it. Some of the monks carry a key to that room; I suggest that you overcome of one of them and take his key. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-08.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-08.htm new file mode 100644 index 0000000000..e9cbc0efe5 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-08.htm @@ -0,0 +1,6 @@ +Priest Gremory:
+Nice! You got away clean, did you? Well, let's test the water.
+Alas! The water fails the test. They must keep the real Grail somewhere else!
+Well, thank you, I suppose. It was worth knowing about the false lead. Now leave me; I must return to my task of finding the real Grail. Go quickly, before they discover us!
+"That wasn't the deal. You promised us a part of the Scripture of Monk in exchange for what we found." + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-09.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-09.htm new file mode 100644 index 0000000000..98541c6660 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-09.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Ah, that's true, that's true. Such forgetfulness is rare in a spy of my caliber, I assure you! Well, I am a man of my word, so here you go. I assume that takes care of our deal, yes?
+What's more, I'll make another deal with you: If you bring me 4000 or 400 Monk Scriptures, I will exchange them for an S-grade Enchant Weapon Scroll or an S-grade Enchant Armor Scroll, respectively. Come back after you slay those bothersome monks. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-10.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-10.htm new file mode 100644 index 0000000000..79bf83507f --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-10.htm @@ -0,0 +1,6 @@ +Priest Gremory:
+The Grail, the Grail...o, where is the blasted thing? A spy of my stature should surely have found it by now! Does it even exist?
+...Huh? Ah, it's you again! Did you bring me any Monk Scriptures?
+Exchange 4000 Monk Scriptures for an S-grade Enchant Weapon Scroll.
+Exchange 400 Monk Scriptures for an S-grade Enchant Armor Scroll. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-11.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-11.htm new file mode 100644 index 0000000000..17025419a2 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-11.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Here you go: one S-grade Enchant Weapon Scroll. Do you like it? You'd better appreciate it; it's a gift from me, after all! Hahaha!
+And here are my Scriptures. Once I show Dominic all of the Scriptures, he'll finally appreciate my abilities properly. Of course, he'll think I collected them myself... but in a sense I did, didn't I? + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-12.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-12.htm new file mode 100644 index 0000000000..ad4132fe85 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-12.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Huh? You need more of the Monk Scriptures to meet my terms! What is this, some sort of con game? You'll never fool me that easily.
+Kill the monks, as many as you need to, and bring me more scriptures. Understood? + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-13.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-13.htm new file mode 100644 index 0000000000..494dc40b70 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-13.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Here is the S-grade Enchant Armor Scroll I promised you, then. Do you like it? You'd better appreciate it, fellow; it's a gift from Gremory the spy! Hahaha!
+And here are my Scriptures. Once I show Dominic my collection of Scriptures, he'll properly appreciate my abilities. He'll think I collected them myself... but in a sense I did, didn't I? + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-14.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-14.htm new file mode 100644 index 0000000000..37a1fc0d08 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32008-14.htm @@ -0,0 +1,4 @@ +Priest Gremory:
+Oh, nonsense. You know very well that these aren't enough Scriptures. What is this, some sort of inept con game? You'll need more than that to trick me, my friend. You're dealing with Gremory, understand?
+Go kill the monks and bring me more Scriptures. Understood? + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-01.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-01.htm new file mode 100644 index 0000000000..4518bc6b4e --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-01.htm @@ -0,0 +1,4 @@ +The Grail of Splendor:
+Gremory's instructions were to pour some water into the Grail, then pour that water into a bottle and bring it to him.
+Pour the water. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-02.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-02.htm new file mode 100644 index 0000000000..fe75441ea6 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-02.htm @@ -0,0 +1,3 @@ +The Grail of Splendor:
+I pour the water into the Grail. I see no change... Now, I'll pour the water into this bottle and return to Gremory. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-03.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-03.htm new file mode 100644 index 0000000000..604430f402 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/32028-03.htm @@ -0,0 +1,3 @@ +The Grail of Splendor:
+I have completed what Gremory asked of me, so now I will go to see him. + \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/Q00639_GuardiansOfTheHolyGrail.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/Q00639_GuardiansOfTheHolyGrail.java index 3c598bdd09..7701742de6 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/Q00639_GuardiansOfTheHolyGrail.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00639_GuardiansOfTheHolyGrail/Q00639_GuardiansOfTheHolyGrail.java @@ -16,33 +16,230 @@ */ package quests.Q00639_GuardiansOfTheHolyGrail; +import java.util.HashMap; +import java.util.Map; + +import org.l2jmobius.commons.util.Rnd; +import org.l2jmobius.gameserver.enums.QuestSound; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; -/** - * Guardians of the Holy Grail (639)
- * NOTE: This quest is no longer available since Freya(CT2.5) - * @author corbin12 - */ public class Q00639_GuardiansOfTheHolyGrail extends Quest { - // NPC + // NPCs private static final int DOMINIC = 31350; + private static final int GREMORY = 32008; + private static final int HOLY_GRAIL = 32028; + // Items + private static final int SCRIPTURE = 8069; + private static final int WATER_BOTTLE = 8070; + private static final int HOLY_WATER_BOTTLE = 8071; + private static final Map CHANCES = new HashMap<>(); + static + { + CHANCES.put(22122, 760000); + CHANCES.put(22123, 750000); + CHANCES.put(22124, 590000); + CHANCES.put(22125, 580000); + CHANCES.put(22126, 590000); + CHANCES.put(22127, 580000); + CHANCES.put(22128, 170000); + CHANCES.put(22129, 590000); + CHANCES.put(22130, 850000); + CHANCES.put(22131, 920000); + CHANCES.put(22132, 580000); + CHANCES.put(22133, 930000); + CHANCES.put(22134, 230000); + CHANCES.put(22135, 580000); + } public Q00639_GuardiansOfTheHolyGrail() { super(639); + registerQuestItems(SCRIPTURE, WATER_BOTTLE, HOLY_WATER_BOTTLE); addStartNpc(DOMINIC); - addTalkId(DOMINIC); + addTalkId(DOMINIC, GREMORY, HOLY_GRAIL); + addKillId(CHANCES.keySet()); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + final QuestState qs = getQuestState(player, false); + String htmltext = null; + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "31350-03.htm": + case "31350-07.htm": + case "32008-02.htm": + case "32008-03.htm": + case "32008-04.htm": + { + htmltext = event; + break; + } + case "31350-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "31350-08.htm": + { + final int count = getQuestItemsCount(player, SCRIPTURE); + takeItems(player, SCRIPTURE, -1); + rewardItems(player, 57, (1625 * count) + ((count >= 10) ? 33940 : 0)); + htmltext = event; + break; + } + case "31350-09.htm": + { + qs.exitQuest(true, true); + htmltext = event; + break; + } + case "32008-05.htm": + { + qs.setCond(2, true); + giveItems(player, WATER_BOTTLE, 1); + htmltext = event; + break; + } + case "32008-09.htm": + { + qs.setCond(4, true); + takeItems(player, HOLY_WATER_BOTTLE, 1); + htmltext = event; + break; + } + case "32008-12.htm": + { + if (getQuestItemsCount(player, SCRIPTURE) >= 4000) + { + takeItems(player, SCRIPTURE, 4000); + rewardItems(player, 959, 1); + htmltext = "32008-11.htm"; + } + else + { + htmltext = event; + } + break; + } + case "32008-14.htm": + { + if (getQuestItemsCount(player, SCRIPTURE) >= 400) + { + takeItems(player, SCRIPTURE, 400); + rewardItems(player, 960, 1); + htmltext = "32008-13.htm"; + } + else + { + htmltext = event; + } + break; + } + case "32028-02.htm": + { + qs.setCond(3, true); + takeItems(player, WATER_BOTTLE, 1); + giveItems(player, HOLY_WATER_BOTTLE, 1); + htmltext = event; + break; + } + } + + return htmltext; } @Override public String onTalk(Npc npc, Player player) { final QuestState qs = getQuestState(player, true); - qs.exitQuest(true); - return "31350-01.html"; + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = player.getLevel() < 73 ? "31350-02.htm" : "31350-01.htm"; + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case DOMINIC: + { + htmltext = hasQuestItems(player, SCRIPTURE) ? "31350-05.htm" : "31350-06.htm"; + break; + } + case GREMORY: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "32008-01.htm"; + break; + } + case 2: + { + htmltext = "32008-06.htm"; + break; + } + case 3: + { + htmltext = "32008-08.htm"; + break; + } + case 4: + { + htmltext = "32008-10.htm"; + break; + } + } + break; + } + case HOLY_GRAIL: + { + if (qs.isCond(2)) + { + htmltext = "32028-01.htm"; + } + else if (qs.getCond() > 2) + { + htmltext = "32028-03.htm"; + } + break; + } + } + break; + } + } + + return htmltext; } -} \ No newline at end of file + + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + final QuestState qs = getRandomPartyMemberState(killer, 4, 3, npc); + if ((qs != null) && (Rnd.get(1000000) < CHANCES.get(npc.getId()))) + { + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + giveItems(qs.getPlayer(), SCRIPTURE, 1); + } + + return super.onKill(npc, killer, isSummon); + } +} diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00655_AGrandPlanForTamingWildBeasts/Q00655_AGrandPlanForTamingWildBeasts.java b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00655_AGrandPlanForTamingWildBeasts/Q00655_AGrandPlanForTamingWildBeasts.java index 2ba8380f79..7036dd86cb 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00655_AGrandPlanForTamingWildBeasts/Q00655_AGrandPlanForTamingWildBeasts.java +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/quests/Q00655_AGrandPlanForTamingWildBeasts/Q00655_AGrandPlanForTamingWildBeasts.java @@ -17,6 +17,7 @@ package quests.Q00655_AGrandPlanForTamingWildBeasts; import java.text.SimpleDateFormat; +import java.util.Calendar; import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.enums.QuestSound; @@ -181,7 +182,15 @@ public class Q00655_AGrandPlanForTamingWildBeasts extends Quest private static String getSiegeDate() { final SiegableHall hall = CHSiegeManager.getInstance().getSiegableHall(ClanHallSiegeEngine.BEAST_FARM); - return hall != null ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(hall.getSiegeDate()) : "Error in date."; + if (hall != null) + { + final Calendar calendar = hall.getSiegeDate(); + if (calendar != null) + { + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime()); + } + } + return "Unknown date."; } /** diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/village_master/ClanMaster/9000-03.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/village_master/ClanMaster/9000-03.htm index 62cf1b1ba3..d84b710ab9 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/village_master/ClanMaster/9000-03.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/village_master/ClanMaster/9000-03.htm @@ -8,14 +8,9 @@ Level 5 - SP: 2,500,000 / Item: Seal of Aspiration
Level 6 - Clan Fame: 5,000 / Clan Member: More than 30
Level 7 - Clan Fame: 10,000 / Clan Member: More than 50
Level 8 - Clan Fame: 20,000 / Clan Member: More than 80
-Level 9 - Clan Fame: 40,000 / Clan Member: More than 120 / Item: 150 Blood Oaths
-Level 10 - Clan Fame: 40,000 / Clan Member: More than 140 / Item: 5 Blood Alliance
-Level 11 - Clan Fame: 75,000 / Clan Member: More than 170 / Must be Territory Owner
You can obtain a Blood Mark by killing a Bloody Queen. They are located in Watcher's Tomb or around the Forbidden Gateway.
To obtain an Alliance Manifesto, meet sir Christopher Rodemai of Giran Castle Town.
To obtain a Seal of Aspiration, see Sir Gustav Athebaldt in the Town of Oren.
-To obtain Blood Oath, acquire a fortress and prove that the territories are being protected.
-To obtain the Determination of Blood, possess a castle and prove that the territories are being protected and citizens are being taken care of.
How to obtain Clan Fame
+ diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3001203.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3001203.xml index 86a1fc5289..403f9f7d99 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3001203.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3001203.xml @@ -3,22 +3,6 @@ 30012 - - - - - - - - - - - - - - - - @@ -127,4 +111,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3093608.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3093608.xml new file mode 100644 index 0000000000..41cae4bcf6 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3093608.xml @@ -0,0 +1,11 @@ + + + + 30936 + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3247801.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3247801.xml index 62bafdb996..62b532fa52 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3247801.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/multisell/3247801.xml @@ -5,25 +5,25 @@ - + - + - + - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 5b501b1f1b..bcc74a8afe 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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; @@ -254,6 +255,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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java index ddc0af33f9..c833679bbb 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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); @@ -190,6 +192,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); @@ -230,7 +233,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 951002a2c2..35bfbcb6bc 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index cd446ab812..2775ff29a4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetAttack.java index 43be5cfc4a..b7f22c792b 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetHold.java index b018436dfe..9108d23a43 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetMove.java index c97c69a261..0ced5aadcf 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index 29d38cbd67..3d23492682 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetStop.java index 495daf88a0..2e0cfd90fe 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 3ce6e28c2a..b681353b73 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index bc32c24750..83b8f824d5 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index 285d766a50..6dc9476247 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index d9277b758e..80f59f231c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index acd342bad9..60fa7d6066 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index a42bae7d82..d5288cd129 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index 390822a7b1..eaace592ee 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index 30fc6eb54c..c5d2782f22 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/dist/game/data/skillTrees/StartingClass/KamaelSoldier.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/skillTrees/StartingClass/KamaelSoldier.xml index 94a55fc0e9..7dd615d85f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/skillTrees/StartingClass/KamaelSoldier.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/skillTrees/StartingClass/KamaelSoldier.xml @@ -7,19 +7,15 @@ - - - - diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/experience.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/experience.xml index 3750b37746..364a9fc3f2 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/experience.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/experience.xml @@ -85,8 +85,8 @@ - - + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49000-49099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49000-49099.xml index 91cda9cf4f..5087a9807c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49000-49099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49000-49099.xml @@ -1218,7 +1218,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49400-49499.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49400-49499.xml index 907398db8b..0d646d9dbe 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49400-49499.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49400-49499.xml @@ -1445,13 +1445,23 @@ - + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49500-49599.xml index 62c4e8b259..d0eee5e7c0 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49500-49599.xml @@ -8,6 +8,13 @@ + + + + + + + @@ -401,6 +408,8 @@ + + @@ -408,6 +417,12 @@ + + + + + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49800-49899.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49800-49899.xml index 948b57109f..2824be5513 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49800-49899.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/49800-49899.xml @@ -669,7 +669,7 @@ - + @@ -678,6 +678,10 @@ + + + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91100-91199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91100-91199.xml index 82477cf655..338eeedc94 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91100-91199.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91100-91199.xml @@ -150,7 +150,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -166,7 +166,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91200-91299.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91200-91299.xml index 8b89d37d82..b1d5df86dc 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91200-91299.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91200-91299.xml @@ -939,7 +939,7 @@ - + @@ -947,7 +947,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91800-91899.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91800-91899.xml index 5886e36862..d97ce55632 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91800-91899.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/91800-91899.xml @@ -873,7 +873,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18100-18199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18100-18199.xml index 382309e159..20a6f078db 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18100-18199.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18100-18199.xml @@ -417,7 +417,7 @@ - + @@ -444,7 +444,7 @@ - + @@ -472,7 +472,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -530,7 +530,7 @@ - + @@ -556,7 +556,7 @@ - + @@ -582,7 +582,7 @@ - + @@ -608,7 +608,7 @@ - + @@ -633,7 +633,7 @@ - + @@ -1328,7 +1328,7 @@ - + @@ -1353,7 +1353,7 @@ - + @@ -1556,7 +1556,7 @@ - + @@ -1583,7 +1583,7 @@ - + @@ -1610,7 +1610,7 @@ - + @@ -1637,7 +1637,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18200-18299.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18200-18299.xml index 96d0ef735d..08d34f1a21 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18200-18299.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/18200-18299.xml @@ -6,7 +6,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -249,7 +249,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -303,7 +303,7 @@ - + @@ -606,7 +606,7 @@ - + @@ -631,7 +631,7 @@ - + @@ -656,7 +656,7 @@ - + @@ -681,7 +681,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20000-20099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20000-20099.xml index b15cf884ff..131ca35b9e 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20000-20099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20000-20099.xml @@ -6,7 +6,7 @@ - + @@ -83,7 +83,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -3546,7 +3546,7 @@ - + @@ -3730,7 +3730,7 @@ - + @@ -4321,7 +4321,7 @@ - + @@ -5374,7 +5374,7 @@ - + @@ -5430,7 +5430,7 @@ - + @@ -5530,7 +5530,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20100-20199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20100-20199.xml index 1b601bffcf..6ede6d8868 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20100-20199.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20100-20199.xml @@ -1132,7 +1132,7 @@ - + @@ -1176,7 +1176,7 @@ - + @@ -1226,7 +1226,7 @@ - + @@ -1278,7 +1278,7 @@ - + @@ -1433,7 +1433,7 @@ - + @@ -1623,7 +1623,7 @@ - + @@ -2102,7 +2102,7 @@ - + @@ -4313,7 +4313,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20200-20299.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20200-20299.xml index 770fe9d84b..e02b24c98a 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20200-20299.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20200-20299.xml @@ -2305,7 +2305,7 @@ - + @@ -2366,7 +2366,7 @@ - + @@ -2428,7 +2428,7 @@ - + @@ -2481,7 +2481,7 @@ - + @@ -2552,7 +2552,7 @@ - + @@ -2619,7 +2619,7 @@ - + @@ -2668,7 +2668,7 @@ - + @@ -2724,7 +2724,7 @@ - + @@ -2780,7 +2780,7 @@ - + @@ -2840,7 +2840,7 @@ - + @@ -2902,7 +2902,7 @@ - + @@ -3886,7 +3886,7 @@ - + @@ -3953,7 +3953,7 @@ - + @@ -4021,7 +4021,7 @@ - + @@ -4087,7 +4087,7 @@ - + @@ -4158,7 +4158,7 @@ - + @@ -4222,7 +4222,7 @@ - + @@ -4282,7 +4282,7 @@ - + @@ -4339,7 +4339,7 @@ - + @@ -4390,7 +4390,7 @@ - + @@ -4455,7 +4455,7 @@ - + @@ -4523,7 +4523,7 @@ - + @@ -4652,7 +4652,7 @@ - + @@ -4711,7 +4711,7 @@ - + @@ -4765,7 +4765,7 @@ - + @@ -4820,7 +4820,7 @@ - + @@ -4871,7 +4871,7 @@ - + @@ -4930,7 +4930,7 @@ - + @@ -4988,7 +4988,7 @@ - + @@ -5034,7 +5034,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20300-20399.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20300-20399.xml index ef32527085..275df8e981 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20300-20399.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20300-20399.xml @@ -512,7 +512,7 @@ - + @@ -569,7 +569,7 @@ - + @@ -625,7 +625,7 @@ - + @@ -808,7 +808,7 @@ - + @@ -897,7 +897,7 @@ - + @@ -1002,7 +1002,7 @@ - + @@ -1056,7 +1056,7 @@ - + @@ -1158,7 +1158,7 @@ - + @@ -1214,7 +1214,7 @@ - + @@ -1266,7 +1266,7 @@ - + @@ -1316,7 +1316,7 @@ - + @@ -1526,7 +1526,7 @@ - + @@ -1732,7 +1732,7 @@ - + @@ -2056,7 +2056,7 @@ - + @@ -2999,7 +2999,7 @@ - + @@ -3220,7 +3220,7 @@ - + @@ -3565,7 +3565,7 @@ - + @@ -3821,7 +3821,7 @@ - + @@ -3878,7 +3878,7 @@ - + @@ -4098,7 +4098,7 @@ - + @@ -4262,7 +4262,7 @@ - + @@ -4312,7 +4312,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20400-20499.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20400-20499.xml index 0dddd981a4..57a9b6fa36 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20400-20499.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20400-20499.xml @@ -336,7 +336,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -434,7 +434,7 @@ - + @@ -1265,7 +1265,7 @@ - + @@ -1329,7 +1329,7 @@ - + @@ -1558,7 +1558,7 @@ - + @@ -1842,7 +1842,7 @@ - + @@ -1904,7 +1904,7 @@ - + @@ -2040,7 +2040,7 @@ - + @@ -2207,7 +2207,7 @@ - + @@ -2259,7 +2259,7 @@ - + @@ -2310,7 +2310,7 @@ - + @@ -2710,7 +2710,7 @@ - + @@ -3301,7 +3301,7 @@ - + @@ -3351,7 +3351,7 @@ - + @@ -3403,7 +3403,7 @@ - + @@ -3454,7 +3454,7 @@ - + @@ -3683,7 +3683,7 @@ - + @@ -3787,7 +3787,7 @@ - + @@ -3948,7 +3948,7 @@ - + @@ -4006,7 +4006,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20500-20599.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20500-20599.xml index b173c66765..dae0eb897a 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20500-20599.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20500-20599.xml @@ -1347,7 +1347,7 @@ - + @@ -1554,7 +1554,7 @@ - + @@ -1601,7 +1601,7 @@ - + @@ -1646,7 +1646,7 @@ - + @@ -1873,7 +1873,7 @@ - + @@ -1918,7 +1918,7 @@ - + @@ -1963,7 +1963,7 @@ - + @@ -2008,7 +2008,7 @@ - + @@ -2275,7 +2275,7 @@ - + @@ -2325,7 +2325,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20600-20699.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20600-20699.xml index a9df952b3d..52cc1abda0 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20600-20699.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20600-20699.xml @@ -1323,7 +1323,7 @@ - + @@ -1370,7 +1370,7 @@ - + @@ -1422,7 +1422,7 @@ - + @@ -1487,7 +1487,7 @@ - + @@ -1537,7 +1537,7 @@ - + @@ -1582,7 +1582,7 @@ - + @@ -1646,7 +1646,7 @@ - + @@ -1712,7 +1712,7 @@ - + @@ -1777,7 +1777,7 @@ - + @@ -1832,7 +1832,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20700-20799.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20700-20799.xml index ef501ed8da..a8c877e730 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20700-20799.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20700-20799.xml @@ -1129,7 +1129,7 @@ - + @@ -1315,7 +1315,7 @@ - + @@ -1379,7 +1379,7 @@ - + @@ -3536,7 +3536,7 @@ - + @@ -3585,7 +3585,7 @@ - + @@ -3633,7 +3633,7 @@ - + @@ -3686,7 +3686,7 @@ - + @@ -3738,7 +3738,7 @@ - + @@ -3788,7 +3788,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20800-20899.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20800-20899.xml index 3eead884a8..8e7209ad2c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20800-20899.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20800-20899.xml @@ -17,7 +17,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -3386,7 +3386,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20900-20999.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20900-20999.xml index 5437ba3579..9901874929 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20900-20999.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/20900-20999.xml @@ -5149,7 +5149,7 @@ - + @@ -5199,7 +5199,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21000-21099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21000-21099.xml index f2bbf6b14b..be8f19a36f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21000-21099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21000-21099.xml @@ -4180,7 +4180,7 @@ - + @@ -4246,7 +4246,7 @@ - + @@ -4537,7 +4537,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21300-21399.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21300-21399.xml index 660b8c9eec..93f74ab36f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21300-21399.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21300-21399.xml @@ -6,7 +6,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21400-21499.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21400-21499.xml index 35ebfeb7d8..24ff8a606d 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21400-21499.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21400-21499.xml @@ -6,7 +6,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -227,7 +227,7 @@ - + @@ -268,7 +268,7 @@ - + @@ -295,7 +295,7 @@ - + @@ -339,7 +339,7 @@ - + @@ -367,7 +367,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -439,7 +439,7 @@ - + @@ -480,7 +480,7 @@ - + @@ -508,7 +508,7 @@ - + @@ -548,7 +548,7 @@ - + @@ -575,7 +575,7 @@ - + @@ -617,7 +617,7 @@ - + @@ -646,7 +646,7 @@ - + @@ -686,7 +686,7 @@ - + @@ -713,7 +713,7 @@ - + @@ -750,7 +750,7 @@ - + @@ -776,7 +776,7 @@ - + @@ -816,7 +816,7 @@ - + @@ -843,7 +843,7 @@ - + @@ -881,7 +881,7 @@ - + @@ -907,7 +907,7 @@ - + @@ -945,7 +945,7 @@ - + @@ -971,7 +971,7 @@ - + @@ -1010,7 +1010,7 @@ - + @@ -1038,7 +1038,7 @@ - + @@ -1077,7 +1077,7 @@ - + @@ -1103,7 +1103,7 @@ - + @@ -1146,7 +1146,7 @@ - + @@ -1188,7 +1188,7 @@ - + @@ -1229,7 +1229,7 @@ - + @@ -1272,7 +1272,7 @@ - + @@ -1314,7 +1314,7 @@ - + @@ -1340,7 +1340,7 @@ - + @@ -1364,7 +1364,7 @@ - + @@ -1387,7 +1387,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21600-21699.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21600-21699.xml index f7b5096ea3..6d2f41db0f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21600-21699.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21600-21699.xml @@ -2716,7 +2716,7 @@ - + @@ -2773,7 +2773,7 @@ - + @@ -2810,7 +2810,7 @@ - + @@ -2858,7 +2858,7 @@ - + @@ -2905,7 +2905,7 @@ - + @@ -2954,7 +2954,7 @@ - + @@ -3003,7 +3003,7 @@ - + @@ -3052,7 +3052,7 @@ - + @@ -3101,7 +3101,7 @@ - + @@ -3145,7 +3145,7 @@ - + @@ -3232,7 +3232,7 @@ - + @@ -3630,7 +3630,7 @@ - + @@ -3679,7 +3679,7 @@ - + @@ -3727,7 +3727,7 @@ - + @@ -3768,7 +3768,7 @@ - + @@ -3809,7 +3809,7 @@ - + @@ -3851,7 +3851,7 @@ - + @@ -3894,7 +3894,7 @@ - + @@ -3936,7 +3936,7 @@ - + @@ -3973,7 +3973,7 @@ - + @@ -4006,7 +4006,7 @@ - + @@ -4048,7 +4048,7 @@ - + @@ -4090,7 +4090,7 @@ - + @@ -4134,7 +4134,7 @@ - + @@ -4174,7 +4174,7 @@ - + @@ -4201,7 +4201,7 @@ - + @@ -4229,7 +4229,7 @@ - + @@ -4275,7 +4275,7 @@ - + @@ -4439,7 +4439,7 @@ - + @@ -4467,7 +4467,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21700-21799.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21700-21799.xml index 230b1a122d..e88b1ef8fc 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21700-21799.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21700-21799.xml @@ -1278,7 +1278,7 @@ - + @@ -1383,7 +1383,7 @@ - + @@ -2513,7 +2513,7 @@ - + @@ -2545,7 +2545,7 @@ - + @@ -2959,7 +2959,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21900-21999.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21900-21999.xml index fcd446f345..5bf06723ac 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21900-21999.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/21900-21999.xml @@ -1171,7 +1171,7 @@ - + @@ -1203,7 +1203,7 @@ - + @@ -1236,7 +1236,7 @@ - + @@ -1270,7 +1270,7 @@ - + @@ -1303,7 +1303,7 @@ - + @@ -1338,7 +1338,7 @@ - + @@ -1371,7 +1371,7 @@ - + @@ -1404,7 +1404,7 @@ - + @@ -2119,7 +2119,7 @@ - + @@ -2161,7 +2161,7 @@ - + @@ -2250,7 +2250,7 @@ - + @@ -2287,7 +2287,7 @@ - + @@ -2328,7 +2328,7 @@ - + @@ -2370,7 +2370,7 @@ - + @@ -2407,7 +2407,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/24000-24099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/24000-24099.xml index 6b3e36b12c..5e710e879f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/24000-24099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/24000-24099.xml @@ -441,7 +441,7 @@ - + @@ -705,7 +705,7 @@ - + @@ -1596,7 +1596,7 @@ - + 840 @@ -1615,7 +1615,7 @@ MALE - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25000-25099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25000-25099.xml index 5db92f5223..15a4171abf 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25000-25099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25000-25099.xml @@ -3493,7 +3493,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25100-25199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25100-25199.xml index d81138a99d..ac3189da6e 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25100-25199.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25100-25199.xml @@ -466,7 +466,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25200-25299.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25200-25299.xml index f7b5d76a40..365716169f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25200-25299.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25200-25299.xml @@ -4001,7 +4001,7 @@ - + @@ -4215,7 +4215,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25700-25799.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25700-25799.xml index 24feb5b3d1..2f3db4e694 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25700-25799.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/25700-25799.xml @@ -72,7 +72,7 @@ - + @@ -137,7 +137,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -305,7 +305,7 @@ - + @@ -369,7 +369,7 @@ - + @@ -416,7 +416,7 @@ - + @@ -462,7 +462,7 @@ - + @@ -529,7 +529,7 @@ - + @@ -596,7 +596,7 @@ - + @@ -663,7 +663,7 @@ - + @@ -731,7 +731,7 @@ - + @@ -799,7 +799,7 @@ - + @@ -906,7 +906,7 @@ - + @@ -952,7 +952,7 @@ - + @@ -998,7 +998,7 @@ - + @@ -1044,7 +1044,7 @@ - + @@ -1090,7 +1090,7 @@ - + @@ -1136,7 +1136,7 @@ - + @@ -1182,7 +1182,7 @@ - + @@ -1228,7 +1228,7 @@ - + @@ -1275,7 +1275,7 @@ - + @@ -1321,7 +1321,7 @@ - + @@ -1407,7 +1407,7 @@ - + @@ -1485,7 +1485,7 @@ - + @@ -1563,7 +1563,7 @@ - + @@ -1641,7 +1641,7 @@ - + @@ -1720,7 +1720,7 @@ - + @@ -1818,7 +1818,7 @@ - + @@ -1896,7 +1896,7 @@ - + @@ -1974,7 +1974,7 @@ - + @@ -2052,7 +2052,7 @@ - + @@ -2130,7 +2130,7 @@ - + @@ -2209,7 +2209,7 @@ - + @@ -2307,7 +2307,7 @@ - + @@ -2370,7 +2370,7 @@ - + @@ -2433,7 +2433,7 @@ - + @@ -2496,7 +2496,7 @@ - + @@ -2559,7 +2559,7 @@ - + @@ -2622,7 +2622,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29000-29099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29000-29099.xml index 73dc5f17eb..e6f0690e00 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29000-29099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29000-29099.xml @@ -11,8 +11,8 @@ FEMALE - - + + @@ -21,11 +21,9 @@ 370 - + - - - + @@ -34,8 +32,11 @@ - + + + + 300 true @@ -50,118 +51,151 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + BUG MALE - - + + @@ -170,9 +204,9 @@ 350 - + - + @@ -181,7 +215,7 @@ - + true @@ -198,9 +232,9 @@ BUG MALE - - - + + + @@ -209,9 +243,9 @@ 260 - + - + @@ -220,7 +254,7 @@ - + true @@ -243,9 +277,9 @@ BUG MALE - - - + + + @@ -254,9 +288,9 @@ 260 - + - + @@ -265,7 +299,7 @@ - + true @@ -287,9 +321,9 @@ BUG MALE - - - + + + @@ -298,9 +332,9 @@ 260 - + - + @@ -309,7 +343,7 @@ - + true @@ -334,18 +368,19 @@ MALE - - + + + 60 - + - + @@ -354,7 +389,7 @@ - + 10 true @@ -369,85 +404,116 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -461,9 +527,9 @@ MALE - - - + + + @@ -472,9 +538,9 @@ 710 - + - + @@ -483,9 +549,7 @@ - - - + true @@ -497,40 +561,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -543,9 +573,9 @@ MALE - - - + + + @@ -554,21 +584,19 @@ 450 - + - + - + - + - - - + true @@ -591,9 +619,9 @@ PLANT FEMALE - + - + @@ -602,19 +630,19 @@ 130 - + - - + + - + - + - + true @@ -626,34 +654,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -664,29 +664,29 @@ BEAST MALE - - - + + + - 300 + 30 - + - - + + - + - + - + true @@ -698,29 +698,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -731,10 +708,10 @@ CONSTRUCT MALE - - + + - + @@ -743,10 +720,10 @@ 430 - + - + @@ -755,7 +732,7 @@ - + true @@ -778,9 +755,9 @@ CONSTRUCT MALE - - - + + + @@ -789,22 +766,22 @@ 410 - + - - - - + + - + - + - - + + + + true @@ -816,35 +793,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -855,9 +803,9 @@ GIANT MALE - - - + + + @@ -866,10 +814,10 @@ 610 - + - - + + @@ -877,7 +825,7 @@ - + true @@ -889,30 +837,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -923,13 +847,13 @@ - ELEMENTAL + FAIRY FEMALE - - - + + + @@ -937,12 +861,9 @@ 710 - + - - - - + @@ -951,7 +872,10 @@ - + + + + 300 true @@ -966,59 +890,92 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1028,13 +985,13 @@ - BEAST + BUG MALE - - + + - - + + @@ -1042,9 +999,9 @@ 540 - + - + @@ -1053,7 +1010,7 @@ - + true @@ -1072,13 +1029,13 @@ - BEAST + BUG MALE - - + + - - + + @@ -1086,9 +1043,9 @@ 540 - + - + @@ -1097,7 +1054,7 @@ - + true @@ -1118,11 +1075,11 @@ BUG FEMALE - - + + - - + + @@ -1130,9 +1087,9 @@ 450 - + - + @@ -1141,7 +1098,7 @@ - + true @@ -1157,11 +1114,11 @@ BUG FEMALE - - + + - - + + @@ -1169,9 +1126,9 @@ 450 - + - + @@ -1180,8 +1137,7 @@ - - + true @@ -1199,27 +1155,19 @@ MALE - - - + + + + 60 - + - - - - - - - - - - + @@ -1228,9 +1176,9 @@ - - - + + + 14 true @@ -1239,92 +1187,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UNDEAD MALE - - - + + + + 60 - + - + + + + + + + + + + + 13 true @@ -1337,83 +1229,107 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1422,9 +1338,9 @@ MALE - - - + + + @@ -1433,11 +1349,18 @@ 760 - + - - + + + + + + + + + true @@ -1455,9 +1378,9 @@ MALE - - - + + + @@ -1465,13 +1388,21 @@ 590 - + - - - - + + + + + + + + + + + + 300 true @@ -1482,84 +1413,106 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1570,33 +1523,31 @@ - - + + - 500 + 50 - + - - - - - + + - + - - - - + + + + + true @@ -1604,22 +1555,8 @@ - - - - - - - - - - - - - - - + @@ -1630,7 +1567,7 @@ - + @@ -1639,66 +1576,9 @@ 740 - + - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - HUMANOID - MALE - - - - - - - - - - - - - @@ -1707,7 +1587,44 @@ + + + + + + true + + + + + + + + UNDEAD + MALE + + + + + + + + + 60 + + + + + + + + + + + + + true @@ -1727,7 +1644,7 @@ - + @@ -1736,9 +1653,9 @@ 760 - + - + @@ -1746,10 +1663,8 @@ - - - - + + true @@ -1769,7 +1684,7 @@ - + @@ -1778,9 +1693,9 @@ 740 - + - + @@ -1788,10 +1703,8 @@ - - - - + + true @@ -1803,14 +1716,10 @@ HUMANOID MALE - - + + - - - - @@ -1819,8 +1728,17 @@ - - + + + + + + + + + + + 15 true @@ -1839,14 +1757,10 @@ MALE - - - - - - - - + + + + @@ -1855,8 +1769,8 @@ - - + + @@ -1865,12 +1779,9 @@ - - - - - - + + + 18 true @@ -1890,13 +1801,15 @@ MALE - - - + + + + 430 + @@ -1904,134 +1817,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CONSTRUCT - FEMALE - - - - - - - - - - - - - 500 - - - - - + @@ -2040,8 +1827,160 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CONSTRUCT + FEMALE + + + + + + + + + 50 + + + + + + + + + + + + + + true @@ -2057,24 +1996,20 @@ CONSTRUCT FEMALE - - - - - - - - + + + + - 500 + 50 - + - + @@ -2083,8 +2018,7 @@ - - + true @@ -2100,14 +2034,10 @@ DEMONIC MALE - - - - - - - - + + + + @@ -2115,9 +2045,9 @@ 430 - + - + @@ -2126,9 +2056,7 @@ - - - + true @@ -2144,14 +2072,10 @@ DEMONIC MALE - - - - - - - - + + + + @@ -2159,9 +2083,9 @@ 430 - + - + @@ -2170,9 +2094,7 @@ - - - + true @@ -2188,19 +2110,20 @@ CONSTRUCT FEMALE - - + + - + - 500 + 50 - + + @@ -2209,7 +2132,6 @@ - true @@ -2222,22 +2144,23 @@ - + CONSTRUCT FEMALE - - - + + + - 500 + 50 - + + @@ -2246,8 +2169,6 @@ - - true @@ -2260,28 +2181,27 @@ - + - FAIRY + DRAGON MALE - - - - + + + + + 60 - + - - - + @@ -2290,8 +2210,9 @@ - - + + + 14 true @@ -2302,73 +2223,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ETC @@ -2384,28 +2238,6 @@ - - - - - - - - - - - - - - - - - - - - - - true @@ -2413,7 +2245,7 @@ - + @@ -2422,19 +2254,18 @@ - + + 60 - + - - - + @@ -2443,8 +2274,9 @@ - - + + + 14 true @@ -2455,91 +2287,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2549,21 +2296,31 @@ MALE - - - + + + + 60 - + - - + + + + + + + + + + + 14 true @@ -2576,125 +2333,169 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -2703,21 +2504,31 @@ DRAGON MALE - - - + + + + 60 - + - - + + + + + + + + + + + true @@ -2728,26 +2539,27 @@ - - + DRAGON MALE - - + + + 60 - + - + + @@ -2756,10 +2568,8 @@ - + - - true @@ -2768,25 +2578,26 @@ - + - FAIRY + DRAGON MALE - - - + + + + 60 - + - + @@ -2795,9 +2606,8 @@ - + - true @@ -2806,25 +2616,26 @@ - + - FAIRY + DRAGON MALE - - - + + + + 60 - + - + @@ -2833,9 +2644,8 @@ - + - true @@ -2844,25 +2654,26 @@ - + - FAIRY + DRAGON MALE - - - + + + + 60 - + - + @@ -2871,9 +2682,8 @@ - + - true @@ -2882,25 +2692,26 @@ - + - FAIRY + DRAGON MALE - - - + + + + 60 - + - + @@ -2909,9 +2720,8 @@ - + - true @@ -2920,25 +2730,26 @@ - + - FAIRY + DRAGON MALE - - - + + + + 60 - + - + @@ -2947,9 +2758,8 @@ - + - true @@ -2958,25 +2768,27 @@ - + - FAIRY + DRAGON MALE - - - + + + + 60 - + - + + @@ -2985,9 +2797,8 @@ - + - true @@ -2996,7 +2807,7 @@ - + @@ -3016,19 +2827,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3037,7 +2849,7 @@ - + true @@ -3046,7 +2858,7 @@ - + @@ -3066,19 +2878,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3087,7 +2900,7 @@ - + true @@ -3096,7 +2909,7 @@ - + @@ -3116,19 +2929,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3137,7 +2951,7 @@ - + true @@ -3146,7 +2960,7 @@ - + @@ -3166,19 +2980,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3187,7 +3002,7 @@ - + true @@ -3196,7 +3011,7 @@ - + @@ -3216,19 +3031,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3237,7 +3053,7 @@ - + true @@ -3246,7 +3062,7 @@ - + @@ -3266,19 +3082,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3287,7 +3104,7 @@ - + true @@ -3296,7 +3113,7 @@ - + @@ -3316,19 +3133,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3337,7 +3155,7 @@ - + true @@ -3346,7 +3164,7 @@ - + @@ -3366,19 +3184,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3387,7 +3206,7 @@ - + true @@ -3396,7 +3215,7 @@ - + @@ -3416,19 +3235,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3437,7 +3257,7 @@ - + true @@ -3446,7 +3266,7 @@ - + @@ -3466,19 +3286,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3487,7 +3308,7 @@ - + true @@ -3496,7 +3317,7 @@ - + @@ -3516,19 +3337,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3537,7 +3359,7 @@ - + true @@ -3546,7 +3368,7 @@ - + @@ -3566,19 +3388,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3587,7 +3410,7 @@ - + true @@ -3596,7 +3419,7 @@ - + @@ -3616,19 +3439,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3637,7 +3461,7 @@ - + true @@ -3646,7 +3470,7 @@ - + @@ -3666,19 +3490,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3687,7 +3512,7 @@ - + true @@ -3696,7 +3521,7 @@ - + @@ -3716,19 +3541,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3737,7 +3563,7 @@ - + true @@ -3746,7 +3572,7 @@ - + @@ -3766,19 +3592,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3787,7 +3614,7 @@ - + true @@ -3796,7 +3623,7 @@ - + @@ -3816,19 +3643,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3837,7 +3665,7 @@ - + true @@ -3846,7 +3674,7 @@ - + @@ -3866,19 +3694,20 @@ CONSTRUCT MALE - - + + + 60 - + - + @@ -3887,7 +3716,7 @@ - + true @@ -3896,20 +3725,34 @@ - - - ETC - FEMALE - - + + UNDEAD + MALE + + + + - - + 60 + - + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29100-29199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29100-29199.xml index d8441bf977..fea47b2222 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29100-29199.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/29100-29199.xml @@ -6,7 +6,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -69,7 +69,7 @@ MALE - + @@ -90,7 +90,7 @@ MALE - + @@ -112,7 +112,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -310,7 +310,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -701,7 +701,7 @@ MALE - + @@ -723,7 +723,7 @@ - + @@ -823,7 +823,7 @@ - + @@ -921,7 +921,7 @@ - + @@ -1019,7 +1019,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/36700-36799.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/36700-36799.xml index e9f9214303..581166294c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/36700-36799.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/npcs/36700-36799.xml @@ -466,7 +466,7 @@ - + @@ -493,7 +493,7 @@ - + @@ -520,7 +520,7 @@ - + @@ -547,7 +547,7 @@ - + @@ -597,7 +597,7 @@ - + @@ -624,7 +624,7 @@ - + @@ -651,7 +651,7 @@ - + @@ -678,7 +678,7 @@ - + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/02000-02099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/02000-02099.xml index 5b383600e7..dceb8ac69b 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/02000-02099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/02000-02099.xml @@ -231,10 +231,16 @@ icon.skill0000 - 20000 + + 20000 + 1000 + 2 1 - 736 + + 736 + 49087 + 1 A1 5 diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39000-39099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39000-39099.xml index d5c11b7c5f..85162cef90 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39000-39099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39000-39099.xml @@ -1234,7 +1234,7 @@ 1000 2 1 - 49087 + 49500 1 A1 5 diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39100-39199.xml index 9690e7aca4..a17dbcb993 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/39100-39199.xml @@ -57,7 +57,19 @@ icon.etc_reagent_white_i00 + 2 + 1 A1 + 5 + 0 + SELF + SINGLE + + + 500 + DIFF + + icon.sa_cube @@ -91,7 +103,7 @@ icon.etc_scroll_of_resurrection_i01 400 1 - 600 + 900 1000 2 1 @@ -104,6 +116,9 @@ SINGLE + + false + @@ -2201,6 +2216,59 @@ icon.sa_cube + 1 A1 + -1 + 500 + 500 + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55200-55299.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55200-55299.xml index 479dae0f67..e95bf170e7 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55200-55299.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55200-55299.xml @@ -500,7 +500,7 @@ 1200 ATTACK_TIME_DOWN 1 - 70102 + 70102 75 2 1 diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt index fe3b07718d..1b59e36f35 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_3.0_TheKamael/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. @@ -158,10 +160,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. @@ -201,7 +204,6 @@ MAtk: M. Atk. stat. MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius) 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. @@ -265,6 +267,7 @@ RearDamage: Multiplier for damage done from behind the target. (l2jmobius) RebalanceHP: Balances targets' current HP. RebalanceHPSummon: Balances targets' current HP for summons. RecoverVitalityInPeaceZone: Recover periodically vitality when player is in a peace zone. (l2jmobius) +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_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java index 84fce12ab4..1da2032efc 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java @@ -631,6 +631,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 @@ -1279,6 +1280,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; @@ -2134,6 +2136,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); @@ -3256,6 +3259,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index a50cbb8033..8378c362cb 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/SkillData.java index 7da7b6a28d..60e1308527 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/SkillData.java @@ -548,9 +548,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index 2260001e17..380989e049 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index ff1583b1d8..9cd9eed8f1 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -63,7 +63,7 @@ public class DailyTaskManager private static final Set RESET_SKILLS = new HashSet<>(); static { - // No known skills. + RESET_SKILLS.add(39199); // Hero's Wondrous Cubic } public static final Set RESET_ITEMS = new HashSet<>(); static diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/IdManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/IdManager.java index 543c76f7c1..d936f9b1e6 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/IdManager.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/IdManager.java @@ -100,6 +100,7 @@ public class IdManager cleanCount += statement.executeUpdate("DELETE FROM character_shortcuts WHERE character_shortcuts.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills WHERE character_skills.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills_save WHERE character_skills_save.charId NOT IN (SELECT charId FROM characters);"); + cleanCount += statement.executeUpdate("DELETE FROM character_spirits WHERE character_spirits.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_subclasses WHERE character_subclasses.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_instance_time WHERE character_instance_time.charId NOT IN (SELECT charId FROM characters);"); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java index 8790780474..56e60aa2fc 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1289,7 +1289,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)) @@ -2817,7 +2817,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); } @@ -2830,189 +2830,151 @@ 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; - } - case ELEMENTAL_SPIRIT_EARTH_ATTACK: - case ELEMENTAL_SPIRIT_EARTH_DEFENSE: - case ELEMENTAL_SPIRIT_FIRE_ATTACK: - case ELEMENTAL_SPIRIT_FIRE_DEFENSE: - case ELEMENTAL_SPIRIT_WATER_ATTACK: - case ELEMENTAL_SPIRIT_WATER_DEFENSE: - case ELEMENTAL_SPIRIT_WIND_ATTACK: - case ELEMENTAL_SPIRIT_WIND_DEFENSE: - { - info.addComponentType(UserInfoType.ATT_SPIRITS); - 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; + } + case ELEMENTAL_SPIRIT_EARTH_ATTACK: + case ELEMENTAL_SPIRIT_EARTH_DEFENSE: + case ELEMENTAL_SPIRIT_FIRE_ATTACK: + case ELEMENTAL_SPIRIT_FIRE_DEFENSE: + case ELEMENTAL_SPIRIT_WATER_ATTACK: + case ELEMENTAL_SPIRIT_WATER_DEFENSE: + case ELEMENTAL_SPIRIT_WIND_ATTACK: + case ELEMENTAL_SPIRIT_WIND_DEFENSE: + { + info.addComponentType(UserInfoType.ATT_SPIRITS); + 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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Player.java index d38268cc3b..dd01d3306d 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -4490,7 +4490,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8237,9 +8237,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Summon.java index 8d7dc0eb54..11d18fc2eb 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index ea1abbff9b..074a4ae995 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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<>(); @@ -863,15 +862,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()); } } } @@ -882,8 +879,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. @@ -892,7 +893,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()) { @@ -965,33 +966,6 @@ 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 { @@ -1001,9 +975,17 @@ public class CreatureStat // 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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 150f95c365..73f94bfe57 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index 3155a27f10..ec3d03a6f5 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index 0b6092b2d9..1e393ec4bf 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2216,6 +2216,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 281d957b09..ba369c8c2e 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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; @@ -71,12 +73,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPi import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; 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; @@ -91,6 +95,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; @@ -1637,7 +1642,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); @@ -2557,6 +2564,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); @@ -2581,6 +2593,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); @@ -2606,6 +2620,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 57cbcf1f6d..d38e4d8834 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -774,7 +774,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; @@ -926,7 +927,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index fca1209fce..f9015699c4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -657,7 +657,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(); } @@ -680,7 +680,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(); } @@ -715,7 +715,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java index c9901fff53..9cd52a0a31 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -91,6 +91,7 @@ public enum Stat HATE_ATTACK("attackHate"), REAR_DAMAGE_RATE("rearDamage"), AUTO_ATTACK_DAMAGE_BONUS("autoAttackDamageBonus"), + IGNORE_REDUCE_DAMAGE("ignoreReduceDamage"), // ELEMENTAL SPIRITS ELEMENTAL_SPIRIT_FIRE_ATTACK("elementalSpiritFireAttack"), @@ -144,7 +145,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()), MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0), BLOW_RATE("blowRate"), diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 647873dac0..6cc98e9690 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -44,7 +44,18 @@ public class MCritRateFinalizer implements IStatFunction final double physicalBonus = (creature.getStat().getMul(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 1) - 1) * creature.getStat().getCriticalHit(); final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1; - return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 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) + physicalBonus), 0, maxMagicalCritRate); } @Override diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index c305987ba6..c29c9ba398 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java @@ -93,6 +93,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index c5257ff589..1aff35bfd5 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java @@ -95,6 +95,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index 7a7a847000..65d1357865 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java @@ -108,6 +108,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) { @@ -608,7 +613,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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index e5b1b8a192..07ed7641a9 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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, 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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java index dcc44cb9f3..2e152e2e29 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index a4539909c2..f7ac12028d 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index f93c9e5e69..03909a2746 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java deleted file mode 100644 index 52a4032d14..0000000000 --- a/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java new file mode 100644 index 0000000000..62bb425a5a --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 9c1fbbcab8..851b53dc09 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 68ca369edf..37f3211b0a 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 0bee2f4e34..ec006a3d5c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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; + } } } } @@ -303,6 +352,7 @@ public class AutoPlayTaskManager { player.getPet().followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 5899235fcb..66c93af753 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/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_Classic_Interlude/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/account_gsdata.sql index ed8c60bfae..a0072cc6e4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/airships.sql index 50453102dd..d5dece1b03 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/announcements.sql index 0fef63e83e..88f8f519ad 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/auction_bid.sql index 85b978f103..2e37fbe5ba 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/bbs_favorites.sql index e7ace21bc9..a43fd1b53a 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/bot_reported_char_data.sql index d7acdfa31b..98daf2dc12 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/buffer_schemes.sql index 1784421092..bd964c8cc2 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/buffer_schemes.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL, PRIMARY KEY (`object_id`,`scheme_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_Classic_Interlude/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle.sql index 7ffcebed6b..3445dea47a 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql index ee822091b4..43a573b36e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_functions.sql index d270fca8a8..d8c1aaaeeb 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql index 54c8517f65..a6cd5a00c3 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_manor_production.sql index 3980eef7aa..71ea5b8591 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql index a0854df17e..139a3a5d45 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_contacts.sql index 3c2c5fb85a..9d8d163095 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_hennas.sql index 668374b2ab..8174451ef2 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_instance_time.sql index 1a82cf40e2..2eaa3164a3 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql index f2773fc195..22857bd4de 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_macroses.sql index 7062388d7a..b23a056e24 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_mentees.sql index 2ad58e3219..d067728900 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_offline_trade.sql index f61c711822..16925760e5 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql index d8a9e0b8e1..38ffd73ae0 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_premium_items.sql index 6b25480f4c..0f613d1029 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_quests.sql index 6199526ae6..93db47171d 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_recipebook.sql index 74cc6b8bd6..807005f0c1 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql index e448547654..e81faed7a4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_reco_bonus.sql index f283ca5136..9717ebc5e9 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_summons.sql index e089d258b3..1936e548d4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_tpbookmark.sql index df70351c2e..2cd0efe8b1 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_variables.sql index 97a8a898d0..82f8e79930 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/characters.sql index ea2aace011..60e1a786a2 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_data.sql index 1748b666e3..a1ca68fe43 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_notices.sql index 3ab4c18480..7464ee18bd 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_privs.sql index 6478e63f8a..af4e35a46b 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_skills.sql index 785d9e489a..10b722e90e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_subpledges.sql index 558ae695e1..64c31b7f38 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/custom_teleport.sql index 27a5d0d877..9dd08290ac 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort.sql index 00eb12a37e..33143b0805 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql index 8bca5d13fe..87e445876e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_functions.sql index 3c0bdfc42a..9ec9f577d2 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql index 19df57a3b9..43763210b4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_siege_guards.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_spawnlist.sql index 22303a9b09..144979acd9 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fort_spawnlist.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql index ea5e71a909..5ae471842d 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/forums.sql index d7bb88e274..af3a8be6ec 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/global_tasks.sql index ec8fd2c36e..5b2a05d01d 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/global_variables.sql index 580d9cd7e5..42bde4188f 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/grandboss_data.sql index d77aedac84..eac8b7ff70 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/heroes.sql index 2fc8753f90..49a371cbd5 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/heroes_diary.sql index e2195a1fea..0cc38a3bdf 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_auction.sql index d73ec83417..4d654f9671 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_auction_bid.sql index a132cbf33b..1fa2a7d060 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_elementals.sql index 73c76bff70..16212982cb 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/items.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/items.sql index c2225c1f32..c701ef6748 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/itemsonground.sql index e0750ce461..cd0b66704c 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/lottery.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/lottery.sql index bab15221c2..268ffd60fd 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/lottery.sql +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/lottery.sql @@ -12,4 +12,4 @@ CREATE TABLE IF NOT EXISTS `lottery` ( `enddate` bigint(13) unsigned NOT NULL DEFAULT '0', `finished` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`,`idnr`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/merchant_lease.sql index 5860107e3d..a5228f511e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_data.sql index f3f1b5b54e..c00edf499e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_fights.sql index ccd4ac94ec..f25cc4c1fa 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_fights.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` ( `classed` tinyint(4) 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_Classic_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql index 386b27df45..0f48e9f71c 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql index f22562d0d5..fde44db92f 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/petition_feedback.sql index 2907d19d72..7752f5ab17 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/pets.sql index 4ffa7cd2b6..298b2e2df0 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/posts.sql index 4b212c323c..179355fd62 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/siege_clans.sql index f649ceb8e7..0cec8f57b5 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/topic.sql index 75f73ee48c..ac232c9d55 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/gameservers.sql index 6d03350ae4..adf3119d08 100644 --- a/L2J_Mobius_Classic_Interlude/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_Classic_Interlude/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 ('1', '-2ad66b3f483c22be097019f55c8abdf0', ''); diff --git a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/AutoPlay.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/AutoPlay.ini index 9a4fd4bf2e..6e9d9628be 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/AutoPlay.ini +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/config/General.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/General.ini index 0d6e0d49f9..46c0eeef52 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_Interlude/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 # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/ActionData.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/ActionData.xml index 965751da7b..5412428b46 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/ActionData.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/ActionData.xml @@ -1,219 +1,248 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/DoorData.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/DoorData.xml index 9fadc1cc3d..bde51d4d2e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/DoorData.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/DoorData.xml @@ -8491,6 +8491,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 5b501b1f1b..bcc74a8afe 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_Classic_Interlude/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; @@ -254,6 +255,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_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java index daef615a57..97c8c4c84e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index cd446ab812..2775ff29a4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/playeractions/PetAttack.java index 43be5cfc4a..ae0fba5834 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_Classic_Interlude/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_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_Classic_Interlude/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 3ce6e28c2a..798a363468 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/stats/experience.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/experience.xml index 3892efec36..9ef9e70e83 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/experience.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/experience.xml @@ -2,110 +2,89 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/46200-46299.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/46200-46299.xml index 39c035e99c..dad37bbefe 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/46200-46299.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/46200-46299.xml @@ -795,14 +795,19 @@ + + + - - - + + + + + diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/16300-16399.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/16300-16399.xml index 36b7b1c7a5..f1f3ee17f8 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/16300-16399.xml +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/stats/skills/18400-18499.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/18400-18499.xml index 075118bfaa..98aff3a6ab 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/18400-18499.xml +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/dist/game/data/stats/skills/30000-30099.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/30000-30099.xml index 4e1e1a1278..8adacbda05 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/30000-30099.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/30000-30099.xml @@ -1841,8 +1841,8 @@ P 85 - - 550 + + 350 DIFF diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt index 5c66bef756..07bde1f1c6 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java index 6d847a3245..346f86fa1a 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java @@ -1214,6 +1214,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<>(); @@ -1289,6 +1290,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; @@ -2526,6 +2528,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", ""); @@ -3282,6 +3285,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_Classic_Interlude/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index a50cbb8033..8378c362cb 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/SkillData.java index 603e7d33be..dd968ed772 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/SkillData.java @@ -549,9 +549,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_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index 2260001e17..380989e049 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/ShortCuts.java index 36f3461010..efc07efb38 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java index 55f0ee03a0..d5c28f7140 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_Interlude/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,142 @@ 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: + case STAT_CHA: + case STAT_LUC: + { + 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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java index 5768d32c69..306e020129 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -4513,7 +4513,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8204,9 +8204,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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Summon.java index cc23c2a6f2..98b7163e50 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index ea1abbff9b..79fab5d65e 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_Classic_Interlude/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<>(); @@ -863,15 +862,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()); } } } @@ -882,8 +879,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. @@ -892,7 +893,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()) { @@ -965,45 +966,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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index 438e73d4cc..a2436eebf0 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index 0b6092b2d9..1e393ec4bf 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2216,6 +2216,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_Classic_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 35994a13a2..fbc7576f7b 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_Classic_Interlude/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; @@ -1578,7 +1584,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); @@ -2202,6 +2210,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); @@ -2226,6 +2239,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); @@ -2251,6 +2266,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_Classic_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 66f6f634be..59ab4324f3 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 1692c9fcd7..ec97ae1f75 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java index 6894ac0fba..e2e6bb404c 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index d96c2e25ae..0ca58d9970 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index c305987ba6..c29c9ba398 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java @@ -93,6 +93,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_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index c5257ff589..1aff35bfd5 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java @@ -95,6 +95,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_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index c6fd6dc758..9f04d53165 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index c16d3301f0..7c284015a5 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index d78d842163..07ed7641a9 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java index dcc44cb9f3..2e152e2e29 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExPetInfo.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index f93c9e5e69..03909a2746 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/PetInfo.java deleted file mode 100644 index 52a4032d14..0000000000 --- a/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/PetSummonInfo.java new file mode 100644 index 0000000000..62bb425a5a --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 83e29f7bed..3ee2b1ef96 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 8872c0cf63..c2b8c8f51a 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 68ca369edf..37f3211b0a 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 1f54b5040f..0d5d066d25 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 7cd7dd9696..c56221841f 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_Classic_Interlude/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_Classic_Interlude/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_Interlude/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/account_gsdata.sql index ed8c60bfae..a0072cc6e4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/airships.sql index 50453102dd..d5dece1b03 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/announcements.sql index 0fef63e83e..88f8f519ad 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/auction_bid.sql index 85b978f103..2e37fbe5ba 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/bbs_favorites.sql index e7ace21bc9..a43fd1b53a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/bot_reported_char_data.sql index d7acdfa31b..98daf2dc12 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buffer_schemes.sql index 1784421092..bd964c8cc2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buffer_schemes.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL, PRIMARY KEY (`object_id`,`scheme_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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle.sql index c7b5613401..9fb7fea4e6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_doorupgrade.sql index ee822091b4..43a573b36e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_functions.sql index d270fca8a8..d8c1aaaeeb 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_manor_procure.sql index 54c8517f65..a6cd5a00c3 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_manor_production.sql index 3980eef7aa..71ea5b8591 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_trapupgrade.sql index a0854df17e..139a3a5d45 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_contacts.sql index 3c2c5fb85a..9d8d163095 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_hennas.sql index 668374b2ab..8174451ef2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_instance_time.sql index 1a82cf40e2..2eaa3164a3 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_item_reuse_save.sql index f2773fc195..22857bd4de 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_macroses.sql index 7062388d7a..b23a056e24 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_mentees.sql index 2ad58e3219..d067728900 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_offline_trade.sql index f61c711822..16925760e5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_offline_trade_items.sql index d8a9e0b8e1..38ffd73ae0 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_premium_items.sql index 6b25480f4c..0f613d1029 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_quests.sql index 6199526ae6..93db47171d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_random_craft.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_random_craft.sql index 977113bbe3..c83402513c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_random_craft.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_random_craft.sql @@ -25,4 +25,4 @@ CREATE TABLE IF NOT EXISTS `character_random_craft` ( `item_5_locked` TINYINT NOT NULL DEFAULT 0, `item_5_lock_left` INT 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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_recipebook.sql index 74cc6b8bd6..807005f0c1 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_recipeshoplist.sql index e448547654..e81faed7a4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_reco_bonus.sql index f283ca5136..9717ebc5e9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_spirits.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_spirits.sql index ac73d8dbe3..bb4044039f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_spirits.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_spirits.sql @@ -11,6 +11,5 @@ CREATE TABLE `character_spirits` `crit_rate_points` TINYINT NOT NULL DEFAULT 0, `crit_damage_points` TINYINT NOT NULL DEFAULT 0, `in_use` BOOLEAN NOT NULL DEFAULT FALSE, - PRIMARY KEY (`charId`, `type`), - FOREIGN KEY FK_CHARACTER_SPIRITS (`charId`) REFERENCES characters (`charId`) ON DELETE CASCADE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file + PRIMARY KEY (`charId`, `type`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_summons.sql index e089d258b3..1936e548d4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_tpbookmark.sql index df70351c2e..2cd0efe8b1 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_variables.sql index 97a8a898d0..82f8e79930 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_data.sql index f8b64d99db..49f88c0122 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_data.sql @@ -24,4 +24,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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_notices.sql index 3ab4c18480..7464ee18bd 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_privs.sql index 6478e63f8a..af4e35a46b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_skills.sql index 785d9e489a..10b722e90e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_subpledges.sql index 558ae695e1..64c31b7f38 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/custom_teleport.sql index 27a5d0d877..9dd08290ac 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort.sql index bb4f761682..caf1e50e76 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_doorupgrade.sql index 8bca5d13fe..87e445876e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_functions.sql index 3c0bdfc42a..9ec9f577d2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_siege_guards.sql index 19df57a3b9..43763210b4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_siege_guards.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_spawnlist.sql index 22303a9b09..144979acd9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fort_spawnlist.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fortsiege_clans.sql index ea5e71a909..5ae471842d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/forums.sql index d7bb88e274..af3a8be6ec 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/global_tasks.sql index ec8fd2c36e..5b2a05d01d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/global_variables.sql index 580d9cd7e5..42bde4188f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/grandboss_data.sql index b4a1f552fd..7cf6d2865d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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, 93069, 8925, -3904, 0, 229898.48, 667.776), -- Queen Ant diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/heroes.sql index ae59eb8ba1..f2ee5692a8 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/heroes_diary.sql index e2195a1fea..0cc38a3bdf 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_auction.sql index d73ec83417..4d654f9671 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_auction_bid.sql index a132cbf33b..1fa2a7d060 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_elementals.sql index 73c76bff70..16212982cb 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/items.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/items.sql index c2225c1f32..c701ef6748 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/itemsonground.sql index e0750ce461..cd0b66704c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/merchant_lease.sql index 5860107e3d..a5228f511e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_data.sql index f3f1b5b54e..c00edf499e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_fights.sql index ccd4ac94ec..f25cc4c1fa 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_fights.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` ( `classed` tinyint(4) 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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_nobles.sql index 386b27df45..0f48e9f71c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_nobles_eom.sql index f22562d0d5..fde44db92f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_evolves.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_evolves.sql index e825631c85..51fcd5eba8 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_evolves.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_evolves.sql @@ -5,4 +5,4 @@ CREATE TABLE `pet_evolves` ( `level` int NOT NULL DEFAULT '0', PRIMARY KEY (`itemObjId`, `index`, `level`), UNIQUE KEY `pet_evolves` (`itemObjId`, `index`, `level`) -) ENGINE=MyISAM; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_skills.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_skills.sql index 2b502c7738..b680f21972 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_skills.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pet_skills.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `pet_skills` ( `skillId` INT NOT NULL DEFAULT 0, `skillLevel` INT(3) NOT NULL DEFAULT 1, PRIMARY KEY (`petObjItemId`,`skillId`,`skillLevel`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/petition_feedback.sql index 2907d19d72..7752f5ab17 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pets.sql index 58b188bbcd..b7e9d545db 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/posts.sql index 4b212c323c..179355fd62 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/siege_clans.sql index f649ceb8e7..0cec8f57b5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/topic.sql index 75f73ee48c..ac232c9d55 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/gameservers.sql index c6f6c5ee36..d2a3e1ee5d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/config/General.ini b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/General.ini index 4230956e3e..3844e15f0c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/General.ini +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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 # --------------------------------------------------------------------------- @@ -640,6 +640,11 @@ AutoPlayAttackAction = True # Retail: False ResumeAutoPlay = False +# Assist party leader. +# When in party, target what the leader is targeting. +# Retail: False +AssistLeader = False + # --------------------------------------------------------------------------- # Share Location Settings diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/ActionData.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/ActionData.xml index 677c57eb99..c3a56c5a7f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/ActionData.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/ActionData.xml @@ -1,48 +1,48 @@ - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -50,169 +50,208 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/CategoryData.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/CategoryData.xml index 45f3b66a2f..ca6343e1c4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/CategoryData.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/CategoryData.xml @@ -363,6 +363,38 @@ 15955 + + 16079 + 16080 + 16081 + 16082 + 16083 + 16084 + 16085 + 16086 + 16087 + 16088 + 16089 + 16090 + 16091 + 16092 + 16093 + 16094 + 16095 + 16096 + 16097 + 16098 + 16099 + 16100 + 16101 + 16102 + 16103 + 16104 + 16105 + 16106 + 16107 + 16108 + 5 6 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/PetExtractData.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/PetExtractData.xml new file mode 100644 index 0000000000..db6643827e --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/PetExtractData.xml @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008995.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008995.xml index 3f6daa7c89..073b7a8f58 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008995.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008995.xml @@ -3,7 +3,7 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008997.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008997.xml index 80076adb1d..42cab86e8f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008997.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008997.xml @@ -8,12 +8,12 @@ - + - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008998.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008998.xml index 62a0d611d9..025f6328d2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008998.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008998.xml @@ -1,6 +1,6 @@ - - + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008999.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008999.xml index a53e594a01..b55c1d74be 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008999.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0008999.xml @@ -1,9 +1,9 @@ - + - - + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009002.xml index 7a99859da0..82b8c47d24 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009002.xml @@ -2,7 +2,7 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009905001.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009905001.xml index 393837b9fd..83935767b9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009905001.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009905001.xml @@ -90,8 +90,8 @@ - - + + @@ -104,7 +104,7 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009918001.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009918001.xml index 67f8c0386d..508ef4a377 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009918001.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009918001.xml @@ -4,6 +4,6 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009919002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009919002.xml index 3d61bf39f3..12a0e94e60 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009919002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009919002.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009928.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009928.xml index 6d8332d6a9..ebce730eb6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009928.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009928.xml @@ -37,13 +37,13 @@ - + - + - + @@ -55,6 +55,6 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009930.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009930.xml index d455f653cc..ee374854bc 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009930.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009930.xml @@ -43,14 +43,14 @@ - + - + - + @@ -74,8 +74,8 @@ - - + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009931.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009931.xml index fdcc3fd917..408d164a08 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009931.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009931.xml @@ -34,23 +34,23 @@ - - - + + + - - + + - + - - - + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946.xml index c881844cf0..6549e6ab78 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946.xml @@ -61,10 +61,10 @@ - + - - + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946001.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946001.xml index b64d6192e7..9e4a29e100 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946001.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009946001.xml @@ -24,8 +24,8 @@ - + - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954.xml index 80fc92f2c1..74c42ea66c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954.xml @@ -11,7 +11,7 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954002.xml index 00f3b95dd4..9e813aba9f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009954002.xml @@ -3,9 +3,9 @@ - + - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009960.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009960.xml index 2181a417e7..51367f5dea 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009960.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009960.xml @@ -5,6 +5,6 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009961003.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009961003.xml index 1918b0307a..726f2322e5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009961003.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009961003.xml @@ -1,10 +1,10 @@ - - - - - + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009978.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009978.xml index 9609a6a3b7..1f825b07cf 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009978.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0009978.xml @@ -20,8 +20,8 @@ - - + + @@ -40,11 +40,11 @@ - - - - - + + + + + @@ -180,34 +180,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020001.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020001.xml index f75583bd9f..d6aefb919f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020001.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020001.xml @@ -55,7 +55,7 @@ - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020002.xml index 3a13b785e9..77c46e2cdf 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020002.xml @@ -11,19 +11,19 @@ - - - - - - - - + + + + + + + + - + - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020003.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020003.xml index 6634be2a44..8daa3b4a67 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020003.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020003.xml @@ -28,6 +28,6 @@ - - + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020004.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020004.xml index 96c61fb1c5..c10abbce14 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020004.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020004.xml @@ -10,5 +10,5 @@ - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020005.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020005.xml index 1631b3531f..155b820f5f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020005.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020005.xml @@ -1,21 +1,21 @@ - - - - + + + + - - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020006.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020006.xml index 278f4ac783..35bfa3cba2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020006.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020006.xml @@ -10,7 +10,7 @@ - - - + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020007.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020007.xml index 4aa18239df..9d055b0723 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020007.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020007.xml @@ -75,32 +75,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -113,7 +113,7 @@ - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020008.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020008.xml index 62627d1a58..a46de855df 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020008.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0020008.xml @@ -9,8 +9,8 @@ - - - - + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050001.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050001.xml index a99f30147b..962f274a28 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050001.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050001.xml @@ -1,9 +1,9 @@ - - - - + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050002.xml index 08c1f07d75..2ae7cf8bc9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030050002.xml @@ -3,7 +3,7 @@ - + @@ -13,9 +13,9 @@ - + - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030051002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030051002.xml index bda5734f08..f23114d6e4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030051002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030051002.xml @@ -4,8 +4,8 @@ - + - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030056002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030056002.xml index 76edbade05..6a8a587098 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030056002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0030056002.xml @@ -11,9 +11,9 @@ - + - + @@ -21,13 +21,13 @@ - + - - - - - - + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539.xml index b3ab899ffa..6f74ceb05e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539.xml @@ -5,18 +5,18 @@ - + - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539002.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539002.xml index 1972b1ca00..3c82f1a013 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539002.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/buylists/custom/0300539002.xml @@ -43,9 +43,9 @@ - - - + + + @@ -58,30 +58,30 @@ - - - - + + + + - - - - - + + + + + - - - - - + + + + + - + @@ -90,8 +90,8 @@ - - + + @@ -104,19 +104,19 @@ - - + + - - - + + + - - - - - + + + + + @@ -128,17 +128,17 @@ - + - - - - - - - + + + + + + + @@ -160,8 +160,8 @@ - - + + @@ -180,24 +180,24 @@ - - + + - - + + - - - - - - - - + + + + + + + + @@ -236,20 +236,20 @@ - - - + + + - + - - - + + + - + - + @@ -258,6 +258,6 @@ - + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30731.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30731.htm index 7d5bb217c7..daf4f90fc3 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30731.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30731.htm @@ -9,7 +9,7 @@ The Pet Manager Association is always happy to assist you and your pet.
--> - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30827.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30827.htm index 830447a916..1a6e7f97c6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30827.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30827.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30828.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30828.htm index 0a7f19fda4..81b47f5ca8 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30828.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30828.htm @@ -10,7 +10,7 @@ Pet Manager Waters:
--> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30829.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30829.htm index 61e46bf654..67f60c6f2e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30829.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30829.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30830.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30830.htm index 6b1860ae08..26536da2b6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30830.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30830.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30831.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30831.htm index b707cd690d..04d1428ac0 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30831.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/30831.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31067.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31067.htm index 9ff970708b..5963bbead2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31067.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31067.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31265.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31265.htm index 5de92941aa..acd3d39c17 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31265.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31265.htm @@ -10,7 +10,7 @@ Perhaps I should write a book, eh? "The Impact of Striders on the History of the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31309.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31309.htm index 9487647c8a..3d6ff06a25 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31309.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31309.htm @@ -10,7 +10,7 @@ Oh, hello. Ah, you noticed my pure-bred black-striped Alpine Cougar, eh? It is n --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31954.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31954.htm index c8025dde3e..e0218b5231 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31954.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/31954.htm @@ -10,7 +10,7 @@ As the number of people who interested in raising pets increases these days, the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/33579.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/33579.htm index c67cae00f5..cafc07db04 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/33579.htm +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/html/petmanager/33579.htm @@ -7,7 +7,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/instances/DwellingOfSpirits.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/instances/DwellingOfSpirits.xml index 24a5c3b457..c5467892ab 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/instances/DwellingOfSpirits.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/instances/DwellingOfSpirits.xml @@ -35,13 +35,6 @@ - - - - - - - @@ -49,77 +42,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/multisell/custom/600016.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/multisell/custom/600016.xml index 15f5a77492..b1bbf39e7a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/multisell/custom/600016.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/multisell/custom/600016.xml @@ -5,19 +5,19 @@ - + - + - + @@ -35,13 +35,13 @@
- + - + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm new file mode 100644 index 0000000000..51ace5fb0f --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm @@ -0,0 +1,7 @@ +Siben:
+
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java new file mode 100644 index 0000000000..6606e36f7e --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java @@ -0,0 +1,190 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfKingIgnis extends AbstractNpcAI +{ + // NPCs + private static final int IGNIS = 29105; + // Skills + private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1); + private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); + private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3); + private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); + private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5); + private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); + private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7); + private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); + private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9); + private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10); + + public ResidenceOfKingIgnis() + { + addAttackId(IGNIS); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "CAST_FIRE_RAGE_1": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill())) + { + npc.doCast(FIRE_RAG_1.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_2": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) + { + npc.doCast(FIRE_RAG_2.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_3": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill())) + { + npc.doCast(FIRE_RAG_3.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_4": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) + { + npc.doCast(FIRE_RAG_4.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_5": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill())) + { + npc.doCast(FIRE_RAG_5.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_6": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) + { + npc.doCast(FIRE_RAG_6.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_7": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill())) + { + npc.doCast(FIRE_RAG_7.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_8": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) + { + npc.doCast(FIRE_RAG_8.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_9": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill())) + { + npc.doCast(FIRE_RAG_9.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_10": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill())) + { + npc.doCast(FIRE_RAG_10.getSkill()); + } + break; + } + } + return null; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) + { + startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) + { + startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) + { + startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) + { + startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15))) + { + startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10))) + { + startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7))) + { + startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5))) + { + startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3))) + { + startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null); + } + else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3)) + { + startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null); + } + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + public static void main(String[] args) + { + new ResidenceOfKingIgnis(); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java new file mode 100644 index 0000000000..0bb5893075 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java @@ -0,0 +1,309 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import java.util.HashMap; +import java.util.Map; + +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; + +import ai.AbstractNpcAI; + +public class ResidenceOfKingPetram extends AbstractNpcAI +{ + // NPCs + private static final int PETRAM = 29108; + private static final int PETRAM_PIECE = 29116; + private static final int PETRAM_FRAGMENT = 29117; + // Skills + private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); + private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); + private static final SkillHolder TEST = new SkillHolder(5712, 1); + + public ResidenceOfKingPetram() + { + addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); + addAttackId(PETRAM); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + petram.doCast(EARTH_ENERGY.getSkill()); + + petram.setInvul(true); + petram.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!"); + + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + final MinionData minionData = StageData.getMinionsStageData(stage)[minionIndex]; + final Location minionLocation = minionData.getMinionLocation(); + world.setParameter("minion" + minionIndex, addSpawn(npc, minionData.getMinionId(), minionLocation.getX(), minionLocation.getY(), minionLocation.getZ(), minionLocation.getHeading(), false, -1, true, npc.getInstanceId())); + } + + startQuestTimer("SUPPORT_PETRAM", 200, npc, null); + } + break; + } + case "SUPPORT_PETRAM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getNpc(PETRAM) != null) && !world.getNpc(PETRAM).isDead()) + { + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + world.getParameters().getObject("minion" + minionIndex, Npc.class).setTarget(world.getNpc(PETRAM)); + world.getParameters().getObject("minion" + minionIndex, Npc.class).doCast(TEST.getSkill()); + } + startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); + } + break; + } + case "REMOVE_INVUL": + { + if (npc != null) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + if (petram != null) + { + petram.doCast(EARTH_FURY.getSkill()); + petram.setInvul(false); + petram.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); + } + + for (int i = 0; i < 12; i++) + { + final Npc minion = world.getParameters().getObject("minion" + i, Npc.class); + if (minion != null) + { + minion.deleteMe(); + } + } + } + } + break; + } + } + + return null; + } + + private int getHigherStage(Instance world) + { + for (int stage = StageData.getMinionsStageData().size() - 1; stage >= 0; stage--) + { + if (world.getParameters().getBoolean("stage" + stage, false)) + { + return stage; + } + } + + return 0; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + synchronized (this) + { + for (int stage = 0; stage < StageData.getMinionsStageData().size(); stage++) + { + if ((npc.getCurrentHpPercent() < StageData.getHpPercents()[stage]) && !world.getParameters().getBoolean("stage" + stage, false)) + { + world.setParameter("stage" + stage, true); + startQuestTimer("SPAWN_MINION", 100, npc, null); + } + } + } + + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + final int stage = getHigherStage(world); + int aliveMinionsCount = 0; + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + if ((world.getParameters().getObject("minion" + minionIndex, Npc.class) != null) && !world.getParameters().getObject("minion" + minionIndex, Npc.class).isDead()) + { + aliveMinionsCount++; + } + } + + boolean breakInvul = false; + switch (stage) + { + case 0: + { + if (aliveMinionsCount == 0) + { + breakInvul = true; + } + break; + } + case 1: + { + if (aliveMinionsCount <= 4) + { + breakInvul = true; + } + break; + } + case 2: + { + if (aliveMinionsCount <= 6) + { + breakInvul = true; + } + break; + } + } + + if (breakInvul) + { + startQuestTimer("REMOVE_INVUL", 500, world.getNpc(PETRAM), null); + } + + return super.onKill(npc, player, isSummon); + } + + private static class StageData + { + private static final int[] _hpPercents = new int[] + { + 75, + 50, + 10 + }; + private static final Map _minionsStageData = new HashMap<>(); + static + { + // Stage 1 + _minionsStageData.put(0, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_FRAGMENT, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_FRAGMENT, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_FRAGMENT, new Location(222077, 191017, -15486, 16383)) + }); + + // Stage 2 + _minionsStageData.put(1, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_FRAGMENT, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_FRAGMENT, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_FRAGMENT, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_FRAGMENT, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_FRAGMENT, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_FRAGMENT, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_FRAGMENT, new Location(221342, 190800, -15486, 10837)) + }); + // Stage 3 + _minionsStageData.put(2, new MinionData[] + { + new MinionData(PETRAM_PIECE, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_PIECE, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_PIECE, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_PIECE, new Location(222077, 191017, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_PIECE, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_PIECE, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_PIECE, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_PIECE, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_PIECE, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_PIECE, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221342, 190800, -15486, 10837)) + }); + } + + public static int[] getHpPercents() + { + return _hpPercents; + } + + public static Map getMinionsStageData() + { + return _minionsStageData; + } + + public static MinionData[] getMinionsStageData(int stage) + { + return _minionsStageData.get(stage); + } + } + + private static class MinionData + { + final int _minionId; + final Location _minionLocation; + + private MinionData(int minionId, Location minionLocation) + { + _minionId = minionId; + _minionLocation = minionLocation; + } + + public int getMinionId() + { + return _minionId; + } + + public Location getMinionLocation() + { + return _minionLocation; + } + } + + public static void main(String[] args) + { + new ResidenceOfKingPetram(); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java new file mode 100644 index 0000000000..d89d396c32 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java @@ -0,0 +1,179 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik, Mobius + */ +public class ResidenceOfKingProcella extends AbstractNpcAI +{ + // NPCs + private static final int PROCELLA = 29107; + private static final int PROCELLA_GUARDIAN_1 = 29112; + private static final int PROCELLA_GUARDIAN_2 = 29113; + private static final int PROCELLA_GUARDIAN_3 = 29114; + private static final int PROCELLA_STORM = 29115; + // Skills + private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); + private static final int HURRICANE_BOLT = 50043; + private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); + // Misc + private static final int STORM_MAX_COUNT = 16; + + public ResidenceOfKingProcella() + { + addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3); + addSpawnId(PROCELLA); + } + + @Override + public String onSpawn(Npc npc) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), npc, null); + startQuestTimer("SPAWN_STORM", 5000, npc, null); + world.setParameter("stormCount", 0); + } + return null; + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (npc.getId() == PROCELLA)) + { + world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); + world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); + world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + break; + } + case "SPAWN_STORM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) + { + world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); + final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); + procellaStorm.setRandomWalking(true); + world.getParameters().increaseInt("stormCount", 1); + startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); + } + break; + } + case "HIDE_PROCELLA": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + if (world.getNpc(PROCELLA).isInvisible()) + { + world.getNpc(PROCELLA).setInvisible(false); + } + else + { + world.getNpc(PROCELLA).setInvisible(true); + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player); + } + } + break; + } + case "CHECK_CHAR_INSIDE_RADIUS_NPC": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().orElse(null); // Usamos orElse(null) para evitar el Optional vac��β€��’Β­o + if ((plr != null) && (plr.isInsideRadius3D(npc, 100))) + { + npc.abortAttack(); + npc.abortCast(); + npc.setTarget(plr); + + if (plr.getKnownSkill(HURRICANE_BOLT) != null) // Verificamos si el jugador tiene la habilidad + { + if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) + { + npc.abortCast(); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) + { + npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); + } + } + } + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + } + break; + } + } + return null; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + if (npc.getId() == PROCELLA) + { + cancelQuestTimer("SPAWN_MINION", npc, player.getActingPlayer()); + cancelQuestTimer("SPAWN_STORM", npc, player.getActingPlayer()); + cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player.getActingPlayer()); + } + else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead())) + { + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfKingProcella(); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java new file mode 100644 index 0000000000..9c3c7ea37b --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java @@ -0,0 +1,209 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.data.xml.SkillData; +import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfQueenNebula extends AbstractNpcAI +{ + // NPCs + private static final int NEBULA = 29106; + private static final int WATER_SLIME = 29111; + // Skills + private static final int AQUA_RAGE = 50036; + private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); + private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); + private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); + private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); + private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); + private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); + + public ResidenceOfQueenNebula() + { + addKillId(NEBULA, WATER_SLIME); + addAttackId(NEBULA); + addSpawnId(NEBULA); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_WATER_SLIME": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().get(); + startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr); + if (npc.getId() == NEBULA) + { + npc.doCast(AQUA_SUMMON.getSkill()); + for (int i = 0; i < getRandom(4, 6); i++) + { + addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + } + } + } + break; + } + case "PLAYER_PARA": + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(true); + startQuestTimer("PLAYER_UNPARA", 5000, npc, player); + } + break; + } + case "PLAYER_UNPARA": + { + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); + player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(false); + break; + } + case "CAST_AQUA_RAGE": + { + startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); + if ((player.isInsideRadius3D(npc, 1000))) + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) + { + npc.doCast(AQUA_RAGE_2.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) + { + npc.doCast(AQUA_RAGE_3.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) + { + npc.doCast(AQUA_RAGE_4.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) + { + npc.doCast(AQUA_RAGE_5.getSkill()); + startQuestTimer("PLAYER_PARA", 100, npc, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + npc.abortCast(); + } + else if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) + { + npc.doCast(AQUA_RAGE_1.getSkill()); + } + } + break; + } + } + return null; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + return super.onSpawn(npc); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + switch (npc.getId()) + { + case NEBULA: + { + cancelQuestTimer("CAST_AQUA_RAGE", npc, player); + cancelQuestTimer("SPAWN_WATER_SLIME", npc, player); + break; + } + case WATER_SLIME: + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_1.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_2.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_3.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_4.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); + skill.applyEffects(player, player); + } + } + break; + } + } + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfQueenNebula(); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 5b501b1f1b..bcc74a8afe 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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; @@ -254,6 +255,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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/config.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/config.xml index c4c5f44366..79a6098a7c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/config.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/config.xml @@ -4,15 +4,15 @@ + - - - + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/rewards.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/rewards.xml index d6234162c4..d647b5069d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/rewards.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/events/LetterCollector/rewards.xml @@ -9,15 +9,15 @@ + - - - + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java index 9297b4ce79..fde0c97c17 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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); @@ -171,6 +173,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveExpAndSp", GiveExpAndSp::new); EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveItemByExp", GiveItemByExp::new); + EffectHandler.getInstance().registerHandler("GivePetXp", GivePetXp::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); @@ -194,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); @@ -235,7 +239,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::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("ModifyCraftPoints", ModifyCraftPoints::new); EffectHandler.getInstance().registerHandler("ModifyDeathPoints", ModifyDeathPoints::new); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/MasterHandler.java index 80cd97dfc1..074681ef62 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/MasterHandler.java @@ -148,6 +148,7 @@ import handlers.bypasshandlers.Link; import handlers.bypasshandlers.Multisell; import handlers.bypasshandlers.NpcViewMod; import handlers.bypasshandlers.Observation; +import handlers.bypasshandlers.PetExtractWindow; import handlers.bypasshandlers.PlayerHelp; import handlers.bypasshandlers.PrivateWarehouse; import handlers.bypasshandlers.QuestLink; @@ -467,6 +468,7 @@ public class MasterHandler Multisell.class, NpcViewMod.class, Observation.class, + PetExtractWindow.class, QuestLink.class, PlayerHelp.class, PrivateWarehouse.class, diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java new file mode 100644 index 0000000000..446334c464 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java @@ -0,0 +1,56 @@ +/* + * 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.bypasshandlers; + +import org.l2jmobius.gameserver.handler.IBypassHandler; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.network.serverpackets.pet.ShowPetExtractSystem; + +/** + * @author Geremy + */ +public class PetExtractWindow implements IBypassHandler +{ + private static final String[] COMMANDS = + { + "pet_extract_window", + }; + + @Override + public boolean useBypass(String command, Player player, Creature target) + { + if (!target.isNpc()) + { + return false; + } + + if (command.toLowerCase().startsWith(COMMANDS[0])) + { + player.sendPacket(ShowPetExtractSystem.STATIC_PACKET); + return true; + } + + return false; + } + + @Override + public String[] getBypassList() + { + return COMMANDS; + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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/MaxMagicCriticalRate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java similarity index 55% rename from L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java rename to L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java index c99b060259..c9801b6d42 100644 --- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java @@ -1,31 +1,53 @@ -/* - * 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.actor.Creature; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.skill.Skill; + +/** + * @author Geremy + */ +public class GivePetXp extends AbstractEffect +{ + private final int _xp; + + public GivePetXp(StatSet params) + { + _xp = params.getInt("xp", 0); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, Item item) + { + if (!effector.hasPet()) + { + return; + } + + effected.getActingPlayer().getPet().addExpAndSp(_xp, 0); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 951002a2c2..35bfbcb6bc 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 7e02e79abc..bff5a1734b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index 70789354f3..fd41f09a9a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index df05ef8607..b36b10a92e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetAttack.java index fa90ba401d..4c76932c3e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_DON_T_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_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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetHold.java index 04649bf332..72ad8a2b4e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetMove.java index edddbab322..817593d9a2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index eaa7bca994..858083f36a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetStop.java index efd4e36b0b..8b8cabc337 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 71d72e95b5..3e0acb89bd 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_DON_T_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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index 7b0ec565e4..41ecb77132 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index be6205b0f9..2b5a8f1e82 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index d119886221..6254d3db05 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index 36aa372909..7fa7f0a45c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 41b3dd19f2..4f91147611 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index fb269e325a..cf0218f87f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index a408928a04..f305fd2787 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java @@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR); } } + + @Override + public boolean isPetAction() + { + return true; + } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java index 4c6398780f..d1698bbf65 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java @@ -20,20 +20,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.l2jmobius.gameserver.data.xml.SkillData; -import org.l2jmobius.gameserver.enums.ChatType; -import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.enums.TeleportWhereType; -import org.l2jmobius.gameserver.instancemanager.ZoneManager; +import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.StatSet; 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.holders.SkillHolder; import org.l2jmobius.gameserver.model.instancezone.Instance; -import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; -import org.l2jmobius.gameserver.model.skill.Skill; -import org.l2jmobius.gameserver.model.skill.SkillCaster; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent; @@ -47,8 +42,12 @@ import instances.AbstractInstance; */ public class DwellingOfSpirits extends AbstractInstance { + private static final int PORTAL_OPEN_CHANCE = 40; + // CRITICAL NPCs private static final int RUIP = 22273; + private static final int FAIRY_C1 = 22271; + private static final int FAIRY_C2 = 22272; private static final int SEALSTONE = 34178; private static final int ANIMAEL = 34176; private static final int PORTAL_EVENT_FIRE = 15969; @@ -56,46 +55,10 @@ public class DwellingOfSpirits extends AbstractInstance private static final int PORTAL_EVENT_EARTH = 15972; private static final int PORTAL_EVENT_WIND = 15971; - // PROCELLA BOSS WIND private static final int KING_PROCELLA = 29107; - private static final int PROCELLA_GUARDIAN_1 = 29112; - private static final int PROCELLA_STORM = 29115; - - private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); - private static final int HURRICANE_BOLT = 50043; - private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); - private static final int STORM_MAX_COUNT = 20; // - - // PETRAM BOSS EARTH private static final int KING_PETRAM = 29108; - private static final int PETRAM_PIECE = 29116; - private static final int PETRAM_FRAGMENT = 29117; - // Skills - private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); - private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); - private static final SkillHolder TEST = new SkillHolder(5712, 1); - - // IGNIS BOSS FIRE - // NPCs private static final int KING_IGNIS = 29105; - // Skills - private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); - private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); - private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); - private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); - - // NEBULA BOSS WATER - // NPCs private static final int KING_NEBULA = 29106; - private static final int WATER_SLIME = 29111; - // Skills - private static final int AQUA_RAGE = 50036; - private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); - private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); - private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); - private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); - private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); - private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); // Entrace Portal Triggers private static final int WIND_FIRST_TRIGGER_1 = 16158880; @@ -107,38 +70,86 @@ public class DwellingOfSpirits extends AbstractInstance private static final int WATER_FIRST_TRIGGER_1 = 16157770; private static final int WATER_FIRST_TRIGGER_2 = 16157772; - // Statue Kill Indicator Triggers - private static final int KILL_INDICATOR_TRIGGER_1 = 16159990; - private static final int KILL_INDICATOR_TRIGGER_2 = 16159994; - private static final int KILL_INDICATOR_TRIGGER_3 = 16159996; - private static final int KILL_INDICATOR_TRIGGER_4 = 16159998; - private static final int KILL_INDICATOR_TRIGGER_5 = 16159992; + // @formatter:off + private static final int[][] PORTAL_TRIGGER_IDS = + { + { 16158880, 16158882 }, + { 16156660, 16156662 }, + { 16155550, 16155552 }, + { 16157770, 16157772 } + }; + + private static final Location IGNIS_FIRE_L = new Location(202374, 168153, -15485); + private static final Location PETRAM_EARTH_L = new Location(222081, 190538, -15485); + private static final Location NEBULA_WATER_L = new Location(222149, 168087, -15485); + private static final Location PROCELLA_WIN_L = new Location(212884, 178847, -15485); + + private static final Location PETRAM_EARTH_RETURN_L = new Location(-114321, -77262, -11445); + private static final Location IGNIS_FIRE_RETURN_L = new Location(-114322, -77262, -11445); + private static final Location NEBULA_WATER_RETURN_L = new Location(-114323, -77262, -11445); + private static final Location PROCELLA_WIN_RETURN_L = new Location(-114324, -77262, -11445); + + private static final int[][][] portalConfigs = + { + {{EARTH_FIRST_TRIGGER_1, EARTH_FIRST_TRIGGER_2, KING_PETRAM}}, + {{FIRE_FIRST_TRIGGER_1, FIRE_FIRST_TRIGGER_2, KING_IGNIS}}, + {{WATER_FIRST_TRIGGER_1, WATER_FIRST_TRIGGER_2, KING_NEBULA}}, + {{WIND_FIRST_TRIGGER_1, WIND_FIRST_TRIGGER_2, KING_PROCELLA}} + }; + + private static final int[][] portalSpawnCoordinates = + { + {222063, 191514, -15486, 50142}, + {202350, 169121, -15484, 48103}, + {222127, 169057, -15486, 48730}, + {212862, 179828, -15489, 48103} + }; + // @formatter:on private static final int TEMPLATE_ID = 214; private static final Map PORTAL_MSG = new HashMap<>(); static { - PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(0, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); PORTAL_MSG.put(2, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WATER_IS_OPEN); PORTAL_MSG.put(3, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WIND_IS_OPEN); - PORTAL_MSG.put(4, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); - PORTAL_MSG.put(5, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); + PORTAL_MSG.put(4, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); } + // Zone + private static final int DWELLING_CENTRAL = 21400000; + + private static final int IGNIS_PORTAL_ENTER_ID = 202201; + private static final int PETRAM_PORTAL_ENTER_ID = 202202; + private static final int NEBULA_PORTAL_ENTER_ID = 202203; + private static final int PROCELLA_PORTAL_ENTER_ID = 202204; + + // Portals return IDs + private static final int IGNIS_PORTAL_RETURN_ID = 202205; + private static final int PETRAM_PORTAL_RETURN_ID = 202206; + private static final int NEBULA_PORTAL_RETURN_ID = 202207; + private static final int PROCELLA_PORTAL_RETURN_ID = 202208; + public DwellingOfSpirits() { super(TEMPLATE_ID); addKillId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); - addKillId(PROCELLA_GUARDIAN_1); - addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); - addKillId(WATER_SLIME); + addKillId(FAIRY_C1, FAIRY_C2, RUIP); addAttackId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); addSpawnId(KING_NEBULA); addFirstTalkId(ANIMAEL, SEALSTONE); addTalkId(ANIMAEL); addStartNpc(SEALSTONE); - addCreatureSeeId(RUIP, ANIMAEL); + addCreatureSeeId(ANIMAEL); + addEnterZoneId(DWELLING_CENTRAL); + addEnterZoneId(IGNIS_PORTAL_ENTER_ID, IGNIS_PORTAL_RETURN_ID); + addEnterZoneId(PETRAM_PORTAL_ENTER_ID, PETRAM_PORTAL_RETURN_ID); + addEnterZoneId(NEBULA_PORTAL_ENTER_ID, NEBULA_PORTAL_RETURN_ID); + addEnterZoneId(PROCELLA_PORTAL_ENTER_ID, PROCELLA_PORTAL_RETURN_ID); + addInstanceEnterId(TEMPLATE_ID); + addInstanceLeaveId(TEMPLATE_ID); } @Override @@ -180,779 +191,106 @@ public class DwellingOfSpirits extends AbstractInstance case "TELEPORT": { - player.teleToLocation(TeleportWhereType.TOWN, null); - return null; - } - //////////////// BOSS PROCELLA WIND ACTION ///////////// - case "SPAWN_MINION_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (npc.getId() == KING_PROCELLA)) + final Instance instance = player.getInstanceWorld(); + if (instance != null) { - world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); - world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_1, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); - world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_1, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); - startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(KING_PROCELLA), player); + instance.finishInstance(); + player.teleToLocation(TeleportWhereType.TOWN, null); } - break; - } - case "SPAWN_STORM_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) - { - world.getNpc(KING_PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); - final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(KING_PROCELLA).getX() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getY() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); - procellaStorm.setRandomWalking(true); - world.getParameters().increaseInt("stormCount", 1); - startQuestTimer("SPAWN_STORM_PROCELLA", 30000, world.getNpc(KING_PROCELLA), player); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, procellaStorm, player); - } - break; - } - case "HIDE_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) >= 1) - { - world.getNpc(KING_PROCELLA).setInvisible(true); - } - else if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) == 0) - { - world.getNpc(KING_PROCELLA).setInvisible(false); - startQuestTimer("SPAWN_MINION_PROCELLA", 90000 + getRandom(-15000, 11000), world.getNpc(KING_PROCELLA), player); - } - break; - } - case "CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().orElse(null); - if ((plr != null) && (plr.isInsideRadius3D(npc, 200))) - { - npc.abortAttack(); - npc.abortCast(); - npc.setTarget(plr); - if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) - { - npc.abortCast(); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) - { - npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); - } - } - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - } - break; - } - //////////////// BOSS PETRAM EARTH ACTION ///////////// - case "SPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - npc.doCast(EARTH_ENERGY.getSkill()); - - if (!world.getParameters().getBoolean("spawnedMinions", false)) - { - world.getParameters().set("spawnedMinions", true); - - final int stage = world.getParameters().getInt("stage", 0); - world.getParameters().set("stage", stage + 1); - - world.setParameter("minionpetram1", addSpawn(npc, PETRAM_FRAGMENT, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram3", addSpawn(npc, PETRAM_FRAGMENT, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId())); - - npc.setInvul(true); - npc.broadcastSay(ChatType.NPC_SHOUT, "HaHahaha, fighters lets kill them. Now Im invul!!!"); - } - - startQuestTimer("SUPPORT_PETRAM", 3000, npc, player); - } - break; - } - case "UNSPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - world.getParameters().set("spawnedMinions", false); - - npc.setInvul(false); - npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); - } - break; - } - case "SUPPORT_PETRAM": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Npc m1 = world.getParameters().getObject("minionpetram1", Npc.class); - final Npc m2 = world.getParameters().getObject("minionpetram2", Npc.class); - final Npc m3 = world.getParameters().getObject("minionpetram3", Npc.class); - final Npc m4 = world.getParameters().getObject("minionpetram4", Npc.class); - if (!m1.isDead()) - { - m1.setTarget(world.getNpc(KING_PETRAM)); - m1.doCast(TEST.getSkill()); - } - if (!m2.isDead()) - { - m2.setTarget(world.getNpc(KING_PETRAM)); - m2.doCast(TEST.getSkill()); - } - if (!m3.isDead()) - { - m3.setTarget(world.getNpc(KING_PETRAM)); - m3.doCast(TEST.getSkill()); - } - if (!m4.isDead()) - { - m4.setTarget(world.getNpc(KING_PETRAM)); - m4.doCast(TEST.getSkill()); - } - - startQuestTimer("SUPPORT_PETRAM", 10100, npc, player); - } - break; - } - case "EARTH_FURY": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - npc.doCast(EARTH_FURY.getSkill()); - } - break; - } - //////////////// BOSS IGNIS ACTION ///////////// - case "CAST_FIRE_RAGE_1": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) - { - npc.doCast(FIRE_RAG_2.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_2": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) - { - npc.doCast(FIRE_RAG_4.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_3": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) - { - npc.doCast(FIRE_RAG_6.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_4": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) - { - npc.doCast(FIRE_RAG_8.getSkill()); - } - break; - } - //////////////// BOSS NEBULA ACTION ///////////// - case "SPAWN_WATER_SLIME": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().get(); - if (plr != null) - { - startQuestTimer("CAST_AQUA_RAGE", 30000 + getRandom(-15000, 15000), npc, plr); - } - if (npc.getId() == KING_NEBULA) - { - npc.doCast(AQUA_SUMMON.getSkill()); - for (int i = 0; i < getRandom(4, 6); i++) - { - addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); - startQuestTimer("SPAWN_WATER_SLIME", 80000, npc, null); - } - } - } - break; - } - case "PLAYER_PARA": - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(true); - startQuestTimer("PLAYER_UNPARA", 5000, npc, player); - } - break; - } - case "PLAYER_UNPARA": - { - player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); - player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(false); - break; - } - case "CAST_AQUA_RAGE": - { - startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); - if ((player.isInsideRadius3D(npc, 1000))) - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) - { - npc.doCast(AQUA_RAGE_2.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) - { - npc.doCast(AQUA_RAGE_3.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) - { - npc.doCast(AQUA_RAGE_4.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) - { - npc.doCast(AQUA_RAGE_5.getSkill()); - startQuestTimer("PLAYER_PARA", 100, npc, player); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - npc.abortCast(); - } - else - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) - { - npc.doCast(AQUA_RAGE_1.getSkill()); - } - } - } - break; - } - case "check_status": - { - final Instance world = player.getInstanceWorld(); - if (!isInInstance(world)) - { - return null; - } - - switch (world.getStatus()) - { - case 0: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(1); - world.despawnGroup("sealstone"); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 1: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(2); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 2: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(3); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 3: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(4); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 4: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(5); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(3), null)); - addSpawn(KING_PROCELLA, 212862, 179828, -15489, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 5: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 6: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(7); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 7: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(8); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 8: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(9); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_2"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 9: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(10); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(1), null)); - addSpawn(KING_PETRAM, 222063, 191514, -15486, 50142, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 10: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 11: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(12); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 12: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(13); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 13: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(14); - world.spawnGroup("ruipwave_2"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 14: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(15); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); - addSpawn(KING_IGNIS, 202350, 169121, -15484, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 15: // Dummy stage pause, u need defeat boss for continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 16: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(17); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 17: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(18); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 18: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(19); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 19: // need defeat boss for finish. - { - if (world.getAliveNpcCount(RUIP) == 0) - - { - world.setStatus(20); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(2), null)); - addSpawn(KING_NEBULA, 222127, 169057, -15486, 48730, false, 0, false, world.getId()); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 20: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.getParameters().set("DwellingOfSpiritsFinished", true); - world.setStatus(21); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - } - - return null; } } return super.onAdvEvent(event, npc, player); - - } - - @Override - public String onSpawn(Npc npc) - { - startQuestTimer("SPAWN_WATER_SLIME", 40000, npc, null); - return super.onSpawn(npc); - } - - @Override - public String onAttack(Npc npc, Player player, int damage, boolean isSummon, Skill skill) - { - final Instance world = npc.getInstanceWorld(); - if (world == null) - { - return null; - } - - switch (npc.getId()) - { - case KING_PROCELLA: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) - { - startQuestTimer("SPAWN_MINION_PROCELLA", 80000 + getRandom(-15000, 15000), npc, player); - startQuestTimer("SPAWN_STORM_PROCELLA", 4000, npc, player); - world.setParameter("stormCount", 0); - } - break; - } - case KING_PETRAM: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.80)) - { - startQuestTimer("EARTH_FURY", 1000, npc, player); - if ((world.getParameters().getInt("stage", 0) == 0) || (npc.getCurrentHp() < (npc.getMaxHp() * 0.50))) - { - startQuestTimer("SPAWN_MINION", 1000, npc, player); - } - } - break; - } - case KING_IGNIS: - { - if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) - { - startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) - { - startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) - { - startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) - { - startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); - } - break; - } - } - - return null; - } - - @Override - public String onCreatureSee(Npc npc, Creature creature) - { - if (creature.isPlayer()) - { - final Instance world = creature.getInstanceWorld(); - if (world.getStatus() >= 5) - { - enableZoneWind(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 10) - { - enableZoneEarth(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 15) - { - enableZoneFire(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 20) - { - enableZoneWater(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 21) - { - world.despawnGroup("ruipwave_1"); - world.despawnGroup("ruipwave_2"); - world.despawnGroup("NormalMobs"); - world.finishInstance(); - } - } - - return super.onCreatureSee(npc, creature); } @Override public String onKill(Npc npc, Player player, boolean isSummon) { final Instance instance = npc.getInstanceWorld(); + final StatSet worldParameters = instance.getParameters(); + + int totalBossDefeatCount = worldParameters.getInt("totalBossDefeatCount", 0); switch (npc.getId()) { - case KING_PETRAM: + case RUIP: + case FAIRY_C1: + case FAIRY_C2: { - final Npc portal = addSpawn(PORTAL_EVENT_EARTH, 222065, 192767, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); // set the portal visible - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneEarthExit(); - cancelQuestTimer("SPAWN_MINION", npc, player); - instance.setStatus(12); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PETRAM_FRAGMENT)) + if (Rnd.get(100) <= PORTAL_OPEN_CHANCE) { - spawn.deleteMe(); - } - break; - } - case KING_NEBULA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WATER, 222127, 170488, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); - setActive(true); - enableZoneWindExit(); - instance.setStatus(21); - instance.spawnGroup("animael"); - break; - } - case KING_IGNIS: - { - final Npc portal = addSpawn(PORTAL_EVENT_FIRE, 202349, 170533, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneFireExit(); - instance.setStatus(17); - break; - } - case KING_PROCELLA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WIND, 212863, 181090, -15487, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneWaterExit(); - instance.setStatus(7); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PROCELLA_GUARDIAN_1)) - { - spawn.deleteMe(); - } - break; - } - case PETRAM_FRAGMENT: - { - startQuestTimer("UNSPAWN_MINION", 1000, instance.getNpc(KING_PETRAM), player); - break; - } - case PROCELLA_GUARDIAN_1: - { - - startQuestTimer("HIDE_PROCELLA", 1000, instance.getNpc(KING_PROCELLA), player); - break; - } - case WATER_SLIME: - { - if (getRandomBoolean()) - { - switch (player.getAffectedSkillLevel(AQUA_RAGE)) + int portalId = Rnd.get(4); + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + + if (!isPortalOpened) { - case 1: + if (instance.getStatus() > totalBossDefeatCount) { - player.stopSkillEffects(AQUA_RAGE_1.getSkill()); - break; - } - case 2: - { - player.stopSkillEffects(AQUA_RAGE_2.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); - skill.applyEffects(player, player); - break; - } - case 3: - { - player.stopSkillEffects(AQUA_RAGE_3.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); - skill.applyEffects(player, player); - break; - } - case 4: - { - player.stopSkillEffects(AQUA_RAGE_4.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); - skill.applyEffects(player, player); - break; + return super.onKill(npc, player, isSummon); } + instance.setStatus(instance.getStatus() + 1); + openPortal(player, portalId, instance); + worldParameters.set("portal" + portalId + "Opened", true); } } break; } + + case KING_PETRAM: + case KING_PROCELLA: + case KING_IGNIS: + case KING_NEBULA: + { + spawnExitPortal(instance, player, npc.getId()); + CheckGeneralResidenceStages(npc, instance); + + break; + } } return super.onKill(npc, player, isSummon); } + @Override + public String onEnterZone(Creature creature, ZoneType zone) + { + Instance instance = creature.getInstanceWorld(); + if ((instance != null) && creature.isPlayer()) + { + + final StatSet worldParameters = instance.getParameters(); + + if (zone.getId() == DWELLING_CENTRAL) + { + worldParameters.set("InsideResidence", true); + handleCentralZone(instance, worldParameters); + } + + int portalId = getPortalIdByZone(zone.getId()); + Location[] locations = getLocationsForPortal(portalId); + + if ((portalId >= 0) && (locations[0] != null)) + { + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + boolean isPortalExitOpened = worldParameters.getBoolean("portalExit" + portalId, false); + boolean InsideResidence = worldParameters.getBoolean("InsideResidence", false); + + if (isPortalOpened && (InsideResidence)) + { + creature.teleToLocation(locations[0], instance); + worldParameters.set("InsideResidence", false); + } + + if (isPortalExitOpened && (!InsideResidence)) + { + creature.teleToLocation(locations[1], instance); + } + } + + } + return null; + } + @Override public String onFirstTalk(Npc npc, Player player) { @@ -971,87 +309,251 @@ public class DwellingOfSpirits extends AbstractInstance return super.onFirstTalk(npc, player); } - // PORTALS - private void enableZoneWind() + private void openPortal(Player player, int id, Instance instance) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_wind"); - if (zone != null) + + if ((id >= 0) && (id < portalSpawnCoordinates.length)) { - zone.setEnabled(true); + int[] coordinates = portalSpawnCoordinates[id]; + int trigger1 = portalConfigs[id][0][0]; + int trigger2 = portalConfigs[id][0][1]; + int kingId = portalConfigs[id][0][2]; + + if ((id >= 0) && (id < PORTAL_MSG.size())) + { + NpcStringId portalMessage = PORTAL_MSG.get(id); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, portalMessage, null)); + } + addSpawn(kingId, coordinates[0], coordinates[1], coordinates[2], coordinates[3], false, 0, false, instance.getId()); + + instance.setParameter("TRIGGER_1_" + id, trigger1); + instance.setParameter("TRIGGER_2_" + id, trigger2); + + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } - private void enableZoneEarth() + private void spawnExitPortal(Instance instance, Player player, int bossId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_earth"); - if (zone != null) + Npc portal; + int portalId; + Location portalLocation; + + final StatSet worldParameters = instance.getParameters(); + worldParameters.set("portalExit" + getPortalByBossId(bossId), true); + + switch (bossId) { - zone.setEnabled(true); + case KING_PROCELLA: + { + portalId = PORTAL_EVENT_WIND; + portalLocation = new Location(212863, 181090, -15487); + break; + } + case KING_PETRAM: + { + portalId = PORTAL_EVENT_EARTH; + portalLocation = new Location(222065, 192767, -15488); + break; + } + case KING_IGNIS: + { + portalId = PORTAL_EVENT_FIRE; + portalLocation = new Location(202349, 170533, -15488); + break; + } + case KING_NEBULA: + { + portalId = PORTAL_EVENT_WATER; + portalLocation = new Location(222127, 170488, -15488); + break; + } + default: + { + return; + } + } + portal = addSpawn(portalId, portalLocation, false, 0, false, instance.getId()); + + if (portal != null) + { + portal.setDisplayEffect(1); + } + + } + + private int getPortalByBossId(int bossId) + { + switch (bossId) + { + case KING_PETRAM: + { + return 0; + } + case KING_IGNIS: + { + return 1; + } + case KING_NEBULA: + { + return 2; + } + case KING_PROCELLA: + { + return 3; + } + default: + return -1; } } - private void enableZoneFire() + private int getPortalIdByZone(int zoneId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_fire"); - if (zone != null) + switch (zoneId) { - zone.setEnabled(true); + case PETRAM_PORTAL_ENTER_ID: + case PETRAM_PORTAL_RETURN_ID: + { + return 0; + } + case IGNIS_PORTAL_ENTER_ID: + case IGNIS_PORTAL_RETURN_ID: + { + return 1; + } + case NEBULA_PORTAL_ENTER_ID: + case NEBULA_PORTAL_RETURN_ID: + { + return 2; + } + case PROCELLA_PORTAL_ENTER_ID: + case PROCELLA_PORTAL_RETURN_ID: + { + return 3; + } + default: + { + return -1; + } } } - private void enableZoneWater() + private Location[] getLocationsForPortal(int portalId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_water"); - if (zone != null) + Location[] locations = new Location[2]; + + switch (portalId) { - zone.setEnabled(true); + case 0: + { + locations[0] = PETRAM_EARTH_L; + locations[1] = PETRAM_EARTH_RETURN_L; + break; + } + case 1: + { + locations[0] = IGNIS_FIRE_L; + locations[1] = IGNIS_FIRE_RETURN_L; + break; + } + case 2: + { + locations[0] = NEBULA_WATER_L; + locations[1] = NEBULA_WATER_RETURN_L; + break; + } + case 3: + { + locations[0] = PROCELLA_WIN_L; + locations[1] = PROCELLA_WIN_RETURN_L; + break; + } + } + + return locations; + } + + private void CheckGeneralResidenceStages(Npc npc, Instance instance) + { + final StatSet worldParameters = instance.getParameters(); + + int portalId = getPortalByBossId(npc.getId()); + + if ((portalId >= 0) && (portalId < portalConfigs.length)) + { + String bossDefeatCountKey = "bossOfPortal_" + portalId + "_defeat_count"; + int currentDefeatCount = worldParameters.getInt(bossDefeatCountKey, 0); + int newDefeatCount = currentDefeatCount + 1; + + worldParameters.set(bossDefeatCountKey, newDefeatCount); + } + + int totalBossDefeatCount = 0; + + for (int i = 0; i < portalConfigs.length; i++) + { + String bossDefeatCountKey = "bossOfPortal_" + i + "_defeat_count"; + totalBossDefeatCount += worldParameters.getInt(bossDefeatCountKey, 0); + } + + worldParameters.set("totalBossDefeatCount", totalBossDefeatCount); + + if (totalBossDefeatCount >= 4) + { + instance.spawnGroup("animael"); + instance.despawnGroup("ruipwave_1"); + instance.despawnGroup("NormalMobs"); } } - private void enableZoneWindExit() + private void handleCentralZone(Instance instance, StatSet worldParameters) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_procella"); - if (zone != null) + for (int id = 0; id < PORTAL_TRIGGER_IDS.length; id++) { - zone.setEnabled(true); - } - } - - private void enableZoneEarthExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_petram"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneFireExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_ignis"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneWaterExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_nebula"); - if (zone != null) - { - zone.setEnabled(true); + int trigger1 = worldParameters.getInt("TRIGGER_1_" + id, -1); + int trigger2 = worldParameters.getInt("TRIGGER_2_" + id, -1); + + if ((trigger1 != -1) && (trigger2 != -1)) + { + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } } private void startEvent(Npc npc, Player player) { - if (!player.getInstanceWorld().getParameters().getBoolean("DwellingOfSpiritsFinished", false)) + final Instance instance = player.getInstanceWorld(); + instance.setParameter("Running", true); + player.getInstanceWorld().broadcastPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); + instance.spawnGroup("ruipwave_1"); + instance.spawnGroup("NormalMobs"); + + if (npc.getId() == SEALSTONE) { - player.sendPacket(new ExSendUIEvent(player, false, false, 1800, 2, NpcStringId.TIME_LEFT)); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(5), null)); - startQuestTimer("check_status", 1000, null, player); + instance.despawnGroup("sealstone"); } + + } + + @Override + public void onInstanceEnter(Player player, Instance instance) + { + boolean Running = instance.getParameters().getBoolean("Running", false); + if ((instance.getRemainingTime() > 0) && Running) + { + player.sendPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + } + } + + @Override + public void onInstanceLeave(Player player, Instance instance) + { + + player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); } public static void main(String[] args) diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java index ff278fe85c..3465ec2a61 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.ai.AttackableAI; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.data.xml.SkillData; import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData; +import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.enums.ShortcutType; import org.l2jmobius.gameserver.enums.SkillFinishType; import org.l2jmobius.gameserver.instancemanager.InstanceManager; @@ -59,6 +60,8 @@ public class TimedHunting extends AbstractInstance private static final int PANJI = 34125; // Skill private static final int BUFF = 45197; + private static final int BUFF_FOR_KAMAEL = 45198; + // Misc private static final int[] TEMPLATES = { @@ -187,7 +190,14 @@ public class TimedHunting extends AbstractInstance } npc.setTarget(player); - if (!player.getEffectList().isAffectedBySkill(BUFF)) + if (player.getRace() == Race.KAMAEL) + { + if (!player.getEffectList().isAffectedBySkill(BUFF_FOR_KAMAEL)) + { + npc.doCast(new SkillHolder(BUFF_FOR_KAMAEL, 1).getSkill()); + } + } + else if (!player.getEffectList().isAffectedBySkill(BUFF)) { npc.doCast(new SkillHolder(BUFF, 1).getSkill()); } @@ -257,6 +267,7 @@ public class TimedHunting extends AbstractInstance player.sendPacket(new TimedHuntingZoneExit(108)); // Training Zone id. player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_FOR_KAMAEL); instance.setParameter("PlayerIsOut", true); // Restore normal skills. diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/augmentation/options/50100-50199.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/augmentation/options/50100-50199.xml index a8ca1f4868..d51c973aeb 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/augmentation/options/50100-50199.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/augmentation/options/50100-50199.xml @@ -675,38 +675,38 @@ diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49400-49499.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49400-49499.xml index a61f30a273..a5da445f5b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49400-49499.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49400-49499.xml @@ -1430,13 +1430,23 @@ - + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49500-49599.xml index f8466f8d5f..8b8796b7da 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49500-49599.xml @@ -424,6 +424,8 @@ + + @@ -431,6 +433,12 @@ + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49800-49899.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49800-49899.xml index 4a83408216..36dffbd7a7 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49800-49899.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/49800-49899.xml @@ -772,6 +772,10 @@ + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/71900-71999.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/71900-71999.xml index 05e0eee6c0..0836b9f0f3 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/71900-71999.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/71900-71999.xml @@ -468,7 +468,7 @@ - ‬ + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94100-94199.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94100-94199.xml index a811a3bb9d..3037b7860d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94100-94199.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94100-94199.xml @@ -292,6 +292,16 @@ + + + + + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94400-94499.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94400-94499.xml index f58fcf1048..1dc2c3e069 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94400-94499.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94400-94499.xml @@ -1232,7 +1232,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94500-94599.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94500-94599.xml index 55a6db9c24..caeeeaccec 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94500-94599.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94500-94599.xml @@ -190,7 +190,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94600-94699.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94600-94699.xml index 5b422a21bd..5728bd34fd 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94600-94699.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/items/94600-94699.xml @@ -604,7 +604,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/pets/16079_BuffaloCalt.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/pets/16079_BuffaloCalf.xml similarity index 97% rename from L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/pets/16079_BuffaloCalt.xml rename to L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/pets/16079_BuffaloCalf.xml index d4c7fa3288..b0f4576405 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/pets/16079_BuffaloCalt.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/pets/16079_BuffaloCalf.xml @@ -1,1721 +1,1721 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/01800-01899.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/01800-01899.xml index c537387a10..8ac12c3e7f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/01800-01899.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/01800-01899.xml @@ -1299,6 +1299,7 @@ 1 2 3 + 4 3 KNOCKDOWN diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39100-39199.xml index 13daef1276..a1e93ff80c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39100-39199.xml @@ -57,7 +57,19 @@
icon.etc_reagent_white_i00 + 2 + 1 A1 + 5 + 0 + SELF + SINGLE + + + 500 + DIFF + + icon.sa_cube @@ -2511,6 +2523,59 @@ icon.sa_cube + 1 A1 + -1 + 500 + 500 + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39200-39299.xml index 0fbc413456..4895c42819 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39200-39299.xml @@ -2064,7 +2064,7 @@ 1200 1 - 2 + 2 4 60000 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39300-39399.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39300-39399.xml index 1489e40b2d..7d283129c1 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39300-39399.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/39300-39399.xml @@ -479,14 +479,14 @@ - + icon.etc_wit_symbol_i01 A1 500 900000 - + icon.etc_wit_symbol_i01 A1 @@ -494,7 +494,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -502,7 +502,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -510,7 +510,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -518,7 +518,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -529,7 +529,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -540,7 +540,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -551,7 +551,7 @@ -671 43 - + icon.etc_wit_symbol_i01 A1 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/40200-40299.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/40200-40299.xml index 4b15e8843b..cea4ce1025 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/40200-40299.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/40200-40299.xml @@ -618,11 +618,14 @@ 1 94480 5 - 0 - 1 5 PET SINGLE + + + 100000000 + + @@ -640,12 +643,14 @@ A1 1 94517 - 5 - 0 - 1 5 PET SINGLE + + + 2000000000 + + icon.skill0000 @@ -834,6 +839,16 @@ icon.skill0000 A1 + 1 + 94635 + 5 + PET + SINGLE + + + 1000000 + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/45100-45199.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/45100-45199.xml index 75f2986352..5e63cfe41d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/45100-45199.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/45100-45199.xml @@ -4109,13 +4109,33 @@ icon.skill_kamael_shadowside - A1 - 1 - 700 - 0 - 660 + A2 + 1 + 600 + KAMAEL_TRANSFORM + KAMAEL_BLACK_TRANSFORM;LONG_RAPIER_BLACK_AVE;BLACK_STANCE_AVE + 4 + + 20 + 60 + + A2 + 1 TARGET SINGLE + + + TRANSFORM + + + 50 + DIFF + + + 3 + 50 + + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50400-50499.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50400-50499.xml index e65612a356..d2779345ea 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50400-50499.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50400-50499.xml @@ -165,8 +165,12 @@ 80 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -266,8 +270,12 @@ 150 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -306,8 +314,6 @@ icon.bless_effect_enchant P - 5 - 1 200 @@ -321,8 +327,12 @@ 200 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/55200-55299.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/55200-55299.xml index f83993fe06..7e76cd190d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/55200-55299.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/55200-55299.xml @@ -500,7 +500,7 @@ 1200 ATTACK_TIME_DOWN 1 - 70102 + 70102 75 2 1 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt index 2637946736..ac90c9071c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt @@ -12,6 +12,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. @@ -143,6 +145,7 @@ GiveClanReputation: Gives clan reputation points to a players clan. (l2jmobius) GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveItemByExp: Gives an item when a certain amount of EXP is gathered. (l2jmobius) +GivePetXp: Gives a given amount of XP to a pet. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. GiveXp: Gives a given amount of XP. (l2jmobius) @@ -162,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. @@ -206,7 +210,6 @@ MAtk: M. Atk. stat. MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius) MaxCp: Max. CP stat. MaxHp: Max. HP stat. -MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius) MaxMp: Max. MP stat. ModifyCraftPoints: Modifies player Craft Point count. (l2jmobius) ModifyDeathPoints: Modifies player Death Point count. (l2jmobius) @@ -273,6 +276,7 @@ RearDamage: Multiplier for damage done from behind the target. (l2jmobius) RebalanceHP: Balances targets' current HP. RebalanceHPSummon: Balances targets' current HP for summons. RecoverVitalityInPeaceZone: Recover periodically vitality when player is in a peace zone. (l2jmobius) +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_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd index 8bc61661ac..cc614f7a31 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd @@ -40,6 +40,7 @@ + diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/PetExtractData.xsd b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/PetExtractData.xsd new file mode 100644 index 0000000000..e9115b614a --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/PetExtractData.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/no_landing.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/no_landing.xml index 4b280f64a8..88b454d0db 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/no_landing.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/no_landing.xml @@ -58,4 +58,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/teleportzones.xml index b5fe1819db..69f7a9aad1 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/teleportzones.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/zones/teleportzones.xml @@ -1,79 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java index cdae7179ed..d396481f39 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java @@ -639,6 +639,7 @@ public class Config public static boolean ENABLE_AUTO_ITEM; public static boolean AUTO_PLAY_ATTACK_ACTION; public static boolean RESUME_AUTO_PLAY; + public static boolean ENABLE_AUTO_ASSIST; public static int SHARING_LOCATION_COST; public static int TELEPORT_SHARE_LOCATION_COST; @@ -1312,6 +1313,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; @@ -2182,6 +2184,7 @@ public class Config ENABLE_AUTO_ITEM = generalConfig.getBoolean("EnableAutoItem", true); AUTO_PLAY_ATTACK_ACTION = generalConfig.getBoolean("AutoPlayAttackAction", true); RESUME_AUTO_PLAY = generalConfig.getBoolean("ResumeAutoPlay", false); + ENABLE_AUTO_ASSIST = generalConfig.getBoolean("AssistLeader", false); SHARING_LOCATION_COST = generalConfig.getInt("ShareLocationLcoinCost", 50); TELEPORT_SHARE_LOCATION_COST = generalConfig.getInt("TeleportShareLocationLcoinCost", 400); @@ -3325,6 +3328,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/GameServer.java index 0456971ac0..da4a3f2e90 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/GameServer.java @@ -92,6 +92,7 @@ import org.l2jmobius.gameserver.data.xml.NpcNameLocalisationData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.data.xml.PetAcquireList; import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; import org.l2jmobius.gameserver.data.xml.PetSkillData; import org.l2jmobius.gameserver.data.xml.PetTypeData; import org.l2jmobius.gameserver.data.xml.PlayerTemplateData; @@ -321,6 +322,8 @@ public class GameServer CharInfoTable.getInstance(); AdminData.getInstance(); PetDataTable.getInstance(); + PetTypeData.getInstance(); + PetExtractData.getInstance(); CubicData.getInstance(); CharSummonTable.getInstance().init(); BeautyShopData.getInstance(); @@ -370,7 +373,6 @@ public class GameServer CrestTable.getInstance(); TeleportListData.getInstance(); SharedTeleportManager.getInstance(); - PetTypeData.getInstance(); TeleporterData.getInstance(); TimedHuntingZoneData.getInstance(); MatchingRoomManager.getInstance(); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index f82b67b3d5..7633d726c4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java index 239f963e0f..209a675ec0 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java @@ -121,6 +121,7 @@ public class LimitShopCraftData implements IXmlReader boolean announce4 = false; boolean announce5 = false; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -203,6 +204,7 @@ public class LimitShopCraftData implements IXmlReader count5 = parseLong(attrs, "count5", 1L); announce5 = parseBoolean(attrs, "announce5", false); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -214,7 +216,7 @@ public class LimitShopCraftData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java index 5cb3a5f531..907ad3a619 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java @@ -103,6 +103,7 @@ public class LimitShopData implements IXmlReader ingredientEnchants[2] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -167,6 +168,7 @@ public class LimitShopData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -178,7 +180,7 @@ public class LimitShopData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java new file mode 100644 index 0000000000..e53f5ca3cd --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java @@ -0,0 +1,107 @@ +/* + * 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.data.xml; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Logger; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +import org.l2jmobius.commons.util.IXmlReader; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; + +/** + * @author Geremy + */ +public class PetExtractData implements IXmlReader +{ + private static final Logger LOGGER = Logger.getLogger(PetExtractData.class.getName()); + // > + private final Map> _extractionData = new HashMap<>(); + + protected PetExtractData() + { + load(); + } + + @Override + public void load() + { + _extractionData.clear(); + parseDatapackFile("data/PetExtractData.xml"); + LOGGER.info(getClass().getSimpleName() + ": Loaded " + _extractionData.size() + " pet extraction data."); + } + + @Override + public void parseDocument(Document doc, File f) + { + for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) + { + if ("list".equalsIgnoreCase(n.getNodeName())) + { + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if ("extraction".equalsIgnoreCase(d.getNodeName())) + { + final NamedNodeMap attrs = d.getAttributes(); + final int petId = parseInteger(attrs, "petId"); + final int petLevel = parseInteger(attrs, "petLevel"); + final long extractExp = parseLong(attrs, "extractExp"); + final int extractItem = parseInteger(attrs, "extractItem"); + final int defaultCostId = parseInteger(attrs, "defaultCostId"); + final int defaultCostCount = parseInteger(attrs, "defaultCostCount"); + final int extractCostId = parseInteger(attrs, "extractCostId"); + final int extractCostCount = parseInteger(attrs, "extractCostCount"); + Map data = _extractionData.get(petId); + if (data == null) + { + data = new HashMap<>(); + _extractionData.put(petId, data); + } + data.put(petLevel, new PetExtractionHolder(petId, petLevel, extractExp, extractItem, new ItemHolder(defaultCostId, defaultCostCount), new ItemHolder(extractCostId, extractCostCount))); + } + } + } + } + } + + public PetExtractionHolder getExtraction(int petId, int petLevel) + { + final Map map = _extractionData.get(petId); + if (map == null) + { + LOGGER.warning(getClass().getSimpleName() + ": Missing pet extraction data: [PetId: " + petId + "] [PetLevel: " + petLevel + "]"); + return null; + } + return map.get(petLevel); + } + + public static PetExtractData getInstance() + { + return SingletonHolder.INSTANCE; + } + + private static class SingletonHolder + { + protected static final PetExtractData INSTANCE = new PetExtractData(); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/SkillData.java index 7da7b6a28d..60e1308527 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/SkillData.java @@ -548,9 +548,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/CategoryType.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/CategoryType.java index 8e43b7b669..9c0f2eb564 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/CategoryType.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/CategoryType.java @@ -36,6 +36,7 @@ public enum CategoryType STRIDER, WOLF_GROUP, WYVERN_GROUP, + PET_GROUP, SUBJOB_GROUP_KNIGHT, HUMAN_FALL_CLASS, HUMAN_MALL_CLASS, diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index b277446b93..7bf956bdc5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index cc140152c0..d89180bf13 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -65,7 +65,7 @@ public class DailyTaskManager private static final Set RESET_SKILLS = new HashSet<>(); static { - // No known skills. + RESET_SKILLS.add(39199); // Hero's Wondrous Cubic } public static final Set RESET_ITEMS = new HashSet<>(); static @@ -112,7 +112,8 @@ public class DailyTaskManager GlobalVariablesManager.getInstance().set(GlobalVariablesManager.DAILY_TASK_RESET, System.currentTimeMillis()); // Wednesday weekly tasks. - if (Calendar.getInstance().get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) + final Calendar calendar = Calendar.getInstance(); + if (calendar.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) { clanLeaderApply(); resetMonsterArenaWeekly(); @@ -124,6 +125,11 @@ public class DailyTaskManager resetVitalityDaily(); } + if (calendar.get(Calendar.DAY_OF_MONTH) == 1) + { + resetMontlyLimitShopData(); + } + // Daily tasks. resetClanBonus(); resetDailySkills(); @@ -635,6 +641,31 @@ public class DailyTaskManager LOGGER.info("LimitShopData has been resetted."); } + private void resetMontlyLimitShopData() + { + for (LimitShopProductHolder holder : LimitShopData.getInstance().getProducts()) + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement("DELETE FROM account_gsdata WHERE var=?")) + { + ps.setString(1, AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + ps.executeUpdate(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset LimitShopData: " + e); + } + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getAccountVariables().remove(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + player.getAccountVariables().storeMe(); + } + } + LOGGER.info("LimitShopData has been resetted."); + } + public static DailyTaskManager getInstance() { return SingletonHolder.INSTANCE; diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/IdManager.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/IdManager.java index 93bfd8b78c..bd50169bc8 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/IdManager.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/IdManager.java @@ -100,6 +100,7 @@ public class IdManager cleanCount += statement.executeUpdate("DELETE FROM character_shortcuts WHERE character_shortcuts.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills WHERE character_skills.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills_save WHERE character_skills_save.charId NOT IN (SELECT charId FROM characters);"); + cleanCount += statement.executeUpdate("DELETE FROM character_spirits WHERE character_spirits.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_subclasses WHERE character_subclasses.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_instance_time WHERE character_instance_time.charId NOT IN (SELECT charId FROM characters);"); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java index 938adc783b..08d37c3f0c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1289,7 +1289,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)) @@ -2817,7 +2817,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); } @@ -2830,189 +2830,151 @@ 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; - } - case ELEMENTAL_SPIRIT_EARTH_ATTACK: - case ELEMENTAL_SPIRIT_EARTH_DEFENSE: - case ELEMENTAL_SPIRIT_FIRE_ATTACK: - case ELEMENTAL_SPIRIT_FIRE_DEFENSE: - case ELEMENTAL_SPIRIT_WATER_ATTACK: - case ELEMENTAL_SPIRIT_WATER_DEFENSE: - case ELEMENTAL_SPIRIT_WIND_ATTACK: - case ELEMENTAL_SPIRIT_WIND_DEFENSE: - { - info.addComponentType(UserInfoType.ATT_SPIRITS); - 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; + } + case ELEMENTAL_SPIRIT_EARTH_ATTACK: + case ELEMENTAL_SPIRIT_EARTH_DEFENSE: + case ELEMENTAL_SPIRIT_FIRE_ATTACK: + case ELEMENTAL_SPIRIT_FIRE_DEFENSE: + case ELEMENTAL_SPIRIT_WATER_ATTACK: + case ELEMENTAL_SPIRIT_WATER_DEFENSE: + case ELEMENTAL_SPIRIT_WIND_ATTACK: + case ELEMENTAL_SPIRIT_WIND_DEFENSE: + { + info.addComponentType(UserInfoType.ATT_SPIRITS); + 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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Player.java index de3652656b..9b1ecb292b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -371,7 +371,7 @@ import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommi import org.l2jmobius.gameserver.network.serverpackets.elementalspirits.ElementalSpiritInfo; import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus; import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCount; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo; import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager; @@ -4557,7 +4557,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -8379,9 +8379,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; + } } } } @@ -10610,7 +10614,7 @@ public class Player extends Playable _pet.setFollowStatus(true); _pet.setInstance(getInstanceWorld()); _pet.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(_pet, 0)); + sendPacket(new PetSummonInfo(_pet, 0)); } getServitors().values().forEach(s -> @@ -10621,7 +10625,7 @@ public class Player extends Playable s.setFollowStatus(true); s.setInstance(getInstanceWorld()); s.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(s, 0)); + sendPacket(new PetSummonInfo(s, 0)); }); // Show movie if available. diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Summon.java index b6c9b57d75..c0b4d1e9d2 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Summon.java @@ -74,10 +74,10 @@ import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetDelete; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.PetInventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.pet.PetItemList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetStatusUpdate; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; public abstract class Summon extends Playable @@ -134,7 +134,7 @@ public abstract class Summon extends Playable { if (isPet()) { - sendPacket(new PetInfo(this, 1)); + sendPacket(new PetSummonInfo(this, 1)); sendPacket(new ExPetSkillList(true, (Pet) this)); if (getInventory() != null) { @@ -228,7 +228,7 @@ public abstract class Summon extends Playable { if (player == _owner) { - player.sendPacket(new PetInfo(this, 1)); + player.sendPacket(new PetSummonInfo(this, 1)); return; } @@ -392,7 +392,7 @@ public abstract class Summon extends Playable @Override public void onDecay() { - super.onDecay(); + unSummon(_owner); deleteMe(_owner); } @@ -879,7 +879,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); @@ -900,7 +900,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)); + } }); } @@ -925,7 +932,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())); @@ -933,7 +940,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)); + } } } @@ -979,7 +993,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(); } @@ -1166,7 +1180,7 @@ public abstract class Summon extends Playable { owner.sendPacket(new PetItemList(getInventory().getItems())); } - owner.sendPacket(new PetInfo(this, 1)); + owner.sendPacket(new PetSummonInfo(this, 1)); } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index f4cc079630..f7e71e5136 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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,33 +976,6 @@ 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 { @@ -1011,9 +985,17 @@ public class CreatureStat // 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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index accbff9373..697ec47e4f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index b7759d1586..1bb8c01d65 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2216,6 +2216,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java index f72c9ddc4d..7beb8a1d2d 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java @@ -48,9 +48,10 @@ public class LimitShopProductHolder private final long _count5; private final boolean _announce5; private final int _accountDailyLimit; + private final int _accountMontlyLimit; private final int _accountBuyLimit; - public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountBuyLimit) + public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountMontlyLimit, int accountBuyLimit) { _id = id; _category = category; @@ -79,6 +80,7 @@ public class LimitShopProductHolder _count5 = count5; _announce5 = announce5; _accountDailyLimit = accountDailyLimit; + _accountMontlyLimit = accountMontlyLimit; _accountBuyLimit = accountBuyLimit; } @@ -217,6 +219,11 @@ public class LimitShopProductHolder return _accountDailyLimit; } + public int getAccountMontlyLimit() + { + return _accountMontlyLimit; + } + public int getAccountBuyLimit() { return _accountBuyLimit; diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java new file mode 100644 index 0000000000..bc54fd0c63 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java @@ -0,0 +1,70 @@ +/* + * 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.model.holders; + +/** + * @author Geremy + */ +public class PetExtractionHolder +{ + private final int _petId; + private final int _petLevel; + private final long _extractExp; + private final int _extractItem; + private final ItemHolder _defaultCost; + private final ItemHolder _extractCost; + + public PetExtractionHolder(int petId, int petLevel, long extractExp, int extractItem, ItemHolder defaultCost, ItemHolder extractCost) + { + _petId = petId; + _petLevel = petLevel; + _extractExp = extractExp; + _extractItem = extractItem; + _defaultCost = defaultCost; + _extractCost = extractCost; + } + + public int getPetId() + { + return _petId; + } + + public int getPetLevel() + { + return _petLevel; + } + + public long getExtractExp() + { + return _extractExp; + } + + public int getExtractItem() + { + return _extractItem; + } + + public ItemHolder getDefaultCost() + { + return _defaultCost; + } + + public ItemHolder getExtractCost() + { + return _extractCost; + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 7b0aafd404..dfdc849b47 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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; @@ -71,12 +73,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPi import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; 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; @@ -91,6 +95,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; @@ -1640,7 +1645,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); @@ -2560,6 +2567,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); @@ -2584,6 +2596,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); @@ -2609,6 +2623,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 398e061d4c..dbdf13cc99 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -889,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) && verifyAndApply(playable, item, Item::getVisualId)) { update = true; @@ -1041,7 +1042,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(playable, item, Item::getVisualId)) { remove = true; diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/FortSiege.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/FortSiege.java index c128c12ecf..c16afcf700 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/FortSiege.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/FortSiege.java @@ -268,7 +268,7 @@ public class FortSiege extends ListenersContainer implements Siegable } ThreadPool.schedule(new ScheduleStartSiegeTask(nextTask), _initialDelayInMilliseconds - (nextTask * 1000)); // Prepare task for @nextTask minutes left. - LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); + // LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); } else if ((_time == 3600) && (_fortInst.getResidenceId() != FortManager.ORC_FORTRESS)) // 1hr remains diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 334df610e5..925a265dd8 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -659,7 +659,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(); } @@ -682,7 +682,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(); } @@ -717,7 +717,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java index e3032a1cf1..2cbe107cc4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -95,6 +95,7 @@ public enum Stat HATE_ATTACK("attackHate"), REAR_DAMAGE_RATE("rearDamage"), AUTO_ATTACK_DAMAGE_BONUS("autoAttackDamageBonus"), + IGNORE_REDUCE_DAMAGE("ignoreReduceDamage"), // ELEMENTAL SPIRITS ELEMENTAL_SPIRIT_FIRE_ATTACK("elementalSpiritFireAttack"), @@ -148,7 +149,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()), MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0), BLOW_RATE("blowRate"), diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 647873dac0..6cc98e9690 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -44,7 +44,18 @@ public class MCritRateFinalizer implements IStatFunction final double physicalBonus = (creature.getStat().getMul(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 1) - 1) * creature.getStat().getCriticalHit(); final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1; - return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 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) + physicalBonus), 0, maxMagicalCritRate); } @Override diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index c305987ba6..c29c9ba398 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java @@ -93,6 +93,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index c5257ff589..1aff35bfd5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java @@ -95,6 +95,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java index fc8fc5e8e6..cb7a29e736 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java @@ -46,6 +46,7 @@ public class AccountVariables extends AbstractVariables public static final String PRIME_SHOP_PRODUCT_DAILY_COUNT = "PSPDailyCount"; public static final String LCOIN_SHOP_PRODUCT_COUNT = "LCSCount"; public static final String LCOIN_SHOP_PRODUCT_DAILY_COUNT = "LCSDailyCount"; + public static final String LCOIN_SHOP_PRODUCT_MONTLY_COUNT = "LCSMontlyCount"; public static final String VIP_POINTS = "VipPoints"; public static final String VIP_TIER = "VipTier"; public static final String VIP_EXPIRATION = "VipExpiration"; diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/ExClientPackets.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/ExClientPackets.java index 78ab6fea76..2b99b4df5a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/ExClientPackets.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/ExClientPackets.java @@ -101,6 +101,7 @@ import org.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMentorLis import org.l2jmobius.gameserver.network.clientpackets.pet.ExEvolvePet; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetEquipItem; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetUnequipItem; +import org.l2jmobius.gameserver.network.clientpackets.pet.ExTryPetExtractSystem; import org.l2jmobius.gameserver.network.clientpackets.pet.RequestExAcquirePetSkill; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyDelete; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyInfoList; @@ -624,7 +625,7 @@ public enum ExClientPackets EX_PLEDGE_ENEMY_DELETE(0x1C8, RequestExPledgeEnemyDelete::new, ConnectionState.IN_GAME), EX_PK_PENALTY_LIST(0x1C9, null, ConnectionState.IN_GAME), EX_PK_PENALTY_LIST_ONLY_LOC(0x1CA, null, ConnectionState.IN_GAME), - EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, null, ConnectionState.IN_GAME), + EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, ExTryPetExtractSystem::new, ConnectionState.IN_GAME), EX_PLEDGE_V3_SET_ANNOUNCE(0x1CC, RequestExPledgeV3SetAnnounce::new, ConnectionState.IN_GAME), EX_MAX(0x1CD, null, ConnectionState.IN_GAME); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index 78c7e62be5..0464b99085 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java @@ -108,6 +108,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) { @@ -644,7 +649,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 23a2f8aa16..23a90780ed 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -222,7 +222,7 @@ public class UseItem implements ClientPacket } // Prevent Death Knight players to equip other weapons. - if (item.isWeapon() && (CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId())) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) + if (item.isWeapon() && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index 0a1a9ac519..b552fb029e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -143,6 +143,25 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket return; } } + else if (_product.getAccountMontlyLimit() > 0) + { + final long amount = _product.getAccountMontlyLimit() * _amount; + if (amount < 1) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + if (player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) >= amount) + { + player.sendMessage("You have reached your montly limit."); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + + } else if (_product.getAccountBuyLimit() > 0) // Count limit. { final long amount = _product.getAccountBuyLimit() * _amount; @@ -164,7 +183,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket } // Check existing items. - final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), _product.getAccountDailyLimit())); + final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), Math.max(_product.getAccountDailyLimit(), _product.getAccountMontlyLimit()))); for (int i = 0; i < _product.getIngredientIds().length; i++) { if (_product.getIngredientIds()[i] == 0) @@ -326,6 +345,10 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), 0) + _amount); } + if (_product.getAccountMontlyLimit() > 0) + { + player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) + _amount); + } else if (_product.getAccountBuyLimit() > 0) { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), 0) + _amount); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 5b243ca0fb..4433741d07 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -230,7 +230,7 @@ public class ExPetEquipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java index c31d8d343f..3891440cd4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java @@ -17,7 +17,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -183,7 +183,7 @@ public class ExPetUnequipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java new file mode 100644 index 0000000000..6bb1753d14 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java @@ -0,0 +1,115 @@ +/* + * 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.clientpackets.pet; + +import org.l2jmobius.commons.network.ReadablePacket; +import org.l2jmobius.gameserver.data.xml.NpcData; +import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; +import org.l2jmobius.gameserver.model.PetData; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.actor.instance.Pet; +import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.itemcontainer.PetInventory; +import org.l2jmobius.gameserver.model.itemcontainer.PlayerInventory; +import org.l2jmobius.gameserver.network.GameClient; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; +import org.l2jmobius.gameserver.network.serverpackets.pet.ResultPetExtractSystem; + +/** + * @author Geremy + */ +public class ExTryPetExtractSystem implements ClientPacket +{ + private int _itemObjId; + + @Override + public void read(ReadablePacket packet) + { + _itemObjId = packet.readInt(); + } + + @Override + public void run(GameClient client) + { + final Player player = client.getPlayer(); + if (player == null) + { + return; + } + + final Item petItem = player.getInventory().getItemByObjectId(_itemObjId); + if ((petItem == null) || ((player.getPet() != null) && (player.getPet().getControlItem() == petItem))) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + final PetData petData = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()); + final NpcTemplate npcTemplate = NpcData.getInstance().getTemplate(petData.getNpcId()); + final Pet pet = new Pet(npcTemplate, player, petItem); + final PetInventory petInventory = pet.getInventory(); + final PlayerInventory playerInventory = player.getInventory(); + if ((petInventory == null) || (playerInventory == null)) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + if (!playerInventory.validateWeight(petInventory.getTotalWeight()) || !playerInventory.validateCapacity(petInventory.getSize())) + { + player.sendPacket(SystemMessageId.THERE_ARE_ITEMS_IN_THE_PET_S_INVENTORY_TAKE_THEM_OUT_FIRST); + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + petInventory.transferItemsToOwner(); + + final Pet petInfo = Pet.restore(petItem, NpcData.getInstance().getTemplate(petData.getNpcId()), player); + final int petId = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()).getType(); + final int petLevel = petInfo.getLevel(); + final PetExtractionHolder holder = PetExtractData.getInstance().getExtraction(petId, petLevel); + if (holder != null) + { + final int extractItemId = holder.getExtractItem(); + final int extractItemCount = (int) (petInfo.getStat().getExp() / holder.getExtractExp()); + final int extractCostId = holder.getExtractCost().getId(); + final long extractCostCount = holder.getExtractCost().getCount() * extractItemCount; + final int defaultCostId = holder.getDefaultCost().getId(); + final long defaultCostCount = holder.getDefaultCost().getCount(); + if ((player.getInventory().getInventoryItemCount(extractCostId, -1) >= extractCostCount) && (player.getInventory().getInventoryItemCount(defaultCostId, -1) >= defaultCostCount)) + { + if (player.destroyItemByItemId("Pet Extraction", extractCostId, extractCostCount, player, true) && player.destroyItemByItemId("Pet Extraction", defaultCostId, defaultCostCount, player, true) && player.destroyItem("Pet Extraction", petItem, player, true)) + { + player.addItem("Pet Extraction", extractItemId, extractItemCount, player, true); + player.sendPacket(new ResultPetExtractSystem(true)); + } + } + else + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT); + player.sendPacket(new ResultPetExtractSystem(false)); + } + return; + } + + player.sendPacket(new ResultPetExtractSystem(false)); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java index 2cf1ef176b..0266b0eff5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java @@ -46,7 +46,7 @@ public class ExRequestRandomCraftExtract implements ClientPacket { final int objId = packet.readInt(); final long count = packet.readLong(); - if (count > 1) + if (count > 0) { _items.put(objId, count); } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index 9540e799e2..07ed7641a9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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,129 +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, 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, 96, 97, 99, - 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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index 8e396d93c9..a72d906550 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index 47076d56c4..61bfe70039 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 9c1fbbcab8..851b53dc09 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 679c26e073..06711fb502 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java index 00f16e304b..4b6f4f1728 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java @@ -71,6 +71,17 @@ public class ExPurchaseLimitShopItemListNew extends ServerPacket writeInt(product.getAccountDailyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + product.getProductionId(), 0)); } } + else if (product.getAccountMontlyLimit() > 0) + { + if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0) >= product.getAccountMontlyLimit()) + { + writeInt(0); + } + else + { + writeInt(product.getAccountMontlyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0)); + } + } else if (product.getAccountBuyLimit() > 0) // Count limit. { if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + product.getProductionId(), 0) >= product.getAccountBuyLimit()) diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java index e2a7e8cb46..e4a2d8308e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java @@ -68,7 +68,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); @@ -142,7 +142,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()) { @@ -241,9 +241,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)) { @@ -261,11 +261,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()); } @@ -289,9 +289,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)) @@ -322,7 +321,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java similarity index 96% rename from L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java rename to L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java index fdc110c324..2b6b70cd0a 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java @@ -1,194 +1,194 @@ -/* - * 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.pet; - -import java.util.Set; - -import org.l2jmobius.gameserver.enums.EvolveLevel; -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.network.serverpackets.ServerPacket; -import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; - -/** - * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon - */ -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.isDead() ? 0 : _summon.isShowSummonAnimation() ? 2 : _value); - 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 - writeShort(_summon.getLevel()); // level - writeLong(_summon.getStat().getExp()); - // 0% absolute value - writeLong(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 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(-1); - writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level. - writeByte(0); // Used Summon Points - writeByte(0); // Maximum Summon Points - final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects(); - writeShort(aves.size()); // Confirmed - for (AbnormalVisualEffect ave : aves) - { - writeShort(ave.getClientId()); // Confirmed - } - writeByte(_statusMask); - if (_summon.isPet()) - { - final Pet pet = (Pet) _summon; - writeInt(pet.getPetData().getType()); - writeInt(pet.getEvolveLevel()); - writeInt(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); - } - else - { - writeInt(0); - writeInt(EvolveLevel.None.ordinal()); - writeInt(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.pet; + +import java.util.Set; + +import org.l2jmobius.gameserver.enums.EvolveLevel; +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.network.serverpackets.ServerPacket; +import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; + +/** + * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon + */ +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.isDead() ? 0 : _summon.isShowSummonAnimation() ? 2 : _value); + 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 + writeShort(_summon.getLevel()); // level + writeLong(_summon.getStat().getExp()); + // 0% absolute value + writeLong(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 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(-1); + writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level. + writeByte(0); // Used Summon Points + writeByte(0); // Maximum Summon Points + final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects(); + writeShort(aves.size()); // Confirmed + for (AbnormalVisualEffect ave : aves) + { + writeShort(ave.getClientId()); // Confirmed + } + writeByte(_statusMask); + if (_summon.isPet()) + { + final Pet pet = (Pet) _summon; + writeInt(pet.getPetData().getType()); + writeInt(pet.getEvolveLevel()); + writeInt(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); + } + else + { + writeInt(0); + writeInt(EvolveLevel.None.ordinal()); + writeInt(0); + } + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java new file mode 100644 index 0000000000..0deca5b570 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java @@ -0,0 +1,40 @@ +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ResultPetExtractSystem extends ServerPacket +{ + private final boolean _success; + + public ResultPetExtractSystem(boolean success) + { + _success = success; + } + + @Override + public void write() + { + ServerPackets.EX_RESULT_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(_success); + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10904_JourneyToTheConquestWorld.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java similarity index 61% rename from L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10904_JourneyToTheConquestWorld.java rename to L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java index 69ed271e41..29683dc5a5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10904_JourneyToTheConquestWorld.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java @@ -1,36 +1,35 @@ -/* - * 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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10904_JourneyToTheConquestWorld extends Quest -{ - private static final int START_NPC = 34600; - - public Q10904_JourneyToTheConquestWorld() - { - super(10904); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ShowPetExtractSystem extends ServerPacket +{ + public static final ShowPetExtractSystem STATIC_PACKET = new ShowPetExtractSystem(); + + @Override + public void write() + { + ServerPackets.EX_SHOW_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(0); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index 8be4d29aa5..0a858b928c 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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,11 +26,13 @@ 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; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.Summon; +import org.l2jmobius.gameserver.model.actor.instance.Pet; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.zone.ZoneId; @@ -42,9 +45,12 @@ 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; + private static final Integer PET_ATTACK_ACTION = 16; + private static final Integer SUMMON_ATTACK_ACTION = 22; protected AutoPlayTaskManager() { @@ -94,6 +100,25 @@ public class AutoPlayTaskManager } else if ((creature.getTarget() == player) || (creature.getTarget() == null)) { + // Pet Attack. + final Pet pet = player.getPet(); + if ((pet != null) && player.getAutoUseSettings().getAutoActions().contains(PET_ATTACK_ACTION) && pet.hasAI() && !pet.isMoving() && !pet.isDisabled() && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature)) + { + pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature); + } + + // Summon Attack. + if (player.hasSummon() && player.getAutoUseSettings().getAutoActions().contains(SUMMON_ATTACK_ACTION)) + { + 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); + } + } + } + // We take granted that mage classes do not auto hit. if (isMageCaster(player)) { @@ -122,23 +147,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); } } } @@ -146,6 +180,9 @@ public class AutoPlayTaskManager } } + // Reset idle count. + IDLE_COUNT.remove(player); + // Pickup. if (player.getAutoPlaySettings().doPickup()) { @@ -180,32 +217,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; + } } } } @@ -311,6 +371,7 @@ public class AutoPlayTaskManager { player.getPet().followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 574af07cdd..473fcb12a6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java @@ -36,7 +36,9 @@ 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.instance.Pet; +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; @@ -47,12 +49,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 @@ -429,8 +431,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; } @@ -442,7 +445,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); + } + } } } } @@ -525,6 +545,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_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/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_Essence_4.2_DwellingOfSpirits/readme.txt b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/readme.txt index 13f53f3e02..82b2fcdba6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/readme.txt +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/readme.txt @@ -127,6 +127,8 @@ Fluffy Reinforcement: https://eu.4game.com/patchnotes/lineage2essence/204/ Dwelling of Spirits: https://eu.4game.com/patchnotes/lineage2essence/261/ -Transcendent hunting zones +-Pet extraction system + Customs: -Newbie Helper NPC location info diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/account_gsdata.sql index ed8c60bfae..a0072cc6e4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/achievement_box.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/achievement_box.sql index a6750eef4c..64c5b1e4e8 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/achievement_box.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/achievement_box.sql @@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `achievement_box` ( `box_state_slot_4` INT NOT NULL DEFAULT 0, `boxtype_slot_4` INT 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_Essence_5.2_FrostLord/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/airships.sql index 50453102dd..d5dece1b03 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/announcements.sql index 0fef63e83e..88f8f519ad 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/auction_bid.sql index 85b978f103..2e37fbe5ba 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/bbs_favorites.sql index e7ace21bc9..a43fd1b53a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/bot_reported_char_data.sql index d7acdfa31b..98daf2dc12 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/buffer_schemes.sql index 1784421092..bd964c8cc2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/buffer_schemes.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL, PRIMARY KEY (`object_id`,`scheme_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_Essence_5.2_FrostLord/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle.sql index c7b5613401..9fb7fea4e6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_doorupgrade.sql index ee822091b4..43a573b36e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_functions.sql index d270fca8a8..d8c1aaaeeb 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_manor_procure.sql index 54c8517f65..a6cd5a00c3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_manor_production.sql index 3980eef7aa..71ea5b8591 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_trapupgrade.sql index a0854df17e..139a3a5d45 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_contacts.sql index 3c2c5fb85a..9d8d163095 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_hennas.sql index 668374b2ab..8174451ef2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_instance_time.sql index 1a82cf40e2..2eaa3164a3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_item_reuse_save.sql index f2773fc195..22857bd4de 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_macroses.sql index 7062388d7a..b23a056e24 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_mentees.sql index 2ad58e3219..d067728900 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_offline_trade.sql index f61c711822..16925760e5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_offline_trade_items.sql index d8a9e0b8e1..38ffd73ae0 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_premium_items.sql index 6b25480f4c..0f613d1029 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_purge.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_purge.sql index d50a902ce1..9c08f111be 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_purge.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_purge.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_purge` ( `keys` int(10) UNSIGNED NOT NULL DEFAULT 0, `remainingKeys` int(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`category`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_quests.sql index 6199526ae6..93db47171d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_random_craft.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_random_craft.sql index 977113bbe3..c83402513c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_random_craft.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_random_craft.sql @@ -25,4 +25,4 @@ CREATE TABLE IF NOT EXISTS `character_random_craft` ( `item_5_locked` TINYINT NOT NULL DEFAULT 0, `item_5_lock_left` INT 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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_recipebook.sql index 74cc6b8bd6..807005f0c1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_recipeshoplist.sql index e448547654..e81faed7a4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_reco_bonus.sql index f283ca5136..9717ebc5e9 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_revenge_history.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_revenge_history.sql index 5be9d849cf..717d779932 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_revenge_history.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_revenge_history.sql @@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `character_revenge_history` ( `shared_teleport_remaining` int NOT NULL DEFAULT 0, `kill_time` BIGINT(10) UNSIGNED NOT NULL, `share_time` BIGINT(10) UNSIGNED NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_spirits.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_spirits.sql index ac73d8dbe3..bb4044039f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_spirits.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_spirits.sql @@ -11,6 +11,5 @@ CREATE TABLE `character_spirits` `crit_rate_points` TINYINT NOT NULL DEFAULT 0, `crit_damage_points` TINYINT NOT NULL DEFAULT 0, `in_use` BOOLEAN NOT NULL DEFAULT FALSE, - PRIMARY KEY (`charId`, `type`), - FOREIGN KEY FK_CHARACTER_SPIRITS (`charId`) REFERENCES characters (`charId`) ON DELETE CASCADE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file + PRIMARY KEY (`charId`, `type`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_summons.sql index e089d258b3..1936e548d4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_surveillances.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_surveillances.sql index 49b3fdaa3d..734b714c5e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_surveillances.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_surveillances.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_surveillances` ( `charId` INT UNSIGNED NOT NULL, `targetId` INT UNSIGNED NOT NULL, PRIMARY KEY (`charId`,`targetId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_tpbookmark.sql index df70351c2e..2cd0efe8b1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_variables.sql index 97a8a898d0..82f8e79930 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_data.sql index f8b64d99db..49f88c0122 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_data.sql @@ -24,4 +24,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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_notices.sql index 3ab4c18480..7464ee18bd 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_privs.sql index 6478e63f8a..af4e35a46b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_skills.sql index 785d9e489a..10b722e90e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_subpledges.sql index 558ae695e1..64c31b7f38 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/collection_favorites.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collection_favorites.sql index 7571da448f..49758d7815 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collection_favorites.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collection_favorites.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `collection_favorites` ( `accountName` VARCHAR(45) NOT NULL DEFAULT '', `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collections.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collections.sql index 8c0fafc9fd..1ff9772ad3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collections.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/collections.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `collections` ( `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, `index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`,`index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/custom_teleport.sql index 27a5d0d877..9dd08290ac 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort.sql index bb4f761682..caf1e50e76 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_doorupgrade.sql index 8bca5d13fe..87e445876e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_functions.sql index 3c0bdfc42a..9ec9f577d2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_siege_guards.sql index 19df57a3b9..43763210b4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_siege_guards.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_spawnlist.sql index 22303a9b09..144979acd9 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fort_spawnlist.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fortsiege_clans.sql index ea5e71a909..5ae471842d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/forums.sql index d7bb88e274..af3a8be6ec 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/global_tasks.sql index ec8fd2c36e..5b2a05d01d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/global_variables.sql index 580d9cd7e5..42bde4188f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/grandboss_data.sql index b4a1f552fd..7cf6d2865d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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, 93069, 8925, -3904, 0, 229898.48, 667.776), -- Queen Ant diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/heroes.sql index ae59eb8ba1..f2ee5692a8 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/heroes_diary.sql index e2195a1fea..0cc38a3bdf 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_auction.sql index d73ec83417..4d654f9671 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_auction_bid.sql index a132cbf33b..1fa2a7d060 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_elementals.sql index 73c76bff70..16212982cb 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/items.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/items.sql index c2225c1f32..c701ef6748 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/itemsonground.sql index e0750ce461..cd0b66704c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/merchant_lease.sql index 5860107e3d..a5228f511e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_data.sql index f3f1b5b54e..c00edf499e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_fights.sql index ccd4ac94ec..f25cc4c1fa 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_fights.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` ( `classed` tinyint(4) 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_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_nobles.sql index 386b27df45..0f48e9f71c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_nobles_eom.sql index f22562d0d5..fde44db92f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_evolves.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_evolves.sql index e825631c85..51fcd5eba8 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_evolves.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_evolves.sql @@ -5,4 +5,4 @@ CREATE TABLE `pet_evolves` ( `level` int NOT NULL DEFAULT '0', PRIMARY KEY (`itemObjId`, `index`, `level`), UNIQUE KEY `pet_evolves` (`itemObjId`, `index`, `level`) -) ENGINE=MyISAM; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_skills.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_skills.sql index 2b502c7738..b680f21972 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_skills.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pet_skills.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `pet_skills` ( `skillId` INT NOT NULL DEFAULT 0, `skillLevel` INT(3) NOT NULL DEFAULT 1, PRIMARY KEY (`petObjItemId`,`skillId`,`skillLevel`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/petition_feedback.sql index 2907d19d72..7752f5ab17 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pets.sql index 58b188bbcd..b7e9d545db 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/posts.sql index 4b212c323c..179355fd62 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/siege_clans.sql index f649ceb8e7..0cec8f57b5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/topic.sql index 75f73ee48c..ac232c9d55 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/gameservers.sql index c6f6c5ee36..d2a3e1ee5d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/config/General.ini b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/General.ini index fabb1dfec3..4cf7d1b7de 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/General.ini +++ b/L2J_Mobius_Essence_5.2_FrostLord/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 # --------------------------------------------------------------------------- @@ -640,6 +640,11 @@ AutoPlayAttackAction = True # Retail: False ResumeAutoPlay = False +# Assist party leader. +# When in party, target what the leader is targeting. +# Retail: False +AssistLeader = False + # --------------------------------------------------------------------------- # Purge Settings diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/ActionData.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/ActionData.xml index 677c57eb99..526d7eed2a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/ActionData.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/ActionData.xml @@ -1,48 +1,48 @@ - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -50,169 +50,200 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/CategoryData.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/CategoryData.xml index b25fcae27d..4facbe6d73 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/CategoryData.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/CategoryData.xml @@ -375,6 +375,38 @@ 15955 + + 16079 + 16080 + 16081 + 16082 + 16083 + 16084 + 16085 + 16086 + 16087 + 16088 + 16089 + 16090 + 16091 + 16092 + 16093 + 16094 + 16095 + 16096 + 16097 + 16098 + 16099 + 16100 + 16101 + 16102 + 16103 + 16104 + 16105 + 16106 + 16107 + 16108 + 5 6 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/PetExtractData.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/PetExtractData.xml new file mode 100644 index 0000000000..db6643827e --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/PetExtractData.xml @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30731.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30731.htm index 7d5bb217c7..daf4f90fc3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30731.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30731.htm @@ -9,7 +9,7 @@ The Pet Manager Association is always happy to assist you and your pet.
--> - + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30827.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30827.htm index 830447a916..1a6e7f97c6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30827.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30827.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30828.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30828.htm index 0a7f19fda4..81b47f5ca8 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30828.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30828.htm @@ -10,7 +10,7 @@ Pet Manager Waters:
--> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30829.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30829.htm index 61e46bf654..67f60c6f2e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30829.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30829.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30830.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30830.htm index 6b1860ae08..26536da2b6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30830.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30830.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30831.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30831.htm index b707cd690d..04d1428ac0 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30831.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/30831.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31067.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31067.htm index 9ff970708b..5963bbead2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31067.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31067.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31265.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31265.htm index 5de92941aa..acd3d39c17 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31265.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31265.htm @@ -10,7 +10,7 @@ Perhaps I should write a book, eh? "The Impact of Striders on the History of the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31309.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31309.htm index 9487647c8a..3d6ff06a25 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31309.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31309.htm @@ -10,7 +10,7 @@ Oh, hello. Ah, you noticed my pure-bred black-striped Alpine Cougar, eh? It is n --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31954.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31954.htm index c8025dde3e..e0218b5231 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31954.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/31954.htm @@ -10,7 +10,7 @@ As the number of people who interested in raising pets increases these days, the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/33579.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/33579.htm index c67cae00f5..cafc07db04 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/33579.htm +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/html/petmanager/33579.htm @@ -7,7 +7,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/instances/DwellingOfSpirits.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/instances/DwellingOfSpirits.xml index 24a5c3b457..c5467892ab 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/instances/DwellingOfSpirits.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/instances/DwellingOfSpirits.xml @@ -35,13 +35,6 @@ - - - - - - - @@ -49,77 +42,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/multisell/custom/600016.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/multisell/custom/600016.xml index 15f5a77492..b1bbf39e7a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/multisell/custom/600016.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/multisell/custom/600016.xml @@ -5,19 +5,19 @@ - + - + - + @@ -35,13 +35,13 @@
- + - + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm new file mode 100644 index 0000000000..51ace5fb0f --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm @@ -0,0 +1,7 @@ +Siben:
+
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java new file mode 100644 index 0000000000..6606e36f7e --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java @@ -0,0 +1,190 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfKingIgnis extends AbstractNpcAI +{ + // NPCs + private static final int IGNIS = 29105; + // Skills + private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1); + private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); + private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3); + private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); + private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5); + private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); + private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7); + private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); + private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9); + private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10); + + public ResidenceOfKingIgnis() + { + addAttackId(IGNIS); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "CAST_FIRE_RAGE_1": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill())) + { + npc.doCast(FIRE_RAG_1.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_2": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) + { + npc.doCast(FIRE_RAG_2.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_3": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill())) + { + npc.doCast(FIRE_RAG_3.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_4": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) + { + npc.doCast(FIRE_RAG_4.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_5": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill())) + { + npc.doCast(FIRE_RAG_5.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_6": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) + { + npc.doCast(FIRE_RAG_6.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_7": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill())) + { + npc.doCast(FIRE_RAG_7.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_8": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) + { + npc.doCast(FIRE_RAG_8.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_9": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill())) + { + npc.doCast(FIRE_RAG_9.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_10": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill())) + { + npc.doCast(FIRE_RAG_10.getSkill()); + } + break; + } + } + return null; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) + { + startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) + { + startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) + { + startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) + { + startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15))) + { + startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10))) + { + startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7))) + { + startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5))) + { + startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3))) + { + startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null); + } + else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3)) + { + startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null); + } + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + public static void main(String[] args) + { + new ResidenceOfKingIgnis(); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java new file mode 100644 index 0000000000..0bb5893075 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java @@ -0,0 +1,309 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import java.util.HashMap; +import java.util.Map; + +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; + +import ai.AbstractNpcAI; + +public class ResidenceOfKingPetram extends AbstractNpcAI +{ + // NPCs + private static final int PETRAM = 29108; + private static final int PETRAM_PIECE = 29116; + private static final int PETRAM_FRAGMENT = 29117; + // Skills + private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); + private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); + private static final SkillHolder TEST = new SkillHolder(5712, 1); + + public ResidenceOfKingPetram() + { + addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); + addAttackId(PETRAM); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + petram.doCast(EARTH_ENERGY.getSkill()); + + petram.setInvul(true); + petram.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!"); + + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + final MinionData minionData = StageData.getMinionsStageData(stage)[minionIndex]; + final Location minionLocation = minionData.getMinionLocation(); + world.setParameter("minion" + minionIndex, addSpawn(npc, minionData.getMinionId(), minionLocation.getX(), minionLocation.getY(), minionLocation.getZ(), minionLocation.getHeading(), false, -1, true, npc.getInstanceId())); + } + + startQuestTimer("SUPPORT_PETRAM", 200, npc, null); + } + break; + } + case "SUPPORT_PETRAM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getNpc(PETRAM) != null) && !world.getNpc(PETRAM).isDead()) + { + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + world.getParameters().getObject("minion" + minionIndex, Npc.class).setTarget(world.getNpc(PETRAM)); + world.getParameters().getObject("minion" + minionIndex, Npc.class).doCast(TEST.getSkill()); + } + startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); + } + break; + } + case "REMOVE_INVUL": + { + if (npc != null) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + if (petram != null) + { + petram.doCast(EARTH_FURY.getSkill()); + petram.setInvul(false); + petram.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); + } + + for (int i = 0; i < 12; i++) + { + final Npc minion = world.getParameters().getObject("minion" + i, Npc.class); + if (minion != null) + { + minion.deleteMe(); + } + } + } + } + break; + } + } + + return null; + } + + private int getHigherStage(Instance world) + { + for (int stage = StageData.getMinionsStageData().size() - 1; stage >= 0; stage--) + { + if (world.getParameters().getBoolean("stage" + stage, false)) + { + return stage; + } + } + + return 0; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + synchronized (this) + { + for (int stage = 0; stage < StageData.getMinionsStageData().size(); stage++) + { + if ((npc.getCurrentHpPercent() < StageData.getHpPercents()[stage]) && !world.getParameters().getBoolean("stage" + stage, false)) + { + world.setParameter("stage" + stage, true); + startQuestTimer("SPAWN_MINION", 100, npc, null); + } + } + } + + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + final int stage = getHigherStage(world); + int aliveMinionsCount = 0; + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + if ((world.getParameters().getObject("minion" + minionIndex, Npc.class) != null) && !world.getParameters().getObject("minion" + minionIndex, Npc.class).isDead()) + { + aliveMinionsCount++; + } + } + + boolean breakInvul = false; + switch (stage) + { + case 0: + { + if (aliveMinionsCount == 0) + { + breakInvul = true; + } + break; + } + case 1: + { + if (aliveMinionsCount <= 4) + { + breakInvul = true; + } + break; + } + case 2: + { + if (aliveMinionsCount <= 6) + { + breakInvul = true; + } + break; + } + } + + if (breakInvul) + { + startQuestTimer("REMOVE_INVUL", 500, world.getNpc(PETRAM), null); + } + + return super.onKill(npc, player, isSummon); + } + + private static class StageData + { + private static final int[] _hpPercents = new int[] + { + 75, + 50, + 10 + }; + private static final Map _minionsStageData = new HashMap<>(); + static + { + // Stage 1 + _minionsStageData.put(0, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_FRAGMENT, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_FRAGMENT, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_FRAGMENT, new Location(222077, 191017, -15486, 16383)) + }); + + // Stage 2 + _minionsStageData.put(1, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_FRAGMENT, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_FRAGMENT, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_FRAGMENT, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_FRAGMENT, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_FRAGMENT, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_FRAGMENT, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_FRAGMENT, new Location(221342, 190800, -15486, 10837)) + }); + // Stage 3 + _minionsStageData.put(2, new MinionData[] + { + new MinionData(PETRAM_PIECE, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_PIECE, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_PIECE, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_PIECE, new Location(222077, 191017, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_PIECE, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_PIECE, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_PIECE, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_PIECE, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_PIECE, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_PIECE, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221342, 190800, -15486, 10837)) + }); + } + + public static int[] getHpPercents() + { + return _hpPercents; + } + + public static Map getMinionsStageData() + { + return _minionsStageData; + } + + public static MinionData[] getMinionsStageData(int stage) + { + return _minionsStageData.get(stage); + } + } + + private static class MinionData + { + final int _minionId; + final Location _minionLocation; + + private MinionData(int minionId, Location minionLocation) + { + _minionId = minionId; + _minionLocation = minionLocation; + } + + public int getMinionId() + { + return _minionId; + } + + public Location getMinionLocation() + { + return _minionLocation; + } + } + + public static void main(String[] args) + { + new ResidenceOfKingPetram(); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java new file mode 100644 index 0000000000..e16c7850fa --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java @@ -0,0 +1,179 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik, Mobius + */ +public class ResidenceOfKingProcella extends AbstractNpcAI +{ + // NPCs + private static final int PROCELLA = 29107; + private static final int PROCELLA_GUARDIAN_1 = 29112; + private static final int PROCELLA_GUARDIAN_2 = 29113; + private static final int PROCELLA_GUARDIAN_3 = 29114; + private static final int PROCELLA_STORM = 29115; + // Skills + private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); + private static final int HURRICANE_BOLT = 50043; + private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); + // Misc + private static final int STORM_MAX_COUNT = 16; + + public ResidenceOfKingProcella() + { + addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3); + addSpawnId(PROCELLA); + } + + @Override + public String onSpawn(Npc npc) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), npc, null); + startQuestTimer("SPAWN_STORM", 5000, npc, null); + world.setParameter("stormCount", 0); + } + return null; + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (npc.getId() == PROCELLA)) + { + world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); + world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); + world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + break; + } + case "SPAWN_STORM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) + { + world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); + final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); + procellaStorm.setRandomWalking(true); + world.getParameters().increaseInt("stormCount", 1); + startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); + } + break; + } + case "HIDE_PROCELLA": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + if (world.getNpc(PROCELLA).isInvisible()) + { + world.getNpc(PROCELLA).setInvisible(false); + } + else + { + world.getNpc(PROCELLA).setInvisible(true); + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player); + } + } + break; + } + case "CHECK_CHAR_INSIDE_RADIUS_NPC": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().orElse(null); // Usamos orElse(null) para evitar el Optional vac��­o + if ((plr != null) && (plr.isInsideRadius3D(npc, 100))) + { + npc.abortAttack(); + npc.abortCast(); + npc.setTarget(plr); + + if (plr.getKnownSkill(HURRICANE_BOLT) != null) // Verificamos si el jugador tiene la habilidad + { + if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) + { + npc.abortCast(); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) + { + npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); + } + } + } + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + } + break; + } + } + return null; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + if (npc.getId() == PROCELLA) + { + cancelQuestTimer("SPAWN_MINION", npc, player.getActingPlayer()); + cancelQuestTimer("SPAWN_STORM", npc, player.getActingPlayer()); + cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player.getActingPlayer()); + } + else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead())) + { + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfKingProcella(); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java new file mode 100644 index 0000000000..9c3c7ea37b --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java @@ -0,0 +1,209 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.data.xml.SkillData; +import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfQueenNebula extends AbstractNpcAI +{ + // NPCs + private static final int NEBULA = 29106; + private static final int WATER_SLIME = 29111; + // Skills + private static final int AQUA_RAGE = 50036; + private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); + private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); + private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); + private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); + private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); + private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); + + public ResidenceOfQueenNebula() + { + addKillId(NEBULA, WATER_SLIME); + addAttackId(NEBULA); + addSpawnId(NEBULA); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_WATER_SLIME": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().get(); + startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr); + if (npc.getId() == NEBULA) + { + npc.doCast(AQUA_SUMMON.getSkill()); + for (int i = 0; i < getRandom(4, 6); i++) + { + addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + } + } + } + break; + } + case "PLAYER_PARA": + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(true); + startQuestTimer("PLAYER_UNPARA", 5000, npc, player); + } + break; + } + case "PLAYER_UNPARA": + { + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); + player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(false); + break; + } + case "CAST_AQUA_RAGE": + { + startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); + if ((player.isInsideRadius3D(npc, 1000))) + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) + { + npc.doCast(AQUA_RAGE_2.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) + { + npc.doCast(AQUA_RAGE_3.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) + { + npc.doCast(AQUA_RAGE_4.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) + { + npc.doCast(AQUA_RAGE_5.getSkill()); + startQuestTimer("PLAYER_PARA", 100, npc, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + npc.abortCast(); + } + else if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) + { + npc.doCast(AQUA_RAGE_1.getSkill()); + } + } + break; + } + } + return null; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + return super.onSpawn(npc); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + switch (npc.getId()) + { + case NEBULA: + { + cancelQuestTimer("CAST_AQUA_RAGE", npc, player); + cancelQuestTimer("SPAWN_WATER_SLIME", npc, player); + break; + } + case WATER_SLIME: + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_1.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_2.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_3.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_4.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); + skill.applyEffects(player, player); + } + } + break; + } + } + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfQueenNebula(); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java index 6a2a5bc73a..f90a79e431 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java @@ -53,12 +53,12 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final AtomicReference SPAWN_BATTLE_MOBS = new AtomicReference<>(); private static final AtomicReference SPAWN_ENCHANCED_MOBS = new AtomicReference<>(); - public static final int[] REGGIESYS_GLAKIAS = + protected static final int[] REGGIESYS_GLAKIAS = { 29136, 29137 }; - public static final int[] SLICING_GLAKIAS = + protected static final int[] SLICING_GLAKIAS = { 29138, 29139 @@ -71,21 +71,20 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final Location GLAKIAS_SPAWN_LOC = new Location(114713, -114799, -11209, 33289); // Teleports - private static final Location The_north_eastern_entrance = new Location(-56255, 13537, -3336); - private static final Location The_south_eastern_entrance = new Location(-49550, 17189, -3016); - private static final Location The_north_western_entrance = new Location(-52849, 5272, -240); - private static final Location The_south_western_entrance = new Location(-52849, 5272, -240); + private static final Location NORTH_EASTERN_ENTRANCE = new Location(-56255, 13537, -3336); + private static final Location SOUTH_EASTERN_ENTRANCE = new Location(-49550, 17189, -3016); + private static final Location NORTH_WESTERN_ENTRANCE = new Location(-52849, 5272, -240); + private static final Location SOUTH_WESTERN_ENTRANCE = new Location(-52849, 5272, -240); - private static final Location Crossroad = new Location(145598, 144091, -11789); - private static final Location Northern_Secret_Passage = new Location(149478, 147145, -12339); + private static final Location CROSSROAD = new Location(145598, 144091, -11789); + private static final Location NOTHERN_SECRET_PASSAGE = new Location(149478, 147145, -12339); - private static final Location Glakias_House = new Location(113479, -114804, -11076); + private static final Location GLAKIAS_RESIDENCE = new Location(113479, -114804, -11076); public static final int UNDERCOVER_AGENT = 34230; // Teleport npc public static final int CRYSTAL_ENERGY = 34232; // Teleport npc // Zones - private static final ZoneType[] ZONES = { ZoneManager.getInstance().getZoneByName("frost_castle_zone"), @@ -93,7 +92,6 @@ public class FrostLordCastleZone extends AbstractNpcAI }; // Timings - private static final int[] DAYS_OF_WEEK = { Calendar.TUESDAY, @@ -112,7 +110,7 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final long DESPAWN_DELAY = 16 * 60 * 60 * 1000; - private static Npc _TeleportchargedCrystal = null; + private static Npc _teleportchargedCrystal = null; private static final String SCRIPT_BYPASS = "Quest FrostLordCastleZone "; @@ -137,148 +135,73 @@ public class FrostLordCastleZone extends AbstractNpcAI { case "Crossroad": { - TeleportCheck(player, 1); + teleportCheck(player, 1); break; } - case "Northern_Secret_Passage": { - TeleportCheck(player, 2); + teleportCheck(player, 2); break; } - case "The_north_eastern_entrance": { - TeleportCheck(player, 3); + teleportCheck(player, 3); break; } - case "The_south_eastern_entrance": { - TeleportCheck(player, 4); + teleportCheck(player, 4); break; } - case "The_north_western_entrance": { - TeleportCheck(player, 5); + teleportCheck(player, 5); break; } - case "The_south_western_entrance": { - TeleportCheck(player, 6); + teleportCheck(player, 6); break; } - case "Crystal_Energy_Teleport": { - player.teleToLocation(Glakias_House); + player.teleToLocation(GLAKIAS_RESIDENCE); break; } - case "FIRST_RAID_SPAWN": { int id = Rnd.get(100) < 7 ? SLICING : REGGIESYS; addSpawn(id, REGGIESYS_SLICING_SPAWN_LOC, false, DESPAWN_DELAY); break; } - case "SECOND_RAID_SPAWN": { addSpawn(TIRON, TIRON_SPAWN_LOC, false, DESPAWN_DELAY); break; } - - default: - { - break; - } } return super.onAdvEvent(event, npc, player); } - private void scheduleFirstRaid() - { - long time = Long.MAX_VALUE; - - for (int day : DAYS_OF_WEEK) - { - long nextDateMillis = getNextDateMilis(day, FIRST_RAID_TIME[0], FIRST_RAID_TIME[1]); - if (nextDateMillis < time) - { - time = nextDateMillis; - } - } - - startQuestTimer("FIRST_RAID_SPAWN", time - System.currentTimeMillis(), null, null); - } - - private void scheduleSecondRaid() - { - long time = Long.MAX_VALUE; - for (int day : DAYS_OF_WEEK) - { - long temp = getNextDateMilis(day, SECOND_RAID_TIME[0], SECOND_RAID_TIME[1]); - if (temp < time) - { - time = temp; - } - } - startQuestTimer("SECOND_RAID_SPAWN", time - System.currentTimeMillis(), null, null); - - } - - private long getNextDateMilis(int dayOfWeek, int hour, int minute) - { - Calendar c = Calendar.getInstance(); - c.set(Calendar.HOUR_OF_DAY, hour); - c.set(Calendar.MINUTE, minute); - c.set(Calendar.SECOND, 0); - for (int i = 0; i < 7; i++) - { - if ((c.get(Calendar.DAY_OF_WEEK) == dayOfWeek) && (c.getTimeInMillis() > System.currentTimeMillis())) - { - return c.getTimeInMillis(); - } - c.add(Calendar.DAY_OF_WEEK, 1); - } - return c.getTimeInMillis(); - } - @Override - public String onKill(Npc npc, Player killer, boolean isSummon) + public String onFirstTalk(Npc npc, Player player) { - switch (npc.getId()) + if (npc.getId() == CRYSTAL_ENERGY) { - case REGGIESYS: - { - addSpawn(REGGIESYS_GLAKIAS[Rnd.get(0, REGGIESYS_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); - - SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); - - break; - } - case SLICING: - { - addSpawn(SLICING_GLAKIAS[Rnd.get(0, SLICING_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); - - SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); - - break; - } - case TIRON: - { - _TeleportchargedCrystal = addSpawn(CHARGED_CRYSTAL, CHARGED_CRYSTAL_SPAWN_LOC, false, DESPAWN_DELAY); - break; - } + return getHtm(player, "34232.htm"); } - DeleteGlakiasSpawns(npc); - return super.onKill(npc, killer, false); + + if (npc.getId() == UNDERCOVER_AGENT) + { + if ((_teleportchargedCrystal != null) && _teleportchargedCrystal.isSpawned()) + { + return getHtm(player, "34230-full.htm"); + } + + return getHtm(player, "34230.htm"); + } + + return null; } @Override @@ -324,47 +247,133 @@ public class FrostLordCastleZone extends AbstractNpcAI } } - public void TeleportCheck(Player player, int locNum) + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + switch (npc.getId()) + { + case REGGIESYS: + { + addSpawn(REGGIESYS_GLAKIAS[Rnd.get(0, REGGIESYS_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); + SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); + break; + } + case SLICING: + { + addSpawn(SLICING_GLAKIAS[Rnd.get(0, SLICING_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); + SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); + break; + } + case TIRON: + { + _teleportchargedCrystal = addSpawn(CHARGED_CRYSTAL, CHARGED_CRYSTAL_SPAWN_LOC, false, DESPAWN_DELAY); + break; + } + } + deleteGlakiasSpawns(npc); + return super.onKill(npc, killer, false); + } + + @RegisterEvent(EventType.ON_PLAYER_BYPASS) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void onPlayerBypass(OnPlayerBypass event) + { + final Player player = event.getPlayer(); + if (event.getCommand().startsWith(SCRIPT_BYPASS)) + { + notifyEvent(event.getCommand().replace(SCRIPT_BYPASS, ""), null, player); + } + } + + private void scheduleFirstRaid() + { + long time = Long.MAX_VALUE; + for (int day : DAYS_OF_WEEK) + { + final long nextDateMillis = getNextDateMilis(day, FIRST_RAID_TIME[0], FIRST_RAID_TIME[1]); + if (nextDateMillis < time) + { + time = nextDateMillis; + } + } + startQuestTimer("FIRST_RAID_SPAWN", time - System.currentTimeMillis(), null, null); + } + + private void scheduleSecondRaid() + { + long time = Long.MAX_VALUE; + for (int day : DAYS_OF_WEEK) + { + final long nextDateMillis = getNextDateMilis(day, SECOND_RAID_TIME[0], SECOND_RAID_TIME[1]); + if (nextDateMillis < time) + { + time = nextDateMillis; + } + } + startQuestTimer("SECOND_RAID_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 void teleportCheck(Player player, int locationId) { int requiredMoney = 0; Location teleportLocation = null; - - switch (locNum) + switch (locationId) { case 1: { requiredMoney = 100000; - teleportLocation = Crossroad; + teleportLocation = CROSSROAD; break; } case 2: { requiredMoney = 100000; - teleportLocation = Northern_Secret_Passage; + teleportLocation = NOTHERN_SECRET_PASSAGE; break; } case 3: { requiredMoney = 500000; - teleportLocation = The_north_eastern_entrance; + teleportLocation = NORTH_EASTERN_ENTRANCE; break; } case 4: { requiredMoney = 500000; - teleportLocation = The_south_eastern_entrance; + teleportLocation = SOUTH_EASTERN_ENTRANCE; break; } case 5: { requiredMoney = 500000; - teleportLocation = The_north_western_entrance; + teleportLocation = NORTH_WESTERN_ENTRANCE; break; } case 6: { requiredMoney = 500000; - teleportLocation = The_south_western_entrance; + teleportLocation = SOUTH_WESTERN_ENTRANCE; break; } default: @@ -382,33 +391,7 @@ public class FrostLordCastleZone extends AbstractNpcAI player.teleToLocation(teleportLocation); } - @Override - public String onFirstTalk(Npc npc, Player player) - { - String html; - if (npc.getId() == CRYSTAL_ENERGY) - { - html = getHtm(player, "34232.htm"); - return html; - } - - if (npc.getId() == UNDERCOVER_AGENT) - { - if ((_TeleportchargedCrystal != null) && _TeleportchargedCrystal.isSpawned()) - { - html = getHtm(player, "34230-full.htm"); - } - else - { - html = getHtm(player, "34230.htm"); - } - - return html; - } - return null; - } - - private void DeleteGlakiasSpawns(Npc npc) + private void deleteGlakiasSpawns(Npc npc) { int npcId = npc.getId(); if ((npcId == REGGIESYS_GLAKIAS[0]) || (npcId == REGGIESYS_GLAKIAS[1]) || (npcId == SLICING_GLAKIAS[0]) || (npcId == SLICING_GLAKIAS[1])) @@ -417,19 +400,8 @@ public class FrostLordCastleZone extends AbstractNpcAI } } - @RegisterEvent(EventType.ON_PLAYER_BYPASS) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onPlayerBypass(OnPlayerBypass event) - { - final Player player = event.getPlayer(); - if (event.getCommand().startsWith(SCRIPT_BYPASS)) - { - notifyEvent(event.getCommand().replace(SCRIPT_BYPASS, ""), null, player); - } - } - public static void main(String[] args) { new FrostLordCastleZone(); } -} \ No newline at end of file +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 5b501b1f1b..bcc74a8afe 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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; @@ -254,6 +255,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_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/config.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/config.xml index be41235de7..d1a01d9195 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/config.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/config.xml @@ -4,15 +4,15 @@ + - - - + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/rewards.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/rewards.xml index d6234162c4..d647b5069d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/rewards.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/events/LetterCollector/rewards.xml @@ -9,15 +9,15 @@ + - - - + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java index b3da341f77..1059dd2ac3 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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); @@ -173,6 +175,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveHonorCoins", GiveHonorCoins::new); EffectHandler.getInstance().registerHandler("GiveItemByExp", GiveItemByExp::new); + EffectHandler.getInstance().registerHandler("GivePetXp", GivePetXp::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); @@ -196,6 +199,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 +241,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::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("ModifyCraftPoints", ModifyCraftPoints::new); EffectHandler.getInstance().registerHandler("ModifyDeathPoints", ModifyDeathPoints::new); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/MasterHandler.java index 80cd97dfc1..074681ef62 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/MasterHandler.java @@ -148,6 +148,7 @@ import handlers.bypasshandlers.Link; import handlers.bypasshandlers.Multisell; import handlers.bypasshandlers.NpcViewMod; import handlers.bypasshandlers.Observation; +import handlers.bypasshandlers.PetExtractWindow; import handlers.bypasshandlers.PlayerHelp; import handlers.bypasshandlers.PrivateWarehouse; import handlers.bypasshandlers.QuestLink; @@ -467,6 +468,7 @@ public class MasterHandler Multisell.class, NpcViewMod.class, Observation.class, + PetExtractWindow.class, QuestLink.class, PlayerHelp.class, PrivateWarehouse.class, diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java new file mode 100644 index 0000000000..446334c464 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java @@ -0,0 +1,56 @@ +/* + * 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.bypasshandlers; + +import org.l2jmobius.gameserver.handler.IBypassHandler; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.network.serverpackets.pet.ShowPetExtractSystem; + +/** + * @author Geremy + */ +public class PetExtractWindow implements IBypassHandler +{ + private static final String[] COMMANDS = + { + "pet_extract_window", + }; + + @Override + public boolean useBypass(String command, Player player, Creature target) + { + if (!target.isNpc()) + { + return false; + } + + if (command.toLowerCase().startsWith(COMMANDS[0])) + { + player.sendPacket(ShowPetExtractSystem.STATIC_PACKET); + return true; + } + + return false; + } + + @Override + public String[] getBypassList() + { + return COMMANDS; + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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/MaxMagicCriticalRate.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java similarity index 55% rename from L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java rename to L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java index c99b060259..c9801b6d42 100644 --- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java @@ -1,31 +1,53 @@ -/* - * 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.actor.Creature; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.skill.Skill; + +/** + * @author Geremy + */ +public class GivePetXp extends AbstractEffect +{ + private final int _xp; + + public GivePetXp(StatSet params) + { + _xp = params.getInt("xp", 0); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, Item item) + { + if (!effector.hasPet()) + { + return; + } + + effected.getActingPlayer().getPet().addExpAndSp(_xp, 0); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 951002a2c2..35bfbcb6bc 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 7e02e79abc..bff5a1734b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index 70789354f3..fd41f09a9a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index df05ef8607..b36b10a92e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetAttack.java index fa90ba401d..4c76932c3e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_DON_T_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_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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetHold.java index 04649bf332..72ad8a2b4e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetMove.java index edddbab322..817593d9a2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index eaa7bca994..858083f36a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetStop.java index efd4e36b0b..8b8cabc337 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 71d72e95b5..3e0acb89bd 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_DON_T_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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index 7b0ec565e4..41ecb77132 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index be6205b0f9..2b5a8f1e82 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index d119886221..6254d3db05 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index 36aa372909..7fa7f0a45c 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 41b3dd19f2..4f91147611 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index fb269e325a..cf0218f87f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index a408928a04..f305fd2787 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java @@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR); } } + + @Override + public boolean isPetAction() + { + return true; + } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java index 4c6398780f..d1698bbf65 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java @@ -20,20 +20,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.l2jmobius.gameserver.data.xml.SkillData; -import org.l2jmobius.gameserver.enums.ChatType; -import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.enums.TeleportWhereType; -import org.l2jmobius.gameserver.instancemanager.ZoneManager; +import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.StatSet; 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.holders.SkillHolder; import org.l2jmobius.gameserver.model.instancezone.Instance; -import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; -import org.l2jmobius.gameserver.model.skill.Skill; -import org.l2jmobius.gameserver.model.skill.SkillCaster; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent; @@ -47,8 +42,12 @@ import instances.AbstractInstance; */ public class DwellingOfSpirits extends AbstractInstance { + private static final int PORTAL_OPEN_CHANCE = 40; + // CRITICAL NPCs private static final int RUIP = 22273; + private static final int FAIRY_C1 = 22271; + private static final int FAIRY_C2 = 22272; private static final int SEALSTONE = 34178; private static final int ANIMAEL = 34176; private static final int PORTAL_EVENT_FIRE = 15969; @@ -56,46 +55,10 @@ public class DwellingOfSpirits extends AbstractInstance private static final int PORTAL_EVENT_EARTH = 15972; private static final int PORTAL_EVENT_WIND = 15971; - // PROCELLA BOSS WIND private static final int KING_PROCELLA = 29107; - private static final int PROCELLA_GUARDIAN_1 = 29112; - private static final int PROCELLA_STORM = 29115; - - private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); - private static final int HURRICANE_BOLT = 50043; - private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); - private static final int STORM_MAX_COUNT = 20; // - - // PETRAM BOSS EARTH private static final int KING_PETRAM = 29108; - private static final int PETRAM_PIECE = 29116; - private static final int PETRAM_FRAGMENT = 29117; - // Skills - private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); - private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); - private static final SkillHolder TEST = new SkillHolder(5712, 1); - - // IGNIS BOSS FIRE - // NPCs private static final int KING_IGNIS = 29105; - // Skills - private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); - private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); - private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); - private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); - - // NEBULA BOSS WATER - // NPCs private static final int KING_NEBULA = 29106; - private static final int WATER_SLIME = 29111; - // Skills - private static final int AQUA_RAGE = 50036; - private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); - private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); - private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); - private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); - private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); - private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); // Entrace Portal Triggers private static final int WIND_FIRST_TRIGGER_1 = 16158880; @@ -107,38 +70,86 @@ public class DwellingOfSpirits extends AbstractInstance private static final int WATER_FIRST_TRIGGER_1 = 16157770; private static final int WATER_FIRST_TRIGGER_2 = 16157772; - // Statue Kill Indicator Triggers - private static final int KILL_INDICATOR_TRIGGER_1 = 16159990; - private static final int KILL_INDICATOR_TRIGGER_2 = 16159994; - private static final int KILL_INDICATOR_TRIGGER_3 = 16159996; - private static final int KILL_INDICATOR_TRIGGER_4 = 16159998; - private static final int KILL_INDICATOR_TRIGGER_5 = 16159992; + // @formatter:off + private static final int[][] PORTAL_TRIGGER_IDS = + { + { 16158880, 16158882 }, + { 16156660, 16156662 }, + { 16155550, 16155552 }, + { 16157770, 16157772 } + }; + + private static final Location IGNIS_FIRE_L = new Location(202374, 168153, -15485); + private static final Location PETRAM_EARTH_L = new Location(222081, 190538, -15485); + private static final Location NEBULA_WATER_L = new Location(222149, 168087, -15485); + private static final Location PROCELLA_WIN_L = new Location(212884, 178847, -15485); + + private static final Location PETRAM_EARTH_RETURN_L = new Location(-114321, -77262, -11445); + private static final Location IGNIS_FIRE_RETURN_L = new Location(-114322, -77262, -11445); + private static final Location NEBULA_WATER_RETURN_L = new Location(-114323, -77262, -11445); + private static final Location PROCELLA_WIN_RETURN_L = new Location(-114324, -77262, -11445); + + private static final int[][][] portalConfigs = + { + {{EARTH_FIRST_TRIGGER_1, EARTH_FIRST_TRIGGER_2, KING_PETRAM}}, + {{FIRE_FIRST_TRIGGER_1, FIRE_FIRST_TRIGGER_2, KING_IGNIS}}, + {{WATER_FIRST_TRIGGER_1, WATER_FIRST_TRIGGER_2, KING_NEBULA}}, + {{WIND_FIRST_TRIGGER_1, WIND_FIRST_TRIGGER_2, KING_PROCELLA}} + }; + + private static final int[][] portalSpawnCoordinates = + { + {222063, 191514, -15486, 50142}, + {202350, 169121, -15484, 48103}, + {222127, 169057, -15486, 48730}, + {212862, 179828, -15489, 48103} + }; + // @formatter:on private static final int TEMPLATE_ID = 214; private static final Map PORTAL_MSG = new HashMap<>(); static { - PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(0, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); PORTAL_MSG.put(2, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WATER_IS_OPEN); PORTAL_MSG.put(3, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WIND_IS_OPEN); - PORTAL_MSG.put(4, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); - PORTAL_MSG.put(5, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); + PORTAL_MSG.put(4, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); } + // Zone + private static final int DWELLING_CENTRAL = 21400000; + + private static final int IGNIS_PORTAL_ENTER_ID = 202201; + private static final int PETRAM_PORTAL_ENTER_ID = 202202; + private static final int NEBULA_PORTAL_ENTER_ID = 202203; + private static final int PROCELLA_PORTAL_ENTER_ID = 202204; + + // Portals return IDs + private static final int IGNIS_PORTAL_RETURN_ID = 202205; + private static final int PETRAM_PORTAL_RETURN_ID = 202206; + private static final int NEBULA_PORTAL_RETURN_ID = 202207; + private static final int PROCELLA_PORTAL_RETURN_ID = 202208; + public DwellingOfSpirits() { super(TEMPLATE_ID); addKillId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); - addKillId(PROCELLA_GUARDIAN_1); - addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); - addKillId(WATER_SLIME); + addKillId(FAIRY_C1, FAIRY_C2, RUIP); addAttackId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); addSpawnId(KING_NEBULA); addFirstTalkId(ANIMAEL, SEALSTONE); addTalkId(ANIMAEL); addStartNpc(SEALSTONE); - addCreatureSeeId(RUIP, ANIMAEL); + addCreatureSeeId(ANIMAEL); + addEnterZoneId(DWELLING_CENTRAL); + addEnterZoneId(IGNIS_PORTAL_ENTER_ID, IGNIS_PORTAL_RETURN_ID); + addEnterZoneId(PETRAM_PORTAL_ENTER_ID, PETRAM_PORTAL_RETURN_ID); + addEnterZoneId(NEBULA_PORTAL_ENTER_ID, NEBULA_PORTAL_RETURN_ID); + addEnterZoneId(PROCELLA_PORTAL_ENTER_ID, PROCELLA_PORTAL_RETURN_ID); + addInstanceEnterId(TEMPLATE_ID); + addInstanceLeaveId(TEMPLATE_ID); } @Override @@ -180,779 +191,106 @@ public class DwellingOfSpirits extends AbstractInstance case "TELEPORT": { - player.teleToLocation(TeleportWhereType.TOWN, null); - return null; - } - //////////////// BOSS PROCELLA WIND ACTION ///////////// - case "SPAWN_MINION_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (npc.getId() == KING_PROCELLA)) + final Instance instance = player.getInstanceWorld(); + if (instance != null) { - world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); - world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_1, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); - world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_1, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); - startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(KING_PROCELLA), player); + instance.finishInstance(); + player.teleToLocation(TeleportWhereType.TOWN, null); } - break; - } - case "SPAWN_STORM_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) - { - world.getNpc(KING_PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); - final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(KING_PROCELLA).getX() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getY() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); - procellaStorm.setRandomWalking(true); - world.getParameters().increaseInt("stormCount", 1); - startQuestTimer("SPAWN_STORM_PROCELLA", 30000, world.getNpc(KING_PROCELLA), player); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, procellaStorm, player); - } - break; - } - case "HIDE_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) >= 1) - { - world.getNpc(KING_PROCELLA).setInvisible(true); - } - else if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) == 0) - { - world.getNpc(KING_PROCELLA).setInvisible(false); - startQuestTimer("SPAWN_MINION_PROCELLA", 90000 + getRandom(-15000, 11000), world.getNpc(KING_PROCELLA), player); - } - break; - } - case "CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().orElse(null); - if ((plr != null) && (plr.isInsideRadius3D(npc, 200))) - { - npc.abortAttack(); - npc.abortCast(); - npc.setTarget(plr); - if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) - { - npc.abortCast(); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) - { - npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); - } - } - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - } - break; - } - //////////////// BOSS PETRAM EARTH ACTION ///////////// - case "SPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - npc.doCast(EARTH_ENERGY.getSkill()); - - if (!world.getParameters().getBoolean("spawnedMinions", false)) - { - world.getParameters().set("spawnedMinions", true); - - final int stage = world.getParameters().getInt("stage", 0); - world.getParameters().set("stage", stage + 1); - - world.setParameter("minionpetram1", addSpawn(npc, PETRAM_FRAGMENT, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram3", addSpawn(npc, PETRAM_FRAGMENT, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId())); - - npc.setInvul(true); - npc.broadcastSay(ChatType.NPC_SHOUT, "HaHahaha, fighters lets kill them. Now Im invul!!!"); - } - - startQuestTimer("SUPPORT_PETRAM", 3000, npc, player); - } - break; - } - case "UNSPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - world.getParameters().set("spawnedMinions", false); - - npc.setInvul(false); - npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); - } - break; - } - case "SUPPORT_PETRAM": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Npc m1 = world.getParameters().getObject("minionpetram1", Npc.class); - final Npc m2 = world.getParameters().getObject("minionpetram2", Npc.class); - final Npc m3 = world.getParameters().getObject("minionpetram3", Npc.class); - final Npc m4 = world.getParameters().getObject("minionpetram4", Npc.class); - if (!m1.isDead()) - { - m1.setTarget(world.getNpc(KING_PETRAM)); - m1.doCast(TEST.getSkill()); - } - if (!m2.isDead()) - { - m2.setTarget(world.getNpc(KING_PETRAM)); - m2.doCast(TEST.getSkill()); - } - if (!m3.isDead()) - { - m3.setTarget(world.getNpc(KING_PETRAM)); - m3.doCast(TEST.getSkill()); - } - if (!m4.isDead()) - { - m4.setTarget(world.getNpc(KING_PETRAM)); - m4.doCast(TEST.getSkill()); - } - - startQuestTimer("SUPPORT_PETRAM", 10100, npc, player); - } - break; - } - case "EARTH_FURY": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - npc.doCast(EARTH_FURY.getSkill()); - } - break; - } - //////////////// BOSS IGNIS ACTION ///////////// - case "CAST_FIRE_RAGE_1": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) - { - npc.doCast(FIRE_RAG_2.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_2": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) - { - npc.doCast(FIRE_RAG_4.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_3": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) - { - npc.doCast(FIRE_RAG_6.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_4": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) - { - npc.doCast(FIRE_RAG_8.getSkill()); - } - break; - } - //////////////// BOSS NEBULA ACTION ///////////// - case "SPAWN_WATER_SLIME": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().get(); - if (plr != null) - { - startQuestTimer("CAST_AQUA_RAGE", 30000 + getRandom(-15000, 15000), npc, plr); - } - if (npc.getId() == KING_NEBULA) - { - npc.doCast(AQUA_SUMMON.getSkill()); - for (int i = 0; i < getRandom(4, 6); i++) - { - addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); - startQuestTimer("SPAWN_WATER_SLIME", 80000, npc, null); - } - } - } - break; - } - case "PLAYER_PARA": - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(true); - startQuestTimer("PLAYER_UNPARA", 5000, npc, player); - } - break; - } - case "PLAYER_UNPARA": - { - player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); - player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(false); - break; - } - case "CAST_AQUA_RAGE": - { - startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); - if ((player.isInsideRadius3D(npc, 1000))) - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) - { - npc.doCast(AQUA_RAGE_2.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) - { - npc.doCast(AQUA_RAGE_3.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) - { - npc.doCast(AQUA_RAGE_4.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) - { - npc.doCast(AQUA_RAGE_5.getSkill()); - startQuestTimer("PLAYER_PARA", 100, npc, player); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - npc.abortCast(); - } - else - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) - { - npc.doCast(AQUA_RAGE_1.getSkill()); - } - } - } - break; - } - case "check_status": - { - final Instance world = player.getInstanceWorld(); - if (!isInInstance(world)) - { - return null; - } - - switch (world.getStatus()) - { - case 0: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(1); - world.despawnGroup("sealstone"); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 1: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(2); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 2: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(3); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 3: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(4); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 4: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(5); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(3), null)); - addSpawn(KING_PROCELLA, 212862, 179828, -15489, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 5: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 6: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(7); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 7: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(8); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 8: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(9); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_2"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 9: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(10); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(1), null)); - addSpawn(KING_PETRAM, 222063, 191514, -15486, 50142, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 10: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 11: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(12); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 12: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(13); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 13: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(14); - world.spawnGroup("ruipwave_2"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 14: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(15); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); - addSpawn(KING_IGNIS, 202350, 169121, -15484, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 15: // Dummy stage pause, u need defeat boss for continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 16: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(17); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 17: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(18); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 18: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(19); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 19: // need defeat boss for finish. - { - if (world.getAliveNpcCount(RUIP) == 0) - - { - world.setStatus(20); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(2), null)); - addSpawn(KING_NEBULA, 222127, 169057, -15486, 48730, false, 0, false, world.getId()); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 20: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.getParameters().set("DwellingOfSpiritsFinished", true); - world.setStatus(21); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - } - - return null; } } return super.onAdvEvent(event, npc, player); - - } - - @Override - public String onSpawn(Npc npc) - { - startQuestTimer("SPAWN_WATER_SLIME", 40000, npc, null); - return super.onSpawn(npc); - } - - @Override - public String onAttack(Npc npc, Player player, int damage, boolean isSummon, Skill skill) - { - final Instance world = npc.getInstanceWorld(); - if (world == null) - { - return null; - } - - switch (npc.getId()) - { - case KING_PROCELLA: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) - { - startQuestTimer("SPAWN_MINION_PROCELLA", 80000 + getRandom(-15000, 15000), npc, player); - startQuestTimer("SPAWN_STORM_PROCELLA", 4000, npc, player); - world.setParameter("stormCount", 0); - } - break; - } - case KING_PETRAM: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.80)) - { - startQuestTimer("EARTH_FURY", 1000, npc, player); - if ((world.getParameters().getInt("stage", 0) == 0) || (npc.getCurrentHp() < (npc.getMaxHp() * 0.50))) - { - startQuestTimer("SPAWN_MINION", 1000, npc, player); - } - } - break; - } - case KING_IGNIS: - { - if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) - { - startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) - { - startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) - { - startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) - { - startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); - } - break; - } - } - - return null; - } - - @Override - public String onCreatureSee(Npc npc, Creature creature) - { - if (creature.isPlayer()) - { - final Instance world = creature.getInstanceWorld(); - if (world.getStatus() >= 5) - { - enableZoneWind(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 10) - { - enableZoneEarth(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 15) - { - enableZoneFire(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 20) - { - enableZoneWater(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 21) - { - world.despawnGroup("ruipwave_1"); - world.despawnGroup("ruipwave_2"); - world.despawnGroup("NormalMobs"); - world.finishInstance(); - } - } - - return super.onCreatureSee(npc, creature); } @Override public String onKill(Npc npc, Player player, boolean isSummon) { final Instance instance = npc.getInstanceWorld(); + final StatSet worldParameters = instance.getParameters(); + + int totalBossDefeatCount = worldParameters.getInt("totalBossDefeatCount", 0); switch (npc.getId()) { - case KING_PETRAM: + case RUIP: + case FAIRY_C1: + case FAIRY_C2: { - final Npc portal = addSpawn(PORTAL_EVENT_EARTH, 222065, 192767, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); // set the portal visible - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneEarthExit(); - cancelQuestTimer("SPAWN_MINION", npc, player); - instance.setStatus(12); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PETRAM_FRAGMENT)) + if (Rnd.get(100) <= PORTAL_OPEN_CHANCE) { - spawn.deleteMe(); - } - break; - } - case KING_NEBULA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WATER, 222127, 170488, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); - setActive(true); - enableZoneWindExit(); - instance.setStatus(21); - instance.spawnGroup("animael"); - break; - } - case KING_IGNIS: - { - final Npc portal = addSpawn(PORTAL_EVENT_FIRE, 202349, 170533, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneFireExit(); - instance.setStatus(17); - break; - } - case KING_PROCELLA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WIND, 212863, 181090, -15487, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneWaterExit(); - instance.setStatus(7); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PROCELLA_GUARDIAN_1)) - { - spawn.deleteMe(); - } - break; - } - case PETRAM_FRAGMENT: - { - startQuestTimer("UNSPAWN_MINION", 1000, instance.getNpc(KING_PETRAM), player); - break; - } - case PROCELLA_GUARDIAN_1: - { - - startQuestTimer("HIDE_PROCELLA", 1000, instance.getNpc(KING_PROCELLA), player); - break; - } - case WATER_SLIME: - { - if (getRandomBoolean()) - { - switch (player.getAffectedSkillLevel(AQUA_RAGE)) + int portalId = Rnd.get(4); + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + + if (!isPortalOpened) { - case 1: + if (instance.getStatus() > totalBossDefeatCount) { - player.stopSkillEffects(AQUA_RAGE_1.getSkill()); - break; - } - case 2: - { - player.stopSkillEffects(AQUA_RAGE_2.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); - skill.applyEffects(player, player); - break; - } - case 3: - { - player.stopSkillEffects(AQUA_RAGE_3.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); - skill.applyEffects(player, player); - break; - } - case 4: - { - player.stopSkillEffects(AQUA_RAGE_4.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); - skill.applyEffects(player, player); - break; + return super.onKill(npc, player, isSummon); } + instance.setStatus(instance.getStatus() + 1); + openPortal(player, portalId, instance); + worldParameters.set("portal" + portalId + "Opened", true); } } break; } + + case KING_PETRAM: + case KING_PROCELLA: + case KING_IGNIS: + case KING_NEBULA: + { + spawnExitPortal(instance, player, npc.getId()); + CheckGeneralResidenceStages(npc, instance); + + break; + } } return super.onKill(npc, player, isSummon); } + @Override + public String onEnterZone(Creature creature, ZoneType zone) + { + Instance instance = creature.getInstanceWorld(); + if ((instance != null) && creature.isPlayer()) + { + + final StatSet worldParameters = instance.getParameters(); + + if (zone.getId() == DWELLING_CENTRAL) + { + worldParameters.set("InsideResidence", true); + handleCentralZone(instance, worldParameters); + } + + int portalId = getPortalIdByZone(zone.getId()); + Location[] locations = getLocationsForPortal(portalId); + + if ((portalId >= 0) && (locations[0] != null)) + { + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + boolean isPortalExitOpened = worldParameters.getBoolean("portalExit" + portalId, false); + boolean InsideResidence = worldParameters.getBoolean("InsideResidence", false); + + if (isPortalOpened && (InsideResidence)) + { + creature.teleToLocation(locations[0], instance); + worldParameters.set("InsideResidence", false); + } + + if (isPortalExitOpened && (!InsideResidence)) + { + creature.teleToLocation(locations[1], instance); + } + } + + } + return null; + } + @Override public String onFirstTalk(Npc npc, Player player) { @@ -971,87 +309,251 @@ public class DwellingOfSpirits extends AbstractInstance return super.onFirstTalk(npc, player); } - // PORTALS - private void enableZoneWind() + private void openPortal(Player player, int id, Instance instance) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_wind"); - if (zone != null) + + if ((id >= 0) && (id < portalSpawnCoordinates.length)) { - zone.setEnabled(true); + int[] coordinates = portalSpawnCoordinates[id]; + int trigger1 = portalConfigs[id][0][0]; + int trigger2 = portalConfigs[id][0][1]; + int kingId = portalConfigs[id][0][2]; + + if ((id >= 0) && (id < PORTAL_MSG.size())) + { + NpcStringId portalMessage = PORTAL_MSG.get(id); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, portalMessage, null)); + } + addSpawn(kingId, coordinates[0], coordinates[1], coordinates[2], coordinates[3], false, 0, false, instance.getId()); + + instance.setParameter("TRIGGER_1_" + id, trigger1); + instance.setParameter("TRIGGER_2_" + id, trigger2); + + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } - private void enableZoneEarth() + private void spawnExitPortal(Instance instance, Player player, int bossId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_earth"); - if (zone != null) + Npc portal; + int portalId; + Location portalLocation; + + final StatSet worldParameters = instance.getParameters(); + worldParameters.set("portalExit" + getPortalByBossId(bossId), true); + + switch (bossId) { - zone.setEnabled(true); + case KING_PROCELLA: + { + portalId = PORTAL_EVENT_WIND; + portalLocation = new Location(212863, 181090, -15487); + break; + } + case KING_PETRAM: + { + portalId = PORTAL_EVENT_EARTH; + portalLocation = new Location(222065, 192767, -15488); + break; + } + case KING_IGNIS: + { + portalId = PORTAL_EVENT_FIRE; + portalLocation = new Location(202349, 170533, -15488); + break; + } + case KING_NEBULA: + { + portalId = PORTAL_EVENT_WATER; + portalLocation = new Location(222127, 170488, -15488); + break; + } + default: + { + return; + } + } + portal = addSpawn(portalId, portalLocation, false, 0, false, instance.getId()); + + if (portal != null) + { + portal.setDisplayEffect(1); + } + + } + + private int getPortalByBossId(int bossId) + { + switch (bossId) + { + case KING_PETRAM: + { + return 0; + } + case KING_IGNIS: + { + return 1; + } + case KING_NEBULA: + { + return 2; + } + case KING_PROCELLA: + { + return 3; + } + default: + return -1; } } - private void enableZoneFire() + private int getPortalIdByZone(int zoneId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_fire"); - if (zone != null) + switch (zoneId) { - zone.setEnabled(true); + case PETRAM_PORTAL_ENTER_ID: + case PETRAM_PORTAL_RETURN_ID: + { + return 0; + } + case IGNIS_PORTAL_ENTER_ID: + case IGNIS_PORTAL_RETURN_ID: + { + return 1; + } + case NEBULA_PORTAL_ENTER_ID: + case NEBULA_PORTAL_RETURN_ID: + { + return 2; + } + case PROCELLA_PORTAL_ENTER_ID: + case PROCELLA_PORTAL_RETURN_ID: + { + return 3; + } + default: + { + return -1; + } } } - private void enableZoneWater() + private Location[] getLocationsForPortal(int portalId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_water"); - if (zone != null) + Location[] locations = new Location[2]; + + switch (portalId) { - zone.setEnabled(true); + case 0: + { + locations[0] = PETRAM_EARTH_L; + locations[1] = PETRAM_EARTH_RETURN_L; + break; + } + case 1: + { + locations[0] = IGNIS_FIRE_L; + locations[1] = IGNIS_FIRE_RETURN_L; + break; + } + case 2: + { + locations[0] = NEBULA_WATER_L; + locations[1] = NEBULA_WATER_RETURN_L; + break; + } + case 3: + { + locations[0] = PROCELLA_WIN_L; + locations[1] = PROCELLA_WIN_RETURN_L; + break; + } + } + + return locations; + } + + private void CheckGeneralResidenceStages(Npc npc, Instance instance) + { + final StatSet worldParameters = instance.getParameters(); + + int portalId = getPortalByBossId(npc.getId()); + + if ((portalId >= 0) && (portalId < portalConfigs.length)) + { + String bossDefeatCountKey = "bossOfPortal_" + portalId + "_defeat_count"; + int currentDefeatCount = worldParameters.getInt(bossDefeatCountKey, 0); + int newDefeatCount = currentDefeatCount + 1; + + worldParameters.set(bossDefeatCountKey, newDefeatCount); + } + + int totalBossDefeatCount = 0; + + for (int i = 0; i < portalConfigs.length; i++) + { + String bossDefeatCountKey = "bossOfPortal_" + i + "_defeat_count"; + totalBossDefeatCount += worldParameters.getInt(bossDefeatCountKey, 0); + } + + worldParameters.set("totalBossDefeatCount", totalBossDefeatCount); + + if (totalBossDefeatCount >= 4) + { + instance.spawnGroup("animael"); + instance.despawnGroup("ruipwave_1"); + instance.despawnGroup("NormalMobs"); } } - private void enableZoneWindExit() + private void handleCentralZone(Instance instance, StatSet worldParameters) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_procella"); - if (zone != null) + for (int id = 0; id < PORTAL_TRIGGER_IDS.length; id++) { - zone.setEnabled(true); - } - } - - private void enableZoneEarthExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_petram"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneFireExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_ignis"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneWaterExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_nebula"); - if (zone != null) - { - zone.setEnabled(true); + int trigger1 = worldParameters.getInt("TRIGGER_1_" + id, -1); + int trigger2 = worldParameters.getInt("TRIGGER_2_" + id, -1); + + if ((trigger1 != -1) && (trigger2 != -1)) + { + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } } private void startEvent(Npc npc, Player player) { - if (!player.getInstanceWorld().getParameters().getBoolean("DwellingOfSpiritsFinished", false)) + final Instance instance = player.getInstanceWorld(); + instance.setParameter("Running", true); + player.getInstanceWorld().broadcastPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); + instance.spawnGroup("ruipwave_1"); + instance.spawnGroup("NormalMobs"); + + if (npc.getId() == SEALSTONE) { - player.sendPacket(new ExSendUIEvent(player, false, false, 1800, 2, NpcStringId.TIME_LEFT)); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(5), null)); - startQuestTimer("check_status", 1000, null, player); + instance.despawnGroup("sealstone"); } + + } + + @Override + public void onInstanceEnter(Player player, Instance instance) + { + boolean Running = instance.getParameters().getBoolean("Running", false); + if ((instance.getRemainingTime() > 0) && Running) + { + player.sendPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + } + } + + @Override + public void onInstanceLeave(Player player, Instance instance) + { + + player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); } public static void main(String[] args) diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java index ff278fe85c..3465ec2a61 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.ai.AttackableAI; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.data.xml.SkillData; import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData; +import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.enums.ShortcutType; import org.l2jmobius.gameserver.enums.SkillFinishType; import org.l2jmobius.gameserver.instancemanager.InstanceManager; @@ -59,6 +60,8 @@ public class TimedHunting extends AbstractInstance private static final int PANJI = 34125; // Skill private static final int BUFF = 45197; + private static final int BUFF_FOR_KAMAEL = 45198; + // Misc private static final int[] TEMPLATES = { @@ -187,7 +190,14 @@ public class TimedHunting extends AbstractInstance } npc.setTarget(player); - if (!player.getEffectList().isAffectedBySkill(BUFF)) + if (player.getRace() == Race.KAMAEL) + { + if (!player.getEffectList().isAffectedBySkill(BUFF_FOR_KAMAEL)) + { + npc.doCast(new SkillHolder(BUFF_FOR_KAMAEL, 1).getSkill()); + } + } + else if (!player.getEffectList().isAffectedBySkill(BUFF)) { npc.doCast(new SkillHolder(BUFF, 1).getSkill()); } @@ -257,6 +267,7 @@ public class TimedHunting extends AbstractInstance player.sendPacket(new TimedHuntingZoneExit(108)); // Training Zone id. player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_FOR_KAMAEL); instance.setParameter("PlayerIsOut", true); // Restore normal skills. diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/augmentation/options/50100-50199.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/augmentation/options/50100-50199.xml index 28a7785bff..cf92d27a6e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/augmentation/options/50100-50199.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/augmentation/options/50100-50199.xml @@ -675,38 +675,38 @@ diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49400-49499.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49400-49499.xml index a63d93c362..a092c48a74 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49400-49499.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49400-49499.xml @@ -1430,13 +1430,23 @@ - + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49500-49599.xml index c5f3ed946e..0408ee1631 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49500-49599.xml @@ -424,6 +424,8 @@ + + @@ -431,6 +433,12 @@ + + + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49800-49899.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49800-49899.xml index 70bb0106ed..060d7c9031 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49800-49899.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/49800-49899.xml @@ -773,6 +773,10 @@ + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94100-94199.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94100-94199.xml index 29d4a5bed0..d407b28008 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94100-94199.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94100-94199.xml @@ -292,6 +292,16 @@ + + + + + + + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94400-94499.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94400-94499.xml index 6cfc106ba4..4accf380d8 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94400-94499.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94400-94499.xml @@ -1232,7 +1232,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94500-94599.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94500-94599.xml index b4d0dd3e5b..d974c2742d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94500-94599.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94500-94599.xml @@ -190,7 +190,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94600-94699.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94600-94699.xml index a5505594dc..68c20e3f6e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94600-94699.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/items/94600-94699.xml @@ -604,7 +604,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/pets/16079_BuffaloCalt.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/pets/16079_BuffaloCalf.xml similarity index 100% rename from L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/pets/16079_BuffaloCalt.xml rename to L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/pets/16079_BuffaloCalf.xml diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/01800-01899.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/01800-01899.xml index 9ff2b17826..68464b2198 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/01800-01899.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/01800-01899.xml @@ -1318,6 +1318,7 @@ 1 2 3 + 4 3 KNOCKDOWN diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39100-39199.xml index 486988c94b..e6e8312c96 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39100-39199.xml @@ -57,7 +57,19 @@ icon.etc_reagent_white_i00 + 2 + 1 A1 + 5 + 0 + SELF + SINGLE + + + 500 + DIFF + + icon.sa_cube @@ -2511,6 +2523,59 @@ icon.sa_cube + 1 A1 + -1 + 500 + 500 + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39200-39299.xml index 0a755be9b6..cc3003ffd1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39200-39299.xml @@ -2064,7 +2064,7 @@ 1200 1 - 2 + 2 4 60000 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39300-39399.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39300-39399.xml index a8c125ca10..2c9c81f790 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39300-39399.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/39300-39399.xml @@ -484,14 +484,14 @@ - + icon.etc_wit_symbol_i01 A1 500 900000 - + icon.etc_wit_symbol_i01 A1 @@ -499,7 +499,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -507,7 +507,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -515,7 +515,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -523,7 +523,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -534,7 +534,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -545,7 +545,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -556,7 +556,7 @@ -671 43 - + icon.etc_wit_symbol_i01 A1 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/40200-40299.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/40200-40299.xml index ce67a989f5..9a4afc46fc 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/40200-40299.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/40200-40299.xml @@ -622,11 +622,14 @@ 1 94480 5 - 0 - 1 5 PET SINGLE + + + 100000000 + + @@ -644,12 +647,14 @@ A1 1 94517 - 5 - 0 - 1 5 PET SINGLE + + + 2000000000 + + icon.skill0000 @@ -838,6 +843,16 @@ icon.skill0000 A1 + 1 + 94635 + 5 + PET + SINGLE + + + 1000000 + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/45100-45199.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/45100-45199.xml index 6b96075260..bcc2b9676e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/45100-45199.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/45100-45199.xml @@ -4251,10 +4251,11 @@ icon.skill_kamael_shadowside - A1 + A2 1 600 - BR_EVENT_BUF1 + KAMAEL_TRANSFORM + KAMAEL_BLACK_TRANSFORM;LONG_RAPIER_BLACK_AVE;BLACK_STANCE_AVE 4 20 @@ -4262,9 +4263,21 @@ A2 1 - U_ER_WI_WINDHIDE_AVE TARGET SINGLE + + + TRANSFORM + + + 50 + DIFF + + + 3 + 50 + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/47000-47099.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/47000-47099.xml index 0afbd78e34..0105ad6526 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/47000-47099.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/47000-47099.xml @@ -1628,6 +1628,7 @@ 1 2 3 + 4 1200 CHEAP_MAGIC @@ -1639,6 +1640,7 @@ 20 30 40 + 40 3 3031 @@ -1654,6 +1656,7 @@ -10 -15 -20 + -20 PER 0 @@ -1663,6 +1666,7 @@ -4 -7 -10 + -10 PER 1 @@ -1672,6 +1676,7 @@ -10 -15 -20 + -20 PER 3 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50400-50499.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50400-50499.xml index 006f4e2efd..4f57abcb3b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50400-50499.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50400-50499.xml @@ -165,8 +165,12 @@ 80 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -266,8 +270,12 @@ 150 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -306,8 +314,6 @@ icon.bless_effect_enchant P - 5 - 1 200 @@ -321,8 +327,12 @@ 200 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/55200-55299.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/55200-55299.xml index 2cffe2e1be..96c2ecb1d9 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/55200-55299.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/55200-55299.xml @@ -500,7 +500,7 @@ 1200 ATTACK_TIME_DOWN 1 - 70102 + 70102 75 2 1 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt index 82645059a7..969d4b3611 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt @@ -12,6 +12,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. @@ -145,6 +147,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveHonorCoins: Gives a given amount of Honor Coins. (l2jmobius) GiveItemByExp: Gives an item when a certain amount of EXP is gathered. (l2jmobius) +GivePetXp: Gives a given amount of XP to a pet. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. GiveXp: Gives a given amount of XP. (l2jmobius) @@ -164,10 +167,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. @@ -208,7 +212,6 @@ MAtk: M. Atk. stat. MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius) MaxCp: Max. CP stat. MaxHp: Max. HP stat. -MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius) MaxMp: Max. MP stat. ModifyCraftPoints: Modifies player Craft Point count. (l2jmobius) ModifyDeathPoints: Modifies player Death Point count. (l2jmobius) @@ -275,6 +278,7 @@ RearDamage: Multiplier for damage done from behind the target. (l2jmobius) RebalanceHP: Balances targets' current HP. RebalanceHPSummon: Balances targets' current HP for summons. RecoverVitalityInPeaceZone: Recover periodically vitality when player is in a peace zone. (l2jmobius) +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_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd index 02d5bc1963..4b05db8578 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd @@ -40,6 +40,7 @@ + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/PetExtractData.xsd b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/PetExtractData.xsd new file mode 100644 index 0000000000..e9115b614a --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/PetExtractData.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/no_landing.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/no_landing.xml index 4b280f64a8..88b454d0db 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/no_landing.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/no_landing.xml @@ -58,4 +58,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/teleportzones.xml index 19a95e0456..d0510c8833 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/teleportzones.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/zones/teleportzones.xml @@ -1,81 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java index d0a8994454..7b4fb93e53 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java @@ -642,6 +642,7 @@ public class Config public static boolean ENABLE_AUTO_ITEM; public static boolean AUTO_PLAY_ATTACK_ACTION; public static boolean RESUME_AUTO_PLAY; + public static boolean ENABLE_AUTO_ASSIST; public static int SHARING_LOCATION_COST; public static int TELEPORT_SHARE_LOCATION_COST; @@ -1328,6 +1329,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; @@ -2288,6 +2290,7 @@ public class Config ENABLE_AUTO_ITEM = generalConfig.getBoolean("EnableAutoItem", true); AUTO_PLAY_ATTACK_ACTION = generalConfig.getBoolean("AutoPlayAttackAction", true); RESUME_AUTO_PLAY = generalConfig.getBoolean("ResumeAutoPlay", false); + ENABLE_AUTO_ASSIST = generalConfig.getBoolean("AssistLeader", false); SUBJUGATION_TOPIC_BODY = generalConfig.getString("SubjugationTopicBody", "Reward for being in the top of the best players in clearing the lands of Aden"); SUBJUGATION_TOPIC_HEADER = generalConfig.getString("SubjugationTopicHeader", "Purge reward"); SHARING_LOCATION_COST = generalConfig.getInt("ShareLocationLcoinCost", 50); @@ -3441,6 +3444,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/GameServer.java index 163584b9f6..f710bbd01a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/GameServer.java @@ -94,6 +94,7 @@ import org.l2jmobius.gameserver.data.xml.NpcNameLocalisationData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.data.xml.PetAcquireList; import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; import org.l2jmobius.gameserver.data.xml.PetSkillData; import org.l2jmobius.gameserver.data.xml.PetTypeData; import org.l2jmobius.gameserver.data.xml.PlayerTemplateData; @@ -333,6 +334,8 @@ public class GameServer CharInfoTable.getInstance(); AdminData.getInstance(); PetDataTable.getInstance(); + PetTypeData.getInstance(); + PetExtractData.getInstance(); CubicData.getInstance(); CharSummonTable.getInstance().init(); BeautyShopData.getInstance(); @@ -382,7 +385,6 @@ public class GameServer CrestTable.getInstance(); TeleportListData.getInstance(); SharedTeleportManager.getInstance(); - PetTypeData.getInstance(); TeleporterData.getInstance(); TimedHuntingZoneData.getInstance(); MatchingRoomManager.getInstance(); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index f82b67b3d5..7633d726c4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java index 251a0d3cbe..49a0e7a291 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java @@ -107,6 +107,7 @@ public class LimitShopClanData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -185,11 +186,12 @@ public class LimitShopClanData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java index 60350c6209..2cf97998b8 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java @@ -127,6 +127,7 @@ public class LimitShopCraftData implements IXmlReader boolean announce4 = false; boolean announce5 = false; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -233,6 +234,7 @@ public class LimitShopCraftData implements IXmlReader count5 = parseLong(attrs, "count5", 1L); announce5 = parseBoolean(attrs, "announce5", false); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -244,7 +246,7 @@ public class LimitShopCraftData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java index 0bdd0c2ba5..f5156d5b4f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java @@ -109,6 +109,7 @@ public class LimitShopData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -197,6 +198,7 @@ public class LimitShopData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -208,7 +210,7 @@ public class LimitShopData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java new file mode 100644 index 0000000000..e53f5ca3cd --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java @@ -0,0 +1,107 @@ +/* + * 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.data.xml; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Logger; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +import org.l2jmobius.commons.util.IXmlReader; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; + +/** + * @author Geremy + */ +public class PetExtractData implements IXmlReader +{ + private static final Logger LOGGER = Logger.getLogger(PetExtractData.class.getName()); + // > + private final Map> _extractionData = new HashMap<>(); + + protected PetExtractData() + { + load(); + } + + @Override + public void load() + { + _extractionData.clear(); + parseDatapackFile("data/PetExtractData.xml"); + LOGGER.info(getClass().getSimpleName() + ": Loaded " + _extractionData.size() + " pet extraction data."); + } + + @Override + public void parseDocument(Document doc, File f) + { + for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) + { + if ("list".equalsIgnoreCase(n.getNodeName())) + { + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if ("extraction".equalsIgnoreCase(d.getNodeName())) + { + final NamedNodeMap attrs = d.getAttributes(); + final int petId = parseInteger(attrs, "petId"); + final int petLevel = parseInteger(attrs, "petLevel"); + final long extractExp = parseLong(attrs, "extractExp"); + final int extractItem = parseInteger(attrs, "extractItem"); + final int defaultCostId = parseInteger(attrs, "defaultCostId"); + final int defaultCostCount = parseInteger(attrs, "defaultCostCount"); + final int extractCostId = parseInteger(attrs, "extractCostId"); + final int extractCostCount = parseInteger(attrs, "extractCostCount"); + Map data = _extractionData.get(petId); + if (data == null) + { + data = new HashMap<>(); + _extractionData.put(petId, data); + } + data.put(petLevel, new PetExtractionHolder(petId, petLevel, extractExp, extractItem, new ItemHolder(defaultCostId, defaultCostCount), new ItemHolder(extractCostId, extractCostCount))); + } + } + } + } + } + + public PetExtractionHolder getExtraction(int petId, int petLevel) + { + final Map map = _extractionData.get(petId); + if (map == null) + { + LOGGER.warning(getClass().getSimpleName() + ": Missing pet extraction data: [PetId: " + petId + "] [PetLevel: " + petLevel + "]"); + return null; + } + return map.get(petLevel); + } + + public static PetExtractData getInstance() + { + return SingletonHolder.INSTANCE; + } + + private static class SingletonHolder + { + protected static final PetExtractData INSTANCE = new PetExtractData(); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/SkillData.java index 7da7b6a28d..60e1308527 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/SkillData.java @@ -548,9 +548,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/CategoryType.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/CategoryType.java index 8f6908eb64..7addea7649 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/CategoryType.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/CategoryType.java @@ -36,6 +36,7 @@ public enum CategoryType STRIDER, WOLF_GROUP, WYVERN_GROUP, + PET_GROUP, SUBJOB_GROUP_KNIGHT, HUMAN_FALL_CLASS, HUMAN_MALL_CLASS, diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index b277446b93..7bf956bdc5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 8adc39fb95..8772022070 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -65,7 +65,7 @@ public class DailyTaskManager private static final Set RESET_SKILLS = new HashSet<>(); static { - // No known skills. + RESET_SKILLS.add(39199); // Hero's Wondrous Cubic } public static final Set RESET_ITEMS = new HashSet<>(); static @@ -112,7 +112,8 @@ public class DailyTaskManager GlobalVariablesManager.getInstance().set(GlobalVariablesManager.DAILY_TASK_RESET, System.currentTimeMillis()); // Wednesday weekly tasks. - if (Calendar.getInstance().get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) + final Calendar calendar = Calendar.getInstance(); + if (calendar.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) { clanLeaderApply(); resetMonsterArenaWeekly(); @@ -124,6 +125,11 @@ public class DailyTaskManager resetVitalityDaily(); } + if (calendar.get(Calendar.DAY_OF_MONTH) == 1) + { + resetMontlyLimitShopData(); + } + // Daily tasks. resetClanBonus(); resetClanContributionList(); @@ -675,6 +681,31 @@ public class DailyTaskManager LOGGER.info("LimitShopData has been resetted."); } + private void resetMontlyLimitShopData() + { + for (LimitShopProductHolder holder : LimitShopData.getInstance().getProducts()) + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement("DELETE FROM account_gsdata WHERE var=?")) + { + ps.setString(1, AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + ps.executeUpdate(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset LimitShopData: " + e); + } + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getAccountVariables().remove(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + player.getAccountVariables().storeMe(); + } + } + LOGGER.info("LimitShopData has been resetted."); + } + private void resetResurrectionByPayment() { // Update data for offline players. diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/IdManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/IdManager.java index 96a825d4bc..c20c4d800a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/IdManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/IdManager.java @@ -100,6 +100,7 @@ public class IdManager cleanCount += statement.executeUpdate("DELETE FROM character_shortcuts WHERE character_shortcuts.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills WHERE character_skills.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills_save WHERE character_skills_save.charId NOT IN (SELECT charId FROM characters);"); + cleanCount += statement.executeUpdate("DELETE FROM character_spirits WHERE character_spirits.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_subclasses WHERE character_subclasses.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_instance_time WHERE character_instance_time.charId NOT IN (SELECT charId FROM characters);"); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java index bf7f625cf0..cc95b36d14 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java @@ -225,7 +225,7 @@ public class PurgeRankingManager { } } - return top5.entrySet().stream().sorted(Map.Entry. comparingByValue().reversed()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); + return top5.entrySet().stream().sorted(Entry. comparingByValue().reversed()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); } public SimpleEntry getPlayerRating(int category, int charId) diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java index 08238d2182..f7e3213d47 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1308,7 +1308,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)) @@ -2836,7 +2836,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); } @@ -2849,189 +2849,151 @@ 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; - } - case ELEMENTAL_SPIRIT_EARTH_ATTACK: - case ELEMENTAL_SPIRIT_EARTH_DEFENSE: - case ELEMENTAL_SPIRIT_FIRE_ATTACK: - case ELEMENTAL_SPIRIT_FIRE_DEFENSE: - case ELEMENTAL_SPIRIT_WATER_ATTACK: - case ELEMENTAL_SPIRIT_WATER_DEFENSE: - case ELEMENTAL_SPIRIT_WIND_ATTACK: - case ELEMENTAL_SPIRIT_WIND_DEFENSE: - { - info.addComponentType(UserInfoType.ATT_SPIRITS); - 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; + } + case ELEMENTAL_SPIRIT_EARTH_ATTACK: + case ELEMENTAL_SPIRIT_EARTH_DEFENSE: + case ELEMENTAL_SPIRIT_FIRE_ATTACK: + case ELEMENTAL_SPIRIT_FIRE_DEFENSE: + case ELEMENTAL_SPIRIT_WATER_ATTACK: + case ELEMENTAL_SPIRIT_WATER_DEFENSE: + case ELEMENTAL_SPIRIT_WIND_ATTACK: + case ELEMENTAL_SPIRIT_WIND_DEFENSE: + { + info.addComponentType(UserInfoType.ATT_SPIRITS); + 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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Player.java index d64abd26bd..219bdb5bdf 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -383,7 +383,7 @@ import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommi import org.l2jmobius.gameserver.network.serverpackets.elementalspirits.ElementalSpiritInfo; import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus; import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCount; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.network.serverpackets.surveillance.ExUserWatcherTargetStatus; import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo; import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; @@ -4674,7 +4674,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -7033,6 +7033,11 @@ public class Player extends Playable player.setOnlineStatus(true, false); PlayerAutoSaveTaskManager.getInstance().add(player); + + if (Config.ENABLE_ACHIEVEMENT_BOX) + { + player.getAchievementBox().restore(); + } } catch (Exception e) { @@ -8526,9 +8531,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; + } } } } @@ -10775,7 +10784,7 @@ public class Player extends Playable _pet.setFollowStatus(true); _pet.setInstance(getInstanceWorld()); _pet.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(_pet, 0)); + sendPacket(new PetSummonInfo(_pet, 0)); } getServitors().values().forEach(s -> @@ -10786,7 +10795,7 @@ public class Player extends Playable s.setFollowStatus(true); s.setInstance(getInstanceWorld()); s.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(s, 0)); + sendPacket(new PetSummonInfo(s, 0)); }); // Show movie if available. diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Summon.java index d3dc4dd1b2..b5c17fe076 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Summon.java @@ -74,10 +74,10 @@ import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetDelete; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.PetInventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.pet.PetItemList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetStatusUpdate; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; public abstract class Summon extends Playable @@ -134,7 +134,7 @@ public abstract class Summon extends Playable { if (isPet()) { - sendPacket(new PetInfo(this, 1)); + sendPacket(new PetSummonInfo(this, 1)); sendPacket(new ExPetSkillList(true, (Pet) this)); if (getInventory() != null) { @@ -228,7 +228,7 @@ public abstract class Summon extends Playable { if (player == _owner) { - player.sendPacket(new PetInfo(this, 1)); + player.sendPacket(new PetSummonInfo(this, 1)); return; } @@ -392,7 +392,7 @@ public abstract class Summon extends Playable @Override public void onDecay() { - super.onDecay(); + unSummon(_owner); deleteMe(_owner); } @@ -879,7 +879,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); @@ -900,7 +900,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)); + } }); } @@ -925,7 +932,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())); @@ -933,7 +940,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)); + } } } @@ -979,7 +993,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(); } @@ -1166,7 +1180,7 @@ public abstract class Summon extends Playable { owner.sendPacket(new PetItemList(getInventory().getItems())); } - owner.sendPacket(new PetInfo(this, 1)); + owner.sendPacket(new PetSummonInfo(this, 1)); } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index f4cc079630..f7e71e5136 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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,33 +976,6 @@ 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 { @@ -1011,9 +985,17 @@ public class CreatureStat // 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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index accbff9373..697ec47e4f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index b7759d1586..1bb8c01d65 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2216,6 +2216,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java index f72c9ddc4d..7beb8a1d2d 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java @@ -48,9 +48,10 @@ public class LimitShopProductHolder private final long _count5; private final boolean _announce5; private final int _accountDailyLimit; + private final int _accountMontlyLimit; private final int _accountBuyLimit; - public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountBuyLimit) + public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountMontlyLimit, int accountBuyLimit) { _id = id; _category = category; @@ -79,6 +80,7 @@ public class LimitShopProductHolder _count5 = count5; _announce5 = announce5; _accountDailyLimit = accountDailyLimit; + _accountMontlyLimit = accountMontlyLimit; _accountBuyLimit = accountBuyLimit; } @@ -217,6 +219,11 @@ public class LimitShopProductHolder return _accountDailyLimit; } + public int getAccountMontlyLimit() + { + return _accountMontlyLimit; + } + public int getAccountBuyLimit() { return _accountBuyLimit; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java new file mode 100644 index 0000000000..bc54fd0c63 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java @@ -0,0 +1,70 @@ +/* + * 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.model.holders; + +/** + * @author Geremy + */ +public class PetExtractionHolder +{ + private final int _petId; + private final int _petLevel; + private final long _extractExp; + private final int _extractItem; + private final ItemHolder _defaultCost; + private final ItemHolder _extractCost; + + public PetExtractionHolder(int petId, int petLevel, long extractExp, int extractItem, ItemHolder defaultCost, ItemHolder extractCost) + { + _petId = petId; + _petLevel = petLevel; + _extractExp = extractExp; + _extractItem = extractItem; + _defaultCost = defaultCost; + _extractCost = extractCost; + } + + public int getPetId() + { + return _petId; + } + + public int getPetLevel() + { + return _petLevel; + } + + public long getExtractExp() + { + return _extractExp; + } + + public int getExtractItem() + { + return _extractItem; + } + + public ItemHolder getDefaultCost() + { + return _defaultCost; + } + + public ItemHolder getExtractCost() + { + return _extractCost; + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 7b0aafd404..dfdc849b47 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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; @@ -71,12 +73,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPi import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; 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; @@ -91,6 +95,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; @@ -1640,7 +1645,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); @@ -2560,6 +2567,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); @@ -2584,6 +2596,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); @@ -2609,6 +2623,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index cdf42e7a80..2399b7fc05 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -898,7 +898,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(playable, item, Item::getVisualId)) { update = true; @@ -1050,7 +1051,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(playable, item, Item::getVisualId)) { remove = true; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/FortSiege.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/FortSiege.java index c128c12ecf..c16afcf700 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/FortSiege.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/FortSiege.java @@ -268,7 +268,7 @@ public class FortSiege extends ListenersContainer implements Siegable } ThreadPool.schedule(new ScheduleStartSiegeTask(nextTask), _initialDelayInMilliseconds - (nextTask * 1000)); // Prepare task for @nextTask minutes left. - LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); + // LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); } else if ((_time == 3600) && (_fortInst.getResidenceId() != FortManager.ORC_FORTRESS)) // 1hr remains diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 0e5fbb013a..8099f59e70 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -691,7 +691,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(); } @@ -714,7 +714,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(); } @@ -749,7 +749,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java index 1a33adcdcf..58288f3690 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -95,6 +95,7 @@ public enum Stat HATE_ATTACK("attackHate"), REAR_DAMAGE_RATE("rearDamage"), AUTO_ATTACK_DAMAGE_BONUS("autoAttackDamageBonus"), + IGNORE_REDUCE_DAMAGE("ignoreReduceDamage"), // ELEMENTAL SPIRITS ELEMENTAL_SPIRIT_FIRE_ATTACK("elementalSpiritFireAttack"), @@ -148,7 +149,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()), MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0), BLOW_RATE("blowRate"), diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 647873dac0..6cc98e9690 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -44,7 +44,18 @@ public class MCritRateFinalizer implements IStatFunction final double physicalBonus = (creature.getStat().getMul(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 1) - 1) * creature.getStat().getCriticalHit(); final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1; - return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 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) + physicalBonus), 0, maxMagicalCritRate); } @Override diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index c305987ba6..c29c9ba398 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java @@ -93,6 +93,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index c5257ff589..1aff35bfd5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java @@ -95,6 +95,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java index fc8fc5e8e6..cb7a29e736 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java @@ -46,6 +46,7 @@ public class AccountVariables extends AbstractVariables public static final String PRIME_SHOP_PRODUCT_DAILY_COUNT = "PSPDailyCount"; public static final String LCOIN_SHOP_PRODUCT_COUNT = "LCSCount"; public static final String LCOIN_SHOP_PRODUCT_DAILY_COUNT = "LCSDailyCount"; + public static final String LCOIN_SHOP_PRODUCT_MONTLY_COUNT = "LCSMontlyCount"; public static final String VIP_POINTS = "VipPoints"; public static final String VIP_TIER = "VipTier"; public static final String VIP_EXPIRATION = "VipExpiration"; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/ExClientPackets.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/ExClientPackets.java index e7fc87836c..a4918e534e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/ExClientPackets.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/ExClientPackets.java @@ -108,6 +108,7 @@ import org.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMentorLis import org.l2jmobius.gameserver.network.clientpackets.pet.ExEvolvePet; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetEquipItem; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetUnequipItem; +import org.l2jmobius.gameserver.network.clientpackets.pet.ExTryPetExtractSystem; import org.l2jmobius.gameserver.network.clientpackets.pet.RequestExAcquirePetSkill; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyDelete; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyInfoList; @@ -654,7 +655,7 @@ public enum ExClientPackets EX_PLEDGE_ENEMY_DELETE(0x1C8, RequestExPledgeEnemyDelete::new, ConnectionState.IN_GAME), EX_PK_PENALTY_LIST(0x1C9, null, ConnectionState.IN_GAME), EX_PK_PENALTY_LIST_ONLY_LOC(0x1CA, null, ConnectionState.IN_GAME), - EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, null, ConnectionState.IN_GAME), + EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, ExTryPetExtractSystem::new, ConnectionState.IN_GAME), EX_PLEDGE_V3_SET_ANNOUNCE(0x1CC, RequestExPledgeV3SetAnnounce::new, ConnectionState.IN_GAME), // 306 EX_RANKING_FESTIVAL_OPEN(0x1CD, null, ConnectionState.IN_GAME), diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index 78c7e62be5..0464b99085 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java @@ -108,6 +108,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) { @@ -644,7 +649,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 70bd438394..0032eb2c56 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -223,7 +223,7 @@ public class UseItem implements ClientPacket } // Prevent Death Knight players to equip other weapons. - if (item.isWeapon() && (CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId())) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) + if (item.isWeapon() && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; @@ -244,7 +244,7 @@ public class UseItem implements ClientPacket } // Prevent Sylph players to equip other weapons. - if (item.isWeapon() && (player.getRace() == Race.SYLPH) && (item.getWeaponItem().getItemType() != WeaponType.PISTOLS)) + if (item.isWeapon() && (player.getRace() == Race.SYLPH) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && (item.getWeaponItem().getItemType() != WeaponType.PISTOLS)) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index 16c528948e..0e657662e6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -150,6 +150,25 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket return; } } + else if (_product.getAccountMontlyLimit() > 0) + { + final long amount = _product.getAccountMontlyLimit() * _amount; + if (amount < 1) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + if (player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) >= amount) + { + player.sendMessage("You have reached your montly limit."); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + + } else if (_product.getAccountBuyLimit() > 0) // Count limit. { final long amount = _product.getAccountBuyLimit() * _amount; @@ -171,7 +190,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket } // Check existing items. - final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), _product.getAccountDailyLimit())); + final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), Math.max(_product.getAccountDailyLimit(), _product.getAccountMontlyLimit()))); for (int i = 0; i < _product.getIngredientIds().length; i++) { if (_product.getIngredientIds()[i] == 0) @@ -356,6 +375,10 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), 0) + _amount); } + if (_product.getAccountMontlyLimit() > 0) + { + player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) + _amount); + } else if (_product.getAccountBuyLimit() > 0) { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), 0) + _amount); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 5b243ca0fb..4433741d07 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -230,7 +230,7 @@ public class ExPetEquipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java index c31d8d343f..3891440cd4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java @@ -17,7 +17,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -183,7 +183,7 @@ public class ExPetUnequipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java new file mode 100644 index 0000000000..6bb1753d14 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java @@ -0,0 +1,115 @@ +/* + * 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.clientpackets.pet; + +import org.l2jmobius.commons.network.ReadablePacket; +import org.l2jmobius.gameserver.data.xml.NpcData; +import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; +import org.l2jmobius.gameserver.model.PetData; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.actor.instance.Pet; +import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.itemcontainer.PetInventory; +import org.l2jmobius.gameserver.model.itemcontainer.PlayerInventory; +import org.l2jmobius.gameserver.network.GameClient; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; +import org.l2jmobius.gameserver.network.serverpackets.pet.ResultPetExtractSystem; + +/** + * @author Geremy + */ +public class ExTryPetExtractSystem implements ClientPacket +{ + private int _itemObjId; + + @Override + public void read(ReadablePacket packet) + { + _itemObjId = packet.readInt(); + } + + @Override + public void run(GameClient client) + { + final Player player = client.getPlayer(); + if (player == null) + { + return; + } + + final Item petItem = player.getInventory().getItemByObjectId(_itemObjId); + if ((petItem == null) || ((player.getPet() != null) && (player.getPet().getControlItem() == petItem))) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + final PetData petData = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()); + final NpcTemplate npcTemplate = NpcData.getInstance().getTemplate(petData.getNpcId()); + final Pet pet = new Pet(npcTemplate, player, petItem); + final PetInventory petInventory = pet.getInventory(); + final PlayerInventory playerInventory = player.getInventory(); + if ((petInventory == null) || (playerInventory == null)) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + if (!playerInventory.validateWeight(petInventory.getTotalWeight()) || !playerInventory.validateCapacity(petInventory.getSize())) + { + player.sendPacket(SystemMessageId.THERE_ARE_ITEMS_IN_THE_PET_S_INVENTORY_TAKE_THEM_OUT_FIRST); + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + petInventory.transferItemsToOwner(); + + final Pet petInfo = Pet.restore(petItem, NpcData.getInstance().getTemplate(petData.getNpcId()), player); + final int petId = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()).getType(); + final int petLevel = petInfo.getLevel(); + final PetExtractionHolder holder = PetExtractData.getInstance().getExtraction(petId, petLevel); + if (holder != null) + { + final int extractItemId = holder.getExtractItem(); + final int extractItemCount = (int) (petInfo.getStat().getExp() / holder.getExtractExp()); + final int extractCostId = holder.getExtractCost().getId(); + final long extractCostCount = holder.getExtractCost().getCount() * extractItemCount; + final int defaultCostId = holder.getDefaultCost().getId(); + final long defaultCostCount = holder.getDefaultCost().getCount(); + if ((player.getInventory().getInventoryItemCount(extractCostId, -1) >= extractCostCount) && (player.getInventory().getInventoryItemCount(defaultCostId, -1) >= defaultCostCount)) + { + if (player.destroyItemByItemId("Pet Extraction", extractCostId, extractCostCount, player, true) && player.destroyItemByItemId("Pet Extraction", defaultCostId, defaultCostCount, player, true) && player.destroyItem("Pet Extraction", petItem, player, true)) + { + player.addItem("Pet Extraction", extractItemId, extractItemCount, player, true); + player.sendPacket(new ResultPetExtractSystem(true)); + } + } + else + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT); + player.sendPacket(new ResultPetExtractSystem(false)); + } + return; + } + + player.sendPacket(new ResultPetExtractSystem(false)); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java index 2cf1ef176b..0266b0eff5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java @@ -46,7 +46,7 @@ public class ExRequestRandomCraftExtract implements ClientPacket { final int objId = packet.readInt(); final long count = packet.readLong(); - if (count > 1) + if (count > 0) { _items.put(objId, count); } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java index 39ee21e7dd..64b279d2dc 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java @@ -48,6 +48,11 @@ public class RequestSubjugationGacha implements ClientPacket @Override public void run(GameClient client) { + if ((_amount < 1) || ((_amount * 20000L) < 1)) + { + return; + } + final Player player = client.getPlayer(); if (player == null) { diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index 9540e799e2..07ed7641a9 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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,129 +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, 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, 96, 97, 99, - 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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index 8e396d93c9..a72d906550 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index 47076d56c4..61bfe70039 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 9c1fbbcab8..851b53dc09 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index 679c26e073..06711fb502 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java index 8e5c5f7765..22eb4ac7d4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java @@ -83,6 +83,17 @@ public class ExPurchaseLimitShopItemListNew extends ServerPacket writeInt(product.getAccountDailyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + product.getProductionId(), 0)); } } + else if (product.getAccountMontlyLimit() > 0) + { + if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0) >= product.getAccountMontlyLimit()) + { + writeInt(0); + } + else + { + writeInt(product.getAccountMontlyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0)); + } + } else if (product.getAccountBuyLimit() > 0) // Count limit. { if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + product.getProductionId(), 0) >= product.getAccountBuyLimit()) diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java index e2a7e8cb46..e4a2d8308e 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java @@ -68,7 +68,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); @@ -142,7 +142,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()) { @@ -241,9 +241,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)) { @@ -261,11 +261,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()); } @@ -289,9 +289,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)) @@ -322,7 +321,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java similarity index 96% rename from L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java rename to L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java index fdc110c324..2b6b70cd0a 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java @@ -1,194 +1,194 @@ -/* - * 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.pet; - -import java.util.Set; - -import org.l2jmobius.gameserver.enums.EvolveLevel; -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.network.serverpackets.ServerPacket; -import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; - -/** - * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon - */ -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.isDead() ? 0 : _summon.isShowSummonAnimation() ? 2 : _value); - 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 - writeShort(_summon.getLevel()); // level - writeLong(_summon.getStat().getExp()); - // 0% absolute value - writeLong(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 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(-1); - writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level. - writeByte(0); // Used Summon Points - writeByte(0); // Maximum Summon Points - final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects(); - writeShort(aves.size()); // Confirmed - for (AbnormalVisualEffect ave : aves) - { - writeShort(ave.getClientId()); // Confirmed - } - writeByte(_statusMask); - if (_summon.isPet()) - { - final Pet pet = (Pet) _summon; - writeInt(pet.getPetData().getType()); - writeInt(pet.getEvolveLevel()); - writeInt(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); - } - else - { - writeInt(0); - writeInt(EvolveLevel.None.ordinal()); - writeInt(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.pet; + +import java.util.Set; + +import org.l2jmobius.gameserver.enums.EvolveLevel; +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.network.serverpackets.ServerPacket; +import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; + +/** + * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon + */ +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.isDead() ? 0 : _summon.isShowSummonAnimation() ? 2 : _value); + 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 + writeShort(_summon.getLevel()); // level + writeLong(_summon.getStat().getExp()); + // 0% absolute value + writeLong(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 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(-1); + writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level. + writeByte(0); // Used Summon Points + writeByte(0); // Maximum Summon Points + final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects(); + writeShort(aves.size()); // Confirmed + for (AbnormalVisualEffect ave : aves) + { + writeShort(ave.getClientId()); // Confirmed + } + writeByte(_statusMask); + if (_summon.isPet()) + { + final Pet pet = (Pet) _summon; + writeInt(pet.getPetData().getType()); + writeInt(pet.getEvolveLevel()); + writeInt(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); + } + else + { + writeInt(0); + writeInt(EvolveLevel.None.ordinal()); + writeInt(0); + } + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java new file mode 100644 index 0000000000..0deca5b570 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java @@ -0,0 +1,40 @@ +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ResultPetExtractSystem extends ServerPacket +{ + private final boolean _success; + + public ResultPetExtractSystem(boolean success) + { + _success = success; + } + + @Override + public void write() + { + ServerPackets.EX_RESULT_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(_success); + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10905_HuntingTime.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java similarity index 61% rename from L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10905_HuntingTime.java rename to L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java index a1c94261cc..29683dc5a5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10905_HuntingTime.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java @@ -1,36 +1,35 @@ -/* - * 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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10905_HuntingTime extends Quest -{ - private static final int START_NPC = 34599; - - public Q10905_HuntingTime() - { - super(10905); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ShowPetExtractSystem extends ServerPacket +{ + public static final ShowPetExtractSystem STATIC_PACKET = new ShowPetExtractSystem(); + + @Override + public void write() + { + ServerPackets.EX_SHOW_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(0); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index d6e032a4c7..2bfee034a2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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,11 +26,13 @@ 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; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.Summon; +import org.l2jmobius.gameserver.model.actor.instance.Pet; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.zone.ZoneId; @@ -42,9 +45,12 @@ 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; + private static final Integer PET_ATTACK_ACTION = 16; + private static final Integer SUMMON_ATTACK_ACTION = 22; protected AutoPlayTaskManager() { @@ -94,6 +100,25 @@ public class AutoPlayTaskManager } else if ((creature.getTarget() == player) || (creature.getTarget() == null)) { + // Pet Attack. + final Pet pet = player.getPet(); + if ((pet != null) && player.getAutoUseSettings().getAutoActions().contains(PET_ATTACK_ACTION) && pet.hasAI() && !pet.isMoving() && !pet.isDisabled() && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature)) + { + pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature); + } + + // Summon Attack. + if (player.hasSummon() && player.getAutoUseSettings().getAutoActions().contains(SUMMON_ATTACK_ACTION)) + { + 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); + } + } + } + // We take granted that mage classes do not auto hit. if (isMageCaster(player)) { @@ -122,23 +147,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); } } } @@ -146,6 +180,9 @@ public class AutoPlayTaskManager } } + // Reset idle count. + IDLE_COUNT.remove(player); + // Pickup. if (player.getAutoPlaySettings().doPickup()) { @@ -180,32 +217,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 */) && (targetMode != 4 /* Counterattack */) ? 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 */) && (targetMode != 4 /* Counterattack */) ? 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; + } } } } @@ -256,7 +316,7 @@ public class AutoPlayTaskManager } case 4: // Counterattack { - return creature.isMonster() || (creature.isPlayable() && creature.isAutoAttackable(player)); + return creature.isMonster() || (creature.isPlayer() && ((creature.getTarget() == player) && (creature.getActingPlayer().getEinhasadOverseeingLevel() >= 1))); } default: // Any Target { @@ -315,6 +375,7 @@ public class AutoPlayTaskManager { player.getPet().followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 574af07cdd..473fcb12a6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java @@ -36,7 +36,9 @@ 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.instance.Pet; +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; @@ -47,12 +49,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 @@ -429,8 +431,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; } @@ -442,7 +445,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); + } + } } } } @@ -525,6 +545,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_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/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_Essence_5.2_FrostLord/readme.txt b/L2J_Mobius_Essence_5.2_FrostLord/readme.txt index 916dd3d75e..fbe1d0bd2b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/readme.txt +++ b/L2J_Mobius_Essence_5.2_FrostLord/readme.txt @@ -127,6 +127,7 @@ Fluffy Reinforcement: https://eu.4game.com/patchnotes/lineage2essence/204/ Dwelling of Spirits: https://eu.4game.com/patchnotes/lineage2essence/261/ -Transcendent hunting zones +-Pet extraction system Sylph: https://eu.4game.com/patchnotes/lineage2essence/281/ -Sylph creation support @@ -142,6 +143,7 @@ Frost Lord: https://eu.4game.com/patchnotes/lineage2essence/329/ -Frost Lord castle -Revenge system + Customs: -Newbie Helper NPC location info -Newbie Helper buff support until 40 level diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/account_gsdata.sql index ed8c60bfae..a0072cc6e4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/account_premium.sql index 89f5887236..ce4703c5e7 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/achievement_box.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/achievement_box.sql index a6750eef4c..64c5b1e4e8 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/achievement_box.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/achievement_box.sql @@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `achievement_box` ( `box_state_slot_4` INT NOT NULL DEFAULT 0, `boxtype_slot_4` INT 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_Essence_6.3_Crusader/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/airships.sql index 50453102dd..d5dece1b03 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/announcements.sql index 0fef63e83e..88f8f519ad 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/auction_bid.sql index 85b978f103..2e37fbe5ba 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/bbs_favorites.sql index e7ace21bc9..a43fd1b53a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/bot_reported_char_data.sql index d7acdfa31b..98daf2dc12 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/buffer_schemes.sql index 1784421092..bd964c8cc2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/buffer_schemes.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL, PRIMARY KEY (`object_id`,`scheme_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_Essence_6.3_Crusader/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle.sql index c7b5613401..9fb7fea4e6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_doorupgrade.sql index ee822091b4..43a573b36e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_functions.sql index d270fca8a8..d8c1aaaeeb 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_manor_procure.sql index 54c8517f65..a6cd5a00c3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_manor_production.sql index 3980eef7aa..71ea5b8591 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_siege_guards.sql index b0c16e12c9..7449f852c3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_trapupgrade.sql index a0854df17e..139a3a5d45 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_contacts.sql index 3c2c5fb85a..9d8d163095 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_hennas.sql index 668374b2ab..8174451ef2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_instance_time.sql index 1a82cf40e2..2eaa3164a3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_item_reuse_save.sql index f2773fc195..22857bd4de 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_macroses.sql index 7db9ed6b15..0a5f6b3390 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_macroses.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` ( `acronym` VARCHAR(4) , `commands` VARCHAR(1255) , 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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_mentees.sql index 2ad58e3219..d067728900 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_offline_trade.sql index f61c711822..16925760e5 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_offline_trade_items.sql index d8a9e0b8e1..38ffd73ae0 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_potens.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_potens.sql index 16b2a7bc7c..e8b138b33b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_potens.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_potens.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_potens` ( `enchant_level` INT NOT NULL DEFAULT 0, `enchant_exp` INT NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`slot_position`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_premium_items.sql index 6b25480f4c..0f613d1029 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_purge.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_purge.sql index d50a902ce1..9c08f111be 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_purge.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_purge.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_purge` ( `keys` int(10) UNSIGNED NOT NULL DEFAULT 0, `remainingKeys` int(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`category`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_quests.sql index 6199526ae6..93db47171d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_random_craft.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_random_craft.sql index 977113bbe3..c83402513c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_random_craft.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_random_craft.sql @@ -25,4 +25,4 @@ CREATE TABLE IF NOT EXISTS `character_random_craft` ( `item_5_locked` TINYINT NOT NULL DEFAULT 0, `item_5_lock_left` INT 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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_recipebook.sql index 74cc6b8bd6..807005f0c1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_recipeshoplist.sql index e448547654..e81faed7a4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_reco_bonus.sql index f283ca5136..9717ebc5e9 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_revenge_history.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_revenge_history.sql index 5be9d849cf..717d779932 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_revenge_history.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_revenge_history.sql @@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `character_revenge_history` ( `shared_teleport_remaining` int NOT NULL DEFAULT 0, `kill_time` BIGINT(10) UNSIGNED NOT NULL, `share_time` BIGINT(10) UNSIGNED NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_spirits.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_spirits.sql index ac73d8dbe3..bb4044039f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_spirits.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_spirits.sql @@ -11,6 +11,5 @@ CREATE TABLE `character_spirits` `crit_rate_points` TINYINT NOT NULL DEFAULT 0, `crit_damage_points` TINYINT NOT NULL DEFAULT 0, `in_use` BOOLEAN NOT NULL DEFAULT FALSE, - PRIMARY KEY (`charId`, `type`), - FOREIGN KEY FK_CHARACTER_SPIRITS (`charId`) REFERENCES characters (`charId`) ON DELETE CASCADE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file + PRIMARY KEY (`charId`, `type`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_summons.sql index e089d258b3..1936e548d4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_surveillances.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_surveillances.sql index 49b3fdaa3d..734b714c5e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_surveillances.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_surveillances.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_surveillances` ( `charId` INT UNSIGNED NOT NULL, `targetId` INT UNSIGNED NOT NULL, PRIMARY KEY (`charId`,`targetId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_tpbookmark.sql index df70351c2e..2cd0efe8b1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_variables.sql index 97a8a898d0..82f8e79930 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_data.sql index f8b64d99db..49f88c0122 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_data.sql @@ -24,4 +24,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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_notices.sql index 3ab4c18480..7464ee18bd 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_privs.sql index 6478e63f8a..af4e35a46b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_skills.sql index 785d9e489a..10b722e90e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_subpledges.sql index 558ae695e1..64c31b7f38 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/collection_favorites.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collection_favorites.sql index 7571da448f..49758d7815 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collection_favorites.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collection_favorites.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `collection_favorites` ( `accountName` VARCHAR(45) NOT NULL DEFAULT '', `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collections.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collections.sql index 8c0fafc9fd..1ff9772ad3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collections.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/collections.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `collections` ( `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, `index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`,`index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/custom_mail.sql index 59cb8b5cfa..0ad31ec68a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/custom_teleport.sql index 27a5d0d877..9dd08290ac 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points.sql index 0cdbee7ee0..f6a80aaeed 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `enchant_challenge_points` ( `groupId` INT NOT NULL, `points` INT NOT NULL, PRIMARY KEY (`charId`,`groupId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql index 61bbd111af..612ed9c4de 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `enchant_challenge_points_recharges` ( `optionIndex` INT NOT NULL, `count` INT NOT NULL, PRIMARY KEY (`charId`, `groupId`, `optionIndex`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort.sql index bb4f761682..caf1e50e76 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_doorupgrade.sql index 8bca5d13fe..87e445876e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_functions.sql index 3c0bdfc42a..9ec9f577d2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_siege_guards.sql index 19df57a3b9..43763210b4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_siege_guards.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_spawnlist.sql index 22303a9b09..144979acd9 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fort_spawnlist.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fortsiege_clans.sql index ea5e71a909..5ae471842d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/forums.sql index d7bb88e274..af3a8be6ec 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/global_tasks.sql index ec8fd2c36e..5b2a05d01d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/global_variables.sql index 580d9cd7e5..42bde4188f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/grandboss_data.sql index b4a1f552fd..7cf6d2865d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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, 93069, 8925, -3904, 0, 229898.48, 667.776), -- Queen Ant diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/heroes.sql index ae59eb8ba1..f2ee5692a8 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/heroes_diary.sql index e2195a1fea..0cc38a3bdf 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/huntpass.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/huntpass.sql index 7108d1448a..69c5e19f44 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/huntpass.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/huntpass.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `huntpass` ( `sayha_points_used` INT NOT NULL DEFAULT 0, `unclaimed_reward` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`account_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_auction.sql index d73ec83417..4d654f9671 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_auction_bid.sql index a132cbf33b..1fa2a7d060 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_elementals.sql index 73c76bff70..16212982cb 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/item_transaction_history.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_transaction_history.sql index f8ba353a1f..cd3be96e9a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_transaction_history.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_transaction_history.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_transaction_history` ( `price` BIGINT UNSIGNED NOT NULL, `count` BIGINT UNSIGNED NOT NULL, PRIMARY KEY (`created_time`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/items.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/items.sql index c2225c1f32..c701ef6748 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/itemsonground.sql index e0750ce461..cd0b66704c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/merchant_lease.sql index 5860107e3d..a5228f511e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_data.sql index f3f1b5b54e..c00edf499e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_fights.sql index ccd4ac94ec..f25cc4c1fa 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_fights.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` ( `classed` tinyint(4) 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_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_nobles.sql index 386b27df45..0f48e9f71c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_nobles_eom.sql index f22562d0d5..fde44db92f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_evolves.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_evolves.sql index e825631c85..51fcd5eba8 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_evolves.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_evolves.sql @@ -5,4 +5,4 @@ CREATE TABLE `pet_evolves` ( `level` int NOT NULL DEFAULT '0', PRIMARY KEY (`itemObjId`, `index`, `level`), UNIQUE KEY `pet_evolves` (`itemObjId`, `index`, `level`) -) ENGINE=MyISAM; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_skills.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_skills.sql index 2b502c7738..b680f21972 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_skills.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pet_skills.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `pet_skills` ( `skillId` INT NOT NULL DEFAULT 0, `skillLevel` INT(3) NOT NULL DEFAULT 1, PRIMARY KEY (`petObjItemId`,`skillId`,`skillLevel`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/petition_feedback.sql index 2907d19d72..7752f5ab17 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pets.sql index 58b188bbcd..b7e9d545db 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/posts.sql index 4b212c323c..179355fd62 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/siege_clans.sql index f649ceb8e7..0cec8f57b5 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/topic.sql index 75f73ee48c..ac232c9d55 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/game/world_exchange_items.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/world_exchange_items.sql index 0db48c4d37..0c64236313 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/world_exchange_items.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/game/world_exchange_items.sql @@ -9,4 +9,4 @@ CREATE TABLE `world_exchange_items` ( `start_time` bigint(13) unsigned NOT NULL DEFAULT '0', `end_time` bigint(13) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`world_exchange_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/account_data.sql index 1614f50a50..9f90064c1c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/accounts.sql index 66583e0598..00030c86cc 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/accounts_ipauth.sql index 0421147ef2..5e37e293e6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/gameservers.sql index c6f6c5ee36..d2a3e1ee5d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_Essence_6.3_Crusader/dist/game/config/Custom/FakePlayers.ini index f745b0d31e..d10a01dec1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/config/General.ini b/L2J_Mobius_Essence_6.3_Crusader/dist/game/config/General.ini index 01d27cf6f0..d0861daa05 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/config/General.ini +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/config/General.ini @@ -436,8 +436,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 # --------------------------------------------------------------------------- @@ -646,6 +646,11 @@ AutoPlayAttackAction = True # Retail: False ResumeAutoPlay = False +# Assist party leader. +# When in party, target what the leader is targeting. +# Retail: False +AssistLeader = False + # --------------------------------------------------------------------------- # Purge Settings diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/ActionData.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/ActionData.xml index 3ede8e344b..f800f0e749 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/ActionData.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/ActionData.xml @@ -1,48 +1,48 @@ - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -50,175 +50,203 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/CategoryData.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/CategoryData.xml index 4316018060..73ff94df19 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/CategoryData.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/CategoryData.xml @@ -387,6 +387,38 @@ 15955 + + 16079 + 16080 + 16081 + 16082 + 16083 + 16084 + 16085 + 16086 + 16087 + 16088 + 16089 + 16090 + 16091 + 16092 + 16093 + 16094 + 16095 + 16096 + 16097 + 16098 + 16099 + 16100 + 16101 + 16102 + 16103 + 16104 + 16105 + 16106 + 16107 + 16108 + 5 6 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/DailyMission.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/DailyMission.xml index 387ef266e8..0f9f9bc1a3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/DailyMission.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/DailyMission.xml @@ -1,767 +1,768 @@ - + 21 40 - - - + + + - + 21 40 - - - + + + - + 21 40 - - - + + + - + 21 40 - - - + + + - + 21 40 - - - + + + - + 41 50 - - - + + + - + 41 50 - - - + + + - + 41 50 - - - + + + - + 41 50 - - - + + + - + 41 50 - - - + + + - + 51 60 - - - + + + - + 51 60 - - - + + + - + 51 60 - - - + + + - + 51 60 - - - + + + - + 51 60 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 76 99 - - - + + + - + 76 99 - - - + + + - + 76 99 - - - + + + - + 76 99 - - - + + + - + - + 76 99 - - - + + + + - + 20 30 - + - + 30 40 - + - + 40 60 - + - + 60 75 - + - + 76 99 - + - + 20 - + - + 30 - + - + 40 - - + + - + 45 - - + + - + 46 - + - + 47 - + - + 48 - + - + 49 - + - + 50 - - + + - + 55 - - + + - + 60 - - + + - + 65 - - + + - + 68 - - + + - + 71 - - + + - + 74 - - - + + + - + 76 - - - + + + - + 78 - - - + + + - + 79 - - - + + + - + 80 - - - + + + - + 81 - - - + + + - + 82 - - - + + + - + 83 - - - + + + - + 84 - - - + + + - + 85 - - - - - + + + + + - + 86 - - - - - + + + + + - + 87 - - - - - + + + + + - + 88 - - - - - + + + + + - + 89 - - - - - + + + + + - + 90 - - - - - + + + + + - + 91 - - - - - + + + + + - + 92 - - - - - + + + + + @@ -771,8 +772,9 @@ 91910 - - + + + @@ -780,95 +782,98 @@ 40 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22107,22108,22109,22122,22331,22111,22110,22112,22123,22116,22117,22118,22124,22113,22114,22115,22147,22148,22149,22275,22276,22277,22278 - + - + 60 99 + 22156 - - + + + - + 60 99 + 22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22179,22180,22181 - - + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - - + + - - + + - + 40 99 - + @@ -879,39 +884,41 @@ 99 - - - + + + - + 22271,22272,22273 76 99 + - - - + + - - + + 29105,29106,29107,29108 76 99 + - + + @@ -922,12 +929,12 @@ 99 - - - - + + + + + - @@ -936,7 +943,7 @@ FIRE - + @@ -945,7 +952,7 @@ WATER - + @@ -954,7 +961,7 @@ WIND - + @@ -963,67 +970,67 @@ EARTH - + - + FIRE - + - + WATER - + - + WIND - + - + EARTH - + - - + + 20792,20794,20795,20796,20797,20798,20799,20800,20801,20802,20803,20849,20995,21661,21662,21663,21664,21665,21666,21667,21668,21669,21670,21671,21672,21673,21674,21675,21676,21678,21685,21686,21761,21762,21763,21764,21765,21766,21767,21768,21769,21770,21771,21772,21773,21774,21775,21776,21777,21778,21779,21780,21781,21782,21783,21784,21785,21786,21787,21788,21789,21790,21791,21792,21793,21813,21814,21815,21816,21817,21818,21819,21820,21821,21822,21823,21824,21825,21826,21827,21828,21829,21830,21831,21832 76 99 - - + + - 79 + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22058,21969,22056,21962,21964,21966,21968,21974,22059,21976,21971 - - + + @@ -1034,9 +1041,9 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + @@ -1047,9 +1054,9 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + @@ -1060,9 +1067,9 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + @@ -1073,88 +1080,54 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + - + - - + + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 18678,18679,18680,18681,18682,18683,18684,18685 - - - - - - - - 76 - 99 - 22192,22193,22194,22195,22196,22197,22198,22199 - - - - - - - - - 76 - 99 - 22192,22193,22194,22195,22196,22197,22198,22199 - - - - - - - - - - 76 - 99 - 22192,22193,22194,22195,22196,22197,22198,22199 - - - - + + - - + + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 18686,18687 - + - - + + 70 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22192,22197 - + + @@ -1162,10 +1135,10 @@ 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 25952,25953,25954,25955,25961,25962,25963 - + @@ -1173,10 +1146,10 @@ 60 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22413,22414,22415,22416,22417 - + @@ -1184,10 +1157,10 @@ 85 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22426,22427,22428,22429,22431,22432,22433,22434,22435,22436,22437,22438,22439,22440,22441,22442,22443,22445,22446 - + @@ -1195,10 +1168,10 @@ 85 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 20761,21085,20627,20623,20621,20407,20626,20625,20624,20622,20620,21084,20405,21089,21087,21086,20629,20628,22500 - + @@ -1206,21 +1179,115 @@ 85 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22351,22346,22347,22345,22352,22349,22350,22348 - + - - + + - 65 + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 25964,25965,25966,25967 - + + + + - \ No newline at end of file + + + + 76 + 99 + 22269,22270 + + + + + + + + + + 76 + 99 + 22528,22523 + + + + + + + + + + + 76 + 99 + 22269,22270 + + + + + + + + + 76 + 99 + 22528,22523 + + + + + + + + + 80 + 99 + 22564,22569,22574,22579,22584,22589,22593,22597,22601,22605,22609,22613 + + + + + + + + + 21 + 40 + + + + + + + +
diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/PetExtractData.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/PetExtractData.xml new file mode 100644 index 0000000000..db6643827e --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/PetExtractData.xml @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30731.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30731.htm index 7d5bb217c7..daf4f90fc3 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30731.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30731.htm @@ -9,7 +9,7 @@ The Pet Manager Association is always happy to assist you and your pet.
--> - + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30827.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30827.htm index 830447a916..1a6e7f97c6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30827.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30827.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30828.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30828.htm index 0a7f19fda4..81b47f5ca8 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30828.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30828.htm @@ -10,7 +10,7 @@ Pet Manager Waters:
--> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30829.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30829.htm index 61e46bf654..67f60c6f2e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30829.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30829.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30830.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30830.htm index 6b1860ae08..26536da2b6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30830.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30830.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30831.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30831.htm index b707cd690d..04d1428ac0 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30831.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/30831.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31067.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31067.htm index 9ff970708b..5963bbead2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31067.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31067.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31265.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31265.htm index 5de92941aa..acd3d39c17 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31265.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31265.htm @@ -10,7 +10,7 @@ Perhaps I should write a book, eh? "The Impact of Striders on the History of the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31309.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31309.htm index 9487647c8a..3d6ff06a25 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31309.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31309.htm @@ -10,7 +10,7 @@ Oh, hello. Ah, you noticed my pure-bred black-striped Alpine Cougar, eh? It is n --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31954.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31954.htm index c8025dde3e..e0218b5231 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31954.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/31954.htm @@ -10,7 +10,7 @@ As the number of people who interested in raising pets increases these days, the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/33579.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/33579.htm index c67cae00f5..cafc07db04 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/33579.htm +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/html/petmanager/33579.htm @@ -7,7 +7,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/instances/DwellingOfSpirits.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/instances/DwellingOfSpirits.xml index 24a5c3b457..c5467892ab 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/instances/DwellingOfSpirits.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/instances/DwellingOfSpirits.xml @@ -35,13 +35,6 @@ - - - - - - - @@ -49,77 +42,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/multisell/custom/600016.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/multisell/custom/600016.xml index 15f5a77492..b1bbf39e7a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/multisell/custom/600016.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/multisell/custom/600016.xml @@ -5,19 +5,19 @@ - + - + - + @@ -35,13 +35,13 @@
- + - + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm new file mode 100644 index 0000000000..51ace5fb0f --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm @@ -0,0 +1,7 @@ +Siben:
+
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java new file mode 100644 index 0000000000..6606e36f7e --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java @@ -0,0 +1,190 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfKingIgnis extends AbstractNpcAI +{ + // NPCs + private static final int IGNIS = 29105; + // Skills + private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1); + private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); + private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3); + private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); + private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5); + private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); + private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7); + private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); + private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9); + private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10); + + public ResidenceOfKingIgnis() + { + addAttackId(IGNIS); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "CAST_FIRE_RAGE_1": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill())) + { + npc.doCast(FIRE_RAG_1.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_2": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) + { + npc.doCast(FIRE_RAG_2.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_3": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill())) + { + npc.doCast(FIRE_RAG_3.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_4": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) + { + npc.doCast(FIRE_RAG_4.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_5": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill())) + { + npc.doCast(FIRE_RAG_5.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_6": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) + { + npc.doCast(FIRE_RAG_6.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_7": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill())) + { + npc.doCast(FIRE_RAG_7.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_8": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) + { + npc.doCast(FIRE_RAG_8.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_9": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill())) + { + npc.doCast(FIRE_RAG_9.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_10": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill())) + { + npc.doCast(FIRE_RAG_10.getSkill()); + } + break; + } + } + return null; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) + { + startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) + { + startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) + { + startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) + { + startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15))) + { + startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10))) + { + startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7))) + { + startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5))) + { + startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3))) + { + startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null); + } + else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3)) + { + startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null); + } + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + public static void main(String[] args) + { + new ResidenceOfKingIgnis(); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java new file mode 100644 index 0000000000..0bb5893075 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java @@ -0,0 +1,309 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import java.util.HashMap; +import java.util.Map; + +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; + +import ai.AbstractNpcAI; + +public class ResidenceOfKingPetram extends AbstractNpcAI +{ + // NPCs + private static final int PETRAM = 29108; + private static final int PETRAM_PIECE = 29116; + private static final int PETRAM_FRAGMENT = 29117; + // Skills + private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); + private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); + private static final SkillHolder TEST = new SkillHolder(5712, 1); + + public ResidenceOfKingPetram() + { + addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); + addAttackId(PETRAM); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + petram.doCast(EARTH_ENERGY.getSkill()); + + petram.setInvul(true); + petram.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!"); + + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + final MinionData minionData = StageData.getMinionsStageData(stage)[minionIndex]; + final Location minionLocation = minionData.getMinionLocation(); + world.setParameter("minion" + minionIndex, addSpawn(npc, minionData.getMinionId(), minionLocation.getX(), minionLocation.getY(), minionLocation.getZ(), minionLocation.getHeading(), false, -1, true, npc.getInstanceId())); + } + + startQuestTimer("SUPPORT_PETRAM", 200, npc, null); + } + break; + } + case "SUPPORT_PETRAM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getNpc(PETRAM) != null) && !world.getNpc(PETRAM).isDead()) + { + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + world.getParameters().getObject("minion" + minionIndex, Npc.class).setTarget(world.getNpc(PETRAM)); + world.getParameters().getObject("minion" + minionIndex, Npc.class).doCast(TEST.getSkill()); + } + startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); + } + break; + } + case "REMOVE_INVUL": + { + if (npc != null) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + if (petram != null) + { + petram.doCast(EARTH_FURY.getSkill()); + petram.setInvul(false); + petram.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); + } + + for (int i = 0; i < 12; i++) + { + final Npc minion = world.getParameters().getObject("minion" + i, Npc.class); + if (minion != null) + { + minion.deleteMe(); + } + } + } + } + break; + } + } + + return null; + } + + private int getHigherStage(Instance world) + { + for (int stage = StageData.getMinionsStageData().size() - 1; stage >= 0; stage--) + { + if (world.getParameters().getBoolean("stage" + stage, false)) + { + return stage; + } + } + + return 0; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + synchronized (this) + { + for (int stage = 0; stage < StageData.getMinionsStageData().size(); stage++) + { + if ((npc.getCurrentHpPercent() < StageData.getHpPercents()[stage]) && !world.getParameters().getBoolean("stage" + stage, false)) + { + world.setParameter("stage" + stage, true); + startQuestTimer("SPAWN_MINION", 100, npc, null); + } + } + } + + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + final int stage = getHigherStage(world); + int aliveMinionsCount = 0; + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + if ((world.getParameters().getObject("minion" + minionIndex, Npc.class) != null) && !world.getParameters().getObject("minion" + minionIndex, Npc.class).isDead()) + { + aliveMinionsCount++; + } + } + + boolean breakInvul = false; + switch (stage) + { + case 0: + { + if (aliveMinionsCount == 0) + { + breakInvul = true; + } + break; + } + case 1: + { + if (aliveMinionsCount <= 4) + { + breakInvul = true; + } + break; + } + case 2: + { + if (aliveMinionsCount <= 6) + { + breakInvul = true; + } + break; + } + } + + if (breakInvul) + { + startQuestTimer("REMOVE_INVUL", 500, world.getNpc(PETRAM), null); + } + + return super.onKill(npc, player, isSummon); + } + + private static class StageData + { + private static final int[] _hpPercents = new int[] + { + 75, + 50, + 10 + }; + private static final Map _minionsStageData = new HashMap<>(); + static + { + // Stage 1 + _minionsStageData.put(0, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_FRAGMENT, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_FRAGMENT, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_FRAGMENT, new Location(222077, 191017, -15486, 16383)) + }); + + // Stage 2 + _minionsStageData.put(1, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_FRAGMENT, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_FRAGMENT, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_FRAGMENT, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_FRAGMENT, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_FRAGMENT, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_FRAGMENT, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_FRAGMENT, new Location(221342, 190800, -15486, 10837)) + }); + // Stage 3 + _minionsStageData.put(2, new MinionData[] + { + new MinionData(PETRAM_PIECE, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_PIECE, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_PIECE, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_PIECE, new Location(222077, 191017, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_PIECE, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_PIECE, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_PIECE, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_PIECE, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_PIECE, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_PIECE, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221342, 190800, -15486, 10837)) + }); + } + + public static int[] getHpPercents() + { + return _hpPercents; + } + + public static Map getMinionsStageData() + { + return _minionsStageData; + } + + public static MinionData[] getMinionsStageData(int stage) + { + return _minionsStageData.get(stage); + } + } + + private static class MinionData + { + final int _minionId; + final Location _minionLocation; + + private MinionData(int minionId, Location minionLocation) + { + _minionId = minionId; + _minionLocation = minionLocation; + } + + public int getMinionId() + { + return _minionId; + } + + public Location getMinionLocation() + { + return _minionLocation; + } + } + + public static void main(String[] args) + { + new ResidenceOfKingPetram(); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java new file mode 100644 index 0000000000..93deb9dce3 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java @@ -0,0 +1,179 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik, Mobius + */ +public class ResidenceOfKingProcella extends AbstractNpcAI +{ + // NPCs + private static final int PROCELLA = 29107; + private static final int PROCELLA_GUARDIAN_1 = 29112; + private static final int PROCELLA_GUARDIAN_2 = 29113; + private static final int PROCELLA_GUARDIAN_3 = 29114; + private static final int PROCELLA_STORM = 29115; + // Skills + private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); + private static final int HURRICANE_BOLT = 50043; + private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); + // Misc + private static final int STORM_MAX_COUNT = 16; + + public ResidenceOfKingProcella() + { + addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3); + addSpawnId(PROCELLA); + } + + @Override + public String onSpawn(Npc npc) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), npc, null); + startQuestTimer("SPAWN_STORM", 5000, npc, null); + world.setParameter("stormCount", 0); + } + return null; + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (npc.getId() == PROCELLA)) + { + world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); + world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); + world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + break; + } + case "SPAWN_STORM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) + { + world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); + final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); + procellaStorm.setRandomWalking(true); + world.getParameters().increaseInt("stormCount", 1); + startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); + } + break; + } + case "HIDE_PROCELLA": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + if (world.getNpc(PROCELLA).isInvisible()) + { + world.getNpc(PROCELLA).setInvisible(false); + } + else + { + world.getNpc(PROCELLA).setInvisible(true); + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player); + } + } + break; + } + case "CHECK_CHAR_INSIDE_RADIUS_NPC": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().orElse(null); // Usamos orElse(null) para evitar el Optional vacΓ­o + if ((plr != null) && (plr.isInsideRadius3D(npc, 100))) + { + npc.abortAttack(); + npc.abortCast(); + npc.setTarget(plr); + + if (plr.getKnownSkill(HURRICANE_BOLT) != null) // Verificamos si el jugador tiene la habilidad + { + if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) + { + npc.abortCast(); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) + { + npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); + } + } + } + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + } + break; + } + } + return null; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + if (npc.getId() == PROCELLA) + { + cancelQuestTimer("SPAWN_MINION", npc, player.getActingPlayer()); + cancelQuestTimer("SPAWN_STORM", npc, player.getActingPlayer()); + cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player.getActingPlayer()); + } + else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead())) + { + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfKingProcella(); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java new file mode 100644 index 0000000000..9c3c7ea37b --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java @@ -0,0 +1,209 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.data.xml.SkillData; +import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfQueenNebula extends AbstractNpcAI +{ + // NPCs + private static final int NEBULA = 29106; + private static final int WATER_SLIME = 29111; + // Skills + private static final int AQUA_RAGE = 50036; + private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); + private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); + private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); + private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); + private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); + private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); + + public ResidenceOfQueenNebula() + { + addKillId(NEBULA, WATER_SLIME); + addAttackId(NEBULA); + addSpawnId(NEBULA); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_WATER_SLIME": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().get(); + startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr); + if (npc.getId() == NEBULA) + { + npc.doCast(AQUA_SUMMON.getSkill()); + for (int i = 0; i < getRandom(4, 6); i++) + { + addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + } + } + } + break; + } + case "PLAYER_PARA": + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(true); + startQuestTimer("PLAYER_UNPARA", 5000, npc, player); + } + break; + } + case "PLAYER_UNPARA": + { + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); + player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(false); + break; + } + case "CAST_AQUA_RAGE": + { + startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); + if ((player.isInsideRadius3D(npc, 1000))) + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) + { + npc.doCast(AQUA_RAGE_2.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) + { + npc.doCast(AQUA_RAGE_3.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) + { + npc.doCast(AQUA_RAGE_4.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) + { + npc.doCast(AQUA_RAGE_5.getSkill()); + startQuestTimer("PLAYER_PARA", 100, npc, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + npc.abortCast(); + } + else if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) + { + npc.doCast(AQUA_RAGE_1.getSkill()); + } + } + break; + } + } + return null; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + return super.onSpawn(npc); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + switch (npc.getId()) + { + case NEBULA: + { + cancelQuestTimer("CAST_AQUA_RAGE", npc, player); + cancelQuestTimer("SPAWN_WATER_SLIME", npc, player); + break; + } + case WATER_SLIME: + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_1.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_2.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_3.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_4.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); + skill.applyEffects(player, player); + } + } + break; + } + } + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfQueenNebula(); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java index e9e2c539a0..b025542e79 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java @@ -54,12 +54,12 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final AtomicReference SPAWN_BATTLE_MOBS = new AtomicReference<>(); private static final AtomicReference SPAWN_ENCHANCED_MOBS = new AtomicReference<>(); - public static final int[] REGGIESYS_GLAKIAS = + protected static final int[] REGGIESYS_GLAKIAS = { 29136, 29137 }; - public static final int[] SLICING_GLAKIAS = + protected static final int[] SLICING_GLAKIAS = { 29138, 29139 @@ -72,21 +72,20 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final Location GLAKIAS_SPAWN_LOC = new Location(114713, -114799, -11209, 33289); // Teleports - private static final Location The_north_eastern_entrance = new Location(-56255, 13537, -3336); - private static final Location The_south_eastern_entrance = new Location(-49550, 17189, -3016); - private static final Location The_north_western_entrance = new Location(-52849, 5272, -240); - private static final Location The_south_western_entrance = new Location(-52849, 5272, -240); + private static final Location NORTH_EASTERN_ENTRANCE = new Location(-56255, 13537, -3336); + private static final Location SOUTH_EASTERN_ENTRANCE = new Location(-49550, 17189, -3016); + private static final Location NORTH_WESTERN_ENTRANCE = new Location(-52849, 5272, -240); + private static final Location SOUTH_WESTERN_ENTRANCE = new Location(-52849, 5272, -240); - private static final Location Crossroad = new Location(145598, 144091, -11789); - private static final Location Northern_Secret_Passage = new Location(149478, 147145, -12339); + private static final Location CROSSROAD = new Location(145598, 144091, -11789); + private static final Location NOTHERN_SECRET_PASSAGE = new Location(149478, 147145, -12339); - private static final Location Glakias_House = new Location(113479, -114804, -11076); + private static final Location GLAKIAS_RESIDENCE = new Location(113479, -114804, -11076); public static final int UNDERCOVER_AGENT = 34230; // Teleport npc public static final int CRYSTAL_ENERGY = 34232; // Teleport npc // Zones - private static final ZoneType[] ZONES = { ZoneManager.getInstance().getZoneByName("frost_castle_zone"), @@ -94,7 +93,6 @@ public class FrostLordCastleZone extends AbstractNpcAI }; // Timings - private static final int[] DAYS_OF_WEEK = { Calendar.TUESDAY, @@ -113,7 +111,7 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final long DESPAWN_DELAY = 16 * 60 * 60 * 1000; - private static Npc _TeleportchargedCrystal = null; + private static Npc _teleportchargedCrystal = null; private static final String SCRIPT_BYPASS = "Quest FrostLordCastleZone "; @@ -138,148 +136,73 @@ public class FrostLordCastleZone extends AbstractNpcAI { case "Crossroad": { - TeleportCheck(player, 1); + teleportCheck(player, 1); break; } - case "Northern_Secret_Passage": { - TeleportCheck(player, 2); + teleportCheck(player, 2); break; } - case "The_north_eastern_entrance": { - TeleportCheck(player, 3); + teleportCheck(player, 3); break; } - case "The_south_eastern_entrance": { - TeleportCheck(player, 4); + teleportCheck(player, 4); break; } - case "The_north_western_entrance": { - TeleportCheck(player, 5); + teleportCheck(player, 5); break; } - case "The_south_western_entrance": { - TeleportCheck(player, 6); + teleportCheck(player, 6); break; } - case "Crystal_Energy_Teleport": { - player.teleToLocation(Glakias_House); + player.teleToLocation(GLAKIAS_RESIDENCE); break; } - case "FIRST_RAID_SPAWN": { int id = Rnd.get(100) < 7 ? SLICING : REGGIESYS; addSpawn(id, REGGIESYS_SLICING_SPAWN_LOC, false, DESPAWN_DELAY); break; } - case "SECOND_RAID_SPAWN": { addSpawn(TIRON, TIRON_SPAWN_LOC, false, DESPAWN_DELAY); break; } - - default: - { - break; - } } return super.onAdvEvent(event, npc, player); } - private void scheduleFirstRaid() - { - long time = Long.MAX_VALUE; - - for (int day : DAYS_OF_WEEK) - { - long nextDateMillis = getNextDateMilis(day, FIRST_RAID_TIME[0], FIRST_RAID_TIME[1]); - if (nextDateMillis < time) - { - time = nextDateMillis; - } - } - - startQuestTimer("FIRST_RAID_SPAWN", time - System.currentTimeMillis(), null, null); - } - - private void scheduleSecondRaid() - { - long time = Long.MAX_VALUE; - for (int day : DAYS_OF_WEEK) - { - long temp = getNextDateMilis(day, SECOND_RAID_TIME[0], SECOND_RAID_TIME[1]); - if (temp < time) - { - time = temp; - } - } - startQuestTimer("SECOND_RAID_SPAWN", time - System.currentTimeMillis(), null, null); - - } - - private long getNextDateMilis(int dayOfWeek, int hour, int minute) - { - Calendar c = Calendar.getInstance(); - c.set(Calendar.HOUR_OF_DAY, hour); - c.set(Calendar.MINUTE, minute); - c.set(Calendar.SECOND, 0); - for (int i = 0; i < 7; i++) - { - if ((c.get(Calendar.DAY_OF_WEEK) == dayOfWeek) && (c.getTimeInMillis() > System.currentTimeMillis())) - { - return c.getTimeInMillis(); - } - c.add(Calendar.DAY_OF_WEEK, 1); - } - return c.getTimeInMillis(); - } - @Override - public String onKill(Npc npc, Player killer, boolean isSummon) + public String onFirstTalk(Npc npc, Player player) { - switch (npc.getId()) + if (npc.getId() == CRYSTAL_ENERGY) { - case REGGIESYS: - { - addSpawn(REGGIESYS_GLAKIAS[Rnd.get(0, REGGIESYS_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); - - SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); - - break; - } - case SLICING: - { - addSpawn(SLICING_GLAKIAS[Rnd.get(0, SLICING_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); - - SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); - - break; - } - case TIRON: - { - _TeleportchargedCrystal = addSpawn(CHARGED_CRYSTAL, CHARGED_CRYSTAL_SPAWN_LOC, false, DESPAWN_DELAY); - break; - } + return getHtm(player, "34232.htm"); } - DeleteGlakiasSpawns(npc); - return super.onKill(npc, killer, false); + + if (npc.getId() == UNDERCOVER_AGENT) + { + if ((_teleportchargedCrystal != null) && _teleportchargedCrystal.isSpawned()) + { + return getHtm(player, "34230-full.htm"); + } + + return getHtm(player, "34230.htm"); + } + + return null; } @Override @@ -325,47 +248,133 @@ public class FrostLordCastleZone extends AbstractNpcAI } } - public void TeleportCheck(Player player, int locNum) + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + switch (npc.getId()) + { + case REGGIESYS: + { + addSpawn(REGGIESYS_GLAKIAS[Rnd.get(0, REGGIESYS_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); + SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); + break; + } + case SLICING: + { + addSpawn(SLICING_GLAKIAS[Rnd.get(0, SLICING_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); + SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); + break; + } + case TIRON: + { + _teleportchargedCrystal = addSpawn(CHARGED_CRYSTAL, CHARGED_CRYSTAL_SPAWN_LOC, false, DESPAWN_DELAY); + break; + } + } + deleteGlakiasSpawns(npc); + return super.onKill(npc, killer, false); + } + + @RegisterEvent(EventType.ON_PLAYER_BYPASS) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void onPlayerBypass(OnPlayerBypass event) + { + final Player player = event.getPlayer(); + if (event.getCommand().startsWith(SCRIPT_BYPASS)) + { + notifyEvent(event.getCommand().replace(SCRIPT_BYPASS, ""), null, player); + } + } + + private void scheduleFirstRaid() + { + long time = Long.MAX_VALUE; + for (int day : DAYS_OF_WEEK) + { + final long nextDateMillis = getNextDateMilis(day, FIRST_RAID_TIME[0], FIRST_RAID_TIME[1]); + if (nextDateMillis < time) + { + time = nextDateMillis; + } + } + startQuestTimer("FIRST_RAID_SPAWN", time - System.currentTimeMillis(), null, null); + } + + private void scheduleSecondRaid() + { + long time = Long.MAX_VALUE; + for (int day : DAYS_OF_WEEK) + { + final long nextDateMillis = getNextDateMilis(day, SECOND_RAID_TIME[0], SECOND_RAID_TIME[1]); + if (nextDateMillis < time) + { + time = nextDateMillis; + } + } + startQuestTimer("SECOND_RAID_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 void teleportCheck(Player player, int locationId) { int requiredMoney = 0; Location teleportLocation = null; - - switch (locNum) + switch (locationId) { case 1: { requiredMoney = 100000; - teleportLocation = Crossroad; + teleportLocation = CROSSROAD; break; } case 2: { requiredMoney = 100000; - teleportLocation = Northern_Secret_Passage; + teleportLocation = NOTHERN_SECRET_PASSAGE; break; } case 3: { requiredMoney = 500000; - teleportLocation = The_north_eastern_entrance; + teleportLocation = NORTH_EASTERN_ENTRANCE; break; } case 4: { requiredMoney = 500000; - teleportLocation = The_south_eastern_entrance; + teleportLocation = SOUTH_EASTERN_ENTRANCE; break; } case 5: { requiredMoney = 500000; - teleportLocation = The_north_western_entrance; + teleportLocation = NORTH_WESTERN_ENTRANCE; break; } case 6: { requiredMoney = 500000; - teleportLocation = The_south_western_entrance; + teleportLocation = SOUTH_WESTERN_ENTRANCE; break; } default: @@ -383,33 +392,7 @@ public class FrostLordCastleZone extends AbstractNpcAI player.teleToLocation(teleportLocation); } - @Override - public String onFirstTalk(Npc npc, Player player) - { - String html; - if (npc.getId() == CRYSTAL_ENERGY) - { - html = getHtm(player, "34232.htm"); - return html; - } - - if (npc.getId() == UNDERCOVER_AGENT) - { - if ((_TeleportchargedCrystal != null) && _TeleportchargedCrystal.isSpawned()) - { - html = getHtm(player, "34230-full.htm"); - } - else - { - html = getHtm(player, "34230.htm"); - } - - return html; - } - return null; - } - - private void DeleteGlakiasSpawns(Npc npc) + private void deleteGlakiasSpawns(Npc npc) { int npcId = npc.getId(); if ((npcId == REGGIESYS_GLAKIAS[0]) || (npcId == REGGIESYS_GLAKIAS[1]) || (npcId == SLICING_GLAKIAS[0]) || (npcId == SLICING_GLAKIAS[1])) @@ -418,19 +401,8 @@ public class FrostLordCastleZone extends AbstractNpcAI } } - @RegisterEvent(EventType.ON_PLAYER_BYPASS) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onPlayerBypass(OnPlayerBypass event) - { - final Player player = event.getPlayer(); - if (event.getCommand().startsWith(SCRIPT_BYPASS)) - { - notifyEvent(event.getCommand().replace(SCRIPT_BYPASS, ""), null, player); - } - } - public static void main(String[] args) { new FrostLordCastleZone(); } -} \ No newline at end of file +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 5b501b1f1b..bcc74a8afe 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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; @@ -254,6 +255,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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/EffectMasterHandler.java index b59d11ec8d..01bc847ec6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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); @@ -176,6 +178,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveHonorCoins", GiveHonorCoins::new); EffectHandler.getInstance().registerHandler("GiveItemByExp", GiveItemByExp::new); + EffectHandler.getInstance().registerHandler("GivePetXp", GivePetXp::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); @@ -199,6 +202,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); @@ -240,7 +244,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::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("ModifyBeastPoints", ModifyBeastPoints::new); EffectHandler.getInstance().registerHandler("ModifyCraftPoints", ModifyCraftPoints::new); diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/MasterHandler.java index 3308643dd5..d62fc6e372 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/MasterHandler.java @@ -148,6 +148,7 @@ import handlers.bypasshandlers.Link; import handlers.bypasshandlers.Multisell; import handlers.bypasshandlers.NpcViewMod; import handlers.bypasshandlers.Observation; +import handlers.bypasshandlers.PetExtractWindow; import handlers.bypasshandlers.PlayerHelp; import handlers.bypasshandlers.PrivateWarehouse; import handlers.bypasshandlers.QuestLink; @@ -468,6 +469,7 @@ public class MasterHandler Multisell.class, NpcViewMod.class, Observation.class, + PetExtractWindow.class, QuestLink.class, PlayerHelp.class, PrivateWarehouse.class, diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java new file mode 100644 index 0000000000..446334c464 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java @@ -0,0 +1,56 @@ +/* + * 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.bypasshandlers; + +import org.l2jmobius.gameserver.handler.IBypassHandler; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.network.serverpackets.pet.ShowPetExtractSystem; + +/** + * @author Geremy + */ +public class PetExtractWindow implements IBypassHandler +{ + private static final String[] COMMANDS = + { + "pet_extract_window", + }; + + @Override + public boolean useBypass(String command, Player player, Creature target) + { + if (!target.isNpc()) + { + return false; + } + + if (command.toLowerCase().startsWith(COMMANDS[0])) + { + player.sendPacket(ShowPetExtractSystem.STATIC_PACKET); + return true; + } + + return false; + } + + @Override + public String[] getBypassList() + { + return COMMANDS; + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java index 2e18f88163..b4e115ac3b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java @@ -113,7 +113,7 @@ public class MonsterDailyMissionHandler extends AbstractDailyMissionHandler final Player player = event.getAttacker(); final int monsterLevel = monster.getLevel(); - if ((_minLevel > 0) && ((monsterLevel < _minLevel) || (monsterLevel > _maxLevel) || ((player.getLevel() - monsterLevel) > 5))) + if ((_minLevel > 0) && ((monsterLevel < _minLevel) || (monsterLevel > _maxLevel) || ((player.getLevel() - monsterLevel) > 15))) { return; } diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index 53461fa88c..d2642e05ab 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java new file mode 100644 index 0000000000..c9801b6d42 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java @@ -0,0 +1,53 @@ +/* + * 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.actor.Creature; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.skill.Skill; + +/** + * @author Geremy + */ +public class GivePetXp extends AbstractEffect +{ + private final int _xp; + + public GivePetXp(StatSet params) + { + _xp = params.getInt("xp", 0); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, Item item) + { + if (!effector.hasPet()) + { + return; + } + + effected.getActingPlayer().getPet().addExpAndSp(_xp, 0); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java deleted file mode 100644 index c99b060259..0000000000 --- a/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 951002a2c2..35bfbcb6bc 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 7e02e79abc..bff5a1734b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index 289fc39e34..658d88fe0a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index 70789354f3..fd41f09a9a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index df05ef8607..b36b10a92e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetAttack.java index 184f7d7c57..37f9d00f2a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_DON_T_HAVE_A_PET); return; } - final Pet pet = player.getPet(); if (pet.isUncontrollable()) { player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_SATIETY_REACHES_0_YOU_CANNOT_CONTROL_IT); + return; } - else if (pet.isBetrayed()) + + if (pet.isBetrayed()) { player.sendPacket(SystemMessageId.YOUR_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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetHold.java index 6965c0d0b5..48627f4566 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetMove.java index 32f4053f45..d62690a655 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index 3dc74de1c2..c8059bf358 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetStop.java index 9fa6da5ad9..3ed527ecd8 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 71d72e95b5..3e0acb89bd 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_DON_T_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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index 7b0ec565e4..41ecb77132 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index be6205b0f9..2b5a8f1e82 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index d119886221..6254d3db05 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index 36aa372909..7fa7f0a45c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 41b3dd19f2..4f91147611 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index 6a502a1f73..70384d677c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index a408928a04..f305fd2787 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java @@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR); } } + + @Override + public boolean isPetAction() + { + return true; + } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 57ebb3bb4c..fffb222021 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index 18c4d64dbc..58cf8bd50e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java index 068f5dc60f..bf71fda5e1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java @@ -20,20 +20,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.l2jmobius.gameserver.data.xml.SkillData; -import org.l2jmobius.gameserver.enums.ChatType; -import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.enums.TeleportWhereType; -import org.l2jmobius.gameserver.instancemanager.ZoneManager; +import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.StatSet; 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.holders.SkillHolder; import org.l2jmobius.gameserver.model.instancezone.Instance; -import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; -import org.l2jmobius.gameserver.model.skill.Skill; -import org.l2jmobius.gameserver.model.skill.SkillCaster; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent; @@ -47,8 +42,12 @@ import instances.AbstractInstance; */ public class DwellingOfSpirits extends AbstractInstance { + private static final int PORTAL_OPEN_CHANCE = 40; + // CRITICAL NPCs private static final int RUIP = 22273; + private static final int FAIRY_C1 = 22271; + private static final int FAIRY_C2 = 22272; private static final int SEALSTONE = 34178; private static final int ANIMAEL = 34176; private static final int PORTAL_EVENT_FIRE = 15969; @@ -56,46 +55,10 @@ public class DwellingOfSpirits extends AbstractInstance private static final int PORTAL_EVENT_EARTH = 15972; private static final int PORTAL_EVENT_WIND = 15971; - // PROCELLA BOSS WIND private static final int KING_PROCELLA = 29107; - private static final int PROCELLA_GUARDIAN_1 = 29112; - private static final int PROCELLA_STORM = 29115; - - private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); - private static final int HURRICANE_BOLT = 50043; - private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); - private static final int STORM_MAX_COUNT = 20; // - - // PETRAM BOSS EARTH private static final int KING_PETRAM = 29108; - private static final int PETRAM_PIECE = 29116; - private static final int PETRAM_FRAGMENT = 29117; - // Skills - private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); - private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); - private static final SkillHolder TEST = new SkillHolder(5712, 1); - - // IGNIS BOSS FIRE - // NPCs private static final int KING_IGNIS = 29105; - // Skills - private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); - private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); - private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); - private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); - - // NEBULA BOSS WATER - // NPCs private static final int KING_NEBULA = 29106; - private static final int WATER_SLIME = 29111; - // Skills - private static final int AQUA_RAGE = 50036; - private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); - private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); - private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); - private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); - private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); - private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); // Entrace Portal Triggers private static final int WIND_FIRST_TRIGGER_1 = 16158880; @@ -107,38 +70,86 @@ public class DwellingOfSpirits extends AbstractInstance private static final int WATER_FIRST_TRIGGER_1 = 16157770; private static final int WATER_FIRST_TRIGGER_2 = 16157772; - // Statue Kill Indicator Triggers - private static final int KILL_INDICATOR_TRIGGER_1 = 16159990; - private static final int KILL_INDICATOR_TRIGGER_2 = 16159994; - private static final int KILL_INDICATOR_TRIGGER_3 = 16159996; - private static final int KILL_INDICATOR_TRIGGER_4 = 16159998; - private static final int KILL_INDICATOR_TRIGGER_5 = 16159992; + // @formatter:off + private static final int[][] PORTAL_TRIGGER_IDS = + { + { 16158880, 16158882 }, + { 16156660, 16156662 }, + { 16155550, 16155552 }, + { 16157770, 16157772 } + }; + + private static final Location IGNIS_FIRE_L = new Location(202374, 168153, -15485); + private static final Location PETRAM_EARTH_L = new Location(222081, 190538, -15485); + private static final Location NEBULA_WATER_L = new Location(222149, 168087, -15485); + private static final Location PROCELLA_WIN_L = new Location(212884, 178847, -15485); + + private static final Location PETRAM_EARTH_RETURN_L = new Location(-114321, -77262, -11445); + private static final Location IGNIS_FIRE_RETURN_L = new Location(-114322, -77262, -11445); + private static final Location NEBULA_WATER_RETURN_L = new Location(-114323, -77262, -11445); + private static final Location PROCELLA_WIN_RETURN_L = new Location(-114324, -77262, -11445); + + private static final int[][][] portalConfigs = + { + {{EARTH_FIRST_TRIGGER_1, EARTH_FIRST_TRIGGER_2, KING_PETRAM}}, + {{FIRE_FIRST_TRIGGER_1, FIRE_FIRST_TRIGGER_2, KING_IGNIS}}, + {{WATER_FIRST_TRIGGER_1, WATER_FIRST_TRIGGER_2, KING_NEBULA}}, + {{WIND_FIRST_TRIGGER_1, WIND_FIRST_TRIGGER_2, KING_PROCELLA}} + }; + + private static final int[][] portalSpawnCoordinates = + { + {222063, 191514, -15486, 50142}, + {202350, 169121, -15484, 48103}, + {222127, 169057, -15486, 48730}, + {212862, 179828, -15489, 48103} + }; + // @formatter:on private static final int TEMPLATE_ID = 214; private static final Map PORTAL_MSG = new HashMap<>(); static { - PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(0, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); PORTAL_MSG.put(2, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WATER_IS_OPEN); PORTAL_MSG.put(3, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WIND_IS_OPEN); - PORTAL_MSG.put(4, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); - PORTAL_MSG.put(5, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); + PORTAL_MSG.put(4, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); } + // Zone + private static final int DWELLING_CENTRAL = 21400000; + + private static final int IGNIS_PORTAL_ENTER_ID = 202201; + private static final int PETRAM_PORTAL_ENTER_ID = 202202; + private static final int NEBULA_PORTAL_ENTER_ID = 202203; + private static final int PROCELLA_PORTAL_ENTER_ID = 202204; + + // Portals return IDs + private static final int IGNIS_PORTAL_RETURN_ID = 202205; + private static final int PETRAM_PORTAL_RETURN_ID = 202206; + private static final int NEBULA_PORTAL_RETURN_ID = 202207; + private static final int PROCELLA_PORTAL_RETURN_ID = 202208; + public DwellingOfSpirits() { super(TEMPLATE_ID); addKillId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); - addKillId(PROCELLA_GUARDIAN_1); - addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); - addKillId(WATER_SLIME); + addKillId(FAIRY_C1, FAIRY_C2, RUIP); addAttackId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); addSpawnId(KING_NEBULA); addFirstTalkId(ANIMAEL, SEALSTONE); addTalkId(ANIMAEL); addStartNpc(SEALSTONE); - addCreatureSeeId(RUIP, ANIMAEL); + addCreatureSeeId(ANIMAEL); + addEnterZoneId(DWELLING_CENTRAL); + addEnterZoneId(IGNIS_PORTAL_ENTER_ID, IGNIS_PORTAL_RETURN_ID); + addEnterZoneId(PETRAM_PORTAL_ENTER_ID, PETRAM_PORTAL_RETURN_ID); + addEnterZoneId(NEBULA_PORTAL_ENTER_ID, NEBULA_PORTAL_RETURN_ID); + addEnterZoneId(PROCELLA_PORTAL_ENTER_ID, PROCELLA_PORTAL_RETURN_ID); + addInstanceEnterId(TEMPLATE_ID); + addInstanceLeaveId(TEMPLATE_ID); } @Override @@ -179,779 +190,106 @@ public class DwellingOfSpirits extends AbstractInstance } case "TELEPORT": { - player.teleToLocation(TeleportWhereType.TOWN, null); - return null; - } - //////////////// BOSS PROCELLA WIND ACTION ///////////// - case "SPAWN_MINION_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (npc.getId() == KING_PROCELLA)) + final Instance instance = player.getInstanceWorld(); + if (instance != null) { - world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); - world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_1, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); - world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_1, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); - startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(KING_PROCELLA), player); + instance.finishInstance(); + player.teleToLocation(TeleportWhereType.TOWN, null); } - break; - } - case "SPAWN_STORM_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) - { - world.getNpc(KING_PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); - final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(KING_PROCELLA).getX() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getY() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); - procellaStorm.setRandomWalking(true); - world.getParameters().increaseInt("stormCount", 1); - startQuestTimer("SPAWN_STORM_PROCELLA", 30000, world.getNpc(KING_PROCELLA), player); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, procellaStorm, player); - } - break; - } - case "HIDE_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) >= 1) - { - world.getNpc(KING_PROCELLA).setInvisible(true); - } - else if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) == 0) - { - world.getNpc(KING_PROCELLA).setInvisible(false); - startQuestTimer("SPAWN_MINION_PROCELLA", 90000 + getRandom(-15000, 11000), world.getNpc(KING_PROCELLA), player); - } - break; - } - case "CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().orElse(null); - if ((plr != null) && (plr.isInsideRadius3D(npc, 200))) - { - npc.abortAttack(); - npc.abortCast(); - npc.setTarget(plr); - if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) - { - npc.abortCast(); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) - { - npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); - } - } - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - } - break; - } - //////////////// BOSS PETRAM EARTH ACTION ///////////// - case "SPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - npc.doCast(EARTH_ENERGY.getSkill()); - - if (!world.getParameters().getBoolean("spawnedMinions", false)) - { - world.getParameters().set("spawnedMinions", true); - - final int stage = world.getParameters().getInt("stage", 0); - world.getParameters().set("stage", stage + 1); - - world.setParameter("minionpetram1", addSpawn(npc, PETRAM_FRAGMENT, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram3", addSpawn(npc, PETRAM_FRAGMENT, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId())); - - npc.setInvul(true); - npc.broadcastSay(ChatType.NPC_SHOUT, "HaHahaha, fighters lets kill them. Now Im invul!!!"); - } - - startQuestTimer("SUPPORT_PETRAM", 3000, npc, player); - } - break; - } - case "UNSPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - world.getParameters().set("spawnedMinions", false); - - npc.setInvul(false); - npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); - } - break; - } - case "SUPPORT_PETRAM": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Npc m1 = world.getParameters().getObject("minionpetram1", Npc.class); - final Npc m2 = world.getParameters().getObject("minionpetram2", Npc.class); - final Npc m3 = world.getParameters().getObject("minionpetram3", Npc.class); - final Npc m4 = world.getParameters().getObject("minionpetram4", Npc.class); - if (!m1.isDead()) - { - m1.setTarget(world.getNpc(KING_PETRAM)); - m1.doCast(TEST.getSkill()); - } - if (!m2.isDead()) - { - m2.setTarget(world.getNpc(KING_PETRAM)); - m2.doCast(TEST.getSkill()); - } - if (!m3.isDead()) - { - m3.setTarget(world.getNpc(KING_PETRAM)); - m3.doCast(TEST.getSkill()); - } - if (!m4.isDead()) - { - m4.setTarget(world.getNpc(KING_PETRAM)); - m4.doCast(TEST.getSkill()); - } - - startQuestTimer("SUPPORT_PETRAM", 10100, npc, player); - } - break; - } - case "EARTH_FURY": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - npc.doCast(EARTH_FURY.getSkill()); - } - break; - } - //////////////// BOSS IGNIS ACTION ///////////// - case "CAST_FIRE_RAGE_1": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) - { - npc.doCast(FIRE_RAG_2.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_2": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) - { - npc.doCast(FIRE_RAG_4.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_3": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) - { - npc.doCast(FIRE_RAG_6.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_4": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) - { - npc.doCast(FIRE_RAG_8.getSkill()); - } - break; - } - //////////////// BOSS NEBULA ACTION ///////////// - case "SPAWN_WATER_SLIME": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().get(); - if (plr != null) - { - startQuestTimer("CAST_AQUA_RAGE", 30000 + getRandom(-15000, 15000), npc, plr); - } - if (npc.getId() == KING_NEBULA) - { - npc.doCast(AQUA_SUMMON.getSkill()); - for (int i = 0; i < getRandom(4, 6); i++) - { - addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); - startQuestTimer("SPAWN_WATER_SLIME", 80000, npc, null); - } - } - } - break; - } - case "PLAYER_PARA": - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(true); - startQuestTimer("PLAYER_UNPARA", 5000, npc, player); - } - break; - } - case "PLAYER_UNPARA": - { - player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); - player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(false); - break; - } - case "CAST_AQUA_RAGE": - { - startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); - if ((player.isInsideRadius3D(npc, 1000))) - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) - { - npc.doCast(AQUA_RAGE_2.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) - { - npc.doCast(AQUA_RAGE_3.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) - { - npc.doCast(AQUA_RAGE_4.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) - { - npc.doCast(AQUA_RAGE_5.getSkill()); - startQuestTimer("PLAYER_PARA", 100, npc, player); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - npc.abortCast(); - } - else - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) - { - npc.doCast(AQUA_RAGE_1.getSkill()); - } - } - } - break; - } - case "check_status": - { - final Instance world = player.getInstanceWorld(); - if (!isInInstance(world)) - { - return null; - } - - switch (world.getStatus()) - { - case 0: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(1); - world.despawnGroup("sealstone"); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 1: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(2); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 2: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(3); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 3: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(4); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 4: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(5); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(3), null)); - addSpawn(KING_PROCELLA, 212862, 179828, -15489, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 5: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 6: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(7); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 7: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(8); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 8: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(9); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_2"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 9: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(10); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(1), null)); - addSpawn(KING_PETRAM, 222063, 191514, -15486, 50142, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 10: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 11: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(12); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 12: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(13); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 13: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(14); - world.spawnGroup("ruipwave_2"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 14: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(15); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); - addSpawn(KING_IGNIS, 202350, 169121, -15484, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 15: // Dummy stage pause, u need defeat boss for continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 16: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(17); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 17: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(18); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 18: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(19); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 19: // need defeat boss for finish. - { - if (world.getAliveNpcCount(RUIP) == 0) - - { - world.setStatus(20); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(2), null)); - addSpawn(KING_NEBULA, 222127, 169057, -15486, 48730, false, 0, false, world.getId()); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 20: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.getParameters().set("DwellingOfSpiritsFinished", true); - world.setStatus(21); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - } - - return null; } } return super.onAdvEvent(event, npc, player); - - } - - @Override - public String onSpawn(Npc npc) - { - startQuestTimer("SPAWN_WATER_SLIME", 40000, npc, null); - return super.onSpawn(npc); - } - - @Override - public String onAttack(Npc npc, Player player, int damage, boolean isSummon, Skill skill) - { - final Instance world = npc.getInstanceWorld(); - if (world == null) - { - return null; - } - - switch (npc.getId()) - { - case KING_PROCELLA: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) - { - startQuestTimer("SPAWN_MINION_PROCELLA", 80000 + getRandom(-15000, 15000), npc, player); - startQuestTimer("SPAWN_STORM_PROCELLA", 4000, npc, player); - world.setParameter("stormCount", 0); - } - break; - } - case KING_PETRAM: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.80)) - { - startQuestTimer("EARTH_FURY", 1000, npc, player); - if ((world.getParameters().getInt("stage", 0) == 0) || (npc.getCurrentHp() < (npc.getMaxHp() * 0.50))) - { - startQuestTimer("SPAWN_MINION", 1000, npc, player); - } - } - break; - } - case KING_IGNIS: - { - if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) - { - startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) - { - startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) - { - startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) - { - startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); - } - break; - } - } - - return null; - } - - @Override - public String onCreatureSee(Npc npc, Creature creature) - { - if (creature.isPlayer()) - { - final Instance world = creature.getInstanceWorld(); - if (world.getStatus() >= 5) - { - enableZoneWind(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 10) - { - enableZoneEarth(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 15) - { - enableZoneFire(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 20) - { - enableZoneWater(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 21) - { - world.despawnGroup("ruipwave_1"); - world.despawnGroup("ruipwave_2"); - world.despawnGroup("NormalMobs"); - world.finishInstance(); - } - } - - return super.onCreatureSee(npc, creature); } @Override public String onKill(Npc npc, Player player, boolean isSummon) { final Instance instance = npc.getInstanceWorld(); + final StatSet worldParameters = instance.getParameters(); + + int totalBossDefeatCount = worldParameters.getInt("totalBossDefeatCount", 0); switch (npc.getId()) { - case KING_PETRAM: + case RUIP: + case FAIRY_C1: + case FAIRY_C2: { - final Npc portal = addSpawn(PORTAL_EVENT_EARTH, 222065, 192767, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); // set the portal visible - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneEarthExit(); - cancelQuestTimer("SPAWN_MINION", npc, player); - instance.setStatus(12); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PETRAM_FRAGMENT)) + if (Rnd.get(100) <= PORTAL_OPEN_CHANCE) { - spawn.deleteMe(); - } - break; - } - case KING_NEBULA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WATER, 222127, 170488, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); - setActive(true); - enableZoneWindExit(); - instance.setStatus(21); - instance.spawnGroup("animael"); - break; - } - case KING_IGNIS: - { - final Npc portal = addSpawn(PORTAL_EVENT_FIRE, 202349, 170533, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneFireExit(); - instance.setStatus(17); - break; - } - case KING_PROCELLA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WIND, 212863, 181090, -15487, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneWaterExit(); - instance.setStatus(7); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PROCELLA_GUARDIAN_1)) - { - spawn.deleteMe(); - } - break; - } - case PETRAM_FRAGMENT: - { - startQuestTimer("UNSPAWN_MINION", 1000, instance.getNpc(KING_PETRAM), player); - break; - } - case PROCELLA_GUARDIAN_1: - { - - startQuestTimer("HIDE_PROCELLA", 1000, instance.getNpc(KING_PROCELLA), player); - break; - } - case WATER_SLIME: - { - if (getRandomBoolean()) - { - switch (player.getAffectedSkillLevel(AQUA_RAGE)) + int portalId = Rnd.get(4); + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + + if (!isPortalOpened) { - case 1: + if (instance.getStatus() > totalBossDefeatCount) { - player.stopSkillEffects(AQUA_RAGE_1.getSkill()); - break; - } - case 2: - { - player.stopSkillEffects(AQUA_RAGE_2.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); - skill.applyEffects(player, player); - break; - } - case 3: - { - player.stopSkillEffects(AQUA_RAGE_3.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); - skill.applyEffects(player, player); - break; - } - case 4: - { - player.stopSkillEffects(AQUA_RAGE_4.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); - skill.applyEffects(player, player); - break; + return super.onKill(npc, player, isSummon); } + instance.setStatus(instance.getStatus() + 1); + openPortal(player, portalId, instance); + worldParameters.set("portal" + portalId + "Opened", true); } } break; } + + case KING_PETRAM: + case KING_PROCELLA: + case KING_IGNIS: + case KING_NEBULA: + { + spawnExitPortal(instance, player, npc.getId()); + CheckGeneralResidenceStages(npc, instance); + + break; + } } return super.onKill(npc, player, isSummon); } + @Override + public String onEnterZone(Creature creature, ZoneType zone) + { + Instance instance = creature.getInstanceWorld(); + if ((instance != null) && creature.isPlayer()) + { + + final StatSet worldParameters = instance.getParameters(); + + if (zone.getId() == DWELLING_CENTRAL) + { + worldParameters.set("InsideResidence", true); + handleCentralZone(instance, worldParameters); + } + + int portalId = getPortalIdByZone(zone.getId()); + Location[] locations = getLocationsForPortal(portalId); + + if ((portalId >= 0) && (locations[0] != null)) + { + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + boolean isPortalExitOpened = worldParameters.getBoolean("portalExit" + portalId, false); + boolean InsideResidence = worldParameters.getBoolean("InsideResidence", false); + + if (isPortalOpened && (InsideResidence)) + { + creature.teleToLocation(locations[0], instance); + worldParameters.set("InsideResidence", false); + } + + if (isPortalExitOpened && (!InsideResidence)) + { + creature.teleToLocation(locations[1], instance); + } + } + + } + return null; + } + @Override public String onFirstTalk(Npc npc, Player player) { @@ -970,87 +308,251 @@ public class DwellingOfSpirits extends AbstractInstance return super.onFirstTalk(npc, player); } - // PORTALS - private void enableZoneWind() + private void openPortal(Player player, int id, Instance instance) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_wind"); - if (zone != null) + + if ((id >= 0) && (id < portalSpawnCoordinates.length)) { - zone.setEnabled(true); + int[] coordinates = portalSpawnCoordinates[id]; + int trigger1 = portalConfigs[id][0][0]; + int trigger2 = portalConfigs[id][0][1]; + int kingId = portalConfigs[id][0][2]; + + if ((id >= 0) && (id < PORTAL_MSG.size())) + { + NpcStringId portalMessage = PORTAL_MSG.get(id); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, portalMessage, null)); + } + addSpawn(kingId, coordinates[0], coordinates[1], coordinates[2], coordinates[3], false, 0, false, instance.getId()); + + instance.setParameter("TRIGGER_1_" + id, trigger1); + instance.setParameter("TRIGGER_2_" + id, trigger2); + + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } - private void enableZoneEarth() + private void spawnExitPortal(Instance instance, Player player, int bossId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_earth"); - if (zone != null) + Npc portal; + int portalId; + Location portalLocation; + + final StatSet worldParameters = instance.getParameters(); + worldParameters.set("portalExit" + getPortalByBossId(bossId), true); + + switch (bossId) { - zone.setEnabled(true); + case KING_PROCELLA: + { + portalId = PORTAL_EVENT_WIND; + portalLocation = new Location(212863, 181090, -15487); + break; + } + case KING_PETRAM: + { + portalId = PORTAL_EVENT_EARTH; + portalLocation = new Location(222065, 192767, -15488); + break; + } + case KING_IGNIS: + { + portalId = PORTAL_EVENT_FIRE; + portalLocation = new Location(202349, 170533, -15488); + break; + } + case KING_NEBULA: + { + portalId = PORTAL_EVENT_WATER; + portalLocation = new Location(222127, 170488, -15488); + break; + } + default: + { + return; + } + } + portal = addSpawn(portalId, portalLocation, false, 0, false, instance.getId()); + + if (portal != null) + { + portal.setDisplayEffect(1); + } + + } + + private int getPortalByBossId(int bossId) + { + switch (bossId) + { + case KING_PETRAM: + { + return 0; + } + case KING_IGNIS: + { + return 1; + } + case KING_NEBULA: + { + return 2; + } + case KING_PROCELLA: + { + return 3; + } + default: + return -1; } } - private void enableZoneFire() + private int getPortalIdByZone(int zoneId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_fire"); - if (zone != null) + switch (zoneId) { - zone.setEnabled(true); + case PETRAM_PORTAL_ENTER_ID: + case PETRAM_PORTAL_RETURN_ID: + { + return 0; + } + case IGNIS_PORTAL_ENTER_ID: + case IGNIS_PORTAL_RETURN_ID: + { + return 1; + } + case NEBULA_PORTAL_ENTER_ID: + case NEBULA_PORTAL_RETURN_ID: + { + return 2; + } + case PROCELLA_PORTAL_ENTER_ID: + case PROCELLA_PORTAL_RETURN_ID: + { + return 3; + } + default: + { + return -1; + } } } - private void enableZoneWater() + private Location[] getLocationsForPortal(int portalId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_water"); - if (zone != null) + Location[] locations = new Location[2]; + + switch (portalId) { - zone.setEnabled(true); + case 0: + { + locations[0] = PETRAM_EARTH_L; + locations[1] = PETRAM_EARTH_RETURN_L; + break; + } + case 1: + { + locations[0] = IGNIS_FIRE_L; + locations[1] = IGNIS_FIRE_RETURN_L; + break; + } + case 2: + { + locations[0] = NEBULA_WATER_L; + locations[1] = NEBULA_WATER_RETURN_L; + break; + } + case 3: + { + locations[0] = PROCELLA_WIN_L; + locations[1] = PROCELLA_WIN_RETURN_L; + break; + } + } + + return locations; + } + + private void CheckGeneralResidenceStages(Npc npc, Instance instance) + { + final StatSet worldParameters = instance.getParameters(); + + int portalId = getPortalByBossId(npc.getId()); + + if ((portalId >= 0) && (portalId < portalConfigs.length)) + { + String bossDefeatCountKey = "bossOfPortal_" + portalId + "_defeat_count"; + int currentDefeatCount = worldParameters.getInt(bossDefeatCountKey, 0); + int newDefeatCount = currentDefeatCount + 1; + + worldParameters.set(bossDefeatCountKey, newDefeatCount); + } + + int totalBossDefeatCount = 0; + + for (int i = 0; i < portalConfigs.length; i++) + { + String bossDefeatCountKey = "bossOfPortal_" + i + "_defeat_count"; + totalBossDefeatCount += worldParameters.getInt(bossDefeatCountKey, 0); + } + + worldParameters.set("totalBossDefeatCount", totalBossDefeatCount); + + if (totalBossDefeatCount >= 4) + { + instance.spawnGroup("animael"); + instance.despawnGroup("ruipwave_1"); + instance.despawnGroup("NormalMobs"); } } - private void enableZoneWindExit() + private void handleCentralZone(Instance instance, StatSet worldParameters) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_procella"); - if (zone != null) + for (int id = 0; id < PORTAL_TRIGGER_IDS.length; id++) { - zone.setEnabled(true); - } - } - - private void enableZoneEarthExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_petram"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneFireExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_ignis"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneWaterExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_nebula"); - if (zone != null) - { - zone.setEnabled(true); + int trigger1 = worldParameters.getInt("TRIGGER_1_" + id, -1); + int trigger2 = worldParameters.getInt("TRIGGER_2_" + id, -1); + + if ((trigger1 != -1) && (trigger2 != -1)) + { + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } } private void startEvent(Npc npc, Player player) { - if (!player.getInstanceWorld().getParameters().getBoolean("DwellingOfSpiritsFinished", false)) + final Instance instance = player.getInstanceWorld(); + instance.setParameter("Running", true); + player.getInstanceWorld().broadcastPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); + instance.spawnGroup("ruipwave_1"); + instance.spawnGroup("NormalMobs"); + + if (npc.getId() == SEALSTONE) { - player.sendPacket(new ExSendUIEvent(player, false, false, 1800, 2, NpcStringId.TIME_LEFT)); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(5), null)); - startQuestTimer("check_status", 1000, null, player); + instance.despawnGroup("sealstone"); } + + } + + @Override + public void onInstanceEnter(Player player, Instance instance) + { + boolean Running = instance.getParameters().getBoolean("Running", false); + if ((instance.getRemainingTime() > 0) && Running) + { + player.sendPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + } + } + + @Override + public void onInstanceLeave(Player player, Instance instance) + { + + player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); } public static void main(String[] args) diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java index fb970cd7bd..9d62f7945d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.ai.AttackableAI; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.data.xml.SkillData; import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData; +import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.enums.ShortcutType; import org.l2jmobius.gameserver.enums.SkillFinishType; import org.l2jmobius.gameserver.instancemanager.InstanceManager; @@ -60,6 +61,8 @@ public class TimedHunting extends AbstractInstance private static final int DEBBIE = 34126; // War-Torn Plains 70-79 // Skill private static final int BUFF = 45197; + private static final int BUFF_FOR_KAMAEL = 45198; + // Misc private static final int[] TEMPLATES = { @@ -201,7 +204,14 @@ public class TimedHunting extends AbstractInstance } npc.setTarget(player); - if (!player.getEffectList().isAffectedBySkill(BUFF)) + if (player.getRace() == Race.KAMAEL) + { + if (!player.getEffectList().isAffectedBySkill(BUFF_FOR_KAMAEL)) + { + npc.doCast(new SkillHolder(BUFF_FOR_KAMAEL, 1).getSkill()); + } + } + else if (!player.getEffectList().isAffectedBySkill(BUFF)) { npc.doCast(new SkillHolder(BUFF, 1).getSkill()); } @@ -276,6 +286,7 @@ public class TimedHunting extends AbstractInstance player.sendPacket(new TimedHuntingZoneExit(108)); // Training Zone id. player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_FOR_KAMAEL); instance.setParameter("PlayerIsOut", true); // Restore normal skills. diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/augmentation/options/50100-50199.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/augmentation/options/50100-50199.xml index 5c8d127857..2ee06e3d5b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/augmentation/options/50100-50199.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/augmentation/options/50100-50199.xml @@ -677,38 +677,38 @@ diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49400-49499.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49400-49499.xml index 13470e5417..62ddd060fd 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49400-49499.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49400-49499.xml @@ -1430,13 +1430,23 @@ - + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49500-49599.xml index cfd7f6feaa..767974f422 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49500-49599.xml @@ -386,6 +386,8 @@ + + @@ -441,6 +443,12 @@ + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49800-49899.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49800-49899.xml index 5eb62c0868..5a63678960 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49800-49899.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/49800-49899.xml @@ -789,6 +789,10 @@ + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94100-94199.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94100-94199.xml index 7390ec16e0..d8281a3f52 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94100-94199.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94100-94199.xml @@ -292,6 +292,16 @@ + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94400-94499.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94400-94499.xml index 0ff4305f22..4c521c5978 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94400-94499.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94400-94499.xml @@ -1232,7 +1232,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94500-94599.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94500-94599.xml index 38d37c2962..d60a5bf585 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94500-94599.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94500-94599.xml @@ -190,7 +190,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94600-94699.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94600-94699.xml index b2f5a20ac9..de83d24ef2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94600-94699.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/items/94600-94699.xml @@ -604,7 +604,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/npcs/29100-29199.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/npcs/29100-29199.xml index d2dfc2f8a1..2c03e87d53 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/npcs/29100-29199.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/npcs/29100-29199.xml @@ -3201,7 +3201,7 @@
- +
@@ -3365,7 +3365,7 @@
- +
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/pets/16079_BuffaloCalt.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/pets/16079_BuffaloCalf.xml similarity index 97% rename from L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/pets/16079_BuffaloCalt.xml rename to L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/pets/16079_BuffaloCalf.xml index 55e3ace585..661b584e16 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/pets/16079_BuffaloCalt.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/pets/16079_BuffaloCalf.xml @@ -1,1721 +1,1721 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/01800-01899.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/01800-01899.xml index 212c794527..20af2f530f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/01800-01899.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/01800-01899.xml @@ -1318,6 +1318,7 @@ 1 2 3 + 4 3 KNOCKDOWN diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39100-39199.xml index 56cd390a78..f709c55c8e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39100-39199.xml @@ -57,7 +57,19 @@ icon.etc_reagent_white_i00 + 2 + 1 A1 + 5 + 0 + SELF + SINGLE + + + 500 + DIFF + + icon.sa_cube @@ -2493,6 +2505,59 @@ icon.sa_cube + 1 A1 + -1 + 500 + 500 + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39200-39299.xml index e962f5884c..780f4da277 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39200-39299.xml @@ -2064,7 +2064,7 @@ 1200 1 - 2 + 2 4 60000 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39300-39399.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39300-39399.xml index 4a47932e1c..c9e8c54afb 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39300-39399.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/39300-39399.xml @@ -532,14 +532,14 @@ - + icon.etc_wit_symbol_i01 A1 500 900000 - + icon.etc_wit_symbol_i01 A1 @@ -547,7 +547,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -555,7 +555,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -563,7 +563,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -571,7 +571,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -582,7 +582,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -593,7 +593,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -604,7 +604,7 @@ -671 43 - + icon.etc_wit_symbol_i01 A1 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/40200-40299.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/40200-40299.xml index 98ffc51f35..0c3f2cacee 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/40200-40299.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/40200-40299.xml @@ -620,11 +620,14 @@ 1 94480 5 - 0 - 1 5 PET SINGLE + + + 100000000 + + @@ -642,12 +645,14 @@ A1 1 94517 - 5 - 0 - 1 5 PET SINGLE + + + 2000000000 + + icon.skill0000 @@ -836,6 +841,16 @@ icon.skill0000 A1 + 1 + 94635 + 5 + PET + SINGLE + + + 1000000 + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/45100-45199.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/45100-45199.xml index 151ae7c586..82c0a6adc2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/45100-45199.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/45100-45199.xml @@ -4463,10 +4463,11 @@ icon.skill_kamael_shadowside - A1 + A2 1 600 - BR_EVENT_BUF1 + KAMAEL_TRANSFORM + KAMAEL_BLACK_TRANSFORM;LONG_RAPIER_BLACK_AVE;BLACK_STANCE_AVE 4 20 @@ -4474,9 +4475,21 @@ A2 1 - U_ER_WI_WINDHIDE_AVE TARGET SINGLE + + + TRANSFORM + + + 50 + DIFF + + + 3 + 50 + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47000-47099.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47000-47099.xml index 290884f005..d2dcad7af5 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47000-47099.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47000-47099.xml @@ -2137,6 +2137,7 @@ 1 2 3 + 4 1200 CHEAP_MAGIC @@ -2148,6 +2149,7 @@ 20 30 40 + 40 3 3031 @@ -2163,6 +2165,7 @@ -10 -15 -20 + -20 PER 0 @@ -2172,6 +2175,7 @@ -4 -7 -10 + -10 PER 1 @@ -2181,6 +2185,7 @@ -10 -15 -20 + -20 PER 3 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47200-47299.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47200-47299.xml index f32f682bd2..25b80b1c20 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47200-47299.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/47200-47299.xml @@ -1876,38 +1876,7 @@ icon.s_saint_recovery - P - 5 - 76 - - - - 100 - 47261 - - 1 - 2 - 3 - - - - - 100 - 47262 - - 1 - 2 - 3 - - - - - - - icon.s_saint_recovery - 600 - 1100 - 1 + true A1 5 SELF @@ -1922,10 +1891,35 @@ + + + icon.s_saint_recovery + P + 5 + 76 + + + 100 + 47260 + + 1 + 2 + 3 + + + + 100 + 47262 + + 1 + 2 + 3 + + + + icon.s_saint_recovery - 600 - 1100 1 A1 60000 @@ -3921,7 +3915,7 @@ Creature 1 20 - TARGET + SELF false ALL 53007 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50400-50499.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50400-50499.xml index bbf51c0ab1..186475c245 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50400-50499.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50400-50499.xml @@ -165,8 +165,12 @@ 80 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -266,8 +270,12 @@ 150 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -306,8 +314,6 @@ icon.bless_effect_enchant P - 5 - 1 200 @@ -321,8 +327,12 @@ 200 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50500-50599.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50500-50599.xml index a22c404d64..a3e62f21cb 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50500-50599.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/50500-50599.xml @@ -4324,6 +4324,7 @@ 28 30 32 + 32 DIFF @@ -4630,7 +4631,7 @@ DIFF - + 0 50 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/55200-55299.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/55200-55299.xml index 904bb257fc..5d3458b457 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/55200-55299.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/55200-55299.xml @@ -500,7 +500,7 @@ 1200 ATTACK_TIME_DOWN 1 - 70102 + 70102 75 2 1 diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/documentation.txt index 44d719518a..9908e3de29 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/skills/documentation.txt @@ -12,6 +12,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. @@ -148,6 +150,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveHonorCoins: Gives a given amount of Honor Coins. (l2jmobius) GiveItemByExp: Gives an item when a certain amount of EXP is gathered. (l2jmobius) +GivePetXp: Gives a given amount of XP to a pet. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. GiveXp: Gives a given amount of XP. (l2jmobius) @@ -167,10 +170,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. @@ -211,7 +215,6 @@ MAtk: M. Atk. stat. MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius) MaxCp: Max. CP stat. MaxHp: Max. HP stat. -MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius) MaxMp: Max. MP stat. ModifyBeastPoints: Modifies player Beast Point count. (l2jmobius) ModifyCraftPoints: Modifies player Craft Point count. (l2jmobius) @@ -280,6 +283,7 @@ RearDamage: Multiplier for damage done from behind the target. (l2jmobius) RebalanceHP: Balances targets' current HP. RebalanceHPSummon: Balances targets' current HP for summons. RecoverVitalityInPeaceZone: Recover periodically vitality when player is in a peace zone. (l2jmobius) +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_Essence_6.3_Crusader/dist/game/data/xsd/DailyMission.xsd b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/DailyMission.xsd index 35f2f6dc35..28d8ddeac4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/DailyMission.xsd +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/DailyMission.xsd @@ -33,8 +33,8 @@ - - + + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd index 02d5bc1963..56b8adce72 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd @@ -24,6 +24,7 @@ + @@ -40,6 +41,7 @@ + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/PetExtractData.xsd b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/PetExtractData.xsd new file mode 100644 index 0000000000..e9115b614a --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/PetExtractData.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/no_landing.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/no_landing.xml index 4b280f64a8..88b454d0db 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/no_landing.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/no_landing.xml @@ -58,4 +58,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/teleportzones.xml index 19a95e0456..d0510c8833 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/teleportzones.xml +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/zones/teleportzones.xml @@ -1,81 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/Config.java index 3596459291..253082732c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/Config.java @@ -646,6 +646,7 @@ public class Config public static boolean ENABLE_AUTO_ITEM; public static boolean AUTO_PLAY_ATTACK_ACTION; public static boolean RESUME_AUTO_PLAY; + public static boolean ENABLE_AUTO_ASSIST; public static AbnormalVisualEffect BLUE_TEAM_ABNORMAL_EFFECT; public static AbnormalVisualEffect RED_TEAM_ABNORMAL_EFFECT; public static int SHARING_LOCATION_COST; @@ -1356,6 +1357,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; @@ -2340,6 +2342,7 @@ public class Config ENABLE_AUTO_ITEM = generalConfig.getBoolean("EnableAutoItem", true); AUTO_PLAY_ATTACK_ACTION = generalConfig.getBoolean("AutoPlayAttackAction", true); RESUME_AUTO_PLAY = generalConfig.getBoolean("ResumeAutoPlay", false); + ENABLE_AUTO_ASSIST = generalConfig.getBoolean("AssistLeader", false); BLUE_TEAM_ABNORMAL_EFFECT = null; final String blueTeamAve = generalConfig.getString("BlueTeamAbnormalEffect", "").trim(); if (!blueTeamAve.isEmpty()) @@ -3514,6 +3517,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/GameServer.java index c03828630a..8bdaaf0c14 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/GameServer.java @@ -98,6 +98,7 @@ import org.l2jmobius.gameserver.data.xml.NpcNameLocalisationData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.data.xml.PetAcquireList; import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; import org.l2jmobius.gameserver.data.xml.PetSkillData; import org.l2jmobius.gameserver.data.xml.PetTypeData; import org.l2jmobius.gameserver.data.xml.PlayerTemplateData; @@ -345,6 +346,8 @@ public class GameServer CharInfoTable.getInstance(); AdminData.getInstance(); PetDataTable.getInstance(); + PetTypeData.getInstance(); + PetExtractData.getInstance(); CubicData.getInstance(); CharSummonTable.getInstance().init(); BeautyShopData.getInstance(); @@ -394,7 +397,6 @@ public class GameServer CrestTable.getInstance(); TeleportListData.getInstance(); SharedTeleportManager.getInstance(); - PetTypeData.getInstance(); TeleporterData.getInstance(); TimedHuntingZoneData.getInstance(); MatchingRoomManager.getInstance(); diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/ai/SummonAI.java index 96cef785c0..13ce9b1224 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index b364734ec8..b635c5088e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ActionData.java index 27860b8144..22da7987bd 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index 47ed7421e8..2995e359c4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java index 251a0d3cbe..1368675c36 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java @@ -107,6 +107,7 @@ public class LimitShopClanData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -185,11 +186,12 @@ public class LimitShopClanData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java index 60350c6209..48e31e400e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java @@ -126,7 +126,9 @@ public class LimitShopCraftData implements IXmlReader boolean announce3 = false; boolean announce4 = false; boolean announce5 = false; + int enchant = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -217,6 +219,7 @@ public class LimitShopCraftData implements IXmlReader count = parseLong(attrs, "count", 1L); chance = parseFloat(attrs, "chance", 100f); announce = parseBoolean(attrs, "announce", false); + enchant = parseInteger(attrs, "enchant", 0); productionId2 = parseInteger(attrs, "id2", 0); count2 = parseLong(attrs, "count2", 1L); chance2 = parseFloat(attrs, "chance2", 100f); @@ -233,6 +236,7 @@ public class LimitShopCraftData implements IXmlReader count5 = parseLong(attrs, "count5", 1L); announce5 = parseBoolean(attrs, "announce5", false); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -244,7 +248,7 @@ public class LimitShopCraftData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, enchant, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java index 0bdd0c2ba5..49a8e17546 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java @@ -109,6 +109,7 @@ public class LimitShopData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -197,6 +198,7 @@ public class LimitShopData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -208,7 +210,7 @@ public class LimitShopData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java new file mode 100644 index 0000000000..e53f5ca3cd --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java @@ -0,0 +1,107 @@ +/* + * 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.data.xml; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Logger; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +import org.l2jmobius.commons.util.IXmlReader; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; + +/** + * @author Geremy + */ +public class PetExtractData implements IXmlReader +{ + private static final Logger LOGGER = Logger.getLogger(PetExtractData.class.getName()); + // > + private final Map> _extractionData = new HashMap<>(); + + protected PetExtractData() + { + load(); + } + + @Override + public void load() + { + _extractionData.clear(); + parseDatapackFile("data/PetExtractData.xml"); + LOGGER.info(getClass().getSimpleName() + ": Loaded " + _extractionData.size() + " pet extraction data."); + } + + @Override + public void parseDocument(Document doc, File f) + { + for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) + { + if ("list".equalsIgnoreCase(n.getNodeName())) + { + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if ("extraction".equalsIgnoreCase(d.getNodeName())) + { + final NamedNodeMap attrs = d.getAttributes(); + final int petId = parseInteger(attrs, "petId"); + final int petLevel = parseInteger(attrs, "petLevel"); + final long extractExp = parseLong(attrs, "extractExp"); + final int extractItem = parseInteger(attrs, "extractItem"); + final int defaultCostId = parseInteger(attrs, "defaultCostId"); + final int defaultCostCount = parseInteger(attrs, "defaultCostCount"); + final int extractCostId = parseInteger(attrs, "extractCostId"); + final int extractCostCount = parseInteger(attrs, "extractCostCount"); + Map data = _extractionData.get(petId); + if (data == null) + { + data = new HashMap<>(); + _extractionData.put(petId, data); + } + data.put(petLevel, new PetExtractionHolder(petId, petLevel, extractExp, extractItem, new ItemHolder(defaultCostId, defaultCostCount), new ItemHolder(extractCostId, extractCostCount))); + } + } + } + } + } + + public PetExtractionHolder getExtraction(int petId, int petLevel) + { + final Map map = _extractionData.get(petId); + if (map == null) + { + LOGGER.warning(getClass().getSimpleName() + ": Missing pet extraction data: [PetId: " + petId + "] [PetLevel: " + petLevel + "]"); + return null; + } + return map.get(petLevel); + } + + public static PetExtractData getInstance() + { + return SingletonHolder.INSTANCE; + } + + private static class SingletonHolder + { + protected static final PetExtractData INSTANCE = new PetExtractData(); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/SkillData.java index 7da7b6a28d..60e1308527 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/SkillData.java @@ -548,9 +548,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 58610a8de5..b608fff1f7 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/CategoryType.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/CategoryType.java index cdae920634..1143f13786 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/CategoryType.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/CategoryType.java @@ -36,6 +36,7 @@ public enum CategoryType STRIDER, WOLF_GROUP, WYVERN_GROUP, + PET_GROUP, SUBJOB_GROUP_KNIGHT, HUMAN_FALL_CLASS, HUMAN_MALL_CLASS, diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index 08704fdc13..2adc6400a8 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 40b4ea1c3d..ae43e8d744 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 316b882925..e7b09a8590 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -65,7 +65,7 @@ public class DailyTaskManager private static final Set RESET_SKILLS = new HashSet<>(); static { - // No known skills. + RESET_SKILLS.add(39199); // Hero's Wondrous Cubic } public static final Set RESET_ITEMS = new HashSet<>(); static @@ -131,6 +131,11 @@ public class DailyTaskManager resetHuntPass(); } + if (calendar.get(Calendar.DAY_OF_MONTH) == 1) + { + resetMontlyLimitShopData(); + } + // Daily tasks. resetClanBonus(); resetClanContributionList(); @@ -688,6 +693,31 @@ public class DailyTaskManager LOGGER.info("LimitShopData has been resetted."); } + private void resetMontlyLimitShopData() + { + for (LimitShopProductHolder holder : LimitShopData.getInstance().getProducts()) + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement("DELETE FROM account_gsdata WHERE var=?")) + { + ps.setString(1, AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + ps.executeUpdate(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset LimitShopData: " + e); + } + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getAccountVariables().remove(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + player.getAccountVariables().storeMe(); + } + } + LOGGER.info("LimitShopData has been resetted."); + } + private void resetHuntPass() { // Update data for offline players. diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/IdManager.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/IdManager.java index 96a825d4bc..c20c4d800a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/IdManager.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/IdManager.java @@ -100,6 +100,7 @@ public class IdManager cleanCount += statement.executeUpdate("DELETE FROM character_shortcuts WHERE character_shortcuts.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills WHERE character_skills.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills_save WHERE character_skills_save.charId NOT IN (SELECT charId FROM characters);"); + cleanCount += statement.executeUpdate("DELETE FROM character_spirits WHERE character_spirits.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_subclasses WHERE character_subclasses.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_instance_time WHERE character_instance_time.charId NOT IN (SELECT charId FROM characters);"); diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java index bdb397e3e1..ea940b280d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java @@ -250,7 +250,7 @@ public class PurgeRankingManager { } } - return top5.entrySet().stream().sorted(Map.Entry. comparingByValue().reversed()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); + return top5.entrySet().stream().sorted(Entry. comparingByValue().reversed()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); } public SimpleEntry getPlayerRating(int category, int charId) diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index 030cf75135..8e34eea3d6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ShortCuts.java index 0c2f5d59de..0b7ad4e019 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Creature.java index fbd73b2a2c..033090198a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1318,7 +1318,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)) @@ -2846,7 +2846,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); } @@ -2859,189 +2859,151 @@ 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; - } - case ELEMENTAL_SPIRIT_EARTH_ATTACK: - case ELEMENTAL_SPIRIT_EARTH_DEFENSE: - case ELEMENTAL_SPIRIT_FIRE_ATTACK: - case ELEMENTAL_SPIRIT_FIRE_DEFENSE: - case ELEMENTAL_SPIRIT_WATER_ATTACK: - case ELEMENTAL_SPIRIT_WATER_DEFENSE: - case ELEMENTAL_SPIRIT_WIND_ATTACK: - case ELEMENTAL_SPIRIT_WIND_DEFENSE: - { - info.addComponentType(UserInfoType.ATT_SPIRITS); - 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; + } + case ELEMENTAL_SPIRIT_EARTH_ATTACK: + case ELEMENTAL_SPIRIT_EARTH_DEFENSE: + case ELEMENTAL_SPIRIT_FIRE_ATTACK: + case ELEMENTAL_SPIRIT_FIRE_DEFENSE: + case ELEMENTAL_SPIRIT_WATER_ATTACK: + case ELEMENTAL_SPIRIT_WATER_DEFENSE: + case ELEMENTAL_SPIRIT_WIND_ATTACK: + case ELEMENTAL_SPIRIT_WIND_DEFENSE: + { + info.addComponentType(UserInfoType.ATT_SPIRITS); + 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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Player.java index f895785975..8635fdd25e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -393,7 +393,7 @@ import org.l2jmobius.gameserver.network.serverpackets.elementalspirits.Elemental import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus; import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimeRestrictFieldDieLimitTime; import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCount; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.network.serverpackets.surveillance.ExUserWatcherTargetStatus; import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo; import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; @@ -4761,7 +4761,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -7141,7 +7141,11 @@ public class Player extends Playable player.setOnlineStatus(true, false); PlayerAutoSaveTaskManager.getInstance().add(player); - player.getAchievementBox().restore(); + + if (Config.ENABLE_ACHIEVEMENT_BOX) + { + player.getAchievementBox().restore(); + } } catch (Exception e) { @@ -8784,9 +8788,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; + } } } } @@ -11054,7 +11062,7 @@ public class Player extends Playable _pet.setFollowStatus(true); _pet.setInstance(getInstanceWorld()); _pet.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(_pet, 0)); + sendPacket(new PetSummonInfo(_pet, 0)); } getServitors().values().forEach(s -> @@ -11065,7 +11073,7 @@ public class Player extends Playable s.setFollowStatus(true); s.setInstance(getInstanceWorld()); s.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(s, 0)); + sendPacket(new PetSummonInfo(s, 0)); }); // Show movie if available. diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Summon.java index 0f727474f4..068dbe6a69 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/Summon.java @@ -74,10 +74,10 @@ import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetDelete; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.PetInventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.pet.PetItemList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetStatusUpdate; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; public abstract class Summon extends Playable @@ -134,7 +134,7 @@ public abstract class Summon extends Playable { if (isPet()) { - sendPacket(new PetInfo(this, 1)); + sendPacket(new PetSummonInfo(this, 1)); sendPacket(new ExPetSkillList(true, (Pet) this)); if (getInventory() != null) { @@ -228,7 +228,7 @@ public abstract class Summon extends Playable { if (player == _owner) { - player.sendPacket(new PetInfo(this, 1)); + player.sendPacket(new PetSummonInfo(this, 1)); return; } @@ -392,7 +392,7 @@ public abstract class Summon extends Playable @Override public void onDecay() { - super.onDecay(); + unSummon(_owner); deleteMe(_owner); } @@ -879,7 +879,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); @@ -900,7 +900,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)); + } }); } @@ -925,7 +932,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())); @@ -933,7 +940,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)); + } } } @@ -979,7 +993,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(); } @@ -1166,7 +1180,7 @@ public abstract class Summon extends Playable { owner.sendPacket(new PetItemList(getInventory().getItems())); } - owner.sendPacket(new PetInfo(this, 1)); + owner.sendPacket(new PetSummonInfo(this, 1)); } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 9c506b6c6b..d737078f98 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index c8f288a792..66f84ae5fa 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index f4cc079630..f7e71e5136 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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,33 +976,6 @@ 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 { @@ -1011,9 +985,17 @@ public class CreatureStat // 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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 9adda5dc3f..b728eedc21 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 6faefa8b48..fecc972ecc 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index 0417bcbc41..18e9d5b27e 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 97397f753f..9d5faa0c61 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index eb10918430..3a194d1660 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index a74b2b512b..88b2588f04 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2216,6 +2216,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java index f72c9ddc4d..ac357b3fa1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java @@ -32,6 +32,7 @@ public class LimitShopProductHolder private final long _count; private final float _chance; private final boolean _announce; + private final int _enchant; private final int _productionId2; private final long _count2; private final float _chance2; @@ -48,9 +49,10 @@ public class LimitShopProductHolder private final long _count5; private final boolean _announce5; private final int _accountDailyLimit; + private final int _accountMontlyLimit; private final int _accountBuyLimit; - public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountBuyLimit) + public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int enchant, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountMontlyLimit, int accountBuyLimit) { _id = id; _category = category; @@ -63,6 +65,7 @@ public class LimitShopProductHolder _count = count; _chance = chance; _announce = announce; + _enchant = enchant; _productionId2 = productionId2; _count2 = count2; _chance2 = chance2; @@ -79,6 +82,7 @@ public class LimitShopProductHolder _count5 = count5; _announce5 = announce5; _accountDailyLimit = accountDailyLimit; + _accountMontlyLimit = accountMontlyLimit; _accountBuyLimit = accountBuyLimit; } @@ -137,6 +141,11 @@ public class LimitShopProductHolder return _announce; } + public int getEnchant() + { + return _enchant; + } + public int getProductionId2() { return _productionId2; @@ -217,6 +226,11 @@ public class LimitShopProductHolder return _accountDailyLimit; } + public int getAccountMontlyLimit() + { + return _accountMontlyLimit; + } + public int getAccountBuyLimit() { return _accountBuyLimit; diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java new file mode 100644 index 0000000000..bc54fd0c63 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java @@ -0,0 +1,70 @@ +/* + * 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.model.holders; + +/** + * @author Geremy + */ +public class PetExtractionHolder +{ + private final int _petId; + private final int _petLevel; + private final long _extractExp; + private final int _extractItem; + private final ItemHolder _defaultCost; + private final ItemHolder _extractCost; + + public PetExtractionHolder(int petId, int petLevel, long extractExp, int extractItem, ItemHolder defaultCost, ItemHolder extractCost) + { + _petId = petId; + _petLevel = petLevel; + _extractExp = extractExp; + _extractItem = extractItem; + _defaultCost = defaultCost; + _extractCost = extractCost; + } + + public int getPetId() + { + return _petId; + } + + public int getPetLevel() + { + return _petLevel; + } + + public long getExtractExp() + { + return _extractExp; + } + + public int getExtractItem() + { + return _extractItem; + } + + public ItemHolder getDefaultCost() + { + return _defaultCost; + } + + public ItemHolder getExtractCost() + { + return _extractCost; + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/item/instance/Item.java index 718fa3dfed..75a80ae15a 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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; @@ -72,12 +74,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPi import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; 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; @@ -92,6 +96,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; @@ -1641,7 +1646,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); @@ -2575,6 +2582,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); @@ -2604,6 +2616,8 @@ public class Item extends WorldObject public void onVisualLifeTimeEnd(boolean announce) { + removeVisualSetSkills(); + final ItemVariables vars = getVariables(); vars.remove(ItemVariables.VISUAL_ID); vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID); @@ -2653,6 +2667,124 @@ public class Item extends WorldObject vars.storeMe(); } + 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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index cdf42e7a80..2399b7fc05 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -898,7 +898,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(playable, item, Item::getVisualId)) { update = true; @@ -1050,7 +1051,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(playable, item, Item::getVisualId)) { remove = true; diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/siege/FortSiege.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/siege/FortSiege.java index c128c12ecf..c16afcf700 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/siege/FortSiege.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/siege/FortSiege.java @@ -268,7 +268,7 @@ public class FortSiege extends ListenersContainer implements Siegable } ThreadPool.schedule(new ScheduleStartSiegeTask(nextTask), _initialDelayInMilliseconds - (nextTask * 1000)); // Prepare task for @nextTask minutes left. - LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); + // LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); } else if ((_time == 3600) && (_fortInst.getResidenceId() != FortManager.ORC_FORTRESS)) // 1hr remains diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 4efe3e480c..3b05f1119d 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -691,7 +691,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(); } @@ -714,7 +714,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(); } @@ -749,7 +749,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/Stat.java index 69f707fd5d..3db59fbfcd 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -97,6 +97,7 @@ public enum Stat HATE_ATTACK("attackHate"), REAR_DAMAGE_RATE("rearDamage"), AUTO_ATTACK_DAMAGE_BONUS("autoAttackDamageBonus"), + IGNORE_REDUCE_DAMAGE("ignoreReduceDamage"), // ELEMENTAL SPIRITS ELEMENTAL_SPIRIT_FIRE_ATTACK("elementalSpiritFireAttack"), @@ -150,7 +151,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()), MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0), DEFENCE_CRITICAL_RATE("defCritRate"), diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 647873dac0..6cc98e9690 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -44,7 +44,18 @@ public class MCritRateFinalizer implements IStatFunction final double physicalBonus = (creature.getStat().getMul(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 1) - 1) * creature.getStat().getCriticalHit(); final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1; - return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 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) + physicalBonus), 0, maxMagicalCritRate); } @Override diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index c305987ba6..c29c9ba398 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java @@ -93,6 +93,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 8ab5a6ea58..c55b35b2ee 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index c5257ff589..1aff35bfd5 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java @@ -95,6 +95,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java index fc8fc5e8e6..cb7a29e736 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java @@ -46,6 +46,7 @@ public class AccountVariables extends AbstractVariables public static final String PRIME_SHOP_PRODUCT_DAILY_COUNT = "PSPDailyCount"; public static final String LCOIN_SHOP_PRODUCT_COUNT = "LCSCount"; public static final String LCOIN_SHOP_PRODUCT_DAILY_COUNT = "LCSDailyCount"; + public static final String LCOIN_SHOP_PRODUCT_MONTLY_COUNT = "LCSMontlyCount"; public static final String VIP_POINTS = "VipPoints"; public static final String VIP_TIER = "VipTier"; public static final String VIP_EXPIRATION = "VipExpiration"; diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/ZoneType.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/ZoneType.java index ae0b7f5853..736f4f70d6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/ZoneType.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/ZoneType.java @@ -36,6 +36,8 @@ import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneEnter; import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneExit; import org.l2jmobius.gameserver.model.instancezone.Instance; import org.l2jmobius.gameserver.model.interfaces.ILocational; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; /** @@ -215,6 +217,10 @@ public abstract class ZoneType extends ListenersContainer // Check level if ((creature.getLevel() < _minLevel) || (creature.getLevel() > _maxLevel)) { + if (creature.isPlayer()) + { + creature.getActingPlayer().sendPacket(new ExShowScreenMessage(SystemMessageId.YOU_CANNOT_ENTER_AS_YOUR_LEVEL_DOESN_T_MEED_THE_REQUIREMENTS, ExShowScreenMessage.TOP_CENTER, 10000)); + } return false; } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java index 535aabfa2d..1b32a7b69f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.model.zone.type; +import org.l2jmobius.gameserver.enums.InstanceType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.zone.ZoneType; @@ -32,6 +33,7 @@ public class TeleportZone extends ZoneType public TeleportZone(int id) { super(id); + setTargetType(InstanceType.Player); // Default only player. } @Override diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/ExClientPackets.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/ExClientPackets.java index 0e1343d7c3..1790841606 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/ExClientPackets.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/ExClientPackets.java @@ -144,6 +144,7 @@ import org.l2jmobius.gameserver.network.clientpackets.newhenna.RequestNewHennaUn import org.l2jmobius.gameserver.network.clientpackets.pet.ExEvolvePet; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetEquipItem; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetUnequipItem; +import org.l2jmobius.gameserver.network.clientpackets.pet.ExTryPetExtractSystem; import org.l2jmobius.gameserver.network.clientpackets.pet.RequestExAcquirePetSkill; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyDelete; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyInfoList; @@ -705,7 +706,7 @@ public enum ExClientPackets EX_PLEDGE_ENEMY_INFO_LIST(0x1C9, RequestExPledgeEnemyInfoList::new, ConnectionState.IN_GAME), EX_PLEDGE_ENEMY_REGISTER(0x1CA, RequestExPledgeEnemyRegister::new, ConnectionState.IN_GAME), EX_PLEDGE_ENEMY_DELETE(0x1CB, RequestExPledgeEnemyDelete::new, ConnectionState.IN_GAME), - EX_TRY_PET_EXTRACT_SYSTEM(0x1CC, null, ConnectionState.IN_GAME), + EX_TRY_PET_EXTRACT_SYSTEM(0x1CC, ExTryPetExtractSystem::new, ConnectionState.IN_GAME), EX_PLEDGE_V3_SET_ANNOUNCE(0x1CD, RequestExPledgeV3SetAnnounce::new, ConnectionState.IN_GAME), // 306 EX_RANKING_FESTIVAL_OPEN(0x1CE, null, ConnectionState.IN_GAME), diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index ba2c4213f5..a3b98e8c66 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java @@ -108,6 +108,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) { @@ -644,7 +649,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index 877179d829..ee724ce9ed 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 14c84055da..63f5c4a527 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index e65beefde7..6e18092aa1 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -226,7 +226,7 @@ public class UseItem implements ClientPacket } // Prevent Death Knight players to equip other weapons. - if (item.isWeapon() && (CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId())) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) + if (item.isWeapon() && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; @@ -247,7 +247,7 @@ public class UseItem implements ClientPacket } // Prevent Sylph players to equip other weapons. - if (item.isWeapon() && (player.getRace() == Race.SYLPH) && (item.getWeaponItem().getItemType() != WeaponType.PISTOLS)) + if (item.isWeapon() && (player.getRace() == Race.SYLPH) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && (item.getWeaponItem().getItemType() != WeaponType.PISTOLS)) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index 20651eb32a..7309463ac0 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java index bb93eb975d..ddbe4f35f4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java @@ -103,10 +103,6 @@ public class RequestEnchantItem implements ClientPacket player.removeRequest(request.getClass()); return; } - if (item.getEnchantLevel() != request.getEnchantLevel()) - { - item.setEnchantLevel(request.getEnchantLevel()); - } // Template for scroll. final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java index 6bab3000be..7881bcedc9 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java @@ -112,26 +112,9 @@ public class RequestHuntPassReward implements ClientPacket return; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); huntPass.setRewardAlert(false); player.sendPacket(new HuntPassInfo(player, _huntPassType)); @@ -157,4 +140,39 @@ public class RequestHuntPassReward implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java index d53d94114c..6547861f11 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java @@ -115,26 +115,9 @@ public class RequestHuntPassRewardAll implements ClientPacket break REWARD_LOOP; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); } if (!inventoryLimitReached) @@ -165,4 +148,39 @@ public class RequestHuntPassRewardAll implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index f58d33cb4f..d619ffeb61 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -154,6 +154,25 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket return; } } + else if (_product.getAccountMontlyLimit() > 0) + { + final long amount = _product.getAccountMontlyLimit() * _amount; + if (amount < 1) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + if (player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) >= amount) + { + player.sendMessage("You have reached your montly limit."); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + + } else if (_product.getAccountBuyLimit() > 0) // Count limit. { final long amount = _product.getAccountBuyLimit() * _amount; @@ -175,7 +194,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket } // Check existing items. - final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), _product.getAccountDailyLimit())); + final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), Math.max(_product.getAccountDailyLimit(), _product.getAccountMontlyLimit()))); for (int i = 0; i < _product.getIngredientIds().length; i++) { if (_product.getIngredientIds()[i] == 0) @@ -326,7 +345,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket if (Rnd.get(100) < _product.getChance()) { rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount()); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -373,7 +392,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket else if (Rnd.get(100) < _product.getChance()) { rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0)); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -385,6 +404,10 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), 0) + _amount); } + if (_product.getAccountMontlyLimit() > 0) + { + player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) + _amount); + } else if (_product.getAccountBuyLimit() > 0) { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), 0) + _amount); diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 9db3b480e4..1c14350e13 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -230,7 +230,7 @@ public class ExPetEquipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java index 921c0695d5..26ac16dc19 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java @@ -17,7 +17,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -183,7 +183,7 @@ public class ExPetUnequipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java new file mode 100644 index 0000000000..6bb1753d14 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java @@ -0,0 +1,115 @@ +/* + * 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.clientpackets.pet; + +import org.l2jmobius.commons.network.ReadablePacket; +import org.l2jmobius.gameserver.data.xml.NpcData; +import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; +import org.l2jmobius.gameserver.model.PetData; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.actor.instance.Pet; +import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.itemcontainer.PetInventory; +import org.l2jmobius.gameserver.model.itemcontainer.PlayerInventory; +import org.l2jmobius.gameserver.network.GameClient; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; +import org.l2jmobius.gameserver.network.serverpackets.pet.ResultPetExtractSystem; + +/** + * @author Geremy + */ +public class ExTryPetExtractSystem implements ClientPacket +{ + private int _itemObjId; + + @Override + public void read(ReadablePacket packet) + { + _itemObjId = packet.readInt(); + } + + @Override + public void run(GameClient client) + { + final Player player = client.getPlayer(); + if (player == null) + { + return; + } + + final Item petItem = player.getInventory().getItemByObjectId(_itemObjId); + if ((petItem == null) || ((player.getPet() != null) && (player.getPet().getControlItem() == petItem))) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + final PetData petData = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()); + final NpcTemplate npcTemplate = NpcData.getInstance().getTemplate(petData.getNpcId()); + final Pet pet = new Pet(npcTemplate, player, petItem); + final PetInventory petInventory = pet.getInventory(); + final PlayerInventory playerInventory = player.getInventory(); + if ((petInventory == null) || (playerInventory == null)) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + if (!playerInventory.validateWeight(petInventory.getTotalWeight()) || !playerInventory.validateCapacity(petInventory.getSize())) + { + player.sendPacket(SystemMessageId.THERE_ARE_ITEMS_IN_THE_PET_S_INVENTORY_TAKE_THEM_OUT_FIRST); + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + petInventory.transferItemsToOwner(); + + final Pet petInfo = Pet.restore(petItem, NpcData.getInstance().getTemplate(petData.getNpcId()), player); + final int petId = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()).getType(); + final int petLevel = petInfo.getLevel(); + final PetExtractionHolder holder = PetExtractData.getInstance().getExtraction(petId, petLevel); + if (holder != null) + { + final int extractItemId = holder.getExtractItem(); + final int extractItemCount = (int) (petInfo.getStat().getExp() / holder.getExtractExp()); + final int extractCostId = holder.getExtractCost().getId(); + final long extractCostCount = holder.getExtractCost().getCount() * extractItemCount; + final int defaultCostId = holder.getDefaultCost().getId(); + final long defaultCostCount = holder.getDefaultCost().getCount(); + if ((player.getInventory().getInventoryItemCount(extractCostId, -1) >= extractCostCount) && (player.getInventory().getInventoryItemCount(defaultCostId, -1) >= defaultCostCount)) + { + if (player.destroyItemByItemId("Pet Extraction", extractCostId, extractCostCount, player, true) && player.destroyItemByItemId("Pet Extraction", defaultCostId, defaultCostCount, player, true) && player.destroyItem("Pet Extraction", petItem, player, true)) + { + player.addItem("Pet Extraction", extractItemId, extractItemCount, player, true); + player.sendPacket(new ResultPetExtractSystem(true)); + } + } + else + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT); + player.sendPacket(new ResultPetExtractSystem(false)); + } + return; + } + + player.sendPacket(new ResultPetExtractSystem(false)); + } +} diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java index 2cf1ef176b..0266b0eff5 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java @@ -46,7 +46,7 @@ public class ExRequestRandomCraftExtract implements ClientPacket { final int objId = packet.readInt(); final long count = packet.readLong(); - if (count > 1) + if (count > 0) { _items.put(objId, count); } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java index 39ee21e7dd..64b279d2dc 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java @@ -48,6 +48,11 @@ public class RequestSubjugationGacha implements ClientPacket @Override public void run(GameClient client) { + if ((_amount < 1) || ((_amount * 20000L) < 1)) + { + return; + } + final Player player = client.getPlayer(); if (player == null) { diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index a8f4142ab3..07ed7641a9 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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,132 +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, 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, 96, 97, 98, - 99, 100, - 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, - 1168, 1169, 1170, 1171, - 1172, 1173, - 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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index a49f41ca7f..2e12fcbc85 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java index 936b64a402..4a9ed2717f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java @@ -118,7 +118,7 @@ public class MultiSellList extends AbstractItemPacket } writeLong(_list.getProductCount(product)); writeShort(product.getEnchantmentLevel() > 0 ? product.getEnchantmentLevel() : displayItemEnchantment != null ? displayItemEnchantment.getEnchantLevel() : 0); // enchant level - writeInt((int) product.getChance() * 1000000); // chance + writeInt((int) (product.getChance() * 1000000)); // chance writeItemAugment(displayItemEnchantment); writeItemElemental(displayItemEnchantment); writeItemEnsoulOptions(displayItemEnchantment); diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index 6ee1d5c660..db417bf89f 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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); @@ -170,7 +170,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); @@ -330,9 +330,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)) { @@ -350,11 +350,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()); } @@ -378,9 +378,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)) { @@ -410,7 +410,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index 05aaedf2c5..46c9ccb5a9 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 944e376e63..851b53dc09 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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,14 +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); // item augment id - writeInt(0); // 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: diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 678f0f29e1..8e3bc2f155 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index bbd799b4a4..c14c273183 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java @@ -68,7 +68,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); @@ -149,7 +149,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()) { @@ -249,9 +249,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)) { @@ -269,11 +269,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()); } @@ -297,9 +297,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)) @@ -330,7 +329,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java index 8e5c5f7765..22eb4ac7d4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java @@ -83,6 +83,17 @@ public class ExPurchaseLimitShopItemListNew extends ServerPacket writeInt(product.getAccountDailyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + product.getProductionId(), 0)); } } + else if (product.getAccountMontlyLimit() > 0) + { + if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0) >= product.getAccountMontlyLimit()) + { + writeInt(0); + } + else + { + writeInt(product.getAccountMontlyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0)); + } + } else if (product.getAccountBuyLimit() > 0) // Count limit. { if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + product.getProductionId(), 0) >= product.getAccountBuyLimit()) diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java index 69ec489ca4..0611f335b7 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java @@ -68,7 +68,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); @@ -142,7 +142,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()) { @@ -241,9 +241,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)) { @@ -261,11 +261,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()); } @@ -289,9 +289,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)) @@ -322,7 +321,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java similarity index 98% rename from L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java rename to L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java index bfe3bf45a8..56cbbf532b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java @@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; /** * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon */ -public class PetInfo extends ServerPacket +public class PetSummonInfo extends ServerPacket { private final Summon _summon; private final int _value; @@ -49,7 +49,7 @@ public class PetInfo extends ServerPacket private int _curFed; private int _statusMask = 0; - public PetInfo(Summon summon, int value) + public PetSummonInfo(Summon summon, int value) { _summon = summon; _moveMultiplier = summon.getMovementSpeedMultiplier(); diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java new file mode 100644 index 0000000000..0deca5b570 --- /dev/null +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java @@ -0,0 +1,40 @@ +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ResultPetExtractSystem extends ServerPacket +{ + private final boolean _success; + + public ResultPetExtractSystem(boolean success) + { + _success = success; + } + + @Override + public void write() + { + ServerPackets.EX_RESULT_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(_success); + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10906_ChasingTheLight.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java similarity index 61% rename from L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10906_ChasingTheLight.java rename to L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java index 538344d77e..29683dc5a5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10906_ChasingTheLight.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java @@ -1,36 +1,35 @@ -/* - * 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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10906_ChasingTheLight extends Quest -{ - private static final int START_NPC = 34599; - - public Q10906_ChasingTheLight() - { - super(10906); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ShowPetExtractSystem extends ServerPacket +{ + public static final ShowPetExtractSystem STATIC_PACKET = new ShowPetExtractSystem(); + + @Override + public void write() + { + ServerPackets.EX_SHOW_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(0); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index d6e032a4c7..2bfee034a2 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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,11 +26,13 @@ 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; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.Summon; +import org.l2jmobius.gameserver.model.actor.instance.Pet; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.zone.ZoneId; @@ -42,9 +45,12 @@ 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; + private static final Integer PET_ATTACK_ACTION = 16; + private static final Integer SUMMON_ATTACK_ACTION = 22; protected AutoPlayTaskManager() { @@ -94,6 +100,25 @@ public class AutoPlayTaskManager } else if ((creature.getTarget() == player) || (creature.getTarget() == null)) { + // Pet Attack. + final Pet pet = player.getPet(); + if ((pet != null) && player.getAutoUseSettings().getAutoActions().contains(PET_ATTACK_ACTION) && pet.hasAI() && !pet.isMoving() && !pet.isDisabled() && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature)) + { + pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature); + } + + // Summon Attack. + if (player.hasSummon() && player.getAutoUseSettings().getAutoActions().contains(SUMMON_ATTACK_ACTION)) + { + 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); + } + } + } + // We take granted that mage classes do not auto hit. if (isMageCaster(player)) { @@ -122,23 +147,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); } } } @@ -146,6 +180,9 @@ public class AutoPlayTaskManager } } + // Reset idle count. + IDLE_COUNT.remove(player); + // Pickup. if (player.getAutoPlaySettings().doPickup()) { @@ -180,32 +217,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 */) && (targetMode != 4 /* Counterattack */) ? 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 */) && (targetMode != 4 /* Counterattack */) ? 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; + } } } } @@ -256,7 +316,7 @@ public class AutoPlayTaskManager } case 4: // Counterattack { - return creature.isMonster() || (creature.isPlayable() && creature.isAutoAttackable(player)); + return creature.isMonster() || (creature.isPlayer() && ((creature.getTarget() == player) && (creature.getActingPlayer().getEinhasadOverseeingLevel() >= 1))); } default: // Any Target { @@ -315,6 +375,7 @@ public class AutoPlayTaskManager { player.getPet().followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 574af07cdd..473fcb12a6 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java @@ -36,7 +36,9 @@ 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.instance.Pet; +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; @@ -47,12 +49,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 @@ -429,8 +431,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; } @@ -442,7 +445,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); + } + } } } } @@ -525,6 +545,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/util/Util.java index c5f25272e9..7170f674d5 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Essence_6.3_Crusader/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_Essence_6.3_Crusader/readme.txt b/L2J_Mobius_Essence_6.3_Crusader/readme.txt index 013241489d..53cc42c22c 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/readme.txt +++ b/L2J_Mobius_Essence_6.3_Crusader/readme.txt @@ -127,6 +127,7 @@ Fluffy Reinforcement: https://eu.4game.com/patchnotes/lineage2essence/204/ Dwelling of Spirits: https://eu.4game.com/patchnotes/lineage2essence/261/ -Transcendent hunting zones +-Pet extraction system Sylph: https://eu.4game.com/patchnotes/lineage2essence/281/ -Sylph creation support @@ -160,6 +161,7 @@ Crusader: https://eu.4game.com/patchnotes/lineage2essence/416/ -Magic Lamp Genie's quests -Valakas Temple instance + Customs: -Newbie Helper NPC location info -Newbie Helper buff support until 40 level diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/account_gsdata.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/account_gsdata.sql index b70d2eea0d..576cc18356 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/account_gsdata.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/account_premium.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/account_premium.sql index b52e46ebca..3125e00443 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/account_premium.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/achievement_box.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/achievement_box.sql index c6830a6caf..63af6ce3ed 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/achievement_box.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/achievement_box.sql @@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `achievement_box` ( `box_state_slot_4` INT NOT NULL DEFAULT 0, `boxtype_slot_4` INT 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_Essence_7.1_Assassin/dist/db_installer/sql/game/airships.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/airships.sql index e4f74d138a..28cc8a9610 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/airships.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/announcements.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/announcements.sql index eb86953965..1ff1b9ddd3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/announcements.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/auction_bid.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/auction_bid.sql index 1afcf3ba88..bd42d75b3a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/auction_bid.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/bbs_favorites.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/bbs_favorites.sql index d46500c1bb..9cb97e6682 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/bbs_favorites.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/bot_reported_char_data.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/bot_reported_char_data.sql index 452d310e16..ddbda95b17 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/bot_reported_char_data.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/buffer_schemes.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/buffer_schemes.sql index 5e79fbfd22..61436e7354 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/buffer_schemes.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/buffer_schemes.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `buffer_schemes` ( `scheme_name` VARCHAR(16) NOT NULL DEFAULT 'default', `skills` VARCHAR(200) NOT NULL, PRIMARY KEY (`object_id`,`scheme_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_Essence_7.1_Assassin/dist/db_installer/sql/game/buylists.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/buylists.sql index a02ce044c8..8c89e22d90 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/buylists.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle.sql index e6a5fcc566..d79bc9f41d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_doorupgrade.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_doorupgrade.sql index c66e5d0991..dc92b68a2f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_doorupgrade.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_functions.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_functions.sql index 14a51b2630..be7ac8630d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_functions.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_manor_procure.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_manor_procure.sql index eae8164dbd..dff0affeec 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_manor_procure.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_manor_production.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_manor_production.sql index ca51a24e35..7f09f6c1b0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_manor_production.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_siege_guards.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_siege_guards.sql index 5352cfb249..ad7acac0a5 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_siege_guards.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_trapupgrade.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_trapupgrade.sql index 63406a22f3..22f6071cb6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/castle_trapupgrade.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_contacts.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_contacts.sql index 5e7c88bd1a..350ec43a14 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_contacts.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_daily_rewards.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_daily_rewards.sql index ed0bbff883..f0b9cf08f0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_daily_rewards.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_friends.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_friends.sql index cdce19820b..8b2dab1d25 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_friends.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_hennas.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_hennas.sql index 5225720259..806d3eb0ae 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_hennas.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_instance_time.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_instance_time.sql index 412aecd168..f9307271bf 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_instance_time.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_item_reuse_save.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_item_reuse_save.sql index 90481cbf90..bdfc7d2385 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_item_reuse_save.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_macroses.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_macroses.sql index 4647752208..d140fc9630 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_macroses.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_macroses.sql @@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS `character_macroses` ( `acronym` VARCHAR(4) , `commands` VARCHAR(1255) , 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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_mentees.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_mentees.sql index 0ff6f45e08..48c7b48b41 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_mentees.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_offline_trade.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_offline_trade.sql index 232f6ad468..2019801a3b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_offline_trade.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_offline_trade_items.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_offline_trade_items.sql index e0c31f77e5..456b9c2231 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_offline_trade_items.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_pet_skills_save.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_pet_skills_save.sql index d6e7305dad..85dfb5c310 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_pet_skills_save.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_potens.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_potens.sql index 16b2a7bc7c..e8b138b33b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_potens.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_potens.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_potens` ( `enchant_level` INT NOT NULL DEFAULT 0, `enchant_exp` INT NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`slot_position`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_premium_items.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_premium_items.sql index 0034ae985b..adcbc4e3f1 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_premium_items.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_purge.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_purge.sql index fb186a0807..5cea267e6e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_purge.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_purge.sql @@ -6,4 +6,4 @@ CREATE TABLE IF NOT EXISTS `character_purge` ( `keys` int(10) UNSIGNED NOT NULL DEFAULT 0, `remainingKeys` int(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`charId`,`category`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_quests.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_quests.sql index 26f87fcefc..75a036b290 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_quests.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_random_craft.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_random_craft.sql index 82a9d4166e..18175b321c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_random_craft.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_random_craft.sql @@ -25,4 +25,4 @@ CREATE TABLE IF NOT EXISTS `character_random_craft` ( `item_5_locked` TINYINT NOT NULL DEFAULT 0, `item_5_lock_left` INT 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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_ranking_history.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_ranking_history.sql index 3f938ba850..d2da345dec 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_ranking_history.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_recipebook.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_recipebook.sql index 259046c922..c4f1ff9e42 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_recipebook.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_recipeshoplist.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_recipeshoplist.sql index 384d5d2dec..97209515a1 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_recipeshoplist.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_reco_bonus.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_reco_bonus.sql index d49289a9ef..d9f0fedb2d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_reco_bonus.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_revenge_history.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_revenge_history.sql index 2afdc80d1c..4f39f43623 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_revenge_history.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_revenge_history.sql @@ -18,4 +18,4 @@ CREATE TABLE IF NOT EXISTS `character_revenge_history` ( `shared_teleport_remaining` int NOT NULL DEFAULT 0, `kill_time` BIGINT(10) UNSIGNED NOT NULL, `share_time` BIGINT(10) UNSIGNED NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_shortcuts.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_shortcuts.sql index a86b023f7c..577853fd57 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_shortcuts.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_skills.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_skills.sql index a5aec73e91..d27740e47d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_skills.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_skills_save.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_skills_save.sql index cce052032b..5ffb37487c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_skills_save.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_spirits.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_spirits.sql index ac73d8dbe3..bb4044039f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_spirits.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_spirits.sql @@ -11,6 +11,5 @@ CREATE TABLE `character_spirits` `crit_rate_points` TINYINT NOT NULL DEFAULT 0, `crit_damage_points` TINYINT NOT NULL DEFAULT 0, `in_use` BOOLEAN NOT NULL DEFAULT FALSE, - PRIMARY KEY (`charId`, `type`), - FOREIGN KEY FK_CHARACTER_SPIRITS (`charId`) REFERENCES characters (`charId`) ON DELETE CASCADE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file + PRIMARY KEY (`charId`, `type`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_subclasses.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_subclasses.sql index 1dfd8b7197..e058480229 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_subclasses.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_summon_skills_save.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_summon_skills_save.sql index 648e445c0a..c10b99bc5c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_summon_skills_save.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_summons.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_summons.sql index b57b1cce1c..d7128f1c29 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_summons.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_surveillances.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_surveillances.sql index 49b3fdaa3d..734b714c5e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_surveillances.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_surveillances.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `character_surveillances` ( `charId` INT UNSIGNED NOT NULL, `targetId` INT UNSIGNED NOT NULL, PRIMARY KEY (`charId`,`targetId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_tpbookmark.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_tpbookmark.sql index 05678e5513..cde9ff3db3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_tpbookmark.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/character_variables.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_variables.sql index 2b33040680..81530a3da5 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/character_variables.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/characters.sql index 4df7d3f88c..f39a66c2db 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_data.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_data.sql index bd55f0c7b0..b74795dc51 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_data.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_data.sql @@ -24,4 +24,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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_notices.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_notices.sql index b8062eea96..61425ca510 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_notices.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_privs.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_privs.sql index cc35c5862f..baca0444a8 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_privs.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_skills.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_skills.sql index 298f710835..ddc8b0f819 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_skills.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_subpledges.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_subpledges.sql index b1ca14bf1a..5ede8982a6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_subpledges.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_variables.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_variables.sql index 2df52d0e90..44bf3fea53 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_variables.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_wars.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_wars.sql index 1e02dfb225..3fcf58a2ad 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clan_wars.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clanentry.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clanentry.sql index 314f2fb6b8..91beee1ac3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clanentry.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clanhall.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clanhall.sql index 39e3deed5c..67e85d8f99 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clanhall.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/clanhall_auctions_bidders.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clanhall_auctions_bidders.sql index 298166e477..4c41da7fda 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/clanhall_auctions_bidders.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/collection_favorites.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collection_favorites.sql index b08c0c4fd2..07c749c815 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collection_favorites.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collection_favorites.sql @@ -3,4 +3,4 @@ CREATE TABLE IF NOT EXISTS `collection_favorites` ( `accountName` VARCHAR(45) NOT NULL DEFAULT '', `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collections.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collections.sql index 5814dfa284..8ff04209a6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collections.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/collections.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `collections` ( `collectionId` int(3) UNSIGNED NOT NULL DEFAULT 0, `index` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`accountName`,`collectionId`,`index`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/commission_items.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/commission_items.sql index 79601a9a4e..44a54d79f2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/commission_items.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/crests.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/crests.sql index 3c8a5540ff..c4bcbe76e2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/crests.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/cursed_weapons.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/cursed_weapons.sql index 06ed9c9aa4..1e35c6d476 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/cursed_weapons.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/custom_mail.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/custom_mail.sql index c05ac99727..312a5ae524 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/custom_mail.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/custom_teleport.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/custom_teleport.sql index 14f8570536..d7f658b250 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/custom_teleport.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points.sql index 0cdbee7ee0..f6a80aaeed 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `enchant_challenge_points` ( `groupId` INT NOT NULL, `points` INT NOT NULL, PRIMARY KEY (`charId`,`groupId`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql index 61bbd111af..612ed9c4de 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/enchant_challenge_points_recharges.sql @@ -5,4 +5,4 @@ CREATE TABLE IF NOT EXISTS `enchant_challenge_points_recharges` ( `optionIndex` INT NOT NULL, `count` INT NOT NULL, PRIMARY KEY (`charId`, `groupId`, `optionIndex`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/event_schedulers.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/event_schedulers.sql index 0e91ede108..999126b47b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/event_schedulers.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/fort.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort.sql index e1251c9bbf..acd8e63408 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_doorupgrade.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_doorupgrade.sql index 8b40b5ffe8..db6f1a278a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_doorupgrade.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_functions.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_functions.sql index 76f3fa99a2..7feb890a15 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_functions.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_siege_guards.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_siege_guards.sql index 7f261ec8bc..a0a0b93ef4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_siege_guards.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_siege_guards.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_spawnlist.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_spawnlist.sql index cd12e5fb31..8d7b95b1ad 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_spawnlist.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fort_spawnlist.sql @@ -11,4 +11,4 @@ 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; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fortsiege_clans.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fortsiege_clans.sql index b091192446..0c9ab1ba84 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/fortsiege_clans.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/forums.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/forums.sql index 0b82c19b72..bd2eeda97a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/forums.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/global_tasks.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/global_tasks.sql index 8cd87cb650..51cab5ed2f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/global_tasks.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/global_variables.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/global_variables.sql index 1721657eb2..e3e5348a1a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/global_variables.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/grandboss_data.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/grandboss_data.sql index b4a1f552fd..7cf6d2865d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/grandboss_data.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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, 93069, 8925, -3904, 0, 229898.48, 667.776), -- Queen Ant diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/heroes.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/heroes.sql index 7691debf5f..6dd502dc65 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/heroes.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/heroes_diary.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/heroes_diary.sql index db45dce351..bb15483356 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/heroes_diary.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/huntpass.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/huntpass.sql index f3ff3061ec..b45d73a32b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/huntpass.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/huntpass.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `huntpass` ( `sayha_points_used` INT NOT NULL DEFAULT 0, `unclaimed_reward` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`account_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_auction.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_auction.sql index 3b7402da4c..0c5514d192 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_auction.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/item_auction_bid.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_auction_bid.sql index a2fd42f3a1..984709481f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_auction_bid.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/item_elementals.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_elementals.sql index 0c432dd172..8ff8322446 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_elementals.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/item_special_abilities.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_special_abilities.sql index f38653c2b8..f0b9af4b51 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_special_abilities.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/item_transaction_history.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_transaction_history.sql index 7ec1d192f0..a08fe3b8fd 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_transaction_history.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_transaction_history.sql @@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS `item_transaction_history` ( `price` BIGINT UNSIGNED NOT NULL, `count` BIGINT UNSIGNED NOT NULL, PRIMARY KEY (`created_time`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_variables.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_variables.sql index aa62996a80..8ed1389861 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_variables.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/item_variations.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_variations.sql index cfbf0ca91e..36adc3d83f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/item_variations.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/items.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/items.sql index 380faa715b..26f64fc7aa 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/items.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/itemsonground.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/itemsonground.sql index 5725d56625..1891903f34 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/itemsonground.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/mdt_bets.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/mdt_bets.sql index 8d7d4cb738..295e97a717 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/mdt_bets.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/mdt_history.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/mdt_history.sql index 06978f3377..a0bd0e009a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/mdt_history.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/merchant_lease.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/merchant_lease.sql index 4c7e52d5e1..d8c5488c67 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/merchant_lease.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/messages.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/messages.sql index 41df84c7d6..162cea05e4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/messages.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/npc_respawns.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/npc_respawns.sql index b93a9f4128..77f93f18ef 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/npc_respawns.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_data.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_data.sql index fb3c7e28fa..d86b0a4e06 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_data.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_fights.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_fights.sql index 6b491f871d..b7a648c302 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_fights.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_fights.sql @@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `olympiad_fights` ( `classed` tinyint(4) 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_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_nobles.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_nobles.sql index a084f69e22..bbe3bc9bf5 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_nobles.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_nobles_eom.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_nobles_eom.sql index 5f4ea7bc47..82578d73a8 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/olympiad_nobles_eom.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/party_matching_history.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/party_matching_history.sql index e363987455..931f044fcd 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/party_matching_history.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_evolves.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_evolves.sql index e825631c85..51fcd5eba8 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_evolves.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_evolves.sql @@ -5,4 +5,4 @@ CREATE TABLE `pet_evolves` ( `level` int NOT NULL DEFAULT '0', PRIMARY KEY (`itemObjId`, `index`, `level`), UNIQUE KEY `pet_evolves` (`itemObjId`, `index`, `level`) -) ENGINE=MyISAM; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_skills.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_skills.sql index 2b502c7738..b680f21972 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_skills.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pet_skills.sql @@ -4,4 +4,4 @@ CREATE TABLE IF NOT EXISTS `pet_skills` ( `skillId` INT NOT NULL DEFAULT 0, `skillLevel` INT(3) NOT NULL DEFAULT 1, PRIMARY KEY (`petObjItemId`,`skillId`,`skillLevel`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/petition_feedback.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/petition_feedback.sql index 55a1c41c22..a77f5730f2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/petition_feedback.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/pets.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pets.sql index b6d916119a..e72bc97c1d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/pets.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/posts.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/posts.sql index dbc8234412..3025ed14ac 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/posts.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/punishments.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/punishments.sql index 286bfd6ca4..8df118acf1 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/punishments.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/residence_functions.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/residence_functions.sql index 9f948c65c0..a78d7aed7b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/residence_functions.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/siege_clans.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/siege_clans.sql index 3aa070529c..d88f155d0f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/siege_clans.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/topic.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/topic.sql index 55fc74d214..b0af891b12 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/topic.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/game/world_exchange_items.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/world_exchange_items.sql index c994e04006..442405f40b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/world_exchange_items.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/game/world_exchange_items.sql @@ -9,4 +9,4 @@ CREATE TABLE `world_exchange_items` ( `start_time` bigint(13) unsigned NOT NULL DEFAULT '0', `end_time` bigint(13) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`world_exchange_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/account_data.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/account_data.sql index d5e81eb0c9..b09fbca191 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/account_data.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/login/accounts.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/accounts.sql index 790c39919c..a724eb54c6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/accounts.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/login/accounts_ipauth.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/accounts_ipauth.sql index ea37ca029b..5c79e268f9 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/accounts_ipauth.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/db_installer/sql/login/gameservers.sql b/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/gameservers.sql index f9f75ef9fe..f2c43f0d90 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/db_installer/sql/login/gameservers.sql +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/config/Custom/FakePlayers.ini b/L2J_Mobius_Essence_7.1_Assassin/dist/game/config/Custom/FakePlayers.ini index 314e1793b8..8de34755bb 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/config/Custom/FakePlayers.ini +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/config/General.ini b/L2J_Mobius_Essence_7.1_Assassin/dist/game/config/General.ini index 01d27cf6f0..d0861daa05 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/config/General.ini +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/config/General.ini @@ -436,8 +436,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 # --------------------------------------------------------------------------- @@ -646,6 +646,11 @@ AutoPlayAttackAction = True # Retail: False ResumeAutoPlay = False +# Assist party leader. +# When in party, target what the leader is targeting. +# Retail: False +AssistLeader = False + # --------------------------------------------------------------------------- # Purge Settings diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/ActionData.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/ActionData.xml index 0b3b3b5c9c..6dee41178c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/ActionData.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/ActionData.xml @@ -2,45 +2,33 @@ - - - - - - - - - - + + + + + + + + + - - - - - + - - - + - - - - - - - - + + + @@ -50,22 +38,11 @@ - + - - - - - - - - - - + - - @@ -73,30 +50,18 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + - + @@ -178,10 +143,6 @@ - - - - diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/CategoryData.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/CategoryData.xml index 72f3cbfa17..a65837abec 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/CategoryData.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/CategoryData.xml @@ -411,6 +411,38 @@ 15955 + + 16079 + 16080 + 16081 + 16082 + 16083 + 16084 + 16085 + 16086 + 16087 + 16088 + 16089 + 16090 + 16091 + 16092 + 16093 + 16094 + 16095 + 16096 + 16097 + 16098 + 16099 + 16100 + 16101 + 16102 + 16103 + 16104 + 16105 + 16106 + 16107 + 16108 + 5 6 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/DailyMission.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/DailyMission.xml index 703870da0e..8f6efcb266 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/DailyMission.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/DailyMission.xml @@ -1,767 +1,573 @@ - - + + 21 40 - - - + + + - - - - 21 - 40 - - - - - - - - - - - 21 - 40 - - - - - - - - - - - 21 - 40 - - - - - - - - - - - 21 - 40 - - - - - - - - - + + 41 50 - - - + + + - - - - 41 - 50 - - - - - - - - - - - 41 - 50 - - - - - - - - - - - 41 - 50 - - - - - - - - - - - 41 - 50 - - - - - - - - - + + 51 60 - - - - - - - - - 51 - 60 - - - - - - - - - - - 51 - 60 - - - - - - - - - - - 51 - 60 - - - - - - - - - - - 51 - 60 - - - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 61 70 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 71 75 - - - + + + - + 76 99 - - - + + + - + 76 99 - - - + + + - + 76 99 - - - + + + - + 76 99 - - - + + + - + - + 76 99 - - - + + + - - - - 20 - 30 - - - - - - - - - 30 - 40 - - - - - - - - - 40 - 60 - - - - - - - - - 60 - 75 - - - - - - - - - 76 - 99 - - - - - - + 20 - + - + 30 - + - + 40 - - + + - + 45 - - + + - + 46 - + - + 47 - + - + 48 - + - + 49 - + - + 50 - - + + - + 55 - - + + - + 60 - - + + - + 65 - - + + - + 68 - - + + - + 71 - - + + - + 74 - - - + + + - + 76 - - - + + + - + 78 - - - + + + - + 79 - - - + + + - + 80 - - - + + + - + 81 - - - + + + - + 82 - - - + + + - + 83 - - - + + + - + 84 - - - + + + - + 85 - - - - - + + + + + - + 86 - - - - - + + + + + - + 87 - - - - - + + + + + - + 88 - - - - - + + + + + - + 89 - - - - - + + + + + - + 90 - - - - - + + + + + - + 91 - - - - - + + + + + - + 92 - - - - - + + + + + @@ -771,104 +577,134 @@ 91910 - - + + + - 40 + 60 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22107,22108,22109,22122,22331,22111,22110,22112,22123,22116,22117,22118,22124,22113,22114,22115,22147,22148,22149,22275,22276,22277,22278 - + - + 60 99 + 22156 - - + + + - + 60 99 + 22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22179,22180,22181 - - + + - - - + + + + 60 + 99 + 29225 + - + + + - - - + + + + 60 + 99 + 18891,18892,18894,18895 + - + + - - + + - + + - - + + - + - - + + - + + + + + + + + + + + + + + + - + - - + + - - + + - + 40 99 - + @@ -879,39 +715,41 @@ 99 - - - + + + - - + + 22271,22272,22273 76 99 + - - - + + - - + + 29105,29106,29107,29108 76 99 + - + + @@ -922,108 +760,108 @@ 99 - - - - + + + + + - - + FIRE - + - + WATER - + - + WIND - + - + EARTH - + - + FIRE - + - + WATER - + - + WIND - + - + EARTH - + - - + + 20792,20794,20795,20796,20797,20798,20799,20800,20801,20802,20803,20849,20995,21661,21662,21663,21664,21665,21666,21667,21668,21669,21670,21671,21672,21673,21674,21675,21676,21678,21685,21686,21761,21762,21763,21764,21765,21766,21767,21768,21769,21770,21771,21772,21773,21774,21775,21776,21777,21778,21779,21780,21781,21782,21783,21784,21785,21786,21787,21788,21789,21790,21791,21792,21793,21813,21814,21815,21816,21817,21818,21819,21820,21821,21822,21823,21824,21825,21826,21827,21828,21829,21830,21831,21832 76 99 - - + + - 79 + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22058,21969,22056,21962,21964,21966,21968,21974,22059,21976,21971 - - + + @@ -1034,9 +872,9 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + @@ -1047,9 +885,9 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + @@ -1060,9 +898,9 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + @@ -1073,99 +911,66 @@ 22192,22193,22194,22195,22196,22197,22198,22199 - - - + + + - + - - + + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 18678,18679,18680,18681,18682,18683,18684,18685 - - - - - - - - 76 - 99 - 22192,22193,22194,22195,22196,22197,22198,22199 - - - - - - - - - 76 - 99 - 22192,22193,22194,22195,22196,22197,22198,22199 - - - - - - - - - - 76 - 99 - 22192,22193,22194,22195,22196,22197,22198,22199 - - - - + + - - + + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 18686,18687 - + - - + + 70 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22192,22197 - + + - + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 25952,25953,25954,25955,25961,25962,25963 - + + @@ -1173,10 +978,10 @@ 60 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22413,22414,22415,22416,22417 - + @@ -1184,10 +989,10 @@ 85 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22426,22427,22428,22429,22431,22432,22433,22434,22435,22436,22437,22438,22439,22440,22441,22442,22443,22445,22446 - + @@ -1195,10 +1000,10 @@ 85 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 20761,21085,20627,20623,20621,20407,20626,20625,20624,20622,20620,21084,20405,21089,21087,21086,20629,20628,22500 - + @@ -1206,21 +1011,152 @@ 85 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 22351,22346,22347,22345,22352,22349,22350,22348 - + - - + + - 65 + 76 99 - 22192,22193,22194,22195,22196,22197,22198,22199 + 25964,25965,25966,25967 - + + + + - \ No newline at end of file + + + + 76 + 99 + 22269,22270 + + + + + + + + + + 76 + 99 + 22528,22523 + + + + + + + + + + + 76 + 99 + 22269,22270 + + + + + + + + + 76 + 99 + 22528,22523 + + + + + + + + + 80 + 99 + 22564,22569,22574,22579,22584,22589,22593,22597,22601,22605,22609,22613 + + + + + + + + + + 76 + 99 + 22564,22569,22574,22579,22584,22589,22593,22597,22601,22605,22609,22613 + + + + + + + + + 76 + 99 + 22564,22569,22574,22579,22584,22589,22593,22597,22601,22605,22609,22613 + + + + + + + + + + 21 + 40 + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemData.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemData.xml index 0d83f94027..dd685f6494 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemData.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemData.xml @@ -1,6 +1,13 @@ + + + + + + + @@ -43,14 +50,48 @@ - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemGroups.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemGroups.xml index d869eecf07..ad28a50626 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemGroups.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/EnchantItemGroups.xml @@ -31,10 +31,12 @@ - - - - + + + + + + @@ -383,8 +385,21 @@ - + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/LimitShopCraft.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/LimitShopCraft.xml index ca9216796f..a36ae3effd 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/LimitShopCraft.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/LimitShopCraft.xml @@ -3482,72 +3482,72 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/PetExtractData.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/PetExtractData.xml new file mode 100644 index 0000000000..db6643827e --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/PetExtractData.xml @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30731.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30731.htm index 7d5bb217c7..daf4f90fc3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30731.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30731.htm @@ -9,7 +9,7 @@ The Pet Manager Association is always happy to assist you and your pet.
--> - + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30827.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30827.htm index 830447a916..1a6e7f97c6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30827.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30827.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30828.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30828.htm index 0a7f19fda4..81b47f5ca8 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30828.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30828.htm @@ -10,7 +10,7 @@ Pet Manager Waters:
--> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30829.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30829.htm index 61e46bf654..67f60c6f2e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30829.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30829.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30830.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30830.htm index 6b1860ae08..26536da2b6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30830.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30830.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30831.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30831.htm index b707cd690d..04d1428ac0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30831.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/30831.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31067.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31067.htm index 9ff970708b..5963bbead2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31067.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31067.htm @@ -9,7 +9,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31265.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31265.htm index 5de92941aa..acd3d39c17 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31265.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31265.htm @@ -10,7 +10,7 @@ Perhaps I should write a book, eh? "The Impact of Striders on the History of the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31309.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31309.htm index 9487647c8a..3d6ff06a25 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31309.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31309.htm @@ -10,7 +10,7 @@ Oh, hello. Ah, you noticed my pure-bred black-striped Alpine Cougar, eh? It is n --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31954.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31954.htm index c8025dde3e..e0218b5231 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31954.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/31954.htm @@ -10,7 +10,7 @@ As the number of people who interested in raising pets increases these days, the --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/33579.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/33579.htm index c67cae00f5..cafc07db04 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/33579.htm +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/html/petmanager/33579.htm @@ -7,7 +7,7 @@ --> The Pet Manager Association is always happy to assist you and your pet.
- + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/instances/DwellingOfSpirits.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/instances/DwellingOfSpirits.xml index 2c601ff065..9dda438b1f 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/instances/DwellingOfSpirits.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/instances/DwellingOfSpirits.xml @@ -35,13 +35,6 @@ - - - - - - - @@ -49,77 +42,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/10045.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/10045.xml index 5b5ad57cb5..e3575f5f40 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/10045.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/10045.xml @@ -6,50 +6,50 @@ - + - + - + - + - + - + - + - + - + - + - + - +
diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/custom/600016.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/custom/600016.xml index 8acf26eb84..c848b0d896 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/custom/600016.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/multisell/custom/600016.xml @@ -5,19 +5,19 @@ - + - + - + @@ -35,13 +35,13 @@
- + - + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm new file mode 100644 index 0000000000..51ace5fb0f --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/34414.htm @@ -0,0 +1,7 @@ +Siben:
+
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java new file mode 100644 index 0000000000..6606e36f7e --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingIgnis.java @@ -0,0 +1,190 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfKingIgnis extends AbstractNpcAI +{ + // NPCs + private static final int IGNIS = 29105; + // Skills + private static final SkillHolder FIRE_RAG_1 = new SkillHolder(50050, 1); + private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); + private static final SkillHolder FIRE_RAG_3 = new SkillHolder(50050, 3); + private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); + private static final SkillHolder FIRE_RAG_5 = new SkillHolder(50050, 5); + private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); + private static final SkillHolder FIRE_RAG_7 = new SkillHolder(50050, 7); + private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); + private static final SkillHolder FIRE_RAG_9 = new SkillHolder(50050, 9); + private static final SkillHolder FIRE_RAG_10 = new SkillHolder(50050, 10); + + public ResidenceOfKingIgnis() + { + addAttackId(IGNIS); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "CAST_FIRE_RAGE_1": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_1.getSkill())) + { + npc.doCast(FIRE_RAG_1.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_2": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) + { + npc.doCast(FIRE_RAG_2.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_3": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_3.getSkill())) + { + npc.doCast(FIRE_RAG_3.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_4": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) + { + npc.doCast(FIRE_RAG_4.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_5": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_5.getSkill())) + { + npc.doCast(FIRE_RAG_5.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_6": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) + { + npc.doCast(FIRE_RAG_6.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_7": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_7.getSkill())) + { + npc.doCast(FIRE_RAG_7.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_8": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) + { + npc.doCast(FIRE_RAG_8.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_9": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_9.getSkill())) + { + npc.doCast(FIRE_RAG_9.getSkill()); + } + break; + } + case "CAST_FIRE_RAGE_10": + { + if (SkillCaster.checkUseConditions(npc, FIRE_RAG_10.getSkill())) + { + npc.doCast(FIRE_RAG_10.getSkill()); + } + break; + } + } + return null; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.99)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) + { + startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) + { + startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) + { + startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) + { + startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.15))) + { + startQuestTimer("CAST_FIRE_RAGE_5", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.15)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.10))) + { + startQuestTimer("CAST_FIRE_RAGE_6", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.10)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.7))) + { + startQuestTimer("CAST_FIRE_RAGE_7", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.7)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.5))) + { + startQuestTimer("CAST_FIRE_RAGE_8", 1000, npc, null); + } + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3))) + { + startQuestTimer("CAST_FIRE_RAGE_9", 1000, npc, null); + } + else if (npc.getCurrentHp() < (npc.getMaxHp() * 0.3)) + { + startQuestTimer("CAST_FIRE_RAGE_10", 1000, npc, null); + } + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + public static void main(String[] args) + { + new ResidenceOfKingIgnis(); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java new file mode 100644 index 0000000000..0bb5893075 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingPetram.java @@ -0,0 +1,309 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import java.util.HashMap; +import java.util.Map; + +import org.l2jmobius.gameserver.enums.ChatType; +import org.l2jmobius.gameserver.model.Location; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; + +import ai.AbstractNpcAI; + +public class ResidenceOfKingPetram extends AbstractNpcAI +{ + // NPCs + private static final int PETRAM = 29108; + private static final int PETRAM_PIECE = 29116; + private static final int PETRAM_FRAGMENT = 29117; + // Skills + private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); + private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); + private static final SkillHolder TEST = new SkillHolder(5712, 1); + + public ResidenceOfKingPetram() + { + addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); + addAttackId(PETRAM); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + petram.doCast(EARTH_ENERGY.getSkill()); + + petram.setInvul(true); + petram.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "HaHa, fighters lets kill them. Now Im invul!!!"); + + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + final MinionData minionData = StageData.getMinionsStageData(stage)[minionIndex]; + final Location minionLocation = minionData.getMinionLocation(); + world.setParameter("minion" + minionIndex, addSpawn(npc, minionData.getMinionId(), minionLocation.getX(), minionLocation.getY(), minionLocation.getZ(), minionLocation.getHeading(), false, -1, true, npc.getInstanceId())); + } + + startQuestTimer("SUPPORT_PETRAM", 200, npc, null); + } + break; + } + case "SUPPORT_PETRAM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getNpc(PETRAM) != null) && !world.getNpc(PETRAM).isDead()) + { + final int stage = getHigherStage(world); + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + world.getParameters().getObject("minion" + minionIndex, Npc.class).setTarget(world.getNpc(PETRAM)); + world.getParameters().getObject("minion" + minionIndex, Npc.class).doCast(TEST.getSkill()); + } + startQuestTimer("SUPPORT_PETRAM", 10100, npc, null); + } + break; + } + case "REMOVE_INVUL": + { + if (npc != null) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Npc petram = world.getNpc(PETRAM); + if (petram != null) + { + petram.doCast(EARTH_FURY.getSkill()); + petram.setInvul(false); + petram.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.EARTH_KING_BARRIER2_AVE); + petram.updateAbnormalVisualEffects(); + petram.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); + } + + for (int i = 0; i < 12; i++) + { + final Npc minion = world.getParameters().getObject("minion" + i, Npc.class); + if (minion != null) + { + minion.deleteMe(); + } + } + } + } + break; + } + } + + return null; + } + + private int getHigherStage(Instance world) + { + for (int stage = StageData.getMinionsStageData().size() - 1; stage >= 0; stage--) + { + if (world.getParameters().getBoolean("stage" + stage, false)) + { + return stage; + } + } + + return 0; + } + + @Override + public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) + { + final Instance world = npc.getInstanceWorld(); + synchronized (this) + { + for (int stage = 0; stage < StageData.getMinionsStageData().size(); stage++) + { + if ((npc.getCurrentHpPercent() < StageData.getHpPercents()[stage]) && !world.getParameters().getBoolean("stage" + stage, false)) + { + world.setParameter("stage" + stage, true); + startQuestTimer("SPAWN_MINION", 100, npc, null); + } + } + } + + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + final int stage = getHigherStage(world); + int aliveMinionsCount = 0; + for (int minionIndex = 0; minionIndex < StageData.getMinionsStageData(stage).length; minionIndex++) + { + if ((world.getParameters().getObject("minion" + minionIndex, Npc.class) != null) && !world.getParameters().getObject("minion" + minionIndex, Npc.class).isDead()) + { + aliveMinionsCount++; + } + } + + boolean breakInvul = false; + switch (stage) + { + case 0: + { + if (aliveMinionsCount == 0) + { + breakInvul = true; + } + break; + } + case 1: + { + if (aliveMinionsCount <= 4) + { + breakInvul = true; + } + break; + } + case 2: + { + if (aliveMinionsCount <= 6) + { + breakInvul = true; + } + break; + } + } + + if (breakInvul) + { + startQuestTimer("REMOVE_INVUL", 500, world.getNpc(PETRAM), null); + } + + return super.onKill(npc, player, isSummon); + } + + private static class StageData + { + private static final int[] _hpPercents = new int[] + { + 75, + 50, + 10 + }; + private static final Map _minionsStageData = new HashMap<>(); + static + { + // Stage 1 + _minionsStageData.put(0, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_FRAGMENT, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_FRAGMENT, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_FRAGMENT, new Location(222077, 191017, -15486, 16383)) + }); + + // Stage 2 + _minionsStageData.put(1, new MinionData[] + { + new MinionData(PETRAM_FRAGMENT, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_FRAGMENT, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_FRAGMENT, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_FRAGMENT, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_FRAGMENT, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_FRAGMENT, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_FRAGMENT, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_FRAGMENT, new Location(221342, 190800, -15486, 10837)) + }); + // Stage 3 + _minionsStageData.put(2, new MinionData[] + { + new MinionData(PETRAM_PIECE, new Location(221543, 191530, -15486, 1131)), + new MinionData(PETRAM_PIECE, new Location(222069, 192019, -15486, 49364)), + new MinionData(PETRAM_PIECE, new Location(222595, 191479, -15486, 34013)), + new MinionData(PETRAM_PIECE, new Location(222077, 191017, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221069, 191544, -15486, 2280)), + new MinionData(PETRAM_PIECE, new Location(221366, 192223, -15486, 56731)), + new MinionData(PETRAM_PIECE, new Location(222067, 192508, -15486, 50632)), + new MinionData(PETRAM_PIECE, new Location(222765, 192216, -15486, 39607)), + new MinionData(PETRAM_PIECE, new Location(223057, 191472, -15486, 33154)), + new MinionData(PETRAM_PIECE, new Location(222773, 190814, -15486, 25376)), + new MinionData(PETRAM_PIECE, new Location(222063, 190516, -15486, 16383)), + new MinionData(PETRAM_PIECE, new Location(221342, 190800, -15486, 10837)) + }); + } + + public static int[] getHpPercents() + { + return _hpPercents; + } + + public static Map getMinionsStageData() + { + return _minionsStageData; + } + + public static MinionData[] getMinionsStageData(int stage) + { + return _minionsStageData.get(stage); + } + } + + private static class MinionData + { + final int _minionId; + final Location _minionLocation; + + private MinionData(int minionId, Location minionLocation) + { + _minionId = minionId; + _minionLocation = minionLocation; + } + + public int getMinionId() + { + return _minionId; + } + + public Location getMinionLocation() + { + return _minionLocation; + } + } + + public static void main(String[] args) + { + new ResidenceOfKingPetram(); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java new file mode 100644 index 0000000000..e48f6b6b18 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfKingProcella.java @@ -0,0 +1,179 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik, Mobius + */ +public class ResidenceOfKingProcella extends AbstractNpcAI +{ + // NPCs + private static final int PROCELLA = 29107; + private static final int PROCELLA_GUARDIAN_1 = 29112; + private static final int PROCELLA_GUARDIAN_2 = 29113; + private static final int PROCELLA_GUARDIAN_3 = 29114; + private static final int PROCELLA_STORM = 29115; + // Skills + private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); + private static final int HURRICANE_BOLT = 50043; + private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); + // Misc + private static final int STORM_MAX_COUNT = 16; + + public ResidenceOfKingProcella() + { + addKillId(PROCELLA, PROCELLA_GUARDIAN_1, PROCELLA_GUARDIAN_2, PROCELLA_GUARDIAN_3); + addSpawnId(PROCELLA); + } + + @Override + public String onSpawn(Npc npc) + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), npc, null); + startQuestTimer("SPAWN_STORM", 5000, npc, null); + world.setParameter("stormCount", 0); + } + return null; + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_MINION": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (npc.getId() == PROCELLA)) + { + world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); + world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_2, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); + world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_3, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + break; + } + case "SPAWN_STORM": + { + final Instance world = npc.getInstanceWorld(); + if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) + { + world.getNpc(PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); + final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(PROCELLA).getX() + getRandom(-500, 500), world.getNpc(PROCELLA).getY() + getRandom(-500, 500), world.getNpc(PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); + procellaStorm.setRandomWalking(true); + world.getParameters().increaseInt("stormCount", 1); + startQuestTimer("SPAWN_STORM", 60000, world.getNpc(PROCELLA), null); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, procellaStorm, player); + } + break; + } + case "HIDE_PROCELLA": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + if (world.getNpc(PROCELLA).isInvisible()) + { + world.getNpc(PROCELLA).setInvisible(false); + } + else + { + world.getNpc(PROCELLA).setInvisible(true); + startQuestTimer("SPAWN_MINION", 300000 + getRandom(-15000, 15000), world.getNpc(PROCELLA), player); + } + } + break; + } + case "CHECK_CHAR_INSIDE_RADIUS_NPC": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().orElse(null); // Usamos orElse(null) para evitar el Optional vacΓ­o + if ((plr != null) && (plr.isInsideRadius3D(npc, 100))) + { + npc.abortAttack(); + npc.abortCast(); + npc.setTarget(plr); + + if (plr.getKnownSkill(HURRICANE_BOLT) != null) // Verificamos si el jugador tiene la habilidad + { + if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) + { + npc.abortCast(); + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) + { + npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); + } + } + } + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + else + { + startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", 100, npc, player); + } + } + break; + } + } + return null; + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + final Instance world = npc.getInstanceWorld(); + if (world == null) + { + return null; + } + + if (npc.getId() == PROCELLA) + { + cancelQuestTimer("SPAWN_MINION", npc, player.getActingPlayer()); + cancelQuestTimer("SPAWN_STORM", npc, player.getActingPlayer()); + cancelQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC", npc, player.getActingPlayer()); + } + else if ((world.getParameters().getObject("minion1", Npc.class).isDead()) && (world.getParameters().getObject("minion2", Npc.class).isDead()) && (world.getParameters().getObject("minion3", Npc.class).isDead())) + { + startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(PROCELLA), null); + } + + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfKingProcella(); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java new file mode 100644 index 0000000000..9c3c7ea37b --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/DwellingOfSpiritsResidence/ResidenceOfQueenNebula.java @@ -0,0 +1,209 @@ +/* + * 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.DwellingOfSpiritsResidence; + +import org.l2jmobius.gameserver.data.xml.SkillData; +import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.model.instancezone.Instance; +import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.model.skill.SkillCaster; + +import ai.AbstractNpcAI; + +/** + * @author RobikBobik + */ +public class ResidenceOfQueenNebula extends AbstractNpcAI +{ + // NPCs + private static final int NEBULA = 29106; + private static final int WATER_SLIME = 29111; + // Skills + private static final int AQUA_RAGE = 50036; + private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); + private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); + private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); + private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); + private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); + private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); + + public ResidenceOfQueenNebula() + { + addKillId(NEBULA, WATER_SLIME); + addAttackId(NEBULA); + addSpawnId(NEBULA); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + switch (event) + { + case "SPAWN_WATER_SLIME": + { + final Instance world = npc.getInstanceWorld(); + if (world != null) + { + final Player plr = world.getPlayers().stream().findAny().get(); + startQuestTimer("CAST_AQUA_RAGE", 60000 + getRandom(-15000, 15000), npc, plr); + if (npc.getId() == NEBULA) + { + npc.doCast(AQUA_SUMMON.getSkill()); + for (int i = 0; i < getRandom(4, 6); i++) + { + addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + } + } + } + break; + } + case "PLAYER_PARA": + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(true); + startQuestTimer("PLAYER_UNPARA", 5000, npc, player); + } + break; + } + case "PLAYER_UNPARA": + { + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); + player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); + player.setImmobilized(false); + break; + } + case "CAST_AQUA_RAGE": + { + startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); + if ((player.isInsideRadius3D(npc, 1000))) + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) + { + npc.doCast(AQUA_RAGE_2.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) + { + npc.doCast(AQUA_RAGE_3.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) + { + npc.doCast(AQUA_RAGE_4.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) + { + npc.doCast(AQUA_RAGE_5.getSkill()); + startQuestTimer("PLAYER_PARA", 100, npc, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) + { + npc.abortCast(); + } + else if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) + { + npc.doCast(AQUA_RAGE_1.getSkill()); + } + } + break; + } + } + return null; + } + + @Override + public String onSpawn(Npc npc) + { + startQuestTimer("SPAWN_WATER_SLIME", 300000, npc, null); + return super.onSpawn(npc); + } + + @Override + public String onKill(Npc npc, Player player, boolean isSummon) + { + switch (npc.getId()) + { + case NEBULA: + { + cancelQuestTimer("CAST_AQUA_RAGE", npc, player); + cancelQuestTimer("SPAWN_WATER_SLIME", npc, player); + break; + } + case WATER_SLIME: + { + if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_1.getSkill()); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_2.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_3.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); + skill.applyEffects(player, player); + } + } + else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) + { + if (getRandomBoolean()) + { + player.stopSkillEffects(AQUA_RAGE_4.getSkill()); + final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); + skill.applyEffects(player, player); + } + } + break; + } + } + return super.onKill(npc, player, isSummon); + } + + public static void main(String[] args) + { + new ResidenceOfQueenNebula(); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java index e9e2c539a0..b025542e79 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/ai/areas/FrostCastleZone/FrostLordCastleZone.java @@ -54,12 +54,12 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final AtomicReference SPAWN_BATTLE_MOBS = new AtomicReference<>(); private static final AtomicReference SPAWN_ENCHANCED_MOBS = new AtomicReference<>(); - public static final int[] REGGIESYS_GLAKIAS = + protected static final int[] REGGIESYS_GLAKIAS = { 29136, 29137 }; - public static final int[] SLICING_GLAKIAS = + protected static final int[] SLICING_GLAKIAS = { 29138, 29139 @@ -72,21 +72,20 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final Location GLAKIAS_SPAWN_LOC = new Location(114713, -114799, -11209, 33289); // Teleports - private static final Location The_north_eastern_entrance = new Location(-56255, 13537, -3336); - private static final Location The_south_eastern_entrance = new Location(-49550, 17189, -3016); - private static final Location The_north_western_entrance = new Location(-52849, 5272, -240); - private static final Location The_south_western_entrance = new Location(-52849, 5272, -240); + private static final Location NORTH_EASTERN_ENTRANCE = new Location(-56255, 13537, -3336); + private static final Location SOUTH_EASTERN_ENTRANCE = new Location(-49550, 17189, -3016); + private static final Location NORTH_WESTERN_ENTRANCE = new Location(-52849, 5272, -240); + private static final Location SOUTH_WESTERN_ENTRANCE = new Location(-52849, 5272, -240); - private static final Location Crossroad = new Location(145598, 144091, -11789); - private static final Location Northern_Secret_Passage = new Location(149478, 147145, -12339); + private static final Location CROSSROAD = new Location(145598, 144091, -11789); + private static final Location NOTHERN_SECRET_PASSAGE = new Location(149478, 147145, -12339); - private static final Location Glakias_House = new Location(113479, -114804, -11076); + private static final Location GLAKIAS_RESIDENCE = new Location(113479, -114804, -11076); public static final int UNDERCOVER_AGENT = 34230; // Teleport npc public static final int CRYSTAL_ENERGY = 34232; // Teleport npc // Zones - private static final ZoneType[] ZONES = { ZoneManager.getInstance().getZoneByName("frost_castle_zone"), @@ -94,7 +93,6 @@ public class FrostLordCastleZone extends AbstractNpcAI }; // Timings - private static final int[] DAYS_OF_WEEK = { Calendar.TUESDAY, @@ -113,7 +111,7 @@ public class FrostLordCastleZone extends AbstractNpcAI private static final long DESPAWN_DELAY = 16 * 60 * 60 * 1000; - private static Npc _TeleportchargedCrystal = null; + private static Npc _teleportchargedCrystal = null; private static final String SCRIPT_BYPASS = "Quest FrostLordCastleZone "; @@ -138,148 +136,73 @@ public class FrostLordCastleZone extends AbstractNpcAI { case "Crossroad": { - TeleportCheck(player, 1); + teleportCheck(player, 1); break; } - case "Northern_Secret_Passage": { - TeleportCheck(player, 2); + teleportCheck(player, 2); break; } - case "The_north_eastern_entrance": { - TeleportCheck(player, 3); + teleportCheck(player, 3); break; } - case "The_south_eastern_entrance": { - TeleportCheck(player, 4); + teleportCheck(player, 4); break; } - case "The_north_western_entrance": { - TeleportCheck(player, 5); + teleportCheck(player, 5); break; } - case "The_south_western_entrance": { - TeleportCheck(player, 6); + teleportCheck(player, 6); break; } - case "Crystal_Energy_Teleport": { - player.teleToLocation(Glakias_House); + player.teleToLocation(GLAKIAS_RESIDENCE); break; } - case "FIRST_RAID_SPAWN": { int id = Rnd.get(100) < 7 ? SLICING : REGGIESYS; addSpawn(id, REGGIESYS_SLICING_SPAWN_LOC, false, DESPAWN_DELAY); break; } - case "SECOND_RAID_SPAWN": { addSpawn(TIRON, TIRON_SPAWN_LOC, false, DESPAWN_DELAY); break; } - - default: - { - break; - } } return super.onAdvEvent(event, npc, player); } - private void scheduleFirstRaid() - { - long time = Long.MAX_VALUE; - - for (int day : DAYS_OF_WEEK) - { - long nextDateMillis = getNextDateMilis(day, FIRST_RAID_TIME[0], FIRST_RAID_TIME[1]); - if (nextDateMillis < time) - { - time = nextDateMillis; - } - } - - startQuestTimer("FIRST_RAID_SPAWN", time - System.currentTimeMillis(), null, null); - } - - private void scheduleSecondRaid() - { - long time = Long.MAX_VALUE; - for (int day : DAYS_OF_WEEK) - { - long temp = getNextDateMilis(day, SECOND_RAID_TIME[0], SECOND_RAID_TIME[1]); - if (temp < time) - { - time = temp; - } - } - startQuestTimer("SECOND_RAID_SPAWN", time - System.currentTimeMillis(), null, null); - - } - - private long getNextDateMilis(int dayOfWeek, int hour, int minute) - { - Calendar c = Calendar.getInstance(); - c.set(Calendar.HOUR_OF_DAY, hour); - c.set(Calendar.MINUTE, minute); - c.set(Calendar.SECOND, 0); - for (int i = 0; i < 7; i++) - { - if ((c.get(Calendar.DAY_OF_WEEK) == dayOfWeek) && (c.getTimeInMillis() > System.currentTimeMillis())) - { - return c.getTimeInMillis(); - } - c.add(Calendar.DAY_OF_WEEK, 1); - } - return c.getTimeInMillis(); - } - @Override - public String onKill(Npc npc, Player killer, boolean isSummon) + public String onFirstTalk(Npc npc, Player player) { - switch (npc.getId()) + if (npc.getId() == CRYSTAL_ENERGY) { - case REGGIESYS: - { - addSpawn(REGGIESYS_GLAKIAS[Rnd.get(0, REGGIESYS_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); - - SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); - - break; - } - case SLICING: - { - addSpawn(SLICING_GLAKIAS[Rnd.get(0, SLICING_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); - - SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); - SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); - - break; - } - case TIRON: - { - _TeleportchargedCrystal = addSpawn(CHARGED_CRYSTAL, CHARGED_CRYSTAL_SPAWN_LOC, false, DESPAWN_DELAY); - break; - } + return getHtm(player, "34232.htm"); } - DeleteGlakiasSpawns(npc); - return super.onKill(npc, killer, false); + + if (npc.getId() == UNDERCOVER_AGENT) + { + if ((_teleportchargedCrystal != null) && _teleportchargedCrystal.isSpawned()) + { + return getHtm(player, "34230-full.htm"); + } + + return getHtm(player, "34230.htm"); + } + + return null; } @Override @@ -325,47 +248,133 @@ public class FrostLordCastleZone extends AbstractNpcAI } } - public void TeleportCheck(Player player, int locNum) + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + switch (npc.getId()) + { + case REGGIESYS: + { + addSpawn(REGGIESYS_GLAKIAS[Rnd.get(0, REGGIESYS_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); + SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); + break; + } + case SLICING: + { + addSpawn(SLICING_GLAKIAS[Rnd.get(0, SLICING_GLAKIAS.length - 1)], GLAKIAS_SPAWN_LOC, false, DESPAWN_DELAY); + SPAWN_BATTLE_MOBS.set(SpawnData.getInstance().getSpawnByName("glakias_mobs_pretorian")); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::despawnAll); + SPAWN_BATTLE_MOBS.get().getGroups().forEach(SpawnGroup::spawnAll); + break; + } + case TIRON: + { + _teleportchargedCrystal = addSpawn(CHARGED_CRYSTAL, CHARGED_CRYSTAL_SPAWN_LOC, false, DESPAWN_DELAY); + break; + } + } + deleteGlakiasSpawns(npc); + return super.onKill(npc, killer, false); + } + + @RegisterEvent(EventType.ON_PLAYER_BYPASS) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void onPlayerBypass(OnPlayerBypass event) + { + final Player player = event.getPlayer(); + if (event.getCommand().startsWith(SCRIPT_BYPASS)) + { + notifyEvent(event.getCommand().replace(SCRIPT_BYPASS, ""), null, player); + } + } + + private void scheduleFirstRaid() + { + long time = Long.MAX_VALUE; + for (int day : DAYS_OF_WEEK) + { + final long nextDateMillis = getNextDateMilis(day, FIRST_RAID_TIME[0], FIRST_RAID_TIME[1]); + if (nextDateMillis < time) + { + time = nextDateMillis; + } + } + startQuestTimer("FIRST_RAID_SPAWN", time - System.currentTimeMillis(), null, null); + } + + private void scheduleSecondRaid() + { + long time = Long.MAX_VALUE; + for (int day : DAYS_OF_WEEK) + { + final long nextDateMillis = getNextDateMilis(day, SECOND_RAID_TIME[0], SECOND_RAID_TIME[1]); + if (nextDateMillis < time) + { + time = nextDateMillis; + } + } + startQuestTimer("SECOND_RAID_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 void teleportCheck(Player player, int locationId) { int requiredMoney = 0; Location teleportLocation = null; - - switch (locNum) + switch (locationId) { case 1: { requiredMoney = 100000; - teleportLocation = Crossroad; + teleportLocation = CROSSROAD; break; } case 2: { requiredMoney = 100000; - teleportLocation = Northern_Secret_Passage; + teleportLocation = NOTHERN_SECRET_PASSAGE; break; } case 3: { requiredMoney = 500000; - teleportLocation = The_north_eastern_entrance; + teleportLocation = NORTH_EASTERN_ENTRANCE; break; } case 4: { requiredMoney = 500000; - teleportLocation = The_south_eastern_entrance; + teleportLocation = SOUTH_EASTERN_ENTRANCE; break; } case 5: { requiredMoney = 500000; - teleportLocation = The_north_western_entrance; + teleportLocation = NORTH_WESTERN_ENTRANCE; break; } case 6: { requiredMoney = 500000; - teleportLocation = The_south_western_entrance; + teleportLocation = SOUTH_WESTERN_ENTRANCE; break; } default: @@ -383,33 +392,7 @@ public class FrostLordCastleZone extends AbstractNpcAI player.teleToLocation(teleportLocation); } - @Override - public String onFirstTalk(Npc npc, Player player) - { - String html; - if (npc.getId() == CRYSTAL_ENERGY) - { - html = getHtm(player, "34232.htm"); - return html; - } - - if (npc.getId() == UNDERCOVER_AGENT) - { - if ((_TeleportchargedCrystal != null) && _TeleportchargedCrystal.isSpawned()) - { - html = getHtm(player, "34230-full.htm"); - } - else - { - html = getHtm(player, "34230.htm"); - } - - return html; - } - return null; - } - - private void DeleteGlakiasSpawns(Npc npc) + private void deleteGlakiasSpawns(Npc npc) { int npcId = npc.getId(); if ((npcId == REGGIESYS_GLAKIAS[0]) || (npcId == REGGIESYS_GLAKIAS[1]) || (npcId == SLICING_GLAKIAS[0]) || (npcId == SLICING_GLAKIAS[1])) @@ -418,19 +401,8 @@ public class FrostLordCastleZone extends AbstractNpcAI } } - @RegisterEvent(EventType.ON_PLAYER_BYPASS) - @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) - public void onPlayerBypass(OnPlayerBypass event) - { - final Player player = event.getPlayer(); - if (event.getCommand().startsWith(SCRIPT_BYPASS)) - { - notifyEvent(event.getCommand().replace(SCRIPT_BYPASS, ""), null, player); - } - } - public static void main(String[] args) { new FrostLordCastleZone(); } -} \ No newline at end of file +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java index 75f58f6ccd..0c9d01003c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/custom/events/TeamVsTeam/TvT.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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; @@ -254,6 +255,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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/EffectMasterHandler.java index 5a1756e12d..95e41c1a8d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -44,6 +44,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); @@ -177,6 +179,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveHonorCoins", GiveHonorCoins::new); EffectHandler.getInstance().registerHandler("GiveItemByExp", GiveItemByExp::new); + EffectHandler.getInstance().registerHandler("GivePetXp", GivePetXp::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); @@ -200,6 +203,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); @@ -241,7 +245,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::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("ModifyAssassinationPoints", ModifyAssassinationPoints::new); EffectHandler.getInstance().registerHandler("ModifyBeastPoints", ModifyBeastPoints::new); diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/MasterHandler.java index c194f9d23c..e6042b2512 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/MasterHandler.java @@ -148,6 +148,7 @@ import handlers.bypasshandlers.Link; import handlers.bypasshandlers.Multisell; import handlers.bypasshandlers.NpcViewMod; import handlers.bypasshandlers.Observation; +import handlers.bypasshandlers.PetExtractWindow; import handlers.bypasshandlers.PlayerHelp; import handlers.bypasshandlers.PrivateWarehouse; import handlers.bypasshandlers.QuestLink; @@ -468,6 +469,7 @@ public class MasterHandler Multisell.class, NpcViewMod.class, Observation.class, + PetExtractWindow.class, QuestLink.class, PlayerHelp.class, PrivateWarehouse.class, diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java new file mode 100644 index 0000000000..446334c464 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/bypasshandlers/PetExtractWindow.java @@ -0,0 +1,56 @@ +/* + * 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.bypasshandlers; + +import org.l2jmobius.gameserver.handler.IBypassHandler; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.network.serverpackets.pet.ShowPetExtractSystem; + +/** + * @author Geremy + */ +public class PetExtractWindow implements IBypassHandler +{ + private static final String[] COMMANDS = + { + "pet_extract_window", + }; + + @Override + public boolean useBypass(String command, Player player, Creature target) + { + if (!target.isNpc()) + { + return false; + } + + if (command.toLowerCase().startsWith(COMMANDS[0])) + { + player.sendPacket(ShowPetExtractSystem.STATIC_PACKET); + return true; + } + + return false; + } + + @Override + public String[] getBypassList() + { + return COMMANDS; + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java index 6a724617a2..d1cc5cb90c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/dailymissionhandlers/MonsterDailyMissionHandler.java @@ -113,7 +113,7 @@ public class MonsterDailyMissionHandler extends AbstractDailyMissionHandler final Player player = event.getAttacker(); final int monsterLevel = monster.getLevel(); - if ((_minLevel > 0) && ((monsterLevel < _minLevel) || (monsterLevel > _maxLevel) || ((player.getLevel() - monsterLevel) > 5))) + if ((_minLevel > 0) && ((monsterLevel < _minLevel) || (monsterLevel > _maxLevel) || ((player.getLevel() - monsterLevel) > 15))) { return; } diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/AddMaxMagicCriticalRate.java new file mode 100644 index 0000000000..4f72de76fa --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/AddMaxPhysicalCriticalRate.java new file mode 100644 index 0000000000..84f20e491a --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java index faca7879c5..ec320c5082 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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/GivePetXp.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java new file mode 100644 index 0000000000..c9801b6d42 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/GivePetXp.java @@ -0,0 +1,53 @@ +/* + * 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.actor.Creature; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.skill.Skill; + +/** + * @author Geremy + */ +public class GivePetXp extends AbstractEffect +{ + private final int _xp; + + public GivePetXp(StatSet params) + { + _xp = params.getInt("xp", 0); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, Item item) + { + if (!effector.hasPet()) + { + return; + } + + effected.getActingPlayer().getPet().addExpAndSp(_xp, 0); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.java new file mode 100644 index 0000000000..5405ccd4be --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/IgnoreReduceDamage.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 IgnoreReduceDamage extends AbstractStatEffect +{ + public IgnoreReduceDamage(StatSet params) + { + super(params, Stat.IGNORE_REDUCE_DAMAGE); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ModifyAssassinationPoints.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ModifyAssassinationPoints.java index 431c51423f..9704fc51ee 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ModifyAssassinationPoints.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ModifyAssassinationPoints.java @@ -32,7 +32,7 @@ public class ModifyAssassinationPoints extends AbstractEffect public ModifyAssassinationPoints(StatSet params) { - _amount = params.getInt("amount"); + _amount = params.getInt("amount") * 10000; } @Override @@ -55,6 +55,6 @@ public class ModifyAssassinationPoints extends AbstractEffect return; } - player.setBeastPoints(player.getAssassinationPoints() + _amount); + player.setAssassinationPoints(player.getAssassinationPoints() + _amount); } } \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java index 1f5992cc6a..efa3a0f694 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/ReduceDamage.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java index deead4a540..2ab5c27685 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/SummonMulti.java @@ -16,6 +16,11 @@ */ package handlers.effecthandlers; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + import org.l2jmobius.gameserver.data.xml.ExperienceData; import org.l2jmobius.gameserver.data.xml.NpcData; import org.l2jmobius.gameserver.enums.Race; @@ -33,11 +38,12 @@ import org.l2jmobius.gameserver.model.skill.Skill; /** * SummonMulti effect implementation. - * @author UnAfraid + * @author UnAfraid, Mobius */ public class SummonMulti extends AbstractEffect { private final int _npcId; + private final Map _levelTemplates; private final float _expMultiplier; private final ItemHolder _consumeItem; private final int _lifeTime; @@ -46,7 +52,21 @@ public class SummonMulti extends AbstractEffect public SummonMulti(StatSet params) { - _npcId = params.getInt("npcId"); + _npcId = params.getInt("npcId", 0); + if (_npcId > 0) + { + _levelTemplates = null; + } + else + { + final List summonerLevels = params.getIntegerList("summonerLevels"); + final List npcIds = params.getIntegerList("npcIds"); + _levelTemplates = new LinkedHashMap<>(npcIds.size()); + for (int i = 0; i < npcIds.size(); i++) + { + _levelTemplates.put(summonerLevels.get(i), npcIds.get(i)); + } + } _expMultiplier = params.getFloat("expMultiplier", 1); _consumeItem = new ItemHolder(params.getInt("consumeItemId", 0), params.getInt("consumeItemCount", 1)); _consumeItemInterval = params.getInt("consumeItemInterval", 0); @@ -80,7 +100,31 @@ public class SummonMulti extends AbstractEffect return; } - final NpcTemplate template = NpcData.getInstance().getTemplate(_npcId); + final NpcTemplate template; + if (_npcId > 0) + { + template = NpcData.getInstance().getTemplate(_npcId); + } + else + { + Entry levelTemplate = null; + for (Entry entry : _levelTemplates.entrySet()) + { + if ((levelTemplate == null) || (player.getLevel() >= entry.getKey())) + { + levelTemplate = entry; + } + } + if (levelTemplate != null) + { + template = NpcData.getInstance().getTemplate(levelTemplate.getValue()); + } + else // Should never happen. + { + template = NpcData.getInstance().getTemplate(_levelTemplates.keySet().stream().findFirst().get()); + } + } + final Servitor summon = new Servitor(template, player); final int consumeItemInterval = (_consumeItemInterval > 0 ? _consumeItemInterval : (template.getRace() != Race.SIEGE_WEAPON ? 240 : 60)) * 1000; diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index 1ae3ab2ae8..41fd35ba57 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java index 4e47c369a2..320ea1a78d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByBaseStat.java @@ -34,6 +34,7 @@ public class TriggerSkillByBaseStat extends AbstractEffect private final BaseStat _baseStat; private final int _skillId; private final int _skillLevel; + private final int _skillSubLevel; private final int _min; private final int _max; @@ -42,6 +43,7 @@ public class TriggerSkillByBaseStat extends AbstractEffect _baseStat = params.getEnum("baseStat", BaseStat.class); _skillId = params.getInt("skillId", 0); _skillLevel = params.getInt("skillLevel", 1); + _skillSubLevel = params.getInt("skillSubLevel", 0); _min = params.getInt("min", 0); _max = params.getInt("max", 9999); } @@ -101,7 +103,7 @@ public class TriggerSkillByBaseStat extends AbstractEffect { if (!target.isAffectedBySkill(_skillId)) { - SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel)); + SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel)); } } else diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java index b58c80876e..9a802942ba 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillBySkill.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java index b5416f6f10..a355ce9ed0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByStat.java @@ -34,6 +34,7 @@ public class TriggerSkillByStat extends AbstractEffect private final Stat _stat; private final int _skillId; private final int _skillLevel; + private final int _skillSubLevel; private final int _min; private final int _max; @@ -42,6 +43,7 @@ public class TriggerSkillByStat extends AbstractEffect _stat = params.getEnum("stat", Stat.class); _skillId = params.getInt("skillId", 0); _skillLevel = params.getInt("skillLevel", 1); + _skillSubLevel = params.getInt("skillSubLevel", 0); _min = params.getInt("min", 0); _max = params.getInt("max", 9999); } @@ -63,7 +65,7 @@ public class TriggerSkillByStat extends AbstractEffect { if (!target.isAffectedBySkill(_skillId)) { - SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel)); + SkillCaster.triggerCast(target, target, SkillData.getInstance().getSkill(_skillId, _skillLevel, _skillSubLevel)); } } else diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java index e6aca114c0..479f697dcf 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusMAtk.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java index 52060ceef6..0909b1d0f6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/effecthandlers/WeaponBonusPAtk.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetAttack.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetAttack.java index 9c6cd18230..1e3e138a80 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetAttack.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_DON_T_HAVE_A_PET); return; } - final Pet pet = player.getPet(); if (pet.isUncontrollable()) { player.sendPacket(SystemMessageId.WHEN_YOUR_PET_S_SATIETY_REACHES_0_YOU_CANNOT_CONTROL_IT); + return; } - else if (pet.isBetrayed()) + + if (pet.isBetrayed()) { player.sendPacket(SystemMessageId.YOUR_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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetHold.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetHold.java index a257b160d3..89ecaf607a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetHold.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetMove.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetMove.java index 3d0943335b..0d4aa61742 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetMove.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java index a33ae749ab..5eb78b7bdf 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetSkillUse.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetStop.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetStop.java index 846981df4b..1d2bff3611 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/PetStop.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java index 1a9adbd92c..e6ba7b9145 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorAttack.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_DON_T_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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorHold.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorHold.java index cd17f52e29..d8c393f79a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorHold.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorMode.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorMode.java index 9e9b5dfd4b..e229844cf2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorMode.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorMove.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorMove.java index 664b42eef9..2d4ced59fb 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorMove.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java index 44ec6496dd..591d47685b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorSkillUse.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorStop.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorStop.java index 0e3e27182f..980ef5ef9e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/ServitorStop.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java index ec175a945f..981d23429a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonPet.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java index 9790f27377..c39b5f4366 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/playeractions/UnsummonServitor.java @@ -69,4 +69,10 @@ public class UnsummonServitor implements IPlayerActionHandler player.sendPacket(SystemMessageId.YOU_DON_T_HAVE_A_SERVITOR); } } + + @Override + public boolean isPetAction() + { + return true; + } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/AssassinationPointsSkillCondition.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/AssassinationPointsSkillCondition.java index f96f1d5fdc..276d2d1614 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/AssassinationPointsSkillCondition.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/AssassinationPointsSkillCondition.java @@ -31,7 +31,7 @@ public class AssassinationPointsSkillCondition implements ISkillCondition public AssassinationPointsSkillCondition(StatSet params) { - _amount = params.getInt("amount"); + _amount = params.getInt("amount") * 10000; } @Override diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index 9785766b0f..a23a6139ad 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java index e836ebce13..acee337ee6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/handlers/targethandlers/affectscope/PartyPledge.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java index fa92044392..7c8d6bbb87 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/DwellingOfSpirits/DwellingOfSpirits.java @@ -20,20 +20,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.l2jmobius.gameserver.data.xml.SkillData; -import org.l2jmobius.gameserver.enums.ChatType; -import org.l2jmobius.gameserver.enums.SkillFinishType; +import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.enums.TeleportWhereType; -import org.l2jmobius.gameserver.instancemanager.ZoneManager; +import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.Party; +import org.l2jmobius.gameserver.model.StatSet; 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.holders.SkillHolder; import org.l2jmobius.gameserver.model.instancezone.Instance; -import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; -import org.l2jmobius.gameserver.model.skill.Skill; -import org.l2jmobius.gameserver.model.skill.SkillCaster; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent; @@ -47,8 +42,12 @@ import instances.AbstractInstance; */ public class DwellingOfSpirits extends AbstractInstance { + private static final int PORTAL_OPEN_CHANCE = 40; + // CRITICAL NPCs private static final int RUIP = 22273; + private static final int FAIRY_C1 = 22271; + private static final int FAIRY_C2 = 22272; private static final int SEALSTONE = 34178; private static final int ANIMAEL = 34176; private static final int PORTAL_EVENT_FIRE = 15969; @@ -56,46 +55,10 @@ public class DwellingOfSpirits extends AbstractInstance private static final int PORTAL_EVENT_EARTH = 15972; private static final int PORTAL_EVENT_WIND = 15971; - // PROCELLA BOSS WIND private static final int KING_PROCELLA = 29107; - private static final int PROCELLA_GUARDIAN_1 = 29112; - private static final int PROCELLA_STORM = 29115; - - private static final SkillHolder HURRICANE_SUMMON = new SkillHolder(50042, 1); - private static final int HURRICANE_BOLT = 50043; - private static final SkillHolder HURRICANE_BOLT_LV_1 = new SkillHolder(50043, 1); - private static final int STORM_MAX_COUNT = 20; // - - // PETRAM BOSS EARTH private static final int KING_PETRAM = 29108; - private static final int PETRAM_PIECE = 29116; - private static final int PETRAM_FRAGMENT = 29117; - // Skills - private static final SkillHolder EARTH_ENERGY = new SkillHolder(50066, 1); - private static final SkillHolder EARTH_FURY = new SkillHolder(50059, 1); - private static final SkillHolder TEST = new SkillHolder(5712, 1); - - // IGNIS BOSS FIRE - // NPCs private static final int KING_IGNIS = 29105; - // Skills - private static final SkillHolder FIRE_RAG_2 = new SkillHolder(50050, 2); - private static final SkillHolder FIRE_RAG_4 = new SkillHolder(50050, 4); - private static final SkillHolder FIRE_RAG_6 = new SkillHolder(50050, 6); - private static final SkillHolder FIRE_RAG_8 = new SkillHolder(50050, 8); - - // NEBULA BOSS WATER - // NPCs private static final int KING_NEBULA = 29106; - private static final int WATER_SLIME = 29111; - // Skills - private static final int AQUA_RAGE = 50036; - private static final SkillHolder AQUA_RAGE_1 = new SkillHolder(AQUA_RAGE, 1); - private static final SkillHolder AQUA_RAGE_2 = new SkillHolder(AQUA_RAGE, 2); - private static final SkillHolder AQUA_RAGE_3 = new SkillHolder(AQUA_RAGE, 3); - private static final SkillHolder AQUA_RAGE_4 = new SkillHolder(AQUA_RAGE, 4); - private static final SkillHolder AQUA_RAGE_5 = new SkillHolder(AQUA_RAGE, 5); - private static final SkillHolder AQUA_SUMMON = new SkillHolder(50037, 1); // Entrace Portal Triggers private static final int WIND_FIRST_TRIGGER_1 = 16158880; @@ -107,38 +70,86 @@ public class DwellingOfSpirits extends AbstractInstance private static final int WATER_FIRST_TRIGGER_1 = 16157770; private static final int WATER_FIRST_TRIGGER_2 = 16157772; - // Statue Kill Indicator Triggers - private static final int KILL_INDICATOR_TRIGGER_1 = 16159990; - private static final int KILL_INDICATOR_TRIGGER_2 = 16159994; - private static final int KILL_INDICATOR_TRIGGER_3 = 16159996; - private static final int KILL_INDICATOR_TRIGGER_4 = 16159998; - private static final int KILL_INDICATOR_TRIGGER_5 = 16159992; + // @formatter:off + private static final int[][] PORTAL_TRIGGER_IDS = + { + { 16158880, 16158882 }, + { 16156660, 16156662 }, + { 16155550, 16155552 }, + { 16157770, 16157772 } + }; + + private static final Location IGNIS_FIRE_L = new Location(202374, 168153, -15485); + private static final Location PETRAM_EARTH_L = new Location(222081, 190538, -15485); + private static final Location NEBULA_WATER_L = new Location(222149, 168087, -15485); + private static final Location PROCELLA_WIN_L = new Location(212884, 178847, -15485); + + private static final Location PETRAM_EARTH_RETURN_L = new Location(-114321, -77262, -11445); + private static final Location IGNIS_FIRE_RETURN_L = new Location(-114322, -77262, -11445); + private static final Location NEBULA_WATER_RETURN_L = new Location(-114323, -77262, -11445); + private static final Location PROCELLA_WIN_RETURN_L = new Location(-114324, -77262, -11445); + + private static final int[][][] portalConfigs = + { + {{EARTH_FIRST_TRIGGER_1, EARTH_FIRST_TRIGGER_2, KING_PETRAM}}, + {{FIRE_FIRST_TRIGGER_1, FIRE_FIRST_TRIGGER_2, KING_IGNIS}}, + {{WATER_FIRST_TRIGGER_1, WATER_FIRST_TRIGGER_2, KING_NEBULA}}, + {{WIND_FIRST_TRIGGER_1, WIND_FIRST_TRIGGER_2, KING_PROCELLA}} + }; + + private static final int[][] portalSpawnCoordinates = + { + {222063, 191514, -15486, 50142}, + {202350, 169121, -15484, 48103}, + {222127, 169057, -15486, 48730}, + {212862, 179828, -15489, 48103} + }; + // @formatter:on private static final int TEMPLATE_ID = 214; private static final Map PORTAL_MSG = new HashMap<>(); static { - PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(0, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_EARTH_IS_OPEN); + PORTAL_MSG.put(1, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); PORTAL_MSG.put(2, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WATER_IS_OPEN); PORTAL_MSG.put(3, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_WIND_IS_OPEN); - PORTAL_MSG.put(4, NpcStringId.DIMENSIONAL_DOOR_TO_THE_SPIRIT_OF_FIRE_IS_OPEN); - PORTAL_MSG.put(5, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); + PORTAL_MSG.put(4, NpcStringId.SEAL_STONE_DISAPPEARS_AFTER_RESONATING_WITH_THE_STATUE); } + // Zone + private static final int DWELLING_CENTRAL = 21400000; + + private static final int IGNIS_PORTAL_ENTER_ID = 202201; + private static final int PETRAM_PORTAL_ENTER_ID = 202202; + private static final int NEBULA_PORTAL_ENTER_ID = 202203; + private static final int PROCELLA_PORTAL_ENTER_ID = 202204; + + // Portals return IDs + private static final int IGNIS_PORTAL_RETURN_ID = 202205; + private static final int PETRAM_PORTAL_RETURN_ID = 202206; + private static final int NEBULA_PORTAL_RETURN_ID = 202207; + private static final int PROCELLA_PORTAL_RETURN_ID = 202208; + public DwellingOfSpirits() { super(TEMPLATE_ID); addKillId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); - addKillId(PROCELLA_GUARDIAN_1); - addKillId(PETRAM_PIECE, PETRAM_FRAGMENT); - addKillId(WATER_SLIME); + addKillId(FAIRY_C1, FAIRY_C2, RUIP); addAttackId(KING_PETRAM, KING_NEBULA, KING_PROCELLA, KING_IGNIS); addSpawnId(KING_NEBULA); addFirstTalkId(ANIMAEL, SEALSTONE); addTalkId(ANIMAEL); addStartNpc(SEALSTONE); - addCreatureSeeId(RUIP, ANIMAEL); + addCreatureSeeId(ANIMAEL); + addEnterZoneId(DWELLING_CENTRAL); + addEnterZoneId(IGNIS_PORTAL_ENTER_ID, IGNIS_PORTAL_RETURN_ID); + addEnterZoneId(PETRAM_PORTAL_ENTER_ID, PETRAM_PORTAL_RETURN_ID); + addEnterZoneId(NEBULA_PORTAL_ENTER_ID, NEBULA_PORTAL_RETURN_ID); + addEnterZoneId(PROCELLA_PORTAL_ENTER_ID, PROCELLA_PORTAL_RETURN_ID); + addInstanceEnterId(TEMPLATE_ID); + addInstanceLeaveId(TEMPLATE_ID); } @Override @@ -179,779 +190,106 @@ public class DwellingOfSpirits extends AbstractInstance } case "TELEPORT": { - player.teleToLocation(TeleportWhereType.TOWN, null); - return null; - } - //////////////// BOSS PROCELLA WIND ACTION ///////////// - case "SPAWN_MINION_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (npc.getId() == KING_PROCELLA)) + final Instance instance = player.getInstanceWorld(); + if (instance != null) { - world.setParameter("minion1", addSpawn(PROCELLA_GUARDIAN_1, 212663, 179421, -15486, 31011, true, 0, true, npc.getInstanceId())); - world.setParameter("minion2", addSpawn(PROCELLA_GUARDIAN_1, 213258, 179822, -15486, 12001, true, 0, true, npc.getInstanceId())); - world.setParameter("minion3", addSpawn(PROCELLA_GUARDIAN_1, 212558, 179974, -15486, 12311, true, 0, true, npc.getInstanceId())); - startQuestTimer("HIDE_PROCELLA", 1000, world.getNpc(KING_PROCELLA), player); + instance.finishInstance(); + player.teleToLocation(TeleportWhereType.TOWN, null); } - break; - } - case "SPAWN_STORM_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if ((world != null) && (world.getParameters().getInt("stormCount", 0) < STORM_MAX_COUNT)) - { - world.getNpc(KING_PROCELLA).doCast(HURRICANE_SUMMON.getSkill()); - final Npc procellaStorm = addSpawn(PROCELLA_STORM, world.getNpc(KING_PROCELLA).getX() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getY() + getRandom(-500, 500), world.getNpc(KING_PROCELLA).getZ(), 31011, true, 0, true, npc.getInstanceId()); - procellaStorm.setRandomWalking(true); - world.getParameters().increaseInt("stormCount", 1); - startQuestTimer("SPAWN_STORM_PROCELLA", 30000, world.getNpc(KING_PROCELLA), player); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, procellaStorm, player); - } - break; - } - case "HIDE_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) >= 1) - { - world.getNpc(KING_PROCELLA).setInvisible(true); - } - else if (world.getAliveNpcCount(PROCELLA_GUARDIAN_1) == 0) - { - world.getNpc(KING_PROCELLA).setInvisible(false); - startQuestTimer("SPAWN_MINION_PROCELLA", 90000 + getRandom(-15000, 11000), world.getNpc(KING_PROCELLA), player); - } - break; - } - case "CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().orElse(null); - if ((plr != null) && (plr.isInsideRadius3D(npc, 200))) - { - npc.abortAttack(); - npc.abortCast(); - npc.setTarget(plr); - if (plr.getAffectedSkillLevel(HURRICANE_BOLT) == 1) - { - npc.abortCast(); - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - if (SkillCaster.checkUseConditions(npc, HURRICANE_BOLT_LV_1.getSkill())) - { - npc.doCast(HURRICANE_BOLT_LV_1.getSkill()); - } - } - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - else - { - startQuestTimer("CHECK_CHAR_INSIDE_RADIUS_NPC_PROCELLA", 100, npc, player); - } - } - break; - } - //////////////// BOSS PETRAM EARTH ACTION ///////////// - case "SPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - npc.doCast(EARTH_ENERGY.getSkill()); - - if (!world.getParameters().getBoolean("spawnedMinions", false)) - { - world.getParameters().set("spawnedMinions", true); - - final int stage = world.getParameters().getInt("stage", 0); - world.getParameters().set("stage", stage + 1); - - world.setParameter("minionpetram1", addSpawn(npc, PETRAM_FRAGMENT, 221543, 191530, -15486, 1131, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram2", addSpawn(npc, PETRAM_FRAGMENT, 222069, 192019, -15486, 49364, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram3", addSpawn(npc, PETRAM_FRAGMENT, 222595, 191479, -15486, 34013, false, -1, true, npc.getInstanceId())); - world.setParameter("minionpetram4", addSpawn(npc, PETRAM_FRAGMENT, 222077, 191017, -15486, 16383, false, -1, true, npc.getInstanceId())); - - npc.setInvul(true); - npc.broadcastSay(ChatType.NPC_SHOUT, "HaHahaha, fighters lets kill them. Now Im invul!!!"); - } - - startQuestTimer("SUPPORT_PETRAM", 3000, npc, player); - } - break; - } - case "UNSPAWN_MINION": - { - final Instance world = npc.getInstanceWorld(); - if (world.getAliveNpcCount(PETRAM_FRAGMENT) == 0) - { - world.getParameters().set("spawnedMinions", false); - - npc.setInvul(false); - npc.broadcastSay(ChatType.NPC_SHOUT, "Nooooo... Nooooo..."); - } - break; - } - case "SUPPORT_PETRAM": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Npc m1 = world.getParameters().getObject("minionpetram1", Npc.class); - final Npc m2 = world.getParameters().getObject("minionpetram2", Npc.class); - final Npc m3 = world.getParameters().getObject("minionpetram3", Npc.class); - final Npc m4 = world.getParameters().getObject("minionpetram4", Npc.class); - if (!m1.isDead()) - { - m1.setTarget(world.getNpc(KING_PETRAM)); - m1.doCast(TEST.getSkill()); - } - if (!m2.isDead()) - { - m2.setTarget(world.getNpc(KING_PETRAM)); - m2.doCast(TEST.getSkill()); - } - if (!m3.isDead()) - { - m3.setTarget(world.getNpc(KING_PETRAM)); - m3.doCast(TEST.getSkill()); - } - if (!m4.isDead()) - { - m4.setTarget(world.getNpc(KING_PETRAM)); - m4.doCast(TEST.getSkill()); - } - - startQuestTimer("SUPPORT_PETRAM", 10100, npc, player); - } - break; - } - case "EARTH_FURY": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - npc.doCast(EARTH_FURY.getSkill()); - } - break; - } - //////////////// BOSS IGNIS ACTION ///////////// - case "CAST_FIRE_RAGE_1": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_2.getSkill())) - { - npc.doCast(FIRE_RAG_2.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_2": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_4.getSkill())) - { - npc.doCast(FIRE_RAG_4.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_3": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_6.getSkill())) - { - npc.doCast(FIRE_RAG_6.getSkill()); - } - break; - } - case "CAST_FIRE_RAGE_4": - { - if (SkillCaster.checkUseConditions(npc, FIRE_RAG_8.getSkill())) - { - npc.doCast(FIRE_RAG_8.getSkill()); - } - break; - } - //////////////// BOSS NEBULA ACTION ///////////// - case "SPAWN_WATER_SLIME": - { - final Instance world = npc.getInstanceWorld(); - if (world != null) - { - final Player plr = world.getPlayers().stream().findAny().get(); - if (plr != null) - { - startQuestTimer("CAST_AQUA_RAGE", 30000 + getRandom(-15000, 15000), npc, plr); - } - if (npc.getId() == KING_NEBULA) - { - npc.doCast(AQUA_SUMMON.getSkill()); - for (int i = 0; i < getRandom(4, 6); i++) - { - addSpawn(npc, WATER_SLIME, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, -1, true, npc.getInstanceId()); - startQuestTimer("SPAWN_WATER_SLIME", 80000, npc, null); - } - } - } - break; - } - case "PLAYER_PARA": - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - player.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(true); - startQuestTimer("PLAYER_UNPARA", 5000, npc, player); - } - break; - } - case "PLAYER_UNPARA": - { - player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, AQUA_RAGE_5.getSkill()); - player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.FROZEN_PILLAR); - player.setImmobilized(false); - break; - } - case "CAST_AQUA_RAGE": - { - startQuestTimer("CAST_AQUA_RAGE", 5000, npc, player); - if ((player.isInsideRadius3D(npc, 1000))) - { - if (player.getAffectedSkillLevel(AQUA_RAGE) == 1) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_2.getSkill())) - { - npc.doCast(AQUA_RAGE_2.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 2) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_3.getSkill())) - { - npc.doCast(AQUA_RAGE_3.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 3) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_4.getSkill())) - { - npc.doCast(AQUA_RAGE_4.getSkill()); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 4) - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_5.getSkill())) - { - npc.doCast(AQUA_RAGE_5.getSkill()); - startQuestTimer("PLAYER_PARA", 100, npc, player); - } - } - else if (player.getAffectedSkillLevel(AQUA_RAGE) == 5) - { - npc.abortCast(); - } - else - { - if (SkillCaster.checkUseConditions(npc, AQUA_RAGE_1.getSkill())) - { - npc.doCast(AQUA_RAGE_1.getSkill()); - } - } - } - break; - } - case "check_status": - { - final Instance world = player.getInstanceWorld(); - if (!isInInstance(world)) - { - return null; - } - - switch (world.getStatus()) - { - case 0: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(1); - world.despawnGroup("sealstone"); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 1: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(2); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 2: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(3); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 3: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(4); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 4: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(5); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(3), null)); - addSpawn(KING_PROCELLA, 212862, 179828, -15489, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 5: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 6: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(7); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 7: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(8); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_1"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 8: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(9); - world.spawnGroup("NormalMobs"); - world.spawnGroup("ruipwave_2"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 9: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(10); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(1), null)); - addSpawn(KING_PETRAM, 222063, 191514, -15486, 50142, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 10: // Dummy stage pause, u need defeat boss to continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 11: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(12); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 12: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(13); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 13: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(14); - world.spawnGroup("ruipwave_2"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 14: - { - if (world.getAliveNpcCount(RUIP) <= 1) - { - world.setStatus(15); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); - addSpawn(KING_IGNIS, 202350, 169121, -15484, 48103, false, 0, false, world.getId()); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 15: // Dummy stage pause, u need defeat boss for continue. - { - if (world.getAliveNpcCount(RUIP) == 0) - { - - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 16: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(17); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_1, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 17: - { - if (world.getAliveNpcCount(RUIP) <= 3) - { - world.setStatus(18); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_2, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_3, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 18: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.setStatus(19); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_4, true)); - player.broadcastPacket(new OnEventTrigger(KILL_INDICATOR_TRIGGER_5, true)); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 19: // need defeat boss for finish. - { - if (world.getAliveNpcCount(RUIP) == 0) - - { - world.setStatus(20); - world.spawnGroup("ruipwave_1"); - world.spawnGroup("NormalMobs"); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(2), null)); - addSpawn(KING_NEBULA, 222127, 169057, -15486, 48730, false, 0, false, world.getId()); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - case 20: - { - if (world.getAliveNpcCount(RUIP) == 0) - { - world.getParameters().set("DwellingOfSpiritsFinished", true); - world.setStatus(21); - } - startQuestTimer("check_status", 1000, null, player); - break; - } - } - - return null; } } return super.onAdvEvent(event, npc, player); - - } - - @Override - public String onSpawn(Npc npc) - { - startQuestTimer("SPAWN_WATER_SLIME", 40000, npc, null); - return super.onSpawn(npc); - } - - @Override - public String onAttack(Npc npc, Player player, int damage, boolean isSummon, Skill skill) - { - final Instance world = npc.getInstanceWorld(); - if (world == null) - { - return null; - } - - switch (npc.getId()) - { - case KING_PROCELLA: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) - { - startQuestTimer("SPAWN_MINION_PROCELLA", 80000 + getRandom(-15000, 15000), npc, player); - startQuestTimer("SPAWN_STORM_PROCELLA", 4000, npc, player); - world.setParameter("stormCount", 0); - } - break; - } - case KING_PETRAM: - { - if (npc.getCurrentHp() < (npc.getMaxHp() * 0.80)) - { - startQuestTimer("EARTH_FURY", 1000, npc, player); - if ((world.getParameters().getInt("stage", 0) == 0) || (npc.getCurrentHp() < (npc.getMaxHp() * 0.50))) - { - startQuestTimer("SPAWN_MINION", 1000, npc, player); - } - } - break; - } - case KING_IGNIS: - { - if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.90)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.70))) - { - startQuestTimer("CAST_FIRE_RAGE_1", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.70)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.50))) - { - startQuestTimer("CAST_FIRE_RAGE_2", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.50)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.40))) - { - startQuestTimer("CAST_FIRE_RAGE_3", 1000, npc, null); - } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.40)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.25))) - { - startQuestTimer("CAST_FIRE_RAGE_4", 1000, npc, null); - } - break; - } - } - - return null; - } - - @Override - public String onCreatureSee(Npc npc, Creature creature) - { - if (creature.isPlayer()) - { - final Instance world = creature.getInstanceWorld(); - if (world.getStatus() >= 5) - { - enableZoneWind(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WIND_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 10) - { - enableZoneEarth(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(EARTH_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 15) - { - enableZoneFire(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(FIRE_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 20) - { - enableZoneWater(); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_1, true)); - creature.getActingPlayer().sendPacket(new OnEventTrigger(WATER_FIRST_TRIGGER_2, true)); - } - else if (world.getStatus() >= 21) - { - world.despawnGroup("ruipwave_1"); - world.despawnGroup("ruipwave_2"); - world.despawnGroup("NormalMobs"); - world.finishInstance(); - } - } - - return super.onCreatureSee(npc, creature); } @Override public String onKill(Npc npc, Player player, boolean isSummon) { final Instance instance = npc.getInstanceWorld(); + final StatSet worldParameters = instance.getParameters(); + + int totalBossDefeatCount = worldParameters.getInt("totalBossDefeatCount", 0); switch (npc.getId()) { - case KING_PETRAM: + case RUIP: + case FAIRY_C1: + case FAIRY_C2: { - final Npc portal = addSpawn(PORTAL_EVENT_EARTH, 222065, 192767, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); // set the portal visible - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneEarthExit(); - cancelQuestTimer("SPAWN_MINION", npc, player); - instance.setStatus(12); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PETRAM_FRAGMENT)) + if (Rnd.get(100) <= PORTAL_OPEN_CHANCE) { - spawn.deleteMe(); - } - break; - } - case KING_NEBULA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WATER, 222127, 170488, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); - setActive(true); - enableZoneWindExit(); - instance.setStatus(21); - instance.spawnGroup("animael"); - break; - } - case KING_IGNIS: - { - final Npc portal = addSpawn(PORTAL_EVENT_FIRE, 202349, 170533, -15488, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneFireExit(); - instance.setStatus(17); - break; - } - case KING_PROCELLA: - { - final Npc portal = addSpawn(PORTAL_EVENT_WIND, 212863, 181090, -15487, 16384, false, 0, false, instance.getId()); - portal.setDisplayEffect(1); - player.getVariables().set("DSIGNIS", 1); - setActive(true); - enableZoneWaterExit(); - instance.setStatus(7); - final Instance world = npc.getInstanceWorld(); - for (Npc spawn : world.getNpcs(PROCELLA_GUARDIAN_1)) - { - spawn.deleteMe(); - } - break; - } - case PETRAM_FRAGMENT: - { - startQuestTimer("UNSPAWN_MINION", 1000, instance.getNpc(KING_PETRAM), player); - break; - } - case PROCELLA_GUARDIAN_1: - { - - startQuestTimer("HIDE_PROCELLA", 1000, instance.getNpc(KING_PROCELLA), player); - break; - } - case WATER_SLIME: - { - if (getRandomBoolean()) - { - switch (player.getAffectedSkillLevel(AQUA_RAGE)) + int portalId = Rnd.get(4); + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + + if (!isPortalOpened) { - case 1: + if (instance.getStatus() > totalBossDefeatCount) { - player.stopSkillEffects(AQUA_RAGE_1.getSkill()); - break; - } - case 2: - { - player.stopSkillEffects(AQUA_RAGE_2.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 1); - skill.applyEffects(player, player); - break; - } - case 3: - { - player.stopSkillEffects(AQUA_RAGE_3.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 2); - skill.applyEffects(player, player); - break; - } - case 4: - { - player.stopSkillEffects(AQUA_RAGE_4.getSkill()); - final Skill skill = SkillData.getInstance().getSkill(AQUA_RAGE, 3); - skill.applyEffects(player, player); - break; + return super.onKill(npc, player, isSummon); } + instance.setStatus(instance.getStatus() + 1); + openPortal(player, portalId, instance); + worldParameters.set("portal" + portalId + "Opened", true); } } break; } + + case KING_PETRAM: + case KING_PROCELLA: + case KING_IGNIS: + case KING_NEBULA: + { + spawnExitPortal(instance, player, npc.getId()); + CheckGeneralResidenceStages(npc, instance); + + break; + } } return super.onKill(npc, player, isSummon); } + @Override + public String onEnterZone(Creature creature, ZoneType zone) + { + Instance instance = creature.getInstanceWorld(); + if ((instance != null) && creature.isPlayer()) + { + + final StatSet worldParameters = instance.getParameters(); + + if (zone.getId() == DWELLING_CENTRAL) + { + worldParameters.set("InsideResidence", true); + handleCentralZone(instance, worldParameters); + } + + int portalId = getPortalIdByZone(zone.getId()); + Location[] locations = getLocationsForPortal(portalId); + + if ((portalId >= 0) && (locations[0] != null)) + { + boolean isPortalOpened = worldParameters.getBoolean("portal" + portalId + "Opened", false); + boolean isPortalExitOpened = worldParameters.getBoolean("portalExit" + portalId, false); + boolean InsideResidence = worldParameters.getBoolean("InsideResidence", false); + + if (isPortalOpened && (InsideResidence)) + { + creature.teleToLocation(locations[0], instance); + worldParameters.set("InsideResidence", false); + } + + if (isPortalExitOpened && (!InsideResidence)) + { + creature.teleToLocation(locations[1], instance); + } + } + + } + return null; + } + @Override public String onFirstTalk(Npc npc, Player player) { @@ -970,87 +308,251 @@ public class DwellingOfSpirits extends AbstractInstance return super.onFirstTalk(npc, player); } - // PORTALS - private void enableZoneWind() + private void openPortal(Player player, int id, Instance instance) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_wind"); - if (zone != null) + + if ((id >= 0) && (id < portalSpawnCoordinates.length)) { - zone.setEnabled(true); + int[] coordinates = portalSpawnCoordinates[id]; + int trigger1 = portalConfigs[id][0][0]; + int trigger2 = portalConfigs[id][0][1]; + int kingId = portalConfigs[id][0][2]; + + if ((id >= 0) && (id < PORTAL_MSG.size())) + { + NpcStringId portalMessage = PORTAL_MSG.get(id); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, portalMessage, null)); + } + addSpawn(kingId, coordinates[0], coordinates[1], coordinates[2], coordinates[3], false, 0, false, instance.getId()); + + instance.setParameter("TRIGGER_1_" + id, trigger1); + instance.setParameter("TRIGGER_2_" + id, trigger2); + + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } - private void enableZoneEarth() + private void spawnExitPortal(Instance instance, Player player, int bossId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_earth"); - if (zone != null) + Npc portal; + int portalId; + Location portalLocation; + + final StatSet worldParameters = instance.getParameters(); + worldParameters.set("portalExit" + getPortalByBossId(bossId), true); + + switch (bossId) { - zone.setEnabled(true); + case KING_PROCELLA: + { + portalId = PORTAL_EVENT_WIND; + portalLocation = new Location(212863, 181090, -15487); + break; + } + case KING_PETRAM: + { + portalId = PORTAL_EVENT_EARTH; + portalLocation = new Location(222065, 192767, -15488); + break; + } + case KING_IGNIS: + { + portalId = PORTAL_EVENT_FIRE; + portalLocation = new Location(202349, 170533, -15488); + break; + } + case KING_NEBULA: + { + portalId = PORTAL_EVENT_WATER; + portalLocation = new Location(222127, 170488, -15488); + break; + } + default: + { + return; + } + } + portal = addSpawn(portalId, portalLocation, false, 0, false, instance.getId()); + + if (portal != null) + { + portal.setDisplayEffect(1); + } + + } + + private int getPortalByBossId(int bossId) + { + switch (bossId) + { + case KING_PETRAM: + { + return 0; + } + case KING_IGNIS: + { + return 1; + } + case KING_NEBULA: + { + return 2; + } + case KING_PROCELLA: + { + return 3; + } + default: + return -1; } } - private void enableZoneFire() + private int getPortalIdByZone(int zoneId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_fire"); - if (zone != null) + switch (zoneId) { - zone.setEnabled(true); + case PETRAM_PORTAL_ENTER_ID: + case PETRAM_PORTAL_RETURN_ID: + { + return 0; + } + case IGNIS_PORTAL_ENTER_ID: + case IGNIS_PORTAL_RETURN_ID: + { + return 1; + } + case NEBULA_PORTAL_ENTER_ID: + case NEBULA_PORTAL_RETURN_ID: + { + return 2; + } + case PROCELLA_PORTAL_ENTER_ID: + case PROCELLA_PORTAL_RETURN_ID: + { + return 3; + } + default: + { + return -1; + } } } - private void enableZoneWater() + private Location[] getLocationsForPortal(int portalId) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("dwelling_portal_water"); - if (zone != null) + Location[] locations = new Location[2]; + + switch (portalId) { - zone.setEnabled(true); + case 0: + { + locations[0] = PETRAM_EARTH_L; + locations[1] = PETRAM_EARTH_RETURN_L; + break; + } + case 1: + { + locations[0] = IGNIS_FIRE_L; + locations[1] = IGNIS_FIRE_RETURN_L; + break; + } + case 2: + { + locations[0] = NEBULA_WATER_L; + locations[1] = NEBULA_WATER_RETURN_L; + break; + } + case 3: + { + locations[0] = PROCELLA_WIN_L; + locations[1] = PROCELLA_WIN_RETURN_L; + break; + } + } + + return locations; + } + + private void CheckGeneralResidenceStages(Npc npc, Instance instance) + { + final StatSet worldParameters = instance.getParameters(); + + int portalId = getPortalByBossId(npc.getId()); + + if ((portalId >= 0) && (portalId < portalConfigs.length)) + { + String bossDefeatCountKey = "bossOfPortal_" + portalId + "_defeat_count"; + int currentDefeatCount = worldParameters.getInt(bossDefeatCountKey, 0); + int newDefeatCount = currentDefeatCount + 1; + + worldParameters.set(bossDefeatCountKey, newDefeatCount); + } + + int totalBossDefeatCount = 0; + + for (int i = 0; i < portalConfigs.length; i++) + { + String bossDefeatCountKey = "bossOfPortal_" + i + "_defeat_count"; + totalBossDefeatCount += worldParameters.getInt(bossDefeatCountKey, 0); + } + + worldParameters.set("totalBossDefeatCount", totalBossDefeatCount); + + if (totalBossDefeatCount >= 4) + { + instance.spawnGroup("animael"); + instance.despawnGroup("ruipwave_1"); + instance.despawnGroup("NormalMobs"); } } - private void enableZoneWindExit() + private void handleCentralZone(Instance instance, StatSet worldParameters) { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_procella"); - if (zone != null) + for (int id = 0; id < PORTAL_TRIGGER_IDS.length; id++) { - zone.setEnabled(true); - } - } - - private void enableZoneEarthExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_petram"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneFireExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_ignis"); - if (zone != null) - { - zone.setEnabled(true); - } - } - - private void enableZoneWaterExit() - { - final ZoneType zone = ZoneManager.getInstance().getZoneByName("return_portal_nebula"); - if (zone != null) - { - zone.setEnabled(true); + int trigger1 = worldParameters.getInt("TRIGGER_1_" + id, -1); + int trigger2 = worldParameters.getInt("TRIGGER_2_" + id, -1); + + if ((trigger1 != -1) && (trigger2 != -1)) + { + instance.broadcastPacket(new OnEventTrigger(trigger1, true)); + instance.broadcastPacket(new OnEventTrigger(trigger2, true)); + } } } private void startEvent(Npc npc, Player player) { - if (!player.getInstanceWorld().getParameters().getBoolean("DwellingOfSpiritsFinished", false)) + final Instance instance = player.getInstanceWorld(); + instance.setParameter("Running", true); + player.getInstanceWorld().broadcastPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(4), null)); + instance.spawnGroup("ruipwave_1"); + instance.spawnGroup("NormalMobs"); + + if (npc.getId() == SEALSTONE) { - player.sendPacket(new ExSendUIEvent(player, false, false, 1800, 2, NpcStringId.TIME_LEFT)); - player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 8000, false, null, PORTAL_MSG.get(5), null)); - startQuestTimer("check_status", 1000, null, player); + instance.despawnGroup("sealstone"); } + + } + + @Override + public void onInstanceEnter(Player player, Instance instance) + { + boolean Running = instance.getParameters().getBoolean("Running", false); + if ((instance.getRemainingTime() > 0) && Running) + { + player.sendPacket(new ExSendUIEvent(player, false, false, (int) (instance.getRemainingTime() / 1000), 0, NpcStringId.TIME_LEFT)); + } + } + + @Override + public void onInstanceLeave(Player player, Instance instance) + { + + player.sendPacket(new ExSendUIEvent(player, false, false, 0, 0, NpcStringId.TIME_LEFT)); } public static void main(String[] args) diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java index 912a293160..2414f8fcfe 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/instances/TimedHunting/TimedHunting.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.ai.AttackableAI; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.data.xml.SkillData; import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData; +import org.l2jmobius.gameserver.enums.Race; import org.l2jmobius.gameserver.enums.ShortcutType; import org.l2jmobius.gameserver.enums.SkillFinishType; import org.l2jmobius.gameserver.instancemanager.InstanceManager; @@ -60,6 +61,8 @@ public class TimedHunting extends AbstractInstance private static final int DEBBIE = 34126; // War-Torn Plains 70-79 // Skill private static final int BUFF = 45197; + private static final int BUFF_FOR_KAMAEL = 45198; + // Misc private static final int[] TEMPLATES = { @@ -201,7 +204,14 @@ public class TimedHunting extends AbstractInstance } npc.setTarget(player); - if (!player.getEffectList().isAffectedBySkill(BUFF)) + if (player.getRace() == Race.KAMAEL) + { + if (!player.getEffectList().isAffectedBySkill(BUFF_FOR_KAMAEL)) + { + npc.doCast(new SkillHolder(BUFF_FOR_KAMAEL, 1).getSkill()); + } + } + else if (!player.getEffectList().isAffectedBySkill(BUFF)) { npc.doCast(new SkillHolder(BUFF, 1).getSkill()); } @@ -276,6 +286,7 @@ public class TimedHunting extends AbstractInstance player.sendPacket(new TimedHuntingZoneExit(108)); // Training Zone id. player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); + player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_FOR_KAMAEL); instance.setParameter("PlayerIsOut", true); // Restore normal skills. diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10061_NewLifesLessons/Q10061_NewLifesLessons.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10061_NewLifesLessons/Q10061_NewLifesLessons.java index 631e19a098..ce6f3104e0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10061_NewLifesLessons/Q10061_NewLifesLessons.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10061_NewLifesLessons/Q10061_NewLifesLessons.java @@ -28,6 +28,8 @@ import org.l2jmobius.gameserver.model.quest.newquestdata.QuestCondType; import org.l2jmobius.gameserver.network.serverpackets.quest.ExQuestDialog; import org.l2jmobius.gameserver.network.serverpackets.quest.ExQuestNotification; +import quests.Q10062_StrengthOfSpirit.Q10062_StrengthOfSpirit; + /** * @author Magik */ @@ -104,10 +106,10 @@ public class Q10061_NewLifesLessons extends Quest questState.exitQuest(false, true); rewardPlayer(player); - final QuestState nextQuestState = player.getQuestState(Q10061_NewLifesLessons.class.getSimpleName()); + final QuestState nextQuestState = player.getQuestState(Q10062_StrengthOfSpirit.class.getSimpleName()); if (nextQuestState == null) { - player.sendPacket(new ExQuestDialog(10061, QuestDialogType.ACCEPT)); + player.sendPacket(new ExQuestDialog(10062, QuestDialogType.ACCEPT)); } } break; diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10062_StrengthOfSpirit/Q10062_StrengthOfSpirit.java b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10062_StrengthOfSpirit/Q10062_StrengthOfSpirit.java index 31705d73a6..2e0facd0a0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10062_StrengthOfSpirit/Q10062_StrengthOfSpirit.java +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/scripts/quests/Q10062_StrengthOfSpirit/Q10062_StrengthOfSpirit.java @@ -28,6 +28,8 @@ import org.l2jmobius.gameserver.model.quest.newquestdata.QuestCondType; import org.l2jmobius.gameserver.network.serverpackets.quest.ExQuestDialog; import org.l2jmobius.gameserver.network.serverpackets.quest.ExQuestNotification; +import quests.Q10063_LearningAutoHunt.Q10063_LearningAutoHunt; + /** * @author Magik */ @@ -36,7 +38,7 @@ public class Q10062_StrengthOfSpirit extends Quest private static final int QUEST_ID = 10062; private static final int[] MONSTERS = { - 22324 // Training dummy + 22183 // Training dummy }; public Q10062_StrengthOfSpirit() @@ -104,10 +106,10 @@ public class Q10062_StrengthOfSpirit extends Quest questState.exitQuest(false, true); rewardPlayer(player); - final QuestState nextQuestState = player.getQuestState(Q10062_StrengthOfSpirit.class.getSimpleName()); + final QuestState nextQuestState = player.getQuestState(Q10063_LearningAutoHunt.class.getSimpleName()); if (nextQuestState == null) { - player.sendPacket(new ExQuestDialog(10062, QuestDialogType.ACCEPT)); + player.sendPacket(new ExQuestDialog(10063, QuestDialogType.ACCEPT)); } } break; diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Overlord.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Overlord.xml index 544886ba90..5c3fcf1fb0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Overlord.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Overlord.xml @@ -6,6 +6,7 @@ + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Warcryer.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Warcryer.xml index 7ee482f6a3..2ca595b04e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Warcryer.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/skillTrees/2ndClass/Warcryer.xml @@ -6,6 +6,7 @@ + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/augmentation/options/50100-50199.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/augmentation/options/50100-50199.xml index f8b80d4fb4..da45ee54ec 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/augmentation/options/50100-50199.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/augmentation/options/50100-50199.xml @@ -677,38 +677,38 @@ diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49400-49499.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49400-49499.xml index 051690bf97..b00af4fb34 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49400-49499.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49400-49499.xml @@ -1430,13 +1430,23 @@ - + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49500-49599.xml index e36b4c92ba..c5729cce86 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49500-49599.xml @@ -386,6 +386,8 @@ + + @@ -441,6 +443,12 @@ + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49800-49899.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49800-49899.xml index 6e8d5c51c6..e949f27fe5 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49800-49899.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/49800-49899.xml @@ -789,6 +789,10 @@ + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/91400-91499.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/91400-91499.xml index dccb0a67c3..745be5016d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/91400-91499.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/91400-91499.xml @@ -977,57 +977,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94100-94199.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94100-94199.xml index 509c9469b3..e0a94a9f48 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94100-94199.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94100-94199.xml @@ -292,6 +292,16 @@ + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94400-94499.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94400-94499.xml index 64a7437fa3..9f6753352c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94400-94499.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94400-94499.xml @@ -1232,7 +1232,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94500-94599.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94500-94599.xml index 165afa230b..e612d5e17c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94500-94599.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94500-94599.xml @@ -190,7 +190,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94600-94699.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94600-94699.xml index 1460c4c82d..301569fd40 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94600-94699.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/94600-94699.xml @@ -604,7 +604,10 @@ - + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/96900-96999.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/96900-96999.xml index fb24471653..2fc3953cb0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/96900-96999.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/96900-96999.xml @@ -339,23 +339,51 @@ - + + + + + 543 304 379 + 8 + 6 19 40 + + + + + + + + + + + + + + + + + + + + + + @@ -363,69 +391,153 @@ + + + + 597 304 379 + 5 + 10 15 40 + + + + + + + + + + + + + + + + + + + + + + - + + + + + 462 357 379 + 8 + 6 19 40 + + + + + + + + + + + + + + + + + + + + + + - + + + + + 628 304 325 + 8 + 6 5 80 + + + + + + + + + + + + + + + + + + + + + + @@ -433,45 +545,101 @@ + + + + 1018 319 293 + -3.75 + 10 5 - 80 + 400 + + + + + + + + + + + + + + + + + + + + + + - + + + + + 506 337 406 + 8 + 10 19 40 + + + + + + + + + + + + + + + + + + + + + + @@ -479,23 +647,51 @@ + + + + 532 377 325 + 8 + 6 19 80 + + + + + + + + + + + + + + + + + + + + + + @@ -519,23 +715,51 @@ - + + + + + 458 304 433 + -3.75 + 12 5 40 + + + + + + + + + + + + + + + + + + + + + + @@ -574,22 +798,49 @@ + + + + 628 304 325 + 8 10 40 + + + + + + + + + + + + + + + + + + + + + + @@ -597,25 +848,51 @@ + + + - - - + 543 304 325 + -3.75 + 8 10 80 + + + + + + + + + + + + + + + + + + + + + + + @@ -623,23 +900,51 @@ + + - + + + 1018 319 293 + -3.75 + 12 5 500 + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/97000-97099.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/97000-97099.xml index 479be17e43..a633e4167b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/97000-97099.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/items/97000-97099.xml @@ -1737,24 +1737,50 @@ - + + - + + + 543 304 379 + 8 10 40 + + + + + + + + + + + + + + + + + + + + + + @@ -1762,23 +1788,48 @@ + - + + + 628 304 325 + 8 10 40 + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/npcs/29100-29199.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/npcs/29100-29199.xml index 21cbdbee28..48917e71c4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/npcs/29100-29199.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/npcs/29100-29199.xml @@ -3327,7 +3327,7 @@ - + @@ -3652,7 +3652,7 @@ - + diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/pets/16079_BuffaloCalt.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/pets/16079_BuffaloCalf.xml similarity index 97% rename from L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/pets/16079_BuffaloCalt.xml rename to L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/pets/16079_BuffaloCalf.xml index 55e3ace585..661b584e16 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/stats/pets/16079_BuffaloCalt.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/pets/16079_BuffaloCalf.xml @@ -1,1721 +1,1721 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/01800-01899.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/01800-01899.xml index f89271b95e..02ac7645f0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/01800-01899.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/01800-01899.xml @@ -1318,6 +1318,7 @@ 1 2 3 + 4 3 KNOCKDOWN diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39100-39199.xml index 6edd99a281..f24e72a5f4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39100-39199.xml @@ -57,7 +57,19 @@ icon.etc_reagent_white_i00 + 2 + 1 A1 + 5 + 0 + SELF + SINGLE + + + 500 + DIFF + + icon.sa_cube @@ -2493,6 +2505,59 @@ icon.sa_cube + 1 A1 + -1 + 500 + 500 + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39200-39299.xml index 18443f9ebc..bd7bd85859 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39200-39299.xml @@ -2064,7 +2064,7 @@ 1200 1 - 2 + 2 4 60000 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39300-39399.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39300-39399.xml index 87c7313e0c..4a0928359b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39300-39399.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/39300-39399.xml @@ -532,14 +532,14 @@ - + icon.etc_wit_symbol_i01 A1 500 900000 - + icon.etc_wit_symbol_i01 A1 @@ -547,7 +547,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -555,7 +555,7 @@ 900000 100 - + icon.etc_wit_symbol_i01 A1 @@ -563,7 +563,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -571,7 +571,7 @@ 600000 100 - + icon.etc_wit_symbol_i01 A1 @@ -582,7 +582,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -593,7 +593,7 @@ 300000 -100 - + icon.etc_wit_symbol_i01 A1 @@ -604,7 +604,7 @@ -671 43 - + icon.etc_wit_symbol_i01 A1 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/40200-40299.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/40200-40299.xml index d0528393dc..ac9352c483 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/40200-40299.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/40200-40299.xml @@ -620,11 +620,14 @@ 1 94480 5 - 0 - 1 5 PET SINGLE + + + 100000000 + + @@ -642,12 +645,14 @@ A1 1 94517 - 5 - 0 - 1 5 PET SINGLE + + + 2000000000 + + icon.skill0000 @@ -836,6 +841,16 @@ icon.skill0000 A1 + 1 + 94635 + 5 + PET + SINGLE + + + 1000000 + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/45100-45199.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/45100-45199.xml index 677f06a52d..2f71ecc947 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/45100-45199.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/45100-45199.xml @@ -4805,10 +4805,11 @@ icon.skill_kamael_shadowside - A1 + A2 1 600 - BR_EVENT_BUF1 + KAMAEL_TRANSFORM + KAMAEL_BLACK_TRANSFORM;LONG_RAPIER_BLACK_AVE;BLACK_STANCE_AVE 4 20 @@ -4816,9 +4817,21 @@ A2 1 - U_ER_WI_WINDHIDE_AVE TARGET SINGLE + + + TRANSFORM + + + 50 + DIFF + + + 3 + 50 + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47000-47099.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47000-47099.xml index 96e334db6e..6b128de90d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47000-47099.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47000-47099.xml @@ -2142,6 +2142,7 @@ 1 2 3 + 4 1200 CHEAP_MAGIC @@ -2153,6 +2154,7 @@ 20 30 40 + 40 3 3031 @@ -2168,6 +2170,7 @@ -10 -15 -20 + -20 PER 0 @@ -2177,6 +2180,7 @@ -4 -7 -10 + -10 PER 1 @@ -2186,6 +2190,7 @@ -10 -15 -20 + -20 PER 3 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47200-47299.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47200-47299.xml index d5fc60c64c..0abc834edc 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47200-47299.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47200-47299.xml @@ -1957,38 +1957,7 @@ icon.s_saint_recovery - P - 5 - 76 - - - - 100 - 47261 - - 1 - 2 - 3 - - - - - 100 - 47262 - - 1 - 2 - 3 - - - - - - - icon.s_saint_recovery - 600 - 1100 - 1 + true A1 5 SELF @@ -2003,10 +1972,35 @@ + + + icon.s_saint_recovery + P + 5 + 76 + + + 100 + 47260 + + 1 + 2 + 3 + + + + 100 + 47262 + + 1 + 2 + 3 + + + + icon.s_saint_recovery - 600 - 1100 1 A1 60000 @@ -4140,7 +4134,7 @@ Creature 1 20 - TARGET + SELF false ALL 53007 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47400-47499.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47400-47499.xml index 452aeefdbc..0856f096bd 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47400-47499.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/47400-47499.xml @@ -1084,6 +1084,11 @@ 3047418 1 + + 1001 + 1002 + 1003 + 0 64 @@ -1096,6 +1101,11 @@ 3047419 1 + + 1001 + 1002 + 1003 + 65 74 @@ -1108,6 +1118,11 @@ 3047420 1 + + 1001 + 1002 + 1003 + 75 84 @@ -1120,6 +1135,11 @@ 3047421 1 + + 1001 + 1002 + 1003 + 85 999 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50400-50499.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50400-50499.xml index f9046d7b98..85734214c3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50400-50499.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50400-50499.xml @@ -165,8 +165,12 @@ 80 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -266,8 +270,12 @@ 150 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF @@ -306,8 +314,6 @@ icon.bless_effect_enchant P - 5 - 1 200 @@ -321,8 +327,12 @@ 200 DIFF - - 550 + + 50 + DIFF + + + 50 DIFF diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50500-50599.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50500-50599.xml index be1d04901b..a1355e326c 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50500-50599.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50500-50599.xml @@ -4333,6 +4333,7 @@ 28 30 32 + 32 DIFF @@ -4639,7 +4640,7 @@ DIFF - + 0 50 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50600-50699.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50600-50699.xml index fc48ae87db..a40c7d1780 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50600-50699.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/50600-50699.xml @@ -1578,943 +1578,1914 @@ icon.immortal_weapon_sword - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + CON + + + 20 + PER + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_blunt - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + CON + + + 20 + PER + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_two_hand_sword - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + + icon.immortal_weapon_ancientsword - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_dual_sword - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_dualfist - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50647 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_pole - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + CON + + + 20 + PER + + + Creature + 1 + SELF + false + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50645 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_dagger - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_rapier - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + MEN + + + 20 + PER + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50643 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_staff - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + INT + + + + 5 + 6 + 7 + 8 + 9 + 10 + + WIT + + + 20 + PER + + + Creature + 1 + SELF + false + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_two_hand_staff - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + INT + + + + 5 + 6 + 7 + 8 + 9 + 10 + + MEN + + + 20 + PER + + + Creature + 1 + SELF + false + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50651 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.immortal_weapon_bow - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.Immortal_weapon_shooter - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + DEX + + + 20 + PER + + + Creature + 1 + SELF + false + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50649 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + icon.fire_sword_aden - A1 - 0 - 0 - -1 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + P + + + + 5 + 6 + 7 + 8 + 9 + 10 + + STR + + + + 5 + 6 + 7 + 8 + 9 + 10 + + CON + + + 20 + PER + + + Creature + 1 + SELF + false + 50653 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + true + 50653 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 2 + 3 + 4 + 6 + 8 + 10 + + + + Creature + 1 + SELF + false + 50653 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + Creature + 1 + SELF + true + 50653 + + 1 + 2 + 3 + 4 + 5 + 6 + + + 5 + 7 + 9 + 12 + 16 + 20 + + true + false + + + 45332 + 87201 + + + 45333 + 87202 + + + 45334 + 87203 + + + 10 + + + 45311 + 87204 + + icon.skill30858 - A1 - 1 - 0 - -1 - 0 - 0 - 0 - -9999 - 0 + true + A2 5 - - - - - - - - - - - - - - - - - - + true + SELF + SINGLE + + + + -250 + -275 + -300 + -325 + -350 + -375 + + DIFF + + + + -100 + -110 + -120 + -130 + -140 + -150 + + DIFF + + + + -1000 + -1500 + -2000 + -3000 + -4000 + -5000 + + DIFF + + + + -1000 + -1500 + -2000 + -3000 + -4000 + -5000 + + DIFF + + + + -1000 + -1500 + -2000 + -3000 + -4000 + -5000 + + DIFF + + + 50640 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill10512 - A1 - 1 - 0 - -1 - 0 - 0 - 0 - -9999 - 0 + true + A2 5 + SELF + SINGLE @@ -2546,15 +3517,40 @@ icon.s_immortal_slash A1 - 0 - 0 - 1200 - 0 - 0 - 0 + 200 + 1-5 -9999 - 0 - 0 + SELF + POINT_BLANK + NOT_FRIEND + + + + 5000 + 7000 + 10000 + 15000 + 22000 + 30000 + + DIFF + + + 50657 + 1 + + + 50639 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill0000 @@ -2572,15 +3568,40 @@ icon.s_hurricane_crush A1 - 0 - 0 - 1200 - 0 - 0 - 0 + 200 + 1-5 -9999 - 0 - 0 + SELF + POINT_BLANK + NOT_FRIEND + + + + 5000 + 7000 + 10000 + 15000 + 22000 + 30000 + + DIFF + + + 50658 + 1 + + + 50639 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill0000 @@ -2598,15 +3619,40 @@ icon.s_dual_execution A1 - 0 - 0 - 1200 - 0 - 0 - 0 + 200 + 1-5 -9999 - 0 - 0 + SELF + POINT_BLANK + NOT_FRIEND + + + + 5000 + 7000 + 10000 + 15000 + 22000 + 30000 + + DIFF + + + 50659 + 1 + + + 50639 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill0000 @@ -2624,15 +3670,40 @@ icon.s_ruin_arrow A1 - 0 - 0 - 1200 - 0 - 0 - 0 + 200 + 1-5 -9999 - 0 - 0 + SELF + POINT_BLANK + NOT_FRIEND + + + + 5000 + 7000 + 10000 + 15000 + 22000 + 30000 + + DIFF + + + 50660 + 1 + + + 50639 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill0000 @@ -2650,15 +3721,40 @@ icon.s_dual_execution A1 - 0 - 0 - 1200 - 0 - 0 - 0 + 200 + 1-5 -9999 - 0 - 0 + SELF + POINT_BLANK + NOT_FRIEND + + + + 5000 + 7000 + 10000 + 15000 + 22000 + 30000 + + DIFF + + + 50661 + 1 + + + 50639 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill0000 @@ -2676,15 +3772,40 @@ icon.skill30974 A1 - 0 - 0 - 1200 - 0 - 0 - 0 + 200 + 1-5 -9999 - 0 - 0 + SELF + POINT_BLANK + NOT_FRIEND + + + + 5000 + 7000 + 10000 + 15000 + 22000 + 30000 + + DIFF + + + 50662 + 1 + + + 50639 + + 1 + 2 + 3 + 4 + 5 + 6 + + + icon.skill0000 @@ -2728,80 +3849,26 @@ icon.skill0000 A1 - 0 - 0 - -1 - 0 - 0 - 0 - -1000 - 0 - 0 icon.skill0000 A1 - 0 - 0 - -1 - 0 - 0 - 0 - -1000 - 0 - 0 icon.skill0000 A1 - 0 - 0 - -1 - 0 - 0 - 0 - -1000 - 0 - 0 icon.skill0000 A1 - 0 - 0 - -1 - 0 - 0 - 0 - -1000 - 0 - 0 icon.skill0000 A1 - 0 - 0 - -1 - 0 - 0 - 0 - -1000 - 0 - 0 icon.skill0000 A1 - 0 - 0 - -1 - 0 - 0 - 0 - -1000 - 0 - 0 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/51200-51299.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/51200-51299.xml index 5f92cd7d0f..e612214213 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/51200-51299.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/51200-51299.xml @@ -1569,35 +1569,83 @@ icon.giant_scrl_of_ench_wp_d + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.giant_scrl_of_ench_am_d + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.giant_scrl_of_ench_wp_c + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.giant_scrl_of_ench_am_c + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.giant_scrl_of_ench_wp_b + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.giant_scrl_of_ench_am_b + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.skill0000 + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE icon.skill0000 + 2 + 1 A1 + 5 + 0 + ITEM + SINGLE diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/55200-55299.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/55200-55299.xml index c9cc7ad214..4d0f44f532 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/55200-55299.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/55200-55299.xml @@ -500,7 +500,7 @@ 1200 ATTACK_TIME_DOWN 1 - 70102 + 70102 75 2 1 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87300-87399.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87300-87399.xml index 2a4c07b05c..e3ce735cad 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87300-87399.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87300-87399.xml @@ -2359,6 +2359,11 @@ 3 + + + -10 + + @@ -2953,6 +2958,10 @@ 50 PER + + 87301 + 87310 + @@ -2967,6 +2976,10 @@ 15 PER + + 87304 + 87313 + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87400-87499.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87400-87499.xml index b34b48ece5..aa7d475a4e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87400-87499.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/87400-87499.xml @@ -14,6 +14,11 @@ 2087431 3087431 + + 1001 + 1002 + 1003 + 1 0 19 @@ -27,6 +32,11 @@ 3087432 1 + + 1001 + 1002 + 1003 + 20 39 @@ -44,6 +54,11 @@ 3087433 1 + + 1001 + 1002 + 1003 + 40 35 @@ -66,6 +81,11 @@ 3087434 1 + + 1001 + 1002 + 1003 + 60 55 @@ -83,6 +103,11 @@ 3087435 1 + + 1001 + 1002 + 1003 + 0 14 @@ -95,6 +120,11 @@ 3087436 1 + + 1001 + 1002 + 1003 + 15 34 @@ -112,6 +142,11 @@ 3087437 1 + + 1001 + 1002 + 1003 + 35 30 @@ -134,6 +169,11 @@ 3087438 1 + + 1001 + 1002 + 1003 + 50 45 @@ -151,6 +191,11 @@ 3087439 1 + + 1001 + 1002 + 1003 + 0 39 @@ -163,6 +208,11 @@ 3087440 1 + + 1001 + 1002 + 1003 + 40 59 @@ -180,6 +230,11 @@ 3087441 1 + + 1001 + 1002 + 1003 + 60 55 @@ -202,6 +257,11 @@ 3087442 1 + + 1001 + 1002 + 1003 + 80 75 diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/documentation.txt index 9307ae0d3f..32e93953ca 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/stats/skills/documentation.txt @@ -13,6 +13,8 @@ AdditionalPhysicalAttack: Additional PhysicalAttack effect handler. (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. @@ -149,6 +151,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveHonorCoins: Gives a given amount of Honor Coins. (l2jmobius) GiveItemByExp: Gives an item when a certain amount of EXP is gathered. (l2jmobius) +GivePetXp: Gives a given amount of XP to a pet. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. GiveXp: Gives a given amount of XP. (l2jmobius) @@ -168,10 +171,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. @@ -212,7 +216,6 @@ MAtk: M. Atk. stat. MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius) MaxCp: Max. CP stat. MaxHp: Max. HP stat. -MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius) MaxMp: Max. MP stat. ModifyAssassinationPoints: Modifies player Assassination Point count. (l2jmobius) ModifyBeastPoints: Modifies player Beast Point count. (l2jmobius) @@ -282,6 +285,7 @@ RearDamage: Multiplier for damage done from behind the target. (l2jmobius) RebalanceHP: Balances targets' current HP. RebalanceHPSummon: Balances targets' current HP for summons. RecoverVitalityInPeaceZone: Recover periodically vitality when player is in a peace zone. (l2jmobius) +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_Essence_7.1_Assassin/dist/game/data/xsd/DailyMission.xsd b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/DailyMission.xsd index 35f2f6dc35..28d8ddeac4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/DailyMission.xsd +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/DailyMission.xsd @@ -33,8 +33,8 @@ - - + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/LimitShop.xsd index 2ef0e76e84..77f1bb3a5d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/LimitShop.xsd +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/LimitShop.xsd @@ -24,6 +24,7 @@ + @@ -40,6 +41,7 @@ + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/PetExtractData.xsd b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/PetExtractData.xsd new file mode 100644 index 0000000000..e9115b614a --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/PetExtractData.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/skills.xsd b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/skills.xsd index f8333709ee..c8bb7df24d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/xsd/skills.xsd @@ -1023,25 +1023,6 @@ - - - - - - - - - - - - - - - - - - - @@ -1767,7 +1748,8 @@ - + + @@ -1787,6 +1769,8 @@ + + @@ -1857,75 +1841,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + + @@ -1933,6 +1862,8 @@ + + diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/no_landing.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/no_landing.xml index 4b280f64a8..88b454d0db 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/no_landing.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/no_landing.xml @@ -58,4 +58,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/teleportzones.xml b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/teleportzones.xml index 6eb199dfcd..417000681d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/teleportzones.xml +++ b/L2J_Mobius_Essence_7.1_Assassin/dist/game/data/zones/teleportzones.xml @@ -1,81 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/Config.java index b513ffb4f9..c6dc6459d4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/Config.java @@ -646,6 +646,7 @@ public class Config public static boolean ENABLE_AUTO_ITEM; public static boolean AUTO_PLAY_ATTACK_ACTION; public static boolean RESUME_AUTO_PLAY; + public static boolean ENABLE_AUTO_ASSIST; public static AbnormalVisualEffect BLUE_TEAM_ABNORMAL_EFFECT; public static AbnormalVisualEffect RED_TEAM_ABNORMAL_EFFECT; public static int SHARING_LOCATION_COST; @@ -1356,6 +1357,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; @@ -2340,6 +2342,7 @@ public class Config ENABLE_AUTO_ITEM = generalConfig.getBoolean("EnableAutoItem", true); AUTO_PLAY_ATTACK_ACTION = generalConfig.getBoolean("AutoPlayAttackAction", true); RESUME_AUTO_PLAY = generalConfig.getBoolean("ResumeAutoPlay", false); + ENABLE_AUTO_ASSIST = generalConfig.getBoolean("AssistLeader", false); BLUE_TEAM_ABNORMAL_EFFECT = null; final String blueTeamAve = generalConfig.getString("BlueTeamAbnormalEffect", "").trim(); if (!blueTeamAve.isEmpty()) @@ -3514,6 +3517,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/GameServer.java index 24847e0b76..e28eaead01 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/GameServer.java @@ -98,6 +98,7 @@ import org.l2jmobius.gameserver.data.xml.NpcNameLocalisationData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.data.xml.PetAcquireList; import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; import org.l2jmobius.gameserver.data.xml.PetSkillData; import org.l2jmobius.gameserver.data.xml.PetTypeData; import org.l2jmobius.gameserver.data.xml.PlayerTemplateData; @@ -347,6 +348,8 @@ public class GameServer CharInfoTable.getInstance(); AdminData.getInstance(); PetDataTable.getInstance(); + PetTypeData.getInstance(); + PetExtractData.getInstance(); CubicData.getInstance(); CharSummonTable.getInstance().init(); BeautyShopData.getInstance(); @@ -396,7 +399,6 @@ public class GameServer CrestTable.getInstance(); TeleportListData.getInstance(); SharedTeleportManager.getInstance(); - PetTypeData.getInstance(); TeleporterData.getInstance(); TimedHuntingZoneData.getInstance(); MatchingRoomManager.getInstance(); diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/ai/SummonAI.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/ai/SummonAI.java index dc9c2e80f1..783e998673 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/ai/SummonAI.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/sql/ClanTable.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/sql/ClanTable.java index 1f09ab7191..b260653119 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/sql/ClanTable.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/ActionData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/ActionData.java index ee8748fe16..1583360766 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/ActionData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java index e33a1b0efa..337ac6dd99 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/InitialShortcutData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java index 81ad3f8ff8..fce691a15b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java @@ -107,6 +107,7 @@ public class LimitShopClanData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -185,11 +186,12 @@ public class LimitShopClanData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java index 5bc59aa442..e6f94bf829 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java @@ -126,7 +126,9 @@ public class LimitShopCraftData implements IXmlReader boolean announce3 = false; boolean announce4 = false; boolean announce5 = false; + int enchant = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -217,6 +219,7 @@ public class LimitShopCraftData implements IXmlReader count = parseLong(attrs, "count", 1L); chance = parseFloat(attrs, "chance", 100f); announce = parseBoolean(attrs, "announce", false); + enchant = parseInteger(attrs, "enchant", 0); productionId2 = parseInteger(attrs, "id2", 0); count2 = parseLong(attrs, "count2", 1L); chance2 = parseFloat(attrs, "chance2", 100f); @@ -233,6 +236,7 @@ public class LimitShopCraftData implements IXmlReader count5 = parseLong(attrs, "count5", 1L); announce5 = parseBoolean(attrs, "announce5", false); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -244,7 +248,7 @@ public class LimitShopCraftData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, announce, enchant, productionId2, count2, chance2, announce2, productionId3, count3, chance3, announce3, productionId4, count4, chance4, announce4, productionId5, count5, announce5, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java index 19176d0ee5..7303b86055 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java @@ -109,6 +109,7 @@ public class LimitShopData implements IXmlReader ingredientEnchants[4] = 0; int productionId = 0; int accountDailyLimit = 0; + int accountMontlyLimit = 0; int accountBuyLimit = 0; for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { @@ -197,6 +198,7 @@ public class LimitShopData implements IXmlReader { productionId = parseInteger(attrs, "id"); accountDailyLimit = parseInteger(attrs, "accountDailyLimit", 0); + accountMontlyLimit = parseInteger(attrs, "accountMontlyLimit", 0); accountBuyLimit = parseInteger(attrs, "accountBuyLimit", 0); final ItemTemplate item = ItemTable.getInstance().getTemplate(productionId); @@ -208,7 +210,7 @@ public class LimitShopData implements IXmlReader } } - _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountBuyLimit)); + _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, false, 0, 0, 0, 0, false, 0, 0, 0, false, 0, 0, 0, false, 0, 0, false, accountDailyLimit, accountMontlyLimit, accountBuyLimit)); } } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java new file mode 100644 index 0000000000..e53f5ca3cd --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/PetExtractData.java @@ -0,0 +1,107 @@ +/* + * 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.data.xml; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Logger; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +import org.l2jmobius.commons.util.IXmlReader; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; + +/** + * @author Geremy + */ +public class PetExtractData implements IXmlReader +{ + private static final Logger LOGGER = Logger.getLogger(PetExtractData.class.getName()); + // > + private final Map> _extractionData = new HashMap<>(); + + protected PetExtractData() + { + load(); + } + + @Override + public void load() + { + _extractionData.clear(); + parseDatapackFile("data/PetExtractData.xml"); + LOGGER.info(getClass().getSimpleName() + ": Loaded " + _extractionData.size() + " pet extraction data."); + } + + @Override + public void parseDocument(Document doc, File f) + { + for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) + { + if ("list".equalsIgnoreCase(n.getNodeName())) + { + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if ("extraction".equalsIgnoreCase(d.getNodeName())) + { + final NamedNodeMap attrs = d.getAttributes(); + final int petId = parseInteger(attrs, "petId"); + final int petLevel = parseInteger(attrs, "petLevel"); + final long extractExp = parseLong(attrs, "extractExp"); + final int extractItem = parseInteger(attrs, "extractItem"); + final int defaultCostId = parseInteger(attrs, "defaultCostId"); + final int defaultCostCount = parseInteger(attrs, "defaultCostCount"); + final int extractCostId = parseInteger(attrs, "extractCostId"); + final int extractCostCount = parseInteger(attrs, "extractCostCount"); + Map data = _extractionData.get(petId); + if (data == null) + { + data = new HashMap<>(); + _extractionData.put(petId, data); + } + data.put(petLevel, new PetExtractionHolder(petId, petLevel, extractExp, extractItem, new ItemHolder(defaultCostId, defaultCostCount), new ItemHolder(extractCostId, extractCostCount))); + } + } + } + } + } + + public PetExtractionHolder getExtraction(int petId, int petLevel) + { + final Map map = _extractionData.get(petId); + if (map == null) + { + LOGGER.warning(getClass().getSimpleName() + ": Missing pet extraction data: [PetId: " + petId + "] [PetLevel: " + petLevel + "]"); + return null; + } + return map.get(petLevel); + } + + public static PetExtractData getInstance() + { + return SingletonHolder.INSTANCE; + } + + private static class SingletonHolder + { + protected static final PetExtractData INSTANCE = new PetExtractData(); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/SkillData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/SkillData.java index 58ee961f76..d6559174bb 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/SkillData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/SkillData.java @@ -548,9 +548,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/TransformData.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/TransformData.java index 290c9084cc..320e04a0a7 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/data/xml/TransformData.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/CategoryType.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/CategoryType.java index 3ea4f4693b..93fb659432 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/CategoryType.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/CategoryType.java @@ -36,6 +36,7 @@ public enum CategoryType STRIDER, WOLF_GROUP, WYVERN_GROUP, + PET_GROUP, SUBJOB_GROUP_KNIGHT, HUMAN_FALL_CLASS, HUMAN_MALL_CLASS, diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/NpcInfoType.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/NpcInfoType.java index a4a43ecd9f..3ed430b9eb 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/enums/NpcInfoType.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java index 46f12b32ae..34ca89e316 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/handler/IPlayerActionHandler.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index c2dc67819f..9dcec79490 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -65,7 +65,7 @@ public class DailyTaskManager private static final Set RESET_SKILLS = new HashSet<>(); static { - // No known skills. + RESET_SKILLS.add(39199); // Hero's Wondrous Cubic } public static final Set RESET_ITEMS = new HashSet<>(); static @@ -131,6 +131,11 @@ public class DailyTaskManager resetHuntPass(); } + if (calendar.get(Calendar.DAY_OF_MONTH) == 1) + { + resetMontlyLimitShopData(); + } + // Daily tasks. resetClanBonus(); resetClanContributionList(); @@ -688,6 +693,31 @@ public class DailyTaskManager LOGGER.info("LimitShopData has been resetted."); } + private void resetMontlyLimitShopData() + { + for (LimitShopProductHolder holder : LimitShopData.getInstance().getProducts()) + { + // Update data for offline players. + try (Connection con = DatabaseFactory.getConnection(); + PreparedStatement ps = con.prepareStatement("DELETE FROM account_gsdata WHERE var=?")) + { + ps.setString(1, AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + ps.executeUpdate(); + } + catch (Exception e) + { + LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Could not reset LimitShopData: " + e); + } + // Update data for online players. + for (Player player : World.getInstance().getPlayers()) + { + player.getAccountVariables().remove(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + holder.getProductionId()); + player.getAccountVariables().storeMe(); + } + } + LOGGER.info("LimitShopData has been resetted."); + } + private void resetHuntPass() { // Update data for offline players. diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/IdManager.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/IdManager.java index 579070ebda..b0fd030621 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/IdManager.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/IdManager.java @@ -100,6 +100,7 @@ public class IdManager cleanCount += statement.executeUpdate("DELETE FROM character_shortcuts WHERE character_shortcuts.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills WHERE character_skills.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_skills_save WHERE character_skills_save.charId NOT IN (SELECT charId FROM characters);"); + cleanCount += statement.executeUpdate("DELETE FROM character_spirits WHERE character_spirits.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_subclasses WHERE character_subclasses.charId NOT IN (SELECT charId FROM characters);"); cleanCount += statement.executeUpdate("DELETE FROM character_instance_time WHERE character_instance_time.charId NOT IN (SELECT charId FROM characters);"); diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java index 9801ec6f72..a517a43c6b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/PurgeRankingManager.java @@ -250,7 +250,7 @@ public class PurgeRankingManager { } } - return top5.entrySet().stream().sorted(Map.Entry. comparingByValue().reversed()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); + return top5.entrySet().stream().sorted(Entry. comparingByValue().reversed()).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); } public SimpleEntry getPlayerRating(int category, int charId) diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java index ed13229014..272c1e6add 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/ShortCuts.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/ShortCuts.java index b4cd9646dc..83fc87bdab 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/ShortCuts.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Creature.java index cd44570d49..5d3c375a01 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1320,7 +1320,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)) @@ -1789,6 +1789,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe EventDispatcher.getInstance().notifyEvent(new OnCreatureKilled(killer, this), killer); } + if ((killer != null) && killer.isPlayer()) + { + final Player player = killer.getActingPlayer(); + if (player.isAssassin() && player.isAffectedBySkill(CommonSkill.BRUTALITY.getId())) + { + player.setAssassinationPoints(player.getAssassinationPoints() + 10000); + } + } + abortAttack(); abortCast(); @@ -2848,7 +2857,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); } @@ -2861,189 +2870,151 @@ 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; - } - case ELEMENTAL_SPIRIT_EARTH_ATTACK: - case ELEMENTAL_SPIRIT_EARTH_DEFENSE: - case ELEMENTAL_SPIRIT_FIRE_ATTACK: - case ELEMENTAL_SPIRIT_FIRE_DEFENSE: - case ELEMENTAL_SPIRIT_WATER_ATTACK: - case ELEMENTAL_SPIRIT_WATER_DEFENSE: - case ELEMENTAL_SPIRIT_WIND_ATTACK: - case ELEMENTAL_SPIRIT_WIND_DEFENSE: - { - info.addComponentType(UserInfoType.ATT_SPIRITS); - 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; + } + case ELEMENTAL_SPIRIT_EARTH_ATTACK: + case ELEMENTAL_SPIRIT_EARTH_DEFENSE: + case ELEMENTAL_SPIRIT_FIRE_ATTACK: + case ELEMENTAL_SPIRIT_FIRE_DEFENSE: + case ELEMENTAL_SPIRIT_WATER_ATTACK: + case ELEMENTAL_SPIRIT_WATER_DEFENSE: + case ELEMENTAL_SPIRIT_WIND_ATTACK: + case ELEMENTAL_SPIRIT_WIND_DEFENSE: + { + info.addComponentType(UserInfoType.ATT_SPIRITS); + 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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Player.java index b01e8b7b5c..d48e00f06a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -395,7 +395,7 @@ import org.l2jmobius.gameserver.network.serverpackets.elementalspirits.ExElement import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus; import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimeRestrictFieldDieLimitTime; import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCount; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.network.serverpackets.surveillance.ExUserWatcherTargetStatus; import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo; import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; @@ -4788,7 +4788,7 @@ public class Player extends Playable { super.doAutoAttack(target); setRecentFakeDeath(false); - if (target.isFakePlayer()) + if (target.isFakePlayer() && !Config.FAKE_PLAYER_AUTO_ATTACKABLE) { updatePvPStatus(); } @@ -7167,7 +7167,11 @@ public class Player extends Playable player.setOnlineStatus(true, false); PlayerAutoSaveTaskManager.getInstance().add(player); - player.getAchievementBox().restore(); + + if (Config.ENABLE_ACHIEVEMENT_BOX) + { + player.getAchievementBox().restore(); + } } catch (Exception e) { @@ -8812,9 +8816,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; + } } } } @@ -11095,7 +11103,7 @@ public class Player extends Playable _pet.setFollowStatus(true); _pet.setInstance(getInstanceWorld()); _pet.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(_pet, 0)); + sendPacket(new PetSummonInfo(_pet, 0)); } getServitors().values().forEach(s -> @@ -11106,7 +11114,7 @@ public class Player extends Playable s.setFollowStatus(true); s.setInstance(getInstanceWorld()); s.updateAndBroadcastStatus(0); - sendPacket(new PetInfo(s, 0)); + sendPacket(new PetSummonInfo(s, 0)); }); // Show movie if available. diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Summon.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Summon.java index 918bcbfa08..abca499335 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Summon.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/Summon.java @@ -74,10 +74,10 @@ import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetDelete; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; import org.l2jmobius.gameserver.network.serverpackets.pet.PetInventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.pet.PetItemList; import org.l2jmobius.gameserver.network.serverpackets.pet.PetStatusUpdate; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; public abstract class Summon extends Playable @@ -134,7 +134,7 @@ public abstract class Summon extends Playable { if (isPet()) { - sendPacket(new PetInfo(this, 1)); + sendPacket(new PetSummonInfo(this, 1)); sendPacket(new ExPetSkillList(true, (Pet) this)); if (getInventory() != null) { @@ -228,7 +228,7 @@ public abstract class Summon extends Playable { if (player == _owner) { - player.sendPacket(new PetInfo(this, 1)); + player.sendPacket(new PetSummonInfo(this, 1)); return; } @@ -392,7 +392,7 @@ public abstract class Summon extends Playable @Override public void onDecay() { - super.onDecay(); + unSummon(_owner); deleteMe(_owner); } @@ -879,7 +879,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); @@ -900,7 +900,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)); + } }); } @@ -925,7 +932,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())); @@ -933,7 +940,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)); + } } } @@ -979,7 +993,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(); } @@ -1166,7 +1180,7 @@ public abstract class Summon extends Playable { owner.sendPacket(new PetItemList(getInventory().getItems())); } - owner.sendPacket(new PetInfo(this, 1)); + owner.sendPacket(new PetSummonInfo(this, 1)); } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/instance/Door.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/instance/Door.java index 3e5ebd7c98..38b04a0109 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/instance/Door.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java index 647f398100..b5d228678e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/instance/Monster.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java index 8d4678e0f9..63af530bc0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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,33 +976,6 @@ 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 { @@ -1011,9 +985,17 @@ public class CreatureStat // 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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java index 61623cf473..d53b9c3c09 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java index 1a95ccb397..8b59c5c95e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/actor/transform/TransformTemplate.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/clan/ClanWar.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/clan/ClanWar.java index 49bcba09e5..e5db83f103 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/clan/ClanWar.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java index 49e27ac3e4..aea3f1b7b2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/commission/CommissionItemType.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java index afa13f0b6c..e3dd26b44a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/commission/CommissionTreeType.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/events/AbstractScript.java index a5ac2d9f22..317f22eb46 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2216,6 +2216,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java index 425bca897b..4e00472bdf 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java @@ -32,6 +32,7 @@ public class LimitShopProductHolder private final long _count; private final float _chance; private final boolean _announce; + private final int _enchant; private final int _productionId2; private final long _count2; private final float _chance2; @@ -48,9 +49,10 @@ public class LimitShopProductHolder private final long _count5; private final boolean _announce5; private final int _accountDailyLimit; + private final int _accountMontlyLimit; private final int _accountBuyLimit; - public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountBuyLimit) + public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, boolean announce, int enchant, int productionId2, long count2, float chance2, boolean announce2, int productionId3, long count3, float chance3, boolean announce3, int productionId4, long count4, float chance4, boolean announce4, int productionId5, long count5, boolean announce5, int accountDailyLimit, int accountMontlyLimit, int accountBuyLimit) { _id = id; _category = category; @@ -63,6 +65,7 @@ public class LimitShopProductHolder _count = count; _chance = chance; _announce = announce; + _enchant = enchant; _productionId2 = productionId2; _count2 = count2; _chance2 = chance2; @@ -79,6 +82,7 @@ public class LimitShopProductHolder _count5 = count5; _announce5 = announce5; _accountDailyLimit = accountDailyLimit; + _accountMontlyLimit = accountMontlyLimit; _accountBuyLimit = accountBuyLimit; } @@ -137,6 +141,11 @@ public class LimitShopProductHolder return _announce; } + public int getEnchant() + { + return _enchant; + } + public int getProductionId2() { return _productionId2; @@ -217,6 +226,11 @@ public class LimitShopProductHolder return _accountDailyLimit; } + public int getAccountMontlyLimit() + { + return _accountMontlyLimit; + } + public int getAccountBuyLimit() { return _accountBuyLimit; diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java new file mode 100644 index 0000000000..bc54fd0c63 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/holders/PetExtractionHolder.java @@ -0,0 +1,70 @@ +/* + * 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.model.holders; + +/** + * @author Geremy + */ +public class PetExtractionHolder +{ + private final int _petId; + private final int _petLevel; + private final long _extractExp; + private final int _extractItem; + private final ItemHolder _defaultCost; + private final ItemHolder _extractCost; + + public PetExtractionHolder(int petId, int petLevel, long extractExp, int extractItem, ItemHolder defaultCost, ItemHolder extractCost) + { + _petId = petId; + _petLevel = petLevel; + _extractExp = extractExp; + _extractItem = extractItem; + _defaultCost = defaultCost; + _extractCost = extractCost; + } + + public int getPetId() + { + return _petId; + } + + public int getPetLevel() + { + return _petLevel; + } + + public long getExtractExp() + { + return _extractExp; + } + + public int getExtractItem() + { + return _extractItem; + } + + public ItemHolder getDefaultCost() + { + return _defaultCost; + } + + public ItemHolder getExtractCost() + { + return _extractCost; + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/item/instance/Item.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/item/instance/Item.java index af5f4f14d9..d4efe730bb 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/item/instance/Item.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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; @@ -72,12 +74,14 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPi import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; 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; @@ -92,6 +96,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; @@ -1069,11 +1074,14 @@ public class Item extends WorldObject */ public boolean setAugmentation(VariationInstance augmentation, boolean updateDatabase) { - // there shall be no previous augmentation.. + // Remove previous augmentation. if (_augmentation != null) { - LOGGER.info("Warning: Augment set for (" + getObjectId() + ") " + getName() + " owner: " + _ownerId); - return false; + if (isEquipped()) + { + _augmentation.removeBonus(getActingPlayer()); + } + removeAugmentation(); } _augmentation = augmentation; @@ -1641,7 +1649,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); @@ -2575,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); @@ -2604,6 +2619,8 @@ public class Item extends WorldObject public void onVisualLifeTimeEnd(boolean announce) { + removeVisualSetSkills(); + final ItemVariables vars = getVariables(); vars.remove(ItemVariables.VISUAL_ID); vars.remove(ItemVariables.VISUAL_APPEARANCE_STONE_ID); @@ -2653,6 +2670,124 @@ public class Item extends WorldObject vars.storeMe(); } + 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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 03f913690c..aa08958f9d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -900,7 +900,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(playable, item, Item::getVisualId)) { update = true; @@ -1052,7 +1053,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(playable, item, Item::getVisualId)) { remove = true; diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/siege/FortSiege.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/siege/FortSiege.java index 20cfe5d465..829b487252 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/siege/FortSiege.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/siege/FortSiege.java @@ -268,7 +268,7 @@ public class FortSiege extends ListenersContainer implements Siegable } ThreadPool.schedule(new ScheduleStartSiegeTask(nextTask), _initialDelayInMilliseconds - (nextTask * 1000)); // Prepare task for @nextTask minutes left. - LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); + // LOGGER.info("scheduling " + nextTask + " in " + ((_initialDelayInMilliseconds / 1000) - nextTask) + " sec"); } else if ((_time == 3600) && (_fortInst.getResidenceId() != FortManager.ORC_FORTRESS)) // 1hr remains diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/CommonSkill.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/CommonSkill.java index eb776c7c42..0d3b2f6ad0 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/CommonSkill.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/CommonSkill.java @@ -95,7 +95,8 @@ public enum CommonSkill FLAG_EQUIP(52013, 1), REMOTE_FLAG_DISPLAY(52017, 1), EINHASAD_OVERSEEING(60002, 1), - TELEPORT(60018, 1); + TELEPORT(60018, 1), + BRUTALITY(87366, 1); private final SkillHolder _holder; diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java index 761d9b19c4..e256a08948 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/skill/SkillCaster.java @@ -691,7 +691,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(); } @@ -714,7 +714,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(); } @@ -749,7 +749,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/Stat.java index 7d380549a9..42deb6e249 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -97,6 +97,7 @@ public enum Stat HATE_ATTACK("attackHate"), REAR_DAMAGE_RATE("rearDamage"), AUTO_ATTACK_DAMAGE_BONUS("autoAttackDamageBonus"), + IGNORE_REDUCE_DAMAGE("ignoreReduceDamage"), // ELEMENTAL SPIRITS ELEMENTAL_SPIRIT_FIRE_ATTACK("elementalSpiritFireAttack"), @@ -150,7 +151,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()), MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0), DEFENCE_CRITICAL_RATE("defCritRate"), diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 5ca3b81223..3ddbf6530e 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -44,7 +44,18 @@ public class MCritRateFinalizer implements IStatFunction final double physicalBonus = (creature.getStat().getMul(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 1) - 1) * creature.getStat().getCriticalHit(); final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1; - return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 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) + physicalBonus), 0, maxMagicalCritRate); } @Override diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java index ac0451e3e1..704975f84b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/MDefenseFinalizer.java @@ -93,6 +93,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java index 33f96df6cd..a1ef8d0a85 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PCriticalRateFinalizer.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java index a45e8bb28a..f2c6378069 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/stats/finalizers/PDefenseFinalizer.java @@ -95,6 +95,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java index 06b7bc57a9..8fcb00e5bf 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java @@ -46,6 +46,7 @@ public class AccountVariables extends AbstractVariables public static final String PRIME_SHOP_PRODUCT_DAILY_COUNT = "PSPDailyCount"; public static final String LCOIN_SHOP_PRODUCT_COUNT = "LCSCount"; public static final String LCOIN_SHOP_PRODUCT_DAILY_COUNT = "LCSDailyCount"; + public static final String LCOIN_SHOP_PRODUCT_MONTLY_COUNT = "LCSMontlyCount"; public static final String VIP_POINTS = "VipPoints"; public static final String VIP_TIER = "VipTier"; public static final String VIP_EXPIRATION = "VipExpiration"; diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/ZoneType.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/ZoneType.java index 69530d1955..6301c52fc8 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/ZoneType.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/ZoneType.java @@ -36,6 +36,8 @@ import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneEnter; import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureZoneExit; import org.l2jmobius.gameserver.model.instancezone.Instance; import org.l2jmobius.gameserver.model.interfaces.ILocational; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; /** @@ -215,6 +217,10 @@ public abstract class ZoneType extends ListenersContainer // Check level if ((creature.getLevel() < _minLevel) || (creature.getLevel() > _maxLevel)) { + if (creature.isPlayer()) + { + creature.getActingPlayer().sendPacket(new ExShowScreenMessage(SystemMessageId.YOU_CANNOT_ENTER_AS_YOUR_LEVEL_DOES_NOT_MEET_THE_REQUIREMENTS, ExShowScreenMessage.TOP_CENTER, 10000)); + } return false; } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java index a6eaf014dc..df6cec9f99 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/model/zone/type/TeleportZone.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.model.zone.type; +import org.l2jmobius.gameserver.enums.InstanceType; import org.l2jmobius.gameserver.model.Location; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.zone.ZoneType; @@ -32,6 +33,7 @@ public class TeleportZone extends ZoneType public TeleportZone(int id) { super(id); + setTargetType(InstanceType.Player); // Default only player. } @Override diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/ExClientPackets.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/ExClientPackets.java index 540b4694bb..ad0a3f1c60 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/ExClientPackets.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/ExClientPackets.java @@ -150,6 +150,7 @@ import org.l2jmobius.gameserver.network.clientpackets.newskillenchant.RequestExS import org.l2jmobius.gameserver.network.clientpackets.pet.ExEvolvePet; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetEquipItem; import org.l2jmobius.gameserver.network.clientpackets.pet.ExPetUnequipItem; +import org.l2jmobius.gameserver.network.clientpackets.pet.ExTryPetExtractSystem; import org.l2jmobius.gameserver.network.clientpackets.pet.RequestExAcquirePetSkill; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyDelete; import org.l2jmobius.gameserver.network.clientpackets.pledgeV3.RequestExPledgeEnemyInfoList; @@ -717,7 +718,7 @@ public enum ExClientPackets EX_PLEDGE_ENEMY_INFO_LIST(0x1C8, RequestExPledgeEnemyInfoList::new, ConnectionState.IN_GAME), EX_PLEDGE_ENEMY_REGISTER(0x1C9, RequestExPledgeEnemyRegister::new, ConnectionState.IN_GAME), EX_PLEDGE_ENEMY_DELETE(0x1CA, RequestExPledgeEnemyDelete::new, ConnectionState.IN_GAME), - EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, null, ConnectionState.IN_GAME), + EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, ExTryPetExtractSystem::new, ConnectionState.IN_GAME), EX_PLEDGE_V3_SET_ANNOUNCE(0x1CC, RequestExPledgeV3SetAnnounce::new, ConnectionState.IN_GAME), // 306 EX_RANKING_FESTIVAL_OPEN(0x1CD, null, ConnectionState.IN_GAME), diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java index 5669a389ff..abfec000db 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestAcquireSkill.java @@ -109,6 +109,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) { @@ -640,7 +645,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.sendPacket(new ExAcquireSkillResult(skill.getId(), skill.getLevel(), true, SystemMessageId.YOU_HAVE_LEARNED_S1)); player.sendSkillList(skill.getId()); diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java index f57765cd74..c58d605857 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestActionUse.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 05934422b3..a35d839832 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java index 67ae4e4741..ddabd11d33 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -226,7 +226,7 @@ public class UseItem implements ClientPacket } // Prevent Death Knight players to equip other weapons. - if (item.isWeapon() && (CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId())) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) + if (item.isWeapon() && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && ((item.getWeaponItem().getItemType() != WeaponType.SWORD) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; @@ -247,7 +247,7 @@ public class UseItem implements ClientPacket } // Prevent Sylph players to equip other weapons. - if (item.isWeapon() && (player.getRace() == Race.SYLPH) && (item.getWeaponItem().getItemType() != WeaponType.PISTOLS)) + if (item.isWeapon() && (player.getRace() == Race.SYLPH) && (item.getWeaponItem().getItemType() != WeaponType.FISHINGROD) && (item.getWeaponItem().getItemType() != WeaponType.PISTOLS)) { player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); return; diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java index a140c01f0e..c366a156ba 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/appearance/RequestShapeShiftingItem.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java index 13c71e9403..61e0c0a0f1 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/enchant/RequestEnchantItem.java @@ -103,10 +103,6 @@ public class RequestEnchantItem implements ClientPacket player.removeRequest(request.getClass()); return; } - if (item.getEnchantLevel() != request.getEnchantLevel()) - { - item.setEnchantLevel(request.getEnchantLevel()); - } // Template for scroll. final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java index ea83f702e2..73bdbcd0f3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassReward.java @@ -112,26 +112,9 @@ public class RequestHuntPassReward implements ClientPacket return; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); huntPass.setRewardAlert(false); player.sendPacket(new HuntPassInfo(player, _huntPassType)); @@ -157,4 +140,39 @@ public class RequestHuntPassReward implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java index dc8277d5b6..032cf143c5 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/huntpass/RequestHuntPassRewardAll.java @@ -115,26 +115,9 @@ public class RequestHuntPassRewardAll implements ClientPacket break REWARD_LOOP; } - // Normal reward. - if (!huntPass.isPremium() && (rewardIndex <= HuntPassData.getInstance().getRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - // Premium reward. - else if (huntPass.isPremium()) - { - if ((rewardIndex < HuntPassData.getInstance().getRewardsCount()) && (rewardIndex <= premiumRewardIndex)) - { - rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); - huntPass.setRewardStep(rewardIndex + 1); - } - else if ((premiumRewardIndex < rewardIndex) && (premiumRewardIndex <= HuntPassData.getInstance().getPremiumRewardsCount())) - { - rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); - huntPass.setPremiumRewardStep(premiumRewardIndex + 1); - } - } + normalReward(player); + premiumReward(player); + huntPass.setRewardStep(rewardIndex + 1); } if (!inventoryLimitReached) @@ -165,4 +148,39 @@ public class RequestHuntPassRewardAll implements ClientPacket player.addItem("HuntPassReward", reward, player, true); } } + + private void premiumReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int premiumRewardIndex = huntPass.getPremiumRewardStep(); + if (premiumRewardIndex >= HuntPassData.getInstance().getPremiumRewardsCount()) + { + return; + } + + if (!huntPass.isPremium()) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getPremiumRewards().get(premiumRewardIndex)); + huntPass.setPremiumRewardStep(premiumRewardIndex + 1); + } + + private void normalReward(Player player) + { + final HuntPass huntPass = player.getHuntPass(); + final int rewardIndex = huntPass.getRewardStep(); + if (rewardIndex >= HuntPassData.getInstance().getRewardsCount()) + { + return; + } + + if (huntPass.isPremium() && ((huntPass.getPremiumRewardStep() < rewardIndex) || (huntPass.getPremiumRewardStep() >= HuntPassData.getInstance().getPremiumRewardsCount()))) + { + return; + } + + rewardItem(player, HuntPassData.getInstance().getRewards().get(rewardIndex)); + } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index 7b893addd1..3897c4a9d5 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -154,6 +154,25 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket return; } } + else if (_product.getAccountMontlyLimit() > 0) + { + final long amount = _product.getAccountMontlyLimit() * _amount; + if (amount < 1) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + if (player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) >= amount) + { + player.sendMessage("You have reached your montly limit."); + player.removeRequest(PrimeShopRequest.class); + player.sendPacket(new ExPurchaseLimitShopItemResult(false, _shopIndex, _productId, 0, Collections.emptyList())); + return; + } + + } else if (_product.getAccountBuyLimit() > 0) // Count limit. { final long amount = _product.getAccountBuyLimit() * _amount; @@ -175,7 +194,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket } // Check existing items. - final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), _product.getAccountDailyLimit())); + final int remainingInfo = Math.max(0, Math.max(_product.getAccountBuyLimit(), Math.max(_product.getAccountDailyLimit(), _product.getAccountMontlyLimit()))); for (int i = 0; i < _product.getIngredientIds().length; i++) { if (_product.getIngredientIds()[i] == 0) @@ -326,7 +345,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket if (Rnd.get(100) < _product.getChance()) { rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount()); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -373,7 +392,7 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket else if (Rnd.get(100) < _product.getChance()) { rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0)); - final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true); + final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, _product.getEnchant(), player, true); if (_product.isAnnounce()) { Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION)); @@ -385,6 +404,10 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + _product.getProductionId(), 0) + _amount); } + if (_product.getAccountMontlyLimit() > 0) + { + player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + _product.getProductionId(), 0) + _amount); + } else if (_product.getAccountBuyLimit() > 0) { player.getAccountVariables().set(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + _product.getProductionId(), 0) + _amount); diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 36ff68c36c..e95b6ff799 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -230,7 +230,7 @@ public class ExPetEquipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java index f5e874bfce..47264a1436 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetUnequipItem.java @@ -17,7 +17,7 @@ import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.network.serverpackets.pet.ExPetSkillList; -import org.l2jmobius.gameserver.network.serverpackets.pet.PetInfo; +import org.l2jmobius.gameserver.network.serverpackets.pet.PetSummonInfo; /** * @author Berezkin Nikolay @@ -183,7 +183,7 @@ public class ExPetUnequipItem implements ClientPacket private void sendInfos(Pet pet, Player player) { pet.getStat().recalculateStats(true); - player.sendPacket(new PetInfo(pet, 1)); + player.sendPacket(new PetSummonInfo(pet, 1)); player.sendPacket(new ExPetSkillList(false, pet)); } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java new file mode 100644 index 0000000000..6bb1753d14 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExTryPetExtractSystem.java @@ -0,0 +1,115 @@ +/* + * 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.clientpackets.pet; + +import org.l2jmobius.commons.network.ReadablePacket; +import org.l2jmobius.gameserver.data.xml.NpcData; +import org.l2jmobius.gameserver.data.xml.PetDataTable; +import org.l2jmobius.gameserver.data.xml.PetExtractData; +import org.l2jmobius.gameserver.model.PetData; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.actor.instance.Pet; +import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; +import org.l2jmobius.gameserver.model.holders.PetExtractionHolder; +import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.itemcontainer.PetInventory; +import org.l2jmobius.gameserver.model.itemcontainer.PlayerInventory; +import org.l2jmobius.gameserver.network.GameClient; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; +import org.l2jmobius.gameserver.network.serverpackets.pet.ResultPetExtractSystem; + +/** + * @author Geremy + */ +public class ExTryPetExtractSystem implements ClientPacket +{ + private int _itemObjId; + + @Override + public void read(ReadablePacket packet) + { + _itemObjId = packet.readInt(); + } + + @Override + public void run(GameClient client) + { + final Player player = client.getPlayer(); + if (player == null) + { + return; + } + + final Item petItem = player.getInventory().getItemByObjectId(_itemObjId); + if ((petItem == null) || ((player.getPet() != null) && (player.getPet().getControlItem() == petItem))) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + final PetData petData = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()); + final NpcTemplate npcTemplate = NpcData.getInstance().getTemplate(petData.getNpcId()); + final Pet pet = new Pet(npcTemplate, player, petItem); + final PetInventory petInventory = pet.getInventory(); + final PlayerInventory playerInventory = player.getInventory(); + if ((petInventory == null) || (playerInventory == null)) + { + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + if (!playerInventory.validateWeight(petInventory.getTotalWeight()) || !playerInventory.validateCapacity(petInventory.getSize())) + { + player.sendPacket(SystemMessageId.THERE_ARE_ITEMS_IN_THE_PET_S_INVENTORY_TAKE_THEM_OUT_FIRST); + player.sendPacket(new ResultPetExtractSystem(false)); + return; + } + + petInventory.transferItemsToOwner(); + + final Pet petInfo = Pet.restore(petItem, NpcData.getInstance().getTemplate(petData.getNpcId()), player); + final int petId = PetDataTable.getInstance().getPetDataByItemId(petItem.getId()).getType(); + final int petLevel = petInfo.getLevel(); + final PetExtractionHolder holder = PetExtractData.getInstance().getExtraction(petId, petLevel); + if (holder != null) + { + final int extractItemId = holder.getExtractItem(); + final int extractItemCount = (int) (petInfo.getStat().getExp() / holder.getExtractExp()); + final int extractCostId = holder.getExtractCost().getId(); + final long extractCostCount = holder.getExtractCost().getCount() * extractItemCount; + final int defaultCostId = holder.getDefaultCost().getId(); + final long defaultCostCount = holder.getDefaultCost().getCount(); + if ((player.getInventory().getInventoryItemCount(extractCostId, -1) >= extractCostCount) && (player.getInventory().getInventoryItemCount(defaultCostId, -1) >= defaultCostCount)) + { + if (player.destroyItemByItemId("Pet Extraction", extractCostId, extractCostCount, player, true) && player.destroyItemByItemId("Pet Extraction", defaultCostId, defaultCostCount, player, true) && player.destroyItem("Pet Extraction", petItem, player, true)) + { + player.addItem("Pet Extraction", extractItemId, extractItemCount, player, true); + player.sendPacket(new ResultPetExtractSystem(true)); + } + } + else + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT); + player.sendPacket(new ResultPetExtractSystem(false)); + } + return; + } + + player.sendPacket(new ResultPetExtractSystem(false)); + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java index 6d9cbca72a..16b9a09305 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/randomcraft/ExRequestRandomCraftExtract.java @@ -46,7 +46,7 @@ public class ExRequestRandomCraftExtract implements ClientPacket { final int objId = packet.readInt(); final long count = packet.readLong(); - if (count > 1) + if (count > 0) { _items.put(objId, count); } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java index 2889ac5094..66eb16b811 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/subjugation/RequestSubjugationGacha.java @@ -48,6 +48,11 @@ public class RequestSubjugationGacha implements ClientPacket @Override public void run(GameClient client) { + if ((_amount < 1) || ((_amount * 20000L) < 1)) + { + return; + } + final Player player = client.getPlayer(); if (player == null) { diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java index 43532feacc..d19439926d 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/clientpackets/variation/ExApplyVariationOption.java @@ -23,7 +23,6 @@ import org.l2jmobius.gameserver.model.actor.request.VariationRequest; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.network.GameClient; import org.l2jmobius.gameserver.network.clientpackets.ClientPacket; -import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.variation.ApplyVariationOption; /** @@ -58,34 +57,26 @@ public class ExApplyVariationOption implements ClientPacket final int option1Id = augment.getOption1Id(); final int option2Id = augment.getOption2Id(); - // Unequip item. - final InventoryUpdate iu = new InventoryUpdate(); - if (targetItem.isEquipped()) - { - for (Item itm : player.getInventory().unEquipItemInSlotAndRecord(targetItem.getLocationSlot())) - { - iu.addModifiedItem(itm); - } - player.broadcastUserInfo(); - } - if ((targetItem.getObjectId() != _enchantedObjectId) || (_option1 != option1Id) || (_option2 != option2Id)) { player.sendPacket(new ApplyVariationOption(0, 0, 0, 0)); return; } - // Remove the augmentation if any (286). - if (targetItem.isAugmented()) - { - targetItem.removeAugmentation(); - } - targetItem.setAugmentation(augment, true); - iu.addModifiedItem(targetItem); - player.sendInventoryUpdate(iu); player.sendPacket(new ApplyVariationOption(1, _enchantedObjectId, _option1, _option2)); + + // Apply new augment. + if (targetItem.isEquipped()) + { + targetItem.getAugmentation().applyBonus(player); + } + + // Recalculate all stats. + player.getStat().recalculateStats(true); + + player.sendItemList(); player.removeRequest(VariationRequest.class); } } \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java index 73459940e5..189fda4a5a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ExBasicActionList.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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,132 +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, 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, 96, 97, 98, - 99, 100, - 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, - 1168, 1169, 1170, 1171, - 1172, 1173, - 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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java index 4dee5efb84..3c298a3a2a 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/FakePlayerInfo.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java index 1d4d2509c7..b78f4d0bb2 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/MultiSellList.java @@ -118,7 +118,7 @@ public class MultiSellList extends AbstractItemPacket } writeLong(_list.getProductCount(product)); writeShort(product.getEnchantmentLevel() > 0 ? product.getEnchantmentLevel() : displayItemEnchantment != null ? displayItemEnchantment.getEnchantLevel() : 0); // enchant level - writeInt((int) product.getChance() * 1000000); // chance + writeInt((int) (product.getChance() * 1000000)); // chance writeItemAugment(displayItemEnchantment); writeItemElemental(displayItemEnchantment); writeItemEnsoulOptions(displayItemEnchantment); diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java index 77da3642a8..1efc641196 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/NpcInfo.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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); @@ -170,7 +170,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); @@ -330,9 +330,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)) { @@ -350,11 +350,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()); } @@ -378,9 +378,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)) { @@ -410,7 +410,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index e88df6a6c3..142634a205 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 77c19e8bcb..d3dd7e1eb6 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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,14 +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); // item augment id - writeInt(0); // 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: diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java index 209a163197..c2cf957f35 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SiegeDefenderList.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java index bdf3abdebe..edd30aaec3 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/SummonInfo.java @@ -68,7 +68,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); @@ -149,7 +149,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()) { @@ -249,9 +249,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)) { @@ -269,11 +269,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()); } @@ -297,9 +297,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)) @@ -330,7 +329,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java index 8e5c5f7765..22eb4ac7d4 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/limitshop/ExPurchaseLimitShopItemListNew.java @@ -83,6 +83,17 @@ public class ExPurchaseLimitShopItemListNew extends ServerPacket writeInt(product.getAccountDailyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_DAILY_COUNT + product.getProductionId(), 0)); } } + else if (product.getAccountMontlyLimit() > 0) + { + if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0) >= product.getAccountMontlyLimit()) + { + writeInt(0); + } + else + { + writeInt(product.getAccountMontlyLimit() - _player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_MONTLY_COUNT + product.getProductionId(), 0)); + } + } else if (product.getAccountBuyLimit() > 0) // Count limit. { if (_player.getAccountVariables().getInt(AccountVariables.LCOIN_SHOP_PRODUCT_COUNT + product.getProductionId(), 0) >= product.getAccountBuyLimit()) diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java index 88230d32a1..900d346e33 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ExPetInfo.java @@ -68,7 +68,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); @@ -142,7 +142,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()) { @@ -241,9 +241,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)) { @@ -261,11 +261,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()); } @@ -289,9 +289,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)) @@ -322,7 +321,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_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java similarity index 96% rename from L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java rename to L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java index fed7aa46a8..56cbbf532b 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetInfo.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/PetSummonInfo.java @@ -1,212 +1,212 @@ -/* - * 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.pet; - -import java.util.Set; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.enums.EvolveLevel; -import org.l2jmobius.gameserver.enums.Team; -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.network.serverpackets.ServerPacket; -import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; - -/** - * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon - */ -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.isDead() ? 0 : _summon.isShowSummonAnimation() ? 2 : _value); - 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 - writeShort(_summon.getLevel()); // level - writeLong(_summon.getStat().getExp()); - // 0% absolute value - writeLong(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 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(-1); - writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level. - writeByte(0); // Used Summon Points - writeByte(0); // Maximum Summon Points - final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects(); - final Team team = (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) && (Config.RED_TEAM_ABNORMAL_EFFECT != null) ? _summon.getTeam() : Team.NONE; - writeShort(aves.size() + (_summon.isInvisible() ? 1 : 0) + (team != Team.NONE ? 1 : 0)); // Confirmed - for (AbnormalVisualEffect ave : aves) - { - writeShort(ave.getClientId()); // Confirmed - } - if (_summon.isInvisible()) - { - writeShort(AbnormalVisualEffect.STEALTH.getClientId()); - } - if (team == Team.BLUE) - { - if (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) - { - writeShort(Config.BLUE_TEAM_ABNORMAL_EFFECT.getClientId()); - } - } - else if ((team == Team.RED) && (Config.RED_TEAM_ABNORMAL_EFFECT != null)) - { - writeShort(Config.RED_TEAM_ABNORMAL_EFFECT.getClientId()); - } - writeByte(_statusMask); - if (_summon.isPet()) - { - final Pet pet = (Pet) _summon; - writeInt(pet.getPetData().getType()); - writeInt(pet.getEvolveLevel()); - writeInt(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); - } - else - { - writeInt(0); - writeInt(EvolveLevel.None.ordinal()); - writeInt(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.pet; + +import java.util.Set; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.enums.EvolveLevel; +import org.l2jmobius.gameserver.enums.Team; +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.network.serverpackets.ServerPacket; +import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; + +/** + * 12 - wolf, 13 - buffalo, 14 - tiger, 15-kukkabara, 17 - hawk, 16 - dragon + */ +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.isDead() ? 0 : _summon.isShowSummonAnimation() ? 2 : _value); + 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 + writeShort(_summon.getLevel()); // level + writeLong(_summon.getStat().getExp()); + // 0% absolute value + writeLong(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 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(-1); + writeInt(0); // "Transformation ID - Confirmed" - Used to bug Fenrir after 64 level. + writeByte(0); // Used Summon Points + writeByte(0); // Maximum Summon Points + final Set aves = _summon.getEffectList().getCurrentAbnormalVisualEffects(); + final Team team = (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) && (Config.RED_TEAM_ABNORMAL_EFFECT != null) ? _summon.getTeam() : Team.NONE; + writeShort(aves.size() + (_summon.isInvisible() ? 1 : 0) + (team != Team.NONE ? 1 : 0)); // Confirmed + for (AbnormalVisualEffect ave : aves) + { + writeShort(ave.getClientId()); // Confirmed + } + if (_summon.isInvisible()) + { + writeShort(AbnormalVisualEffect.STEALTH.getClientId()); + } + if (team == Team.BLUE) + { + if (Config.BLUE_TEAM_ABNORMAL_EFFECT != null) + { + writeShort(Config.BLUE_TEAM_ABNORMAL_EFFECT.getClientId()); + } + } + else if ((team == Team.RED) && (Config.RED_TEAM_ABNORMAL_EFFECT != null)) + { + writeShort(Config.RED_TEAM_ABNORMAL_EFFECT.getClientId()); + } + writeByte(_statusMask); + if (_summon.isPet()) + { + final Pet pet = (Pet) _summon; + writeInt(pet.getPetData().getType()); + writeInt(pet.getEvolveLevel()); + writeInt(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); + } + else + { + writeInt(0); + writeInt(EvolveLevel.None.ordinal()); + writeInt(0); + } + } +} diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java new file mode 100644 index 0000000000..0deca5b570 --- /dev/null +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ResultPetExtractSystem.java @@ -0,0 +1,40 @@ +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ResultPetExtractSystem extends ServerPacket +{ + private final boolean _success; + + public ResultPetExtractSystem(boolean success) + { + _success = success; + } + + @Override + public void write() + { + ServerPackets.EX_RESULT_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(_success); + } +} diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10907_WhereFlowersBlossom.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java similarity index 61% rename from L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10907_WhereFlowersBlossom.java rename to L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java index 5498674f66..29683dc5a5 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/quests/not_done/Q10907_WhereFlowersBlossom.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/network/serverpackets/pet/ShowPetExtractSystem.java @@ -1,36 +1,35 @@ -/* - * 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 quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10907_WhereFlowersBlossom extends Quest -{ - private static final int START_NPC = 34599; - - public Q10907_WhereFlowersBlossom() - { - super(10907); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} +/* + * 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.pet; + +import org.l2jmobius.gameserver.network.ServerPackets; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; + +/** + * @author Geremy + */ +public class ShowPetExtractSystem extends ServerPacket +{ + public static final ShowPetExtractSystem STATIC_PACKET = new ShowPetExtractSystem(); + + @Override + public void write() + { + ServerPackets.EX_SHOW_PET_EXTRACT_SYSTEM.writeId(this); + writeInt(0); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java index d9708e71db..25ce6b8dd7 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoPlayTaskManager.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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,11 +26,13 @@ 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; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.actor.Summon; +import org.l2jmobius.gameserver.model.actor.instance.Pet; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.zone.ZoneId; @@ -42,9 +45,12 @@ 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; + private static final Integer PET_ATTACK_ACTION = 16; + private static final Integer SUMMON_ATTACK_ACTION = 22; protected AutoPlayTaskManager() { @@ -94,6 +100,25 @@ public class AutoPlayTaskManager } else if ((creature.getTarget() == player) || (creature.getTarget() == null)) { + // Pet Attack. + final Pet pet = player.getPet(); + if ((pet != null) && player.getAutoUseSettings().getAutoActions().contains(PET_ATTACK_ACTION) && pet.hasAI() && !pet.isMoving() && !pet.isDisabled() && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (pet.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && creature.isAutoAttackable(player) && GeoEngine.getInstance().canSeeTarget(player, creature)) + { + pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature); + } + + // Summon Attack. + if (player.hasSummon() && player.getAutoUseSettings().getAutoActions().contains(SUMMON_ATTACK_ACTION)) + { + 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); + } + } + } + // We take granted that mage classes do not auto hit. if (isMageCaster(player)) { @@ -122,23 +147,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); } } } @@ -146,6 +180,9 @@ public class AutoPlayTaskManager } } + // Reset idle count. + IDLE_COUNT.remove(player); + // Pickup. if (player.getAutoPlaySettings().doPickup()) { @@ -180,32 +217,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 */) && (targetMode != 4 /* Counterattack */) ? 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 */) && (targetMode != 4 /* Counterattack */) ? 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; + } } } } @@ -256,7 +316,7 @@ public class AutoPlayTaskManager } case 4: // Counterattack { - return creature.isMonster() || (creature.isPlayable() && creature.isAutoAttackable(player)); + return creature.isMonster() || (creature.isPlayer() && ((creature.getTarget() == player) && (creature.getActingPlayer().getEinhasadOverseeingLevel() >= 1))); } default: // Any Target { @@ -315,6 +375,7 @@ public class AutoPlayTaskManager { player.getPet().followOwner(); } + IDLE_COUNT.remove(player); return; } } diff --git a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java index 0b448194b6..a5dda1d99b 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java +++ b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/taskmanager/AutoUseTaskManager.java @@ -36,7 +36,9 @@ 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.instance.Pet; +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; @@ -47,12 +49,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 @@ -429,8 +431,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; } @@ -442,7 +445,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); + } + } } } } @@ -525,6 +545,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_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/util/Util.java index dde351d51a..d004f93d57 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/java/org/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Essence_7.1_Assassin/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_Essence_7.1_Assassin/readme.txt b/L2J_Mobius_Essence_7.1_Assassin/readme.txt index c51b302ee4..b883194292 100644 --- a/L2J_Mobius_Essence_7.1_Assassin/readme.txt +++ b/L2J_Mobius_Essence_7.1_Assassin/readme.txt @@ -127,6 +127,7 @@ Fluffy Reinforcement: https://eu.4game.com/patchnotes/lineage2essence/204/ Dwelling of Spirits: https://eu.4game.com/patchnotes/lineage2essence/261/ -Transcendent hunting zones +-Pet extraction system Sylph: https://eu.4game.com/patchnotes/lineage2essence/281/ -Sylph creation support @@ -167,6 +168,7 @@ Assassin: https://eu.4game.com/patchnotes/lineage2essence/426/ -New quest system -Elemental spirit changes + Customs: -Newbie Helper NPC location info -Newbie Helper buff support until 40 level