コード例 #1
0
 def _get_checked_character(self, guid):
     """ Get the character data associated to that GUID, but only if this
     character belongs to the connected account, else return None. """
     try:
         character = CharacterData.get(
             CharacterData.guid == guid
             and CharacterData.account == self.conn.account)
         return character
     except CharacterData.DoesNotExist:
         return None
コード例 #2
0
ファイル: login.py プロジェクト: Shgck/DuratorEmu
 def _get_checked_character(self, guid):
     """ Get the character data associated to that GUID, but only if this
     character belongs to the connected account, else return None. """
     try:
         character = CharacterData.get(
             CharacterData.guid == guid
             and CharacterData.account == self.conn.account
         )
         return character
     except CharacterData.DoesNotExist:
         return None
コード例 #3
0
ファイル: manager.py プロジェクト: rocverde/DuratorEmu
    def _delete_char(guid):
        character = CharacterData.get(CharacterData.guid == guid)

        _CharacterDestructor._delete_char_skills(character)
        _CharacterDestructor._delete_char_spells(character)

        features = character.features
        stats = character.stats
        position = character.position

        character.delete_instance()
        features.delete_instance()
        stats.delete_instance()
        position.delete_instance()

        LOG.debug("Character " + str(guid) + " deleted.")
        return 0
コード例 #4
0
ファイル: manager.py プロジェクト: Shgck/DuratorEmu
    def _delete_char(guid):
        character = CharacterData.get(CharacterData.guid == guid)

        _CharacterDestructor._delete_char_skills(character)
        _CharacterDestructor._delete_char_spells(character)

        features = character.features
        stats = character.stats
        position = character.position

        character.delete_instance()
        features.delete_instance()
        stats.delete_instance()
        position.delete_instance()

        LOG.debug("Character " + str(guid) + " deleted.")
        return 0
コード例 #5
0
ファイル: manager.py プロジェクト: rocverde/DuratorEmu
 def get_char_data(guid):
     """ Get the CharacterData associated to that GUID, or None. """
     try:
         return CharacterData.get(CharacterData.guid == guid)
     except CharacterData.DoesNotExist:
         return None
コード例 #6
0
ファイル: manager.py プロジェクト: Shgck/DuratorEmu
 def get_char_data(guid):
     """ Get the CharacterData associated to that GUID, or None. """
     try:
         return CharacterData.get(CharacterData.guid == guid)
     except CharacterData.DoesNotExist:
         return None