export default class RoleData { public id : number ; public name : string ; public chaos : number ; public consciousness : number ; public exp : number ; public gas : number ; public jade : number ; public level : number ; public levelName : string ; public money : number ; public dragon_badge : number ; public tiger_badge : number ; public phoenix_badge : number ; public tortoise_badge : number ; public physique : number ; public root : string ; public soul : number ; public talent_point : number ; public environment : number ; public phase : number ; public step : number ; constructor ( data ) { this . id = data . id ; this . name = data . name ; this . chaos = data . chaos ; this . consciousness = data . consciousness ; this . exp = data . exp ; this . gas = data . gas ; this . jade = data . jade ; this . level = data . level ; this . levelName = window . appContext . ConfigManager . GetlevelById ( this . level ) . name ; this . money = data . money ; this . dragon_badge = data . dragon_badge ; this . tiger_badge = data . tiger_badge ; this . phoenix_badge = data . phoenix_badge ; this . tortoise_badge = data . tortoise_badge ; this . physique = data . physique ; this . root = data . root ; this . soul = data . soul ; this . talent_point = data . talent_point ; this . environment = data . environment ; this . phase = Math . floor ( ( this . level - 1 ) / 10 ) + 1 ; this . step = this . level - ( this . phase - 1 ) * 10 ; } }