Partial sync L2jUnity free release Feb 23th 2015.
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
<respawnPoint X="-114336" Y="255654" Z="-1512" />
|
<respawnPoint X="-114336" Y="255654" Z="-1512" />
|
||||||
<respawnPoint X="-114742" Y="255603" Z="-1512" />
|
<respawnPoint X="-114742" Y="255603" Z="-1512" />
|
||||||
<respawnPoint X="-113990" Y="255700" Z="-1504" />
|
<respawnPoint X="-113990" Y="255700" Z="-1504" />
|
||||||
|
<respawnPoint X="-114359" Y="256482" Z="-1280" />
|
||||||
<respawnPoint X="-119602" Y="246335" Z="-1232" isChaotic="true" />
|
<respawnPoint X="-119602" Y="246335" Z="-1232" isChaotic="true" />
|
||||||
<respawnPoint X="-119756" Y="246335" Z="-1232" isChaotic="true" />
|
<respawnPoint X="-119756" Y="246335" Z="-1232" isChaotic="true" />
|
||||||
<map X="15" Y="23" />
|
<map X="15" Y="23" />
|
||||||
|
@@ -41,13 +41,13 @@ public final class Nottingale extends AbstractNpcAI
|
|||||||
private static final Map<Integer, RadarControl> RADARS = new HashMap<>();
|
private static final Map<Integer, RadarControl> RADARS = new HashMap<>();
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
RADARS.put(2, new RadarControl(0, -184545, 243120, 1581, 2));
|
RADARS.put(2, new RadarControl(0, 2, -184545, 243120, 1581));
|
||||||
RADARS.put(5, new RadarControl(0, -192361, 254528, 3598, 1));
|
RADARS.put(5, new RadarControl(0, 1, -192361, 254528, 3598));
|
||||||
RADARS.put(6, new RadarControl(0, -174600, 219711, 4424, 1));
|
RADARS.put(6, new RadarControl(0, 1, -174600, 219711, 4424));
|
||||||
RADARS.put(7, new RadarControl(0, -181989, 208968, 4424, 1));
|
RADARS.put(7, new RadarControl(0, 1, -181989, 208968, 4424));
|
||||||
RADARS.put(8, new RadarControl(0, -252898, 235845, 5343, 1));
|
RADARS.put(8, new RadarControl(0, 1, -252898, 235845, 5343));
|
||||||
RADARS.put(9, new RadarControl(0, -212819, 209813, 4288, 1));
|
RADARS.put(9, new RadarControl(0, 1, -212819, 209813, 4288));
|
||||||
RADARS.put(10, new RadarControl(0, -246899, 251918, 4352, 1));
|
RADARS.put(10, new RadarControl(0, 1, -246899, 251918, 4352));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Nottingale()
|
private Nottingale()
|
||||||
|
@@ -30,6 +30,7 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
|||||||
import com.l2jmobius.gameserver.model.actor.instance.L2ChestInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2ChestInstance;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
import com.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
import com.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||||
@@ -360,12 +361,19 @@ public class AdminEffects implements IAdminCommandHandler
|
|||||||
activeChar.stopSkillEffects((val == 0) && sendMessage, 7029);
|
activeChar.stopSkillEffects((val == 0) && sendMessage, 7029);
|
||||||
if ((val >= 1) && (val <= 4))
|
if ((val >= 1) && (val <= 4))
|
||||||
{
|
{
|
||||||
activeChar.doSimultaneousCast(SkillData.getInstance().getSkill(7029, val));
|
int time = 0;
|
||||||
|
if (st.hasMoreTokens())
|
||||||
|
{
|
||||||
|
time = Integer.parseInt(st.nextToken());
|
||||||
|
}
|
||||||
|
|
||||||
|
final Skill gmSpeedSkill = SkillData.getInstance().getSkill(7029, val);
|
||||||
|
gmSpeedSkill.applyEffects(activeChar, activeChar, true, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
activeChar.sendMessage("Usage: //gmspeed <value> (0=off...4=max)");
|
activeChar.sendMessage("Usage: //gmspeed <Effect level (0-4)> <Time in seconds>");
|
||||||
}
|
}
|
||||||
if (command.contains("_menu"))
|
if (command.contains("_menu"))
|
||||||
{
|
{
|
||||||
|
1
L2J_Mobius_Test/dist/game/data/xsd/items.xsd
vendored
1
L2J_Mobius_Test/dist/game/data/xsd/items.xsd
vendored
@@ -4,6 +4,7 @@
|
|||||||
<xs:attribute name="name" use="required">
|
<xs:attribute name="name" use="required">
|
||||||
<xs:simpleType>
|
<xs:simpleType>
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
|
<xs:enumeration value="displayId" />
|
||||||
<xs:enumeration value="armor_type" />
|
<xs:enumeration value="armor_type" />
|
||||||
<xs:enumeration value="attack_range" />
|
<xs:enumeration value="attack_range" />
|
||||||
<xs:enumeration value="auto_destroy_time" />
|
<xs:enumeration value="auto_destroy_time" />
|
||||||
|
@@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.ThreadPoolManager;
|
|||||||
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
|
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||||
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import com.l2jmobius.gameserver.model.L2Party.messageType;
|
import com.l2jmobius.gameserver.model.L2Party.MessageType;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
@@ -426,7 +426,7 @@ public class CursedWeapon implements INamable
|
|||||||
_player.setPkKills(0);
|
_player.setPkKills(0);
|
||||||
if (_player.isInParty())
|
if (_player.isInParty())
|
||||||
{
|
{
|
||||||
_player.getParty().removePartyMember(_player, messageType.Expelled);
|
_player.getParty().removePartyMember(_player, MessageType.EXPELLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable All Skills
|
// Disable All Skills
|
||||||
|
@@ -106,12 +106,12 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
/**
|
/**
|
||||||
* The message type send to the party members.
|
* The message type send to the party members.
|
||||||
*/
|
*/
|
||||||
public enum messageType
|
public enum MessageType
|
||||||
{
|
{
|
||||||
Expelled,
|
EXPELLED,
|
||||||
Left,
|
LEFT,
|
||||||
None,
|
NONE,
|
||||||
Disconnected
|
DISCONNECTED
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -476,9 +476,9 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
/**
|
/**
|
||||||
* Removes a party member using its name.
|
* Removes a party member using its name.
|
||||||
* @param name player the player to be removed from the party.
|
* @param name player the player to be removed from the party.
|
||||||
* @param type the message type {@link messageType}.
|
* @param type the message type {@link MessageType}.
|
||||||
*/
|
*/
|
||||||
public void removePartyMember(String name, messageType type)
|
public void removePartyMember(String name, MessageType type)
|
||||||
{
|
{
|
||||||
removePartyMember(getPlayerByName(name), type);
|
removePartyMember(getPlayerByName(name), type);
|
||||||
}
|
}
|
||||||
@@ -486,9 +486,9 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
/**
|
/**
|
||||||
* Removes a party member instance.
|
* Removes a party member instance.
|
||||||
* @param player the player to be removed from the party.
|
* @param player the player to be removed from the party.
|
||||||
* @param type the message type {@link messageType}.
|
* @param type the message type {@link MessageType}.
|
||||||
*/
|
*/
|
||||||
public void removePartyMember(L2PcInstance player, messageType type)
|
public void removePartyMember(L2PcInstance player, MessageType type)
|
||||||
{
|
{
|
||||||
if (!getMembers().contains(player))
|
if (!getMembers().contains(player))
|
||||||
{
|
{
|
||||||
@@ -496,7 +496,7 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
}
|
}
|
||||||
|
|
||||||
final boolean isLeader = isLeader(player);
|
final boolean isLeader = isLeader(player);
|
||||||
if (!_disbanding && ((getMembers().size() == 2) || (isLeader && !Config.ALT_LEAVE_PARTY_LEADER && (type != messageType.Disconnected))))
|
if (!_disbanding && ((getMembers().size() == 2) || (isLeader && !Config.ALT_LEAVE_PARTY_LEADER && (type != MessageType.DISCONNECTED))))
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
disbandParty();
|
disbandParty();
|
||||||
@@ -525,14 +525,14 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
}
|
}
|
||||||
|
|
||||||
SystemMessage msg;
|
SystemMessage msg;
|
||||||
if (type == messageType.Expelled)
|
if (type == MessageType.EXPELLED)
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_EXPELLED_FROM_THE_PARTY);
|
player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_EXPELLED_FROM_THE_PARTY);
|
||||||
msg = SystemMessage.getSystemMessage(SystemMessageId.C1_WAS_EXPELLED_FROM_THE_PARTY);
|
msg = SystemMessage.getSystemMessage(SystemMessageId.C1_WAS_EXPELLED_FROM_THE_PARTY);
|
||||||
msg.addString(player.getName());
|
msg.addString(player.getName());
|
||||||
broadcastPacket(msg);
|
broadcastPacket(msg);
|
||||||
}
|
}
|
||||||
else if ((type == messageType.Left) || (type == messageType.Disconnected))
|
else if ((type == MessageType.LEFT) || (type == MessageType.DISCONNECTED))
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_HAVE_WITHDRAWN_FROM_THE_PARTY);
|
player.sendPacket(SystemMessageId.YOU_HAVE_WITHDRAWN_FROM_THE_PARTY);
|
||||||
msg = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_LEFT_THE_PARTY);
|
msg = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_LEFT_THE_PARTY);
|
||||||
@@ -556,7 +556,7 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
{
|
{
|
||||||
player.sendPacket(new ExCloseMPCC());
|
player.sendPacket(new ExCloseMPCC());
|
||||||
}
|
}
|
||||||
if (isLeader && (getMembers().size() > 1) && (Config.ALT_LEAVE_PARTY_LEADER || (type == messageType.Disconnected)))
|
if (isLeader && (getMembers().size() > 1) && (Config.ALT_LEAVE_PARTY_LEADER || (type == MessageType.DISCONNECTED)))
|
||||||
{
|
{
|
||||||
msg = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_BECOME_THE_PARTY_LEADER);
|
msg = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_BECOME_THE_PARTY_LEADER);
|
||||||
msg.addString(getLeader().getName());
|
msg.addString(getLeader().getName());
|
||||||
@@ -613,7 +613,7 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
{
|
{
|
||||||
if (member != null)
|
if (member != null)
|
||||||
{
|
{
|
||||||
removePartyMember(member, messageType.None);
|
removePartyMember(member, MessageType.NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -126,7 +126,7 @@ import com.l2jmobius.gameserver.model.L2EnchantSkillLearn;
|
|||||||
import com.l2jmobius.gameserver.model.L2ManufactureItem;
|
import com.l2jmobius.gameserver.model.L2ManufactureItem;
|
||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2Party;
|
import com.l2jmobius.gameserver.model.L2Party;
|
||||||
import com.l2jmobius.gameserver.model.L2Party.messageType;
|
import com.l2jmobius.gameserver.model.L2Party.MessageType;
|
||||||
import com.l2jmobius.gameserver.model.L2PetLevelData;
|
import com.l2jmobius.gameserver.model.L2PetLevelData;
|
||||||
import com.l2jmobius.gameserver.model.L2PremiumItem;
|
import com.l2jmobius.gameserver.model.L2PremiumItem;
|
||||||
import com.l2jmobius.gameserver.model.L2Radar;
|
import com.l2jmobius.gameserver.model.L2Radar;
|
||||||
@@ -6649,7 +6649,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (isInParty())
|
if (isInParty())
|
||||||
{
|
{
|
||||||
_party.removePartyMember(this, messageType.Disconnected);
|
_party.removePartyMember(this, MessageType.DISCONNECTED);
|
||||||
_party = null;
|
_party = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9724,7 +9724,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
|
|
||||||
if (getParty() != null)
|
if (getParty() != null)
|
||||||
{
|
{
|
||||||
getParty().removePartyMember(this, messageType.Expelled);
|
getParty().removePartyMember(this, MessageType.EXPELLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
_olympiadGameId = id;
|
_olympiadGameId = id;
|
||||||
@@ -13294,7 +13294,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
final int relation1 = getRelation(activeChar);
|
final int relation1 = getRelation(activeChar);
|
||||||
final int relation2 = activeChar.getRelation(this);
|
final int relation2 = activeChar.getRelation(this);
|
||||||
Integer oldrelation = getKnownList().getKnownRelations().get(activeChar.getObjectId());
|
Integer oldrelation = getKnownList().getKnownRelations().get(activeChar.getObjectId());
|
||||||
if ((oldrelation != null) && (oldrelation != relation1))
|
if ((oldrelation != null) && (oldrelation != relation1) && isVisibleFor(activeChar))
|
||||||
{
|
{
|
||||||
final RelationChanged rc = new RelationChanged();
|
final RelationChanged rc = new RelationChanged();
|
||||||
rc.addRelation(this, relation1, isAutoAttackable(activeChar));
|
rc.addRelation(this, relation1, isAutoAttackable(activeChar));
|
||||||
@@ -13313,7 +13313,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
activeChar.sendPacket(rc);
|
activeChar.sendPacket(rc);
|
||||||
}
|
}
|
||||||
oldrelation = activeChar.getKnownList().getKnownRelations().get(getObjectId());
|
oldrelation = activeChar.getKnownList().getKnownRelations().get(getObjectId());
|
||||||
if ((oldrelation != null) && (oldrelation != relation2))
|
if ((oldrelation != null) && (oldrelation != relation2) && activeChar.isVisibleFor(this))
|
||||||
{
|
{
|
||||||
final RelationChanged rc = new RelationChanged();
|
final RelationChanged rc = new RelationChanged();
|
||||||
rc.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
rc.addRelation(activeChar, relation2, activeChar.isAutoAttackable(this));
|
||||||
|
@@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.actor.request;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.model.L2Party;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,12 +27,15 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
|||||||
public class PartyRequest extends AbstractRequest
|
public class PartyRequest extends AbstractRequest
|
||||||
{
|
{
|
||||||
private final L2PcInstance _targetPlayer;
|
private final L2PcInstance _targetPlayer;
|
||||||
|
private final L2Party _party;
|
||||||
|
|
||||||
public PartyRequest(L2PcInstance activeChar, L2PcInstance targetPlayer)
|
public PartyRequest(L2PcInstance activeChar, L2PcInstance targetPlayer, L2Party party)
|
||||||
{
|
{
|
||||||
super(activeChar);
|
super(activeChar);
|
||||||
Objects.requireNonNull(targetPlayer);
|
Objects.requireNonNull(targetPlayer);
|
||||||
|
Objects.requireNonNull(party);
|
||||||
_targetPlayer = targetPlayer;
|
_targetPlayer = targetPlayer;
|
||||||
|
_party = party;
|
||||||
}
|
}
|
||||||
|
|
||||||
public L2PcInstance getTargetPlayer()
|
public L2PcInstance getTargetPlayer()
|
||||||
@@ -39,6 +43,11 @@ public class PartyRequest extends AbstractRequest
|
|||||||
return _targetPlayer;
|
return _targetPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public L2Party getParty()
|
||||||
|
{
|
||||||
|
return _party;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUsing(int objectId)
|
public boolean isUsing(int objectId)
|
||||||
{
|
{
|
||||||
|
@@ -691,7 +691,12 @@ public class CharStat
|
|||||||
*/
|
*/
|
||||||
public final int getMpInitialConsume(Skill skill)
|
public final int getMpInitialConsume(Skill skill)
|
||||||
{
|
{
|
||||||
return skill == null ? 1 : (int) calcStat(Stats.MP_CONSUME, skill.getMpInitialConsume(), null, skill);
|
if (skill == null)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int) calcStat(Stats.MP_CONSUME, skill.getMpInitialConsume(), null, skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getAttackElement()
|
public byte getAttackElement()
|
||||||
|
@@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
|||||||
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||||
import com.l2jmobius.gameserver.model.L2Party;
|
import com.l2jmobius.gameserver.model.L2Party;
|
||||||
import com.l2jmobius.gameserver.model.L2Party.messageType;
|
import com.l2jmobius.gameserver.model.L2Party.MessageType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
@@ -257,7 +257,7 @@ public abstract class AbstractOlympiadGame
|
|||||||
final L2Party party = player.getParty();
|
final L2Party party = player.getParty();
|
||||||
if (party != null)
|
if (party != null)
|
||||||
{
|
{
|
||||||
party.removePartyMember(player, messageType.Expelled);
|
party.removePartyMember(player, MessageType.EXPELLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remove Agathion
|
// Remove Agathion
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.model.L2Party;
|
import com.l2jmobius.gameserver.model.L2Party;
|
||||||
|
import com.l2jmobius.gameserver.model.L2Party.MessageType;
|
||||||
import com.l2jmobius.gameserver.model.PartyMatchRoom;
|
import com.l2jmobius.gameserver.model.PartyMatchRoom;
|
||||||
import com.l2jmobius.gameserver.model.PartyMatchRoomList;
|
import com.l2jmobius.gameserver.model.PartyMatchRoomList;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
@@ -28,8 +29,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
|||||||
|
|
||||||
public final class RequestAnswerJoinParty extends L2GameClientPacket
|
public final class RequestAnswerJoinParty extends L2GameClientPacket
|
||||||
{
|
{
|
||||||
private static final String _C__43_REQUESTANSWERPARTY = "[C] 43 RequestAnswerJoinParty";
|
|
||||||
|
|
||||||
private int _response;
|
private int _response;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,109 +47,94 @@ public final class RequestAnswerJoinParty extends L2GameClientPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final PartyRequest request = player.getRequest(PartyRequest.class);
|
final PartyRequest request = player.getRequest(PartyRequest.class);
|
||||||
if ((request == null) || request.isProcessing())
|
if ((request == null) || request.isProcessing() || !player.removeRequest(request.getClass()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
request.setProcessing(true);
|
request.setProcessing(true);
|
||||||
|
|
||||||
final L2PcInstance requestor = request.getActiveChar();
|
final L2PcInstance requestor = request.getActiveChar();
|
||||||
if (requestor == null)
|
if (requestor == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final L2Party party = requestor.getParty();
|
|
||||||
|
final L2Party party = request.getParty();
|
||||||
|
final L2Party requestorParty = requestor.getParty();
|
||||||
|
if ((requestorParty != null) && (requestorParty != party))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
requestor.sendPacket(new JoinParty(_response));
|
requestor.sendPacket(new JoinParty(_response));
|
||||||
|
|
||||||
switch (_response)
|
if (_response == 1)
|
||||||
{
|
{
|
||||||
case -1: // Party disable by player client config
|
if (party.getMemberCount() >= 7)
|
||||||
{
|
{
|
||||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_SET_TO_REFUSE_PARTY_REQUESTS_AND_CANNOT_RECEIVE_A_PARTY_REQUEST);
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_PARTY_IS_FULL);
|
||||||
sm.addPcName(player);
|
player.sendPacket(sm);
|
||||||
requestor.sendPacket(sm);
|
requestor.sendPacket(sm);
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
case 0: // Party cancel by player
|
|
||||||
|
// Assign the party to the leader upon accept of his partner
|
||||||
|
if (requestorParty == null)
|
||||||
{
|
{
|
||||||
// requestor.sendPacket(SystemMessageId.THE_PLAYER_DECLINED_TO_JOIN_YOUR_PARTY); FIXME: Done in client?
|
requestor.setParty(party);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 1: // Party accept by player
|
|
||||||
|
player.joinParty(party);
|
||||||
|
|
||||||
|
if (requestor.isInPartyMatchRoom())
|
||||||
{
|
{
|
||||||
if (requestor.isInParty())
|
final PartyMatchRoomList list = PartyMatchRoomList.getInstance();
|
||||||
|
if (player.isInPartyMatchRoom())
|
||||||
{
|
{
|
||||||
if (requestor.getParty().getMemberCount() >= 7)
|
if (list.getPlayerRoomId(requestor) == list.getPlayerRoomId(player))
|
||||||
{
|
{
|
||||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_PARTY_IS_FULL);
|
final PartyMatchRoom room = list.getPlayerRoom(requestor);
|
||||||
player.sendPacket(sm);
|
if (room != null)
|
||||||
requestor.sendPacket(sm);
|
{
|
||||||
return;
|
final ExManagePartyRoomMember packet = new ExManagePartyRoomMember(player, room, 1);
|
||||||
|
room.getPartyMembers().forEach(packet::sendTo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
requestor.setParty(new L2Party(requestor, requestor.getPartyDistributionType()));
|
final PartyMatchRoom room = list.getPlayerRoom(requestor);
|
||||||
}
|
if (room != null)
|
||||||
player.joinParty(requestor.getParty());
|
|
||||||
if (requestor.isInPartyMatchRoom() && player.isInPartyMatchRoom())
|
|
||||||
{
|
|
||||||
final PartyMatchRoomList list = PartyMatchRoomList.getInstance();
|
|
||||||
if ((list != null) && (list.getPlayerRoomId(requestor) == list.getPlayerRoomId(player)))
|
|
||||||
{
|
{
|
||||||
final PartyMatchRoom room = list.getPlayerRoom(requestor);
|
room.addMember(player);
|
||||||
if (room != null)
|
final ExManagePartyRoomMember packet = new ExManagePartyRoomMember(player, room, 1);
|
||||||
{
|
room.getPartyMembers().forEach(packet::sendTo);
|
||||||
final ExManagePartyRoomMember packet = new ExManagePartyRoomMember(player, room, 1);
|
player.setPartyRoom(room.getId());
|
||||||
for (L2PcInstance member : room.getPartyMembers())
|
player.broadcastUserInfo();
|
||||||
{
|
|
||||||
if (member != null)
|
|
||||||
{
|
|
||||||
member.sendPacket(packet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (requestor.isInPartyMatchRoom() && !player.isInPartyMatchRoom())
|
}
|
||||||
{
|
}
|
||||||
final PartyMatchRoomList list = PartyMatchRoomList.getInstance();
|
else if (_response == -1)
|
||||||
if (list != null)
|
{
|
||||||
{
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_SET_TO_REFUSE_PARTY_REQUESTS_AND_CANNOT_RECEIVE_A_PARTY_REQUEST);
|
||||||
final PartyMatchRoom room = list.getPlayerRoom(requestor);
|
sm.addPcName(player);
|
||||||
if (room != null)
|
requestor.sendPacket(sm);
|
||||||
{
|
|
||||||
room.addMember(player);
|
if (party.getMemberCount() == 1)
|
||||||
final ExManagePartyRoomMember packet = new ExManagePartyRoomMember(player, room, 1);
|
{
|
||||||
for (L2PcInstance member : room.getPartyMembers())
|
party.removePartyMember(requestor, MessageType.NONE);
|
||||||
{
|
}
|
||||||
if (member != null)
|
}
|
||||||
{
|
else
|
||||||
member.sendPacket(packet);
|
{
|
||||||
}
|
if (party.getMemberCount() == 1)
|
||||||
}
|
{
|
||||||
player.setPartyRoom(room.getId());
|
party.removePartyMember(requestor, MessageType.NONE);
|
||||||
// player.setPartyMatching(1);
|
|
||||||
player.broadcastUserInfo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (party != null)
|
party.setPendingInvitation(false);
|
||||||
{
|
|
||||||
party.setPendingInvitation(false); // if party is null, there is no need of decreasing
|
|
||||||
}
|
|
||||||
|
|
||||||
request.setProcessing(false);
|
request.setProcessing(false);
|
||||||
player.removeRequest(request.getClass());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getType()
|
|
||||||
{
|
|
||||||
return _C__43_REQUESTANSWERPARTY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -48,8 +48,8 @@ public final class RequestJoinParty extends L2GameClientPacket
|
|||||||
@Override
|
@Override
|
||||||
protected void runImpl()
|
protected void runImpl()
|
||||||
{
|
{
|
||||||
final L2PcInstance requestor = getClient().getActiveChar();
|
L2PcInstance requestor = getClient().getActiveChar();
|
||||||
final L2PcInstance target = L2World.getInstance().getPlayer(_name);
|
L2PcInstance target = L2World.getInstance().getPlayer(_name);
|
||||||
|
|
||||||
if (requestor == null)
|
if (requestor == null)
|
||||||
{
|
{
|
||||||
@@ -77,7 +77,7 @@ public final class RequestJoinParty extends L2GameClientPacket
|
|||||||
|
|
||||||
if (target.isPartyBanned())
|
if (target.isPartyBanned())
|
||||||
{
|
{
|
||||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_BEEN_REPORTED_AS_AN_ILLEGAL_PROGRAM_USER_AND_CANNOT_JOIN_A_PARTY);
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_BEEN_REPORTED_AS_AN_ILLEGAL_PROGRAM_USER_AND_CANNOT_JOIN_A_PARTY);
|
||||||
sm.addCharName(target);
|
sm.addCharName(target);
|
||||||
requestor.sendPacket(sm);
|
requestor.sendPacket(sm);
|
||||||
return;
|
return;
|
||||||
@@ -124,10 +124,13 @@ public final class RequestJoinParty extends L2GameClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((target.isInOlympiadMode() || requestor.isInOlympiadMode()) && ((target.isInOlympiadMode() != requestor.isInOlympiadMode()) || (target.getOlympiadGameId() != requestor.getOlympiadGameId()) || (target.getOlympiadSide() != requestor.getOlympiadSide())))
|
if (target.isInOlympiadMode() || requestor.isInOlympiadMode())
|
||||||
{
|
{
|
||||||
requestor.sendPacket(SystemMessageId.A_USER_CURRENTLY_PARTICIPATING_IN_THE_OLYMPIAD_CANNOT_SEND_PARTY_AND_FRIEND_INVITATIONS);
|
if ((target.isInOlympiadMode() != requestor.isInOlympiadMode()) || (target.getOlympiadGameId() != requestor.getOlympiadGameId()) || (target.getOlympiadSide() != requestor.getOlympiadSide()))
|
||||||
return;
|
{
|
||||||
|
requestor.sendPacket(SystemMessageId.A_USER_CURRENTLY_PARTICIPATING_IN_THE_OLYMPIAD_CANNOT_SEND_PARTY_AND_FRIEND_INVITATIONS);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_BEEN_INVITED_TO_THE_PARTY);
|
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_BEEN_INVITED_TO_THE_PARTY);
|
||||||
@@ -157,7 +160,7 @@ public final class RequestJoinParty extends L2GameClientPacket
|
|||||||
{
|
{
|
||||||
requestor.sendPacket(SystemMessageId.ONLY_THE_LEADER_CAN_GIVE_OUT_INVITATIONS);
|
requestor.sendPacket(SystemMessageId.ONLY_THE_LEADER_CAN_GIVE_OUT_INVITATIONS);
|
||||||
}
|
}
|
||||||
else if (party.getMemberCount() >= 7) // 7 members for GOD version
|
else if (party.getMemberCount() >= 9)
|
||||||
{
|
{
|
||||||
requestor.sendPacket(SystemMessageId.THE_PARTY_IS_FULL);
|
requestor.sendPacket(SystemMessageId.THE_PARTY_IS_FULL);
|
||||||
}
|
}
|
||||||
@@ -167,7 +170,7 @@ public final class RequestJoinParty extends L2GameClientPacket
|
|||||||
}
|
}
|
||||||
else if (!target.hasRequest(PartyRequest.class))
|
else if (!target.hasRequest(PartyRequest.class))
|
||||||
{
|
{
|
||||||
final PartyRequest request = new PartyRequest(requestor, target);
|
final PartyRequest request = new PartyRequest(requestor, target, party);
|
||||||
request.scheduleTimeout(30 * 1000);
|
request.scheduleTimeout(30 * 1000);
|
||||||
requestor.addRequest(request);
|
requestor.addRequest(request);
|
||||||
target.addRequest(request);
|
target.addRequest(request);
|
||||||
@@ -196,13 +199,13 @@ public final class RequestJoinParty extends L2GameClientPacket
|
|||||||
|
|
||||||
if (!target.hasRequest(PartyRequest.class))
|
if (!target.hasRequest(PartyRequest.class))
|
||||||
{
|
{
|
||||||
final PartyRequest request = new PartyRequest(requestor, target);
|
final L2Party party = new L2Party(requestor, partyDistributionType);
|
||||||
|
party.setPendingInvitation(true);
|
||||||
|
final PartyRequest request = new PartyRequest(requestor, target, party);
|
||||||
request.scheduleTimeout(30 * 1000);
|
request.scheduleTimeout(30 * 1000);
|
||||||
requestor.addRequest(request);
|
requestor.addRequest(request);
|
||||||
target.addRequest(request);
|
target.addRequest(request);
|
||||||
target.sendPacket(new AskJoinParty(requestor.getName(), partyDistributionType));
|
target.sendPacket(new AskJoinParty(requestor.getName(), partyDistributionType));
|
||||||
|
|
||||||
requestor.setPartyDistributionType(partyDistributionType);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.model.L2Party.messageType;
|
import com.l2jmobius.gameserver.model.L2Party.MessageType;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +46,7 @@ public final class RequestOustPartyMember extends L2GameClientPacket
|
|||||||
|
|
||||||
if (activeChar.isInParty() && activeChar.getParty().isLeader(activeChar))
|
if (activeChar.isInParty() && activeChar.getParty().isLeader(activeChar))
|
||||||
{
|
{
|
||||||
activeChar.getParty().removePartyMember(_name, messageType.Expelled);
|
activeChar.getParty().removePartyMember(_name, MessageType.EXPELLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.model.L2Party;
|
import com.l2jmobius.gameserver.model.L2Party;
|
||||||
import com.l2jmobius.gameserver.model.L2Party.messageType;
|
import com.l2jmobius.gameserver.model.L2Party.MessageType;
|
||||||
import com.l2jmobius.gameserver.model.PartyMatchRoom;
|
import com.l2jmobius.gameserver.model.PartyMatchRoom;
|
||||||
import com.l2jmobius.gameserver.model.PartyMatchRoomList;
|
import com.l2jmobius.gameserver.model.PartyMatchRoomList;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
@@ -49,27 +49,26 @@ public final class RequestWithDrawalParty extends L2GameClientPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
final L2Party party = player.getParty();
|
final L2Party party = player.getParty();
|
||||||
if (party == null)
|
if (party != null)
|
||||||
{
|
{
|
||||||
return;
|
party.removePartyMember(player, MessageType.LEFT);
|
||||||
}
|
|
||||||
|
|
||||||
party.removePartyMember(player, messageType.Left);
|
if (player.isInPartyMatchRoom())
|
||||||
if (!player.isInPartyMatchRoom())
|
{
|
||||||
{
|
final PartyMatchRoom room = PartyMatchRoomList.getInstance().getPlayerRoom(player);
|
||||||
return;
|
if (room != null)
|
||||||
}
|
{
|
||||||
|
player.sendPacket(new PartyMatchDetail(player, room));
|
||||||
|
player.sendPacket(new ExPartyRoomMember(player, room, 0));
|
||||||
|
player.sendPacket(new ExClosePartyRoom());
|
||||||
|
|
||||||
final PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(player);
|
room.deleteMember(player);
|
||||||
if (_room != null)
|
}
|
||||||
{
|
player.setPartyRoom(0);
|
||||||
player.sendPacket(new PartyMatchDetail(player, _room));
|
// player.setPartyMatching(0);
|
||||||
player.sendPacket(new ExPartyRoomMember(player, _room, 0));
|
player.broadcastUserInfo();
|
||||||
player.sendPacket(new ExClosePartyRoom());
|
}
|
||||||
_room.deleteMember(player);
|
|
||||||
}
|
}
|
||||||
player.setPartyRoom(0);
|
|
||||||
player.broadcastUserInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user