Browse Source

rune and item skill grant sub arrays are now hashed

master
MagicBot 8 months ago
parent
commit
834f8f6d8d
  1. 22
      mbEditorPro2.0/arcane/objects/common/Arcane.py

22
mbEditorPro2.0/arcane/objects/common/Arcane.py

@ -5,7 +5,7 @@
# ▀▀ █▪▀▀▀·▀▀▀▀ ▀▀▀ ▀▀▀▀▀• ▀▀▀ ▀▀▀ ▀█▄▀▪.▀ ▀ .▀ .▀ ▀ ▀█▄▀▪ # ▀▀ █▪▀▀▀·▀▀▀▀ ▀▀▀ ▀▀▀▀▀• ▀▀▀ ▀▀▀ ▀█▄▀▪.▀ ▀ .▀ .▀ ▀ ▀█▄▀▪
# Magicbane Emulator Project © 2013 - 2022 # Magicbane Emulator Project © 2013 - 2022
# www.magicbane.com # www.magicbane.com
import copy
from collections import OrderedDict from collections import OrderedDict
from arcane.enums.hashes import hash_to_string, string_to_hash from arcane.enums.hashes import hash_to_string, string_to_hash
@ -177,7 +177,10 @@ class PowerGrant:
self.power_type = string_to_hash(data['power_type']) self.power_type = string_to_hash(data['power_type'])
self.power_value = data['power_value'] self.power_value = data['power_value']
self.power_granted_attrs = data['power_granted_attrs'] self.power_granted_attrs = data['power_granted_attrs']
self.power_granted_skills = data['power_granted_skills'] grants_copy = data['power_granted_skills']
for subarr in grants_copy:
subarr[0] = string_to_hash(subarr[0])
self.power_granted_skills = grants_copy
self.power_granted_powers = data['power_granted_powers'] self.power_granted_powers = data['power_granted_powers']
self.power_monster_types = data['power_monster_types'] self.power_monster_types = data['power_monster_types']
@ -186,7 +189,10 @@ class PowerGrant:
data['power_type'] = hash_to_string(self.power_type) data['power_type'] = hash_to_string(self.power_type)
data['power_value'] = self.power_value data['power_value'] = self.power_value
data['power_granted_attrs'] = self.power_granted_attrs data['power_granted_attrs'] = self.power_granted_attrs
data['power_granted_skills'] = self.power_granted_skills grants_copy = copy.deepcopy(self.power_granted_skills)
for subarr in grants_copy:
subarr[0] = hash_to_string(subarr[0])
data['power_granted_skills'] = grants_copy
data['power_granted_powers'] = self.power_granted_powers data['power_granted_powers'] = self.power_granted_powers
data['power_monster_types'] = self.power_monster_types data['power_monster_types'] = self.power_monster_types
return data return data
@ -245,7 +251,10 @@ class SkillGrant:
self.skill_type = string_to_hash(data['skill_type']) self.skill_type = string_to_hash(data['skill_type'])
self.skill_value = data['skill_value'] self.skill_value = data['skill_value']
self.skill_granted_attrs = data['skill_granted_attrs'] self.skill_granted_attrs = data['skill_granted_attrs']
self.skill_granted_skills = data['skill_granted_skills'] grants_copy = data['skill_granted_skills']
for subarr in grants_copy:
subarr[0] = string_to_hash(subarr[0])
self.skill_granted_skills = grants_copy
self.skill_granted_powers = data['skill_granted_powers'] self.skill_granted_powers = data['skill_granted_powers']
self.skill_monster_types = data['skill_monster_types'] self.skill_monster_types = data['skill_monster_types']
@ -254,7 +263,10 @@ class SkillGrant:
data['skill_type'] = hash_to_string(self.skill_type) data['skill_type'] = hash_to_string(self.skill_type)
data['skill_value'] = self.skill_value data['skill_value'] = self.skill_value
data['skill_granted_attrs'] = self.skill_granted_attrs data['skill_granted_attrs'] = self.skill_granted_attrs
data['skill_granted_skills'] = self.skill_granted_skills grants_copy = copy.deepcopy(self.skill_granted_skills)
for subarr in grants_copy:
subarr[0] = hash_to_string(subarr[0])
data['skill_granted_skills'] = grants_copy
data['skill_granted_powers'] = self.skill_granted_powers data['skill_granted_powers'] = self.skill_granted_powers
data['skill_monster_types'] = self.skill_monster_types data['skill_monster_types'] = self.skill_monster_types
return data return data

Loading…
Cancel
Save