class 1 warrior_passive_casting_sleep_magic : warrior_casting_sleep_magic
{
handler:
	EventHandler SEE_CREATURE(creature,i6)
	{
		if( creature.is_pc == 0 && myself::IsInCategory(11,creature.npc_class_id) == 0 )
		{
			super;
			return;
		}
		if( myself.p_state == 1 && i6 < 2 )
		{
			if( myself::Skill_GetConsumeMP(SleepMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(SleepMagic) < myself.sm.hp && myself::Skill_InReuseDelay(SleepMagic) == 0 )
			{
				myself::AddUseSkillDesire(creature,SleepMagic,0,1,1000000);
			}
		}
		super;
	}

}
