Browse Source

mbEditorPro 2.1

master
MagicBot 7 months ago
parent
commit
89faf12277
  1. 2
      README.md
  2. 6
      mbEditorPro2.0/arcane/enums/arc_item.py
  3. 14
      mbEditorPro2.0/arcane/zones/mobile/MobileInfo.py

2
README.md

@ -8,7 +8,7 @@
www.magicbane.com www.magicbane.com
``` ```
# mbEditorPro v 2.0 # mbEditorPro v 2.1
![Example JSON](https://cdn.discordapp.com/attachments/399623779531096074/1029063849640468550/unknown.png)<br> ![Example JSON](https://cdn.discordapp.com/attachments/399623779531096074/1029063849640468550/unknown.png)<br>
![Example Textures](https://cdn.discordapp.com/attachments/534260038039109632/1056584030310641696/image.png)<br> ![Example Textures](https://cdn.discordapp.com/attachments/534260038039109632/1056584030310641696/image.png)<br>

6
mbEditorPro2.0/arcane/enums/arc_item.py

@ -103,7 +103,7 @@ STRING_TO_ITEM_EQIP_SLOT = {
'HAIR': ITEM_EQUIP_SLOT_HAIR, 'HAIR': ITEM_EQUIP_SLOT_HAIR,
} }
ITEM_TYPE_UNKNOWN = 0 ITEM_TYPE_DECORATION = 0
ITEM_TYPE_WEAPON = 1 ITEM_TYPE_WEAPON = 1
ITEM_TYPE_ARMOR = 2 ITEM_TYPE_ARMOR = 2
ITEM_TYPE_BASE = 3 ITEM_TYPE_BASE = 3
@ -141,7 +141,7 @@ ITEM_TYPE_RESOURCE = 34
ITEM_TYPE_REALMCHARTER = 35 ITEM_TYPE_REALMCHARTER = 35
ITEM_TYPE_TO_STRING = { ITEM_TYPE_TO_STRING = {
ITEM_TYPE_UNKNOWN: 'UNKNOWN', ITEM_TYPE_DECORATION: 'DECORATION',
ITEM_TYPE_WEAPON: 'WEAPON', ITEM_TYPE_WEAPON: 'WEAPON',
ITEM_TYPE_ARMOR: 'ARMOR', ITEM_TYPE_ARMOR: 'ARMOR',
ITEM_TYPE_BASE: 'BASE', ITEM_TYPE_BASE: 'BASE',
@ -180,7 +180,7 @@ ITEM_TYPE_TO_STRING = {
} }
STRING_TO_ITEM_TYPE = { STRING_TO_ITEM_TYPE = {
'UNKNOWN': ITEM_TYPE_UNKNOWN, 'DECORATION': ITEM_TYPE_DECORATION,
'WEAPON': ITEM_TYPE_WEAPON, 'WEAPON': ITEM_TYPE_WEAPON,
'ARMOR': ITEM_TYPE_ARMOR, 'ARMOR': ITEM_TYPE_ARMOR,
'BASE': ITEM_TYPE_BASE, 'BASE': ITEM_TYPE_BASE,

14
mbEditorPro2.0/arcane/zones/mobile/MobileInfo.py

@ -145,8 +145,8 @@ class MobileInfo:
self.mobile_helper_monster_types = [stream.read_dword() for _ in range(num_helper_monster_types)] self.mobile_helper_monster_types = [stream.read_dword() for _ in range(num_helper_monster_types)]
num_enemy_genders = stream.read_dword() num_enemy_genders = stream.read_dword()
self.mobile_enemy_genders = [stream.read_dword() for _ in range(num_enemy_genders)] self.mobile_enemy_genders = [stream.read_dword() for _ in range(num_enemy_genders)]
num_firendly_charters = stream.read_dword() num_friendly_charters = stream.read_dword()
self.mobile_firendly_charters = [stream.read_dword() for _ in range(num_firendly_charters)] self.mobile_friendly_charters = [stream.read_dword() for _ in range(num_friendly_charters)]
self.mobile_parley_name = stream.read_string() self.mobile_parley_name = stream.read_string()
def save_binary(self, stream: ResStream): def save_binary(self, stream: ResStream):
@ -212,9 +212,9 @@ class MobileInfo:
stream.write_dword(len(self.mobile_enemy_genders)) stream.write_dword(len(self.mobile_enemy_genders))
for enemy_gender in self.mobile_enemy_genders: for enemy_gender in self.mobile_enemy_genders:
stream.write_dword(enemy_gender) stream.write_dword(enemy_gender)
stream.write_dword(len(self.mobile_firendly_charters)) stream.write_dword(len(self.mobile_friendly_charters))
for firendly_charter in self.mobile_firendly_charters: for friendly_charter in self.mobile_friendly_charters:
stream.write_dword(firendly_charter) stream.write_dword(friendly_charter)
stream.write_string(self.mobile_parley_name) stream.write_string(self.mobile_parley_name)
def save_json(self): def save_json(self):
@ -272,7 +272,7 @@ class MobileInfo:
data['mobile_enemy_genders'] = [] data['mobile_enemy_genders'] = []
for enemy_gender in self.mobile_enemy_genders: for enemy_gender in self.mobile_enemy_genders:
data['mobile_enemy_genders'].append(RUNE_SEX_TO_STRING[enemy_gender]) data['mobile_enemy_genders'].append(RUNE_SEX_TO_STRING[enemy_gender])
data['mobile_firendly_charters'] = self.mobile_firendly_charters data['mobile_friendly_charters'] = self.mobile_friendly_charters
data['mobile_parley_name'] = self.mobile_parley_name data['mobile_parley_name'] = self.mobile_parley_name
return data return data
@ -336,5 +336,5 @@ class MobileInfo:
self.mobile_enemy_genders = [] self.mobile_enemy_genders = []
for enemy_gender in data['mobile_enemy_genders']: for enemy_gender in data['mobile_enemy_genders']:
self.mobile_enemy_genders.append(STRING_TO_RUNE_SEX[enemy_gender]) self.mobile_enemy_genders.append(STRING_TO_RUNE_SEX[enemy_gender])
self.mobile_firendly_charters = data['mobile_firendly_charters'] self.mobile_friendly_charters = data['mobile_friendly_charters']
self.mobile_parley_name = data['mobile_parley_name'] self.mobile_parley_name = data['mobile_parley_name']

Loading…
Cancel
Save