Modify junin00's code and just add the checks for MonsterInstance:
=======================================================================================
Index: org.l2jmobius.Config;
=======================================================================================
public static List<Integer> RAID_INFO_IDS_LIST = new ArrayList<>();
+ public static String RAID_FLAG_IDS;
+ public static List<Integer> RAID_FLAG_LIST = new ArrayList<>();
public static boolean AUTO_LOOT;
RAID_INFO_IDS_LIST.add(Integer.parseInt(id));
}
+ RAID_FLAG_IDS = bossConfig.getString("RaidFlagIDs", "29020,29019,25517,25523,25524");
+ RAID_FLAG_LIST = new ArrayList<>();
+ for (final String id : RAID_FLAG_IDS.split(","))
+ {
+ RAID_FLAG_LIST.add(Integer.parseInt(id));
+ }
// High Priestess van Halter
=======================================================================================
Index: org.l2jmobius.gameserver.model.actor.Creature;
=======================================================================================
---------- Line 817 ----------
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
+
+ // Boss Flag MOD by Tayran.JavaDev
+ if (target instanceof RaidBossInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((RaidBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+
+ }
+ else if (target instanceof GrandBossInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((GrandBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+ }
+ else if (target instanceof MonsterInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((MonsterInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+ }
// GeoData Los Check here (or dz > 1000)
if (!GeoEngine.getInstance().canSeeTarget(this, target))
---------- Line 1507 ----------
// Player can't heal rb config
if (!Config.PLAYERS_CAN_HEAL_RB && (creature instanceof PlayerInstance) && !((PlayerInstance) creature).isGM() && ((target instanceof RaidBossInstance) || (target instanceof GrandBossInstance)) && ((skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.HEAL_PERCENT)))
{
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
+
+ // on attack Boss player Flag. MOD by Tayran.JavaDev
+ if ((creature instanceof PlayerInstance) && (target instanceof RaidBossInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((RaidBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
+ else if ((creature instanceof PlayerInstance) && (target instanceof GrandBossInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((GrandBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
+ else if ((creature instanceof PlayerInstance) && (target instanceof MonsterInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((MonsterInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
if ((creature instanceof PlayerInstance) && (target instanceof NpcInstance) && Config.DISABLE_ATTACK_NPC_TYPE)
{
final String mob
=======================================================================================
Index: game\config\main\RaidBoss.ini
=======================================================================================
# Default: True
PlayersCanHealRb = True
+# This config defines the Raid Boss that leaves you Flag by attacking them.
+# Creditos : Tayran.JavaDev
+# Format : RaidFlagIDs = bossId1,bossId2.bossId3
+RaidFlagIDs = 25001,25002
# Return GrandBosses/RaidBosses to spawnpoint
# ATTENTION: if specific boss lock rage is defined, it has