class 1 spike_stakato_qn_shyid : raid_boss_type5
{
handler:
	EventHandler MY_DYING(always_list,code_info,c1,c2,i1,i2,i3,i9,last_attacker,lparty,member,random1_list,target)
	{
		always_list = gg::AllocCodeInfoList();
		always_list::SetInfo(0,last_attacker);
		while( gg::IsNull(code_info = always_list::Next()) == 0 )
		{
			if( code_info.code == 0 )
			{
				myself::SetCurrentQuestID(509);
				target = code_info::RandomSelectOne();
				if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
				{
					c1 = myself::GetLastAttacker();
					if( c1.master )
					{
						c1 = c1.master;
					}
					c2 = myself::Pledge_GetLeader(c1);
					if( myself::IsNullCreature(c2) == 0 )
					{
						if( myself::HaveMemo(c2,509) == 1 && myself::DistFromMe(c2) <= 1500 )
						{
							myself::GiveItem1(c2,8493,1);
							myself::SoundEffect(c2,"ItemSound.quest_middle");
						}
					}
				}
			}
		}
		super;
	}

}
