RefreshItem(pi);
static bool ItemDroppedOnTrainer(P_CLIENT ps, PKGx08 *pp, P_ITEM pi){	UOXSOCKET s = ps->GetSocket();	P_CHAR pc_currchar = ps->getPlayer();	P_CHAR pc_t = FindCharBySerial(pp->Tserial);	if( pi->id() ==0x0EED )	{ // They gave the NPC gold		char sk=pc_t->trainingplayerin;		npctalk(s, pc_t, "I thank thee for thy payment. That should give thee a good start on thy way. Farewell!",0);		int sum = pc_currchar->getSkillSum();		int delta = pc_t->getTeachingDelta(pc_currchar, sk, sum);		if(pi->amount>delta) // Paid too much		{			pi->amount-=delta;			Sndbounce5(s);			if (ps->IsDragging())			{				ps->ResetDragging();				item_bounce5(s,pi);			}		}		else		{			if(pi->amount < delta)		// Gave less gold				delta = pi->amount;		// so adjust skillgain			Items->DeleItem(pi);		}		pc_currchar->baseskill[sk]+=delta;		Skills->updateSkillLevel(pc_currchar, sk);		updateskill(s,sk);		pc_currchar->trainer=-1;		pc_t->trainingplayerin='\xFF';		itemsfx(s, pi->id());//AntiChrist - do the gold sound		return true;	}	else // Did not give gold	{		npctalk(s, pc_t, "I am sorry, but I can only accept gold.",0);		Sndbounce5(s);		if (ps->IsDragging())		{			ps->ResetDragging();			item_bounce5(s,pi);			return true;		}		else			return true;	}//if items[i]=gold	return true;}