Fixed probable giveResidentialSkills NPE.
This commit is contained in:
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -439,6 +441,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -483,10 +486,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -508,16 +513,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -57,6 +57,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -296,14 +297,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -301,14 +302,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -301,14 +302,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -301,14 +302,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -447,6 +449,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -491,10 +494,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -519,16 +524,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -59,6 +59,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -300,14 +301,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -447,6 +449,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -491,10 +494,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -519,16 +524,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -59,6 +59,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -300,14 +301,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -447,6 +449,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -491,10 +494,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -519,16 +524,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -59,6 +59,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -300,14 +301,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
@@ -446,6 +448,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -490,10 +493,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -518,16 +523,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 19009);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -59,6 +59,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -301,14 +302,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
@@ -446,6 +448,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -490,10 +493,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -518,16 +523,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 19009);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -306,14 +307,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
@@ -446,6 +448,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -490,10 +493,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -518,16 +523,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 19009);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -308,14 +309,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
@@ -446,6 +448,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -490,10 +493,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -518,16 +523,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 19009);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -309,14 +310,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
@@ -446,6 +448,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -490,10 +493,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -518,16 +523,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 19009);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -309,14 +310,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -103,6 +103,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles)
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -80,6 +80,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts)
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -61,6 +61,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
@@ -423,6 +425,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -491,16 +494,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
removeSkillEffects(player);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+25
-15
@@ -62,6 +62,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.residences.AuctionableHall;
|
||||
import org.l2jmobius.gameserver.model.sevensigns.SevenSigns;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -241,14 +242,15 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
boolean showClanNotice = false;
|
||||
|
||||
// Clan related checks are here
|
||||
if (player.getClan() != null)
|
||||
final Clan clan = player.getClan();
|
||||
if (clan != null)
|
||||
{
|
||||
player.sendPacket(new PledgeSkillList(player.getClan()));
|
||||
player.sendPacket(new PledgeSkillList(clan));
|
||||
notifyClanMembers(player);
|
||||
|
||||
notifySponsorOrApprentice(player);
|
||||
|
||||
final AuctionableHall clanHall = ClanHallTable.getInstance().getClanHallByOwner(player.getClan());
|
||||
final AuctionableHall clanHall = ClanHallTable.getInstance().getClanHallByOwner(clan);
|
||||
if (clanHall != null)
|
||||
{
|
||||
if (!clanHall.getPaid())
|
||||
@@ -264,13 +266,13 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
continue;
|
||||
}
|
||||
|
||||
if (siege.checkIsAttacker(player.getClan()))
|
||||
if (siege.checkIsAttacker(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 1);
|
||||
player.setSiegeSide(siege.getCastle().getResidenceId());
|
||||
}
|
||||
|
||||
else if (siege.checkIsDefender(player.getClan()))
|
||||
else if (siege.checkIsDefender(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 2);
|
||||
player.setSiegeSide(siege.getCastle().getResidenceId());
|
||||
@@ -284,13 +286,13 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
continue;
|
||||
}
|
||||
|
||||
if (siege.checkIsAttacker(player.getClan()))
|
||||
if (siege.checkIsAttacker(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 1);
|
||||
player.setSiegeSide(siege.getFort().getResidenceId());
|
||||
}
|
||||
|
||||
else if (siege.checkIsDefender(player.getClan()))
|
||||
else if (siege.checkIsDefender(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 2);
|
||||
player.setSiegeSide(siege.getFort().getResidenceId());
|
||||
@@ -304,7 +306,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hall.isRegistered(player.getClan()))
|
||||
if (hall.isRegistered(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 1);
|
||||
player.setSiegeSide(hall.getId());
|
||||
@@ -312,21 +314,29 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
}
|
||||
|
||||
player.sendPacket(new PledgeShowMemberListAll(player.getClan(), player));
|
||||
player.sendPacket(new PledgeStatusChanged(player.getClan()));
|
||||
player.sendPacket(new PledgeShowMemberListAll(clan, player));
|
||||
player.sendPacket(new PledgeStatusChanged(clan));
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = player.getClan().isNoticeEnabled();
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
}
|
||||
|
||||
if (TerritoryWarManager.getInstance().getRegisteredTerritoryId(player) > 0)
|
||||
|
||||
+4
@@ -103,6 +103,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles)
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -80,6 +80,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts)
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -61,6 +61,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
@@ -423,6 +425,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -491,16 +494,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
removeSkillEffects(player);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+25
-15
@@ -61,6 +61,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.residences.AuctionableHall;
|
||||
import org.l2jmobius.gameserver.model.sevensigns.SevenSigns;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -242,14 +243,15 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
boolean showClanNotice = false;
|
||||
|
||||
// Clan related checks are here
|
||||
if (player.getClan() != null)
|
||||
final Clan clan = player.getClan();
|
||||
if (clan != null)
|
||||
{
|
||||
player.sendPacket(new PledgeSkillList(player.getClan()));
|
||||
player.sendPacket(new PledgeSkillList(clan));
|
||||
notifyClanMembers(player);
|
||||
|
||||
notifySponsorOrApprentice(player);
|
||||
|
||||
final AuctionableHall clanHall = ClanHallTable.getInstance().getClanHallByOwner(player.getClan());
|
||||
final AuctionableHall clanHall = ClanHallTable.getInstance().getClanHallByOwner(clan);
|
||||
if (clanHall != null)
|
||||
{
|
||||
if (!clanHall.getPaid())
|
||||
@@ -265,13 +267,13 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
continue;
|
||||
}
|
||||
|
||||
if (siege.checkIsAttacker(player.getClan()))
|
||||
if (siege.checkIsAttacker(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 1);
|
||||
player.setSiegeSide(siege.getCastle().getResidenceId());
|
||||
}
|
||||
|
||||
else if (siege.checkIsDefender(player.getClan()))
|
||||
else if (siege.checkIsDefender(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 2);
|
||||
player.setSiegeSide(siege.getCastle().getResidenceId());
|
||||
@@ -285,13 +287,13 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
continue;
|
||||
}
|
||||
|
||||
if (siege.checkIsAttacker(player.getClan()))
|
||||
if (siege.checkIsAttacker(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 1);
|
||||
player.setSiegeSide(siege.getFort().getResidenceId());
|
||||
}
|
||||
|
||||
else if (siege.checkIsDefender(player.getClan()))
|
||||
else if (siege.checkIsDefender(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 2);
|
||||
player.setSiegeSide(siege.getFort().getResidenceId());
|
||||
@@ -305,7 +307,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hall.isRegistered(player.getClan()))
|
||||
if (hall.isRegistered(clan))
|
||||
{
|
||||
player.setSiegeState((byte) 1);
|
||||
player.setSiegeSide(hall.getId());
|
||||
@@ -313,21 +315,29 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
}
|
||||
|
||||
player.sendPacket(new PledgeShowMemberListAll(player.getClan(), player));
|
||||
player.sendPacket(new PledgeStatusChanged(player.getClan()));
|
||||
player.sendPacket(new PledgeShowMemberListAll(clan, player));
|
||||
player.sendPacket(new PledgeStatusChanged(clan));
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = player.getClan().isNoticeEnabled();
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
}
|
||||
|
||||
if (TerritoryWarManager.getInstance().getRegisteredTerritoryId(player) > 0)
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -57,6 +57,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -299,14 +300,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -57,6 +57,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -299,14 +300,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -300,14 +301,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -300,14 +301,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -300,14 +301,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -301,14 +302,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -57,6 +57,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -297,14 +298,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -63,6 +63,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -440,6 +442,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -484,10 +487,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -509,16 +514,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -306,14 +307,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -64,6 +64,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -459,6 +461,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -503,10 +506,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -528,16 +533,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -310,14 +311,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
+17
-5
@@ -64,6 +64,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -459,6 +461,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -503,10 +506,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -528,16 +533,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -310,14 +311,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
+4
@@ -88,6 +88,10 @@ public class CastleManager
|
||||
|
||||
public Castle getCastleByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Castle temp : _castles.values())
|
||||
{
|
||||
if (temp.getOwnerId() == clan.getId())
|
||||
|
||||
+4
@@ -74,6 +74,10 @@ public class FortManager
|
||||
|
||||
public Fort getFortByOwner(Clan clan)
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Fort f : _forts.values())
|
||||
{
|
||||
if (f.getOwnerClan() == clan)
|
||||
|
||||
@@ -64,6 +64,8 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.ClanVariables;
|
||||
@@ -459,6 +461,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
LOGGER.warning("Member Object ID: " + objectId + " not found in clan while trying to remove");
|
||||
return;
|
||||
}
|
||||
|
||||
final int leadssubpledge = getLeaderSubPledge(objectId);
|
||||
if (leadssubpledge != 0)
|
||||
{
|
||||
@@ -503,10 +506,12 @@ public class Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
exMember.saveApprenticeAndSponsor(0, 0);
|
||||
|
||||
if (Config.REMOVE_CASTLE_CIRCLETS)
|
||||
{
|
||||
CastleManager.getInstance().removeCirclet(exMember, getCastleId());
|
||||
}
|
||||
|
||||
if (exMember.isOnline())
|
||||
{
|
||||
final Player player = exMember.getPlayer();
|
||||
@@ -528,16 +533,23 @@ public class Clan implements IIdentifiable, INamable
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(this);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(player.getClan()).removeResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(this);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.removeResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
||||
player.setClan(null);
|
||||
|
||||
// players leaving from clan academy have no penalty
|
||||
|
||||
+13
-4
@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.siege.FortSiege;
|
||||
import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
@@ -310,14 +311,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Residential skills support
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
if (clan.getCastleId() > 0)
|
||||
{
|
||||
CastleManager.getInstance().getCastleByOwner(clan).giveResidentialSkills(player);
|
||||
final Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
|
||||
if (castle != null)
|
||||
{
|
||||
castle.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getClan().getFortId() > 0)
|
||||
if (clan.getFortId() > 0)
|
||||
{
|
||||
FortManager.getInstance().getFortByOwner(clan).giveResidentialSkills(player);
|
||||
final Fort fort = FortManager.getInstance().getFortByOwner(clan);
|
||||
if (fort != null)
|
||||
{
|
||||
fort.giveResidentialSkills(player);
|
||||
}
|
||||
}
|
||||
|
||||
showClanNotice = clan.isNoticeEnabled();
|
||||
|
||||
Reference in New Issue
Block a user