### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 9)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy)
@@ -23,6 +23,7 @@
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.datatables.SkillTable.FrequentSkill;
+import net.sf.l2j.gameserver.instancemanager.CastleManager;
import net.sf.l2j.gameserver.instancemanager.ClanHallManager;
import net.sf.l2j.gameserver.instancemanager.CoupleManager;
import net.sf.l2j.gameserver.instancemanager.DimensionalRiftManager;
@@ -34,6 +35,7 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.entity.Castle;
import net.sf.l2j.gameserver.model.entity.ClanHall;
import net.sf.l2j.gameserver.model.entity.Couple;
import net.sf.l2j.gameserver.model.entity.Siege;
@@ -110,6 +112,7 @@
activeChar.sendPacket(new PledgeSkillList(activeChar.getClan()));
notifyClanMembers(activeChar);
notifySponsorOrApprentice(activeChar);
+ Announcements(activeChar);
// Add message at connexion if clanHall not paid.
ClanHall clanHall = ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan());
@@ -250,6 +253,35 @@
activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
}
+ public static void Announcements(L2PcInstance activeChar)
+ {
+ if (activeChar.isHero())
+ {
+ Announcements.announceToAll("Hero "+activeChar.getName()+" has been logged in.");
+ return;
+ }
+
+ /**
+ *
+ * if (activeChar.isVip())
+ * {
+ * Announcements.announceToAll("VIP "+activeChar.getName()+" has been logged in.");
+ * return;
+ * }
+ *
+ */
+
+ L2Clan clan = activeChar.getClan();
+
+ if (clan != null)
+ {
+ if (clan.hasCastle())
+ {
+ Castle castle = CastleManager.getInstance().getCastleById(clan.getCastleId());
+ if ((castle != null) && (activeChar.getObjectId() == clan.getLeaderId()))
+ {
+ Announcements.announceToAll("Lord " + activeChar.getName() + " ruler of " + castle.getName() + " castle is now online!");
+ return;
+ }
+ }
+ }
+ }
+
private static void engage(L2PcInstance cha)
{
int _chaid = cha.getObjectId();
something like this !
This way everytime that enters a check will return (aka will not continue to the next checks of the method)