int counter;
int GuildCompare(P_CHAR player1, P_CHAR player2){	int counter;	if (player1 == NULL || player2 == NULL) return 0;	// one of both not in a guild -> no guildwarfare	if (player1->guildstone == INVALID_SERIAL || player2->guildstone == INVALID_SERIAL ) return 0;	if (player1->guildstone == player2->guildstone) { return 1; }	cGuildStone* pStone1 = dynamic_cast<cGuildStone*>(FindItemBySerial(player1->guildstone));	cGuildStone* pStone2 = dynamic_cast<cGuildStone*>(FindItemBySerial(player2->guildstone));	if ( pStone1->guildType != pStone2->guildType && pStone1->guildType != cGuildStone::standard && pStone2->guildType != cGuildStone::standard)	{		return 2;	}	unsigned int i;	for (i = 0; i < pStone1->war.size(); ++i)	{		if ( find(pStone1->war.begin(), pStone1->war.end(), pStone2->serial) != pStone1->war.end() )		{			if ( find( pStone2->war.begin(), pStone2->war.end(), pStone1->serial ) != pStone2->war.end() )			{				return 2;			}		}	}	return 0;}