blob: 0436a393c317afda16fa566fe8eb0da5102abec0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
global function AddTitanXP
void function AddTitanXP( entity player, int amount )
{
string titan = GetActiveTitanLoadout( player ).titanClass
int oldLevel = TitanGetLevel( player, titan )
// increment xp
player.SetPersistentVar( "titanXP[" + titan + "]", min( TitanGetXP( player, titan ) + amount, TitanGetMaxXP( titan ) ) )
// level up notif
if ( TitanGetLevel( player, titan ) != oldLevel )
{
Remote_CallFunction_NonReplay( player, "ServerCallback_TitanLeveledUp", shTitanXP.titanClasses.find( titan ), TitanGetGen( player, titan ), TitanGetLevel( player, titan ) )
AddPlayerScore( player, "TitanLevelUp" )
}
}
|