Check pre-existing mastery skill after prohibition checks.

This commit is contained in:
MobiusDevelopment
2019-05-10 13:50:32 +00:00
parent dbe104cbc2
commit 068aaddc0e
3 changed files with 21 additions and 21 deletions

View File

@@ -56,13 +56,6 @@ public class RequestExPledgeSkillActivate implements IClientIncomingPacket
return;
}
// Check if already enabled.
if (clan.getMasterySkillRemainingTime(_skillId) > 0)
{
clan.removeMasterySkill(_skillId);
return;
}
// Check if it can be learned.
int previous = 0;
int cost = 0;
@@ -110,6 +103,13 @@ public class RequestExPledgeSkillActivate implements IClientIncomingPacket
return;
}
// Check if already enabled.
if (clan.getMasterySkillRemainingTime(_skillId) > 0)
{
clan.removeMasterySkill(_skillId);
return;
}
// Learn.
clan.takeReputationScore(cost, true);
clan.addMasterySkill(_skillId);