const string _STR_MESSAGE_ARENAVICTORIES_2 = " побед";
func void b_arena_printgladiator(var int gladiatorinstance,var int gladiatorranking)
{
var int work1;
var int work2;
var C_Npc gladiator;
var string msg_rank;
var string msg_victories;
PrintDebugNpc(PD_ZS_DETAIL,"B_Arena_PrintGladiator");
gladiator = Hlp_GetNpc(gladiatorinstance);
work1 = gladiator.aivar[AIV_ARENA_VICTORIES]%10;// Последняя цифра количества побед.
work2 = gladiator.aivar[AIV_ARENA_VICTORIES]%100;// Две последние цифры количества побед.
msg_rank = ConcatStrings(_STR_MESSAGE_ARENARANK,IntToString(gladiatorranking));
msg_victories = IntToString(gladiator.aivar[AIV_ARENA_VICTORIES]);
if(work2 == 11)
{
msg_victories = ConcatStrings(msg_victories,_STR_MESSAGE_ARENAVICTORIES_2);// ... побед
}
else if(work1 == 1)
{
msg_victories = ConcatStrings(msg_victories,_STR_MESSAGE_ARENAVICTORY);// ... победа
}
else if((work2 == 12) || (work2 == 13) || (work2 == 14))
{
msg_victories = ConcatStrings(msg_victories,_STR_MESSAGE_ARENAVICTORIES_2);// ... побед
}
else if((work1 == 2) || (work1 == 3) || (work1 == 4))
{
msg_victories = ConcatStrings(msg_victories,_STR_MESSAGE_ARENAVICTORIES);// ... победы
}
else //0 5 6 7 8 9
{
msg_victories = ConcatStrings(msg_victories,_STR_MESSAGE_ARENAVICTORIES_2);// ... побед
};
PrintScreen(msg_rank,_XPOS_MESSAGE_ARENARANK,_YPOS_MESSAGE_ARENARANKING + (_YPOS_MESSAGE_ARENARANKINGROW * gladiatorranking),FONT_OLD_SMALL,_TIME_MESSAGE_ARENARANKING);
PrintScreen(gladiator.name,_XPOS_MESSAGE_ARENANAME,_YPOS_MESSAGE_ARENARANKING + (_YPOS_MESSAGE_ARENARANKINGROW * gladiatorranking),FONT_OLD_SMALL,_TIME_MESSAGE_ARENARANKING);
PrintScreen(msg_victories,_XPOS_MESSAGE_ARENAVICTORIES,_YPOS_MESSAGE_ARENARANKING + (_YPOS_MESSAGE_ARENARANKINGROW * gladiatorranking),FONT_OLD_SMALL,_TIME_MESSAGE_ARENARANKING);
};