Example #1
0
    def update(self):
        from eve.views import chars_sheet, char_additional_info

        sheet = chars_sheet(self.char_name.account.key_id, self.char_name.account.v_code, self.char_name.character_id)
        info = char_additional_info(
            self.char_name.account.key_id, self.char_name.account.v_code, self.char_name.character_id
        )
        self.alliance_name = sheet.allianceName
        self.alliance_id = sheet.allianceID
        self.balance = sheet.balance
        self.clone_name = sheet.cloneName
        self.clone_skill_point = sheet.cloneSkillPoints
        self.skill_points = info.skillPoints
        self.security_status = round(info.securityStatus, 1)
        self.last_location = info.lastKnownLocation
        self.ship_name = info.shipName
        self.ship_type = info.shipTypeID
        self.ship_type_name = info.shipTypeName
        self.save()
Example #2
0
    def init_sheet(self):
        from eve.views import chars_sheet, char_additional_info

        char_sheet = chars_sheet(self.account.key_id, self.account.v_code, self.character_id)
        info = char_additional_info(self.account.key_id, self.account.v_code, self.character_id)
        CharacterSheet.objects.create(
            char_name=self,
            race=char_sheet.race,
            bloodline=char_sheet.bloodLine,
            ancestry=char_sheet.ancestry,
            gender=char_sheet.gender,
            alliance_name=char_sheet.allianceName,
            alliance_id=char_sheet.allianceID,
            balance=char_sheet.balance,
            clone_name=char_sheet.cloneName,
            clone_skill_point=char_sheet.cloneSkillPoints,
            skill_points=info.skillPoints,
            security_status=round(info.securityStatus, 1),
            last_location=info.lastKnownLocation,
            ship_name=info.shipName,
            ship_type=info.shipTypeID,
            ship_type_name=info.shipTypeName,
        )