{
// Can't use Spiritshots
if(isAutoSoulShot)
{
player.removeAutoSoulShot(SoulshotId);
player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
return;
}
player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
return;
}
if(grade == 0 && SpiritshotId != 5790 && SpiritshotId != 2509 // NG
|| grade == 1 && SpiritshotId != 2510 && SpiritshotId != 22077 // D
|| grade == 2 && SpiritshotId != 2511 && SpiritshotId != 22078 // C
|| grade == 3 && SpiritshotId != 2512 && SpiritshotId != 22079 // B
|| grade == 4 && SpiritshotId != 2513 && SpiritshotId != 22080 // A
|| grade == 5 && SpiritshotId != 2514 && SpiritshotId != 22081 // S
)
{
// wrong grade for weapon
if(isAutoSoulShot)
{
return;
}
player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
return;
}
if(count < soulSpiritConsumption)
{
if(isAutoSoulShot)
{
player.removeAutoSoulShot(SoulshotId);
player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
return;
}
player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);
return;
}