示例#1
0
void Skills::MakeMenu( P_CHAR pc, int m, int skill, P_ITEM first, P_ITEM second )
{

	Skills::MakeMenu( 
		pc, m, skill, ISVALIDPI(first)? first->getId() : 0, ISVALIDPI(first)? first->getColor() : 0,
		ISVALIDPI(second)? second->getId() : 0, ISVALIDPI(second)? second->getColor() : 0 
	);
	
}
示例#2
0
	/*!
	\author Luxor
	\brief returns the *index element with the given id and color of the vector of a container(identified by serial)
	\param serial the serial of the container
	\param index the pointer to the integer which we're using for the search
	\param id the id which we're searching for
	\param color the color which we're searching for
	\return the item we're searching for
	\note *index should be 0 at the beginning of the search
	*/
	P_ITEM containerSearchFor(const int serial, int *index, short id, short color)
	{
		P_ITEM pi;
		int loopexit=0;
		while ( ((pi = containerSearch(serial,index)) != 0) && (++loopexit < MAXLOOPS) )
		{
			if (pi->getId()==id  &&
				(color==-1 || pi->getColor()==color) && ISVALIDPI(pi))
			return pi;
		}
		return 0;
	}
示例#3
0
void Skills::MakeMenu( P_CHAR pc, int m, int skill, P_ITEM first, P_ITEM second )
{

	Skills::MakeMenu( 
		pc, m, skill, ISVALIDPI(first)? (unsigned short)first->getId() : (unsigned short)0, ISVALIDPI(first)? (unsigned short)first->getColor() : (unsigned short)0,
		ISVALIDPI(second)? (unsigned short)second->getId() : (unsigned short)0, ISVALIDPI(second)? (unsigned short)second->getColor() : (unsigned short)0 
	);
	
}