예제 #1
0
파일: Game.cpp 프로젝트: dhewg/gemrb
int Game::GetXPFromCR(int cr)
{
	if (!crtable) LoadCRTable();
	if (crtable) {
		int level = GetPartyLevel(true);
		if (cr>=MAX_CRLEVEL) {
			cr=MAX_CRLEVEL-1;
		}
		print("Challenge Rating: %d, party level: %d ", cr, level);
		return crtable[level][cr];
	}
	printMessage("Game","Cannot find moncrate.2da!\n", LIGHT_RED);
	return 0;
}
예제 #2
0
파일: Game.cpp 프로젝트: BlackLotus/gemrb
int Game::GetXPFromCR(int cr)
{
	if (!crtable) LoadCRTable();
	if (crtable) {
		int size = GetPartySize(true);
		if (!size) return 0; // everyone just died anyway
		int level = GetPartyLevel(true) / size;
		if (cr+1>=MAX_CRLEVEL) {
			cr=MAX_CRLEVEL-2;
		}
		Log(MESSAGE, "Game", "Challenge Rating: %d, party level: %d", cr, level);
		// it also has a column for cr 0.25 and 0.5
		return crtable[level-1][cr+1];
	}
	Log(ERROR, "Game", "Cannot find moncrate.2da!");
	return 0;
}