Changed OpSocialClassSkillCondition according to previous core changes.
This commit is contained in:
		| @@ -19,6 +19,7 @@ package handlers.skillconditionhandlers; | ||||
| import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.WorldObject; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.skills.ISkillCondition; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
|  | ||||
| @@ -37,6 +38,18 @@ public class OpSocialClassSkillCondition implements ISkillCondition | ||||
| 	@Override | ||||
| 	public boolean canUse(Creature caster, Skill skill, WorldObject target) | ||||
| 	{ | ||||
| 		return caster.isPlayer() && (caster.getActingPlayer().getPledgeClass() >= _socialClass); | ||||
| 		final PlayerInstance player = caster.getActingPlayer(); | ||||
| 		if ((player == null) || (player.getClan() == null)) | ||||
| 		{ | ||||
| 			return false; | ||||
| 		} | ||||
| 		 | ||||
| 		final boolean isClanLeader = player.isClanLeader(); | ||||
| 		if ((_socialClass == -1) && !isClanLeader) | ||||
| 		{ | ||||
| 			return false; | ||||
| 		} | ||||
| 		 | ||||
| 		return isClanLeader || (player.getPledgeClass() >= _socialClass); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -2788,7 +2788,7 @@ | ||||
| 		<conditions> | ||||
| 			<condition name="OpCanNotUseAirship" /> | ||||
| 			<condition name="OpSocialClass"> | ||||
| 				<socialClass>8</socialClass> | ||||
| 				<socialClass>-1</socialClass> | ||||
| 			</condition> | ||||
| 			<condition name="CanUseInBattlefield" /> | ||||
| 		</conditions> | ||||
|   | ||||
| @@ -218,6 +218,9 @@ | ||||
| 		<itemConsumeId>3031</itemConsumeId> <!-- Spirit Ore --> | ||||
| 		<conditions> | ||||
| 			<condition name="CanUseInBattlefield" /> | ||||
| 			<condition name="OpSocialClass"> | ||||
| 				<socialClass>-1</socialClass> | ||||
| 			</condition> | ||||
| 		</conditions> | ||||
| 		<effects> | ||||
| 			<effect name="HealPercent"> | ||||
|   | ||||
| @@ -443,7 +443,7 @@ | ||||
| 														<xs:element minOccurs="0" maxOccurs="unbounded" name="npcId" type="xs:unsignedShort" /> | ||||
| 														<xs:element minOccurs="0" name="instanceId" type="xs:unsignedByte" /> | ||||
| 														<xs:element minOccurs="0" name="itemId" type="xs:unsignedShort" /> | ||||
| 														<xs:element minOccurs="0" name="socialClass" type="xs:unsignedByte" /> | ||||
| 														<xs:element minOccurs="0" name="socialClass" type="xs:int" /> | ||||
| 														<xs:element minOccurs="0" name="npcsIds"> | ||||
| 															<xs:complexType> | ||||
| 																<xs:sequence> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment