From b140419920695bd2e2db21609f9044822de04761 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 3 Dec 2020 15:53:41 +0000 Subject: [PATCH] Prevent full inventory when getting talismans from Castle Court Magician. Contributed by CostyKiller. --- .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ .../ai/others/CastleCourtMagician/CastleCourtMagician.java | 6 ++++++ 11 files changed, 66 insertions(+) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index 56174aed7f..a65a6072e3 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -165,6 +166,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index c31af841a3..9bdd9a26b0 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -146,6 +147,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index c31af841a3..9bdd9a26b0 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.clan.ClanPrivilege; import org.l2jmobius.gameserver.model.holders.SkillHolder; +import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill; import ai.AbstractNpcAI; @@ -146,6 +147,11 @@ public class CastleCourtMagician extends AbstractNpcAI htmltext = "courtmagician-06.html"; break; } + if (player.getInventory().getSize() == player.getInventoryLimit()) + { + player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL); + break; + } final int categoryChance = getRandom(100); if (categoryChance <= 5)