Fixed Class Change skill not been able to cast.
This commit is contained in:
parent
ce761fbc1c
commit
d5c7a92b95
@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@ -48,21 +50,19 @@ public final class RequestMagicSkillUse implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeChar.isSpawnProtected())
|
|
||||||
{
|
|
||||||
activeChar.onActionRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the level of the used skill
|
// Get the level of the used skill
|
||||||
Skill skill = activeChar.getKnownSkill(_magicId);
|
Skill skill = activeChar.getKnownSkill(_magicId);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
// Player doesn't know this skill, maybe it's the display Id.
|
if ((_magicId == CommonSkill.HAIR_ACCESSORY_SET.getId()) //
|
||||||
skill = activeChar.getCustomSkill(_magicId);
|
|| ((_magicId > 1565) && (_magicId < 1570))) // subClass change SkillTree
|
||||||
if (skill == null)
|
{
|
||||||
|
skill = SkillData.getInstance().getSkill(_magicId, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
_log.warning("Player " + activeChar + " tried to use a skill [" + _magicId + "] which hasn't been learned or it belongs to a macro of a currently inactive class.");
|
_log.warning("Skill Id " + _magicId + " not found in player!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@ -48,21 +50,19 @@ public final class RequestMagicSkillUse implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeChar.isSpawnProtected())
|
|
||||||
{
|
|
||||||
activeChar.onActionRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the level of the used skill
|
// Get the level of the used skill
|
||||||
Skill skill = activeChar.getKnownSkill(_magicId);
|
Skill skill = activeChar.getKnownSkill(_magicId);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
// Player doesn't know this skill, maybe it's the display Id.
|
if ((_magicId == CommonSkill.HAIR_ACCESSORY_SET.getId()) //
|
||||||
skill = activeChar.getCustomSkill(_magicId);
|
|| ((_magicId > 1565) && (_magicId < 1570))) // subClass change SkillTree
|
||||||
if (skill == null)
|
{
|
||||||
|
skill = SkillData.getInstance().getSkill(_magicId, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
_log.warning("Player " + activeChar + " tried to use a skill [" + _magicId + "] which hasn't been learned or it belongs to a macro of a currently inactive class.");
|
_log.warning("Skill Id " + _magicId + " not found in player!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@ -48,21 +50,19 @@ public final class RequestMagicSkillUse implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeChar.isSpawnProtected())
|
|
||||||
{
|
|
||||||
activeChar.onActionRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the level of the used skill
|
// Get the level of the used skill
|
||||||
Skill skill = activeChar.getKnownSkill(_magicId);
|
Skill skill = activeChar.getKnownSkill(_magicId);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
// Player doesn't know this skill, maybe it's the display Id.
|
if ((_magicId == CommonSkill.HAIR_ACCESSORY_SET.getId()) //
|
||||||
skill = activeChar.getCustomSkill(_magicId);
|
|| ((_magicId > 1565) && (_magicId < 1570))) // subClass change SkillTree
|
||||||
if (skill == null)
|
{
|
||||||
|
skill = SkillData.getInstance().getSkill(_magicId, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
_log.warning("Player " + activeChar + " tried to use a skill [" + _magicId + "] which hasn't been learned or it belongs to a macro of a currently inactive class.");
|
_log.warning("Skill Id " + _magicId + " not found in player!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@ -48,21 +50,19 @@ public final class RequestMagicSkillUse implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeChar.isSpawnProtected())
|
|
||||||
{
|
|
||||||
activeChar.onActionRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the level of the used skill
|
// Get the level of the used skill
|
||||||
Skill skill = activeChar.getKnownSkill(_magicId);
|
Skill skill = activeChar.getKnownSkill(_magicId);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
// Player doesn't know this skill, maybe it's the display Id.
|
if ((_magicId == CommonSkill.HAIR_ACCESSORY_SET.getId()) //
|
||||||
skill = activeChar.getCustomSkill(_magicId);
|
|| ((_magicId > 1565) && (_magicId < 1570))) // subClass change SkillTree
|
||||||
if (skill == null)
|
{
|
||||||
|
skill = SkillData.getInstance().getSkill(_magicId, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
_log.warning("Player " + activeChar + " tried to use a skill [" + _magicId + "] which hasn't been learned or it belongs to a macro of a currently inactive class.");
|
_log.warning("Skill Id " + _magicId + " not found in player!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@ -48,21 +50,19 @@ public final class RequestMagicSkillUse implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeChar.isSpawnProtected())
|
|
||||||
{
|
|
||||||
activeChar.onActionRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the level of the used skill
|
// Get the level of the used skill
|
||||||
Skill skill = activeChar.getKnownSkill(_magicId);
|
Skill skill = activeChar.getKnownSkill(_magicId);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
// Player doesn't know this skill, maybe it's the display Id.
|
if ((_magicId == CommonSkill.HAIR_ACCESSORY_SET.getId()) //
|
||||||
skill = activeChar.getCustomSkill(_magicId);
|
|| ((_magicId > 1565) && (_magicId < 1570))) // subClass change SkillTree
|
||||||
if (skill == null)
|
{
|
||||||
|
skill = SkillData.getInstance().getSkill(_magicId, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
_log.warning("Player " + activeChar + " tried to use a skill [" + _magicId + "] which hasn't been learned or it belongs to a macro of a currently inactive class.");
|
_log.warning("Skill Id " + _magicId + " not found in player!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user