albibong 1.0.6__py3-none-any.whl → 1.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- albibong/classes/event_handler/handle_operation_join.py +10 -4
- albibong/classes/event_handler/world_data_utils.py +11 -1
- albibong/classes/location.py +0 -28
- albibong/resources/EventCode.py +527 -522
- albibong/resources/OperationCode.py +287 -284
- albibong/resources/event_code.json +527 -522
- albibong/resources/items.json +21767 -21108
- albibong/resources/maps.json +502 -261
- albibong/resources/operation_code.json +287 -284
- {albibong-1.0.6.dist-info → albibong-1.0.7.dist-info}/METADATA +1 -1
- {albibong-1.0.6.dist-info → albibong-1.0.7.dist-info}/RECORD +14 -14
- {albibong-1.0.6.dist-info → albibong-1.0.7.dist-info}/WHEEL +0 -0
- {albibong-1.0.6.dist-info → albibong-1.0.7.dist-info}/entry_points.txt +0 -0
- {albibong-1.0.6.dist-info → albibong-1.0.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,10 +7,16 @@ from albibong.threads.websocket_server import send_event
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def handle_operation_join(world_data: WorldData, parameters):
|
|
10
|
+
# update relative id if character has initialized before
|
|
11
|
+
if world_data.me.username != "not initialized":
|
|
12
|
+
WorldDataUtils.convert_id_to_name(
|
|
13
|
+
world_data,
|
|
14
|
+
old_id=world_data.me.id,
|
|
15
|
+
new_id=parameters[0],
|
|
16
|
+
char=world_data.me,
|
|
17
|
+
)
|
|
18
|
+
|
|
10
19
|
# set my character
|
|
11
|
-
WorldDataUtils.convert_id_to_name(
|
|
12
|
-
world_data, old_id=world_data.me.id, new_id=parameters[0], char=world_data.me
|
|
13
|
-
)
|
|
14
20
|
world_data.me.uuid = Utils.convert_int_arr_to_uuid(parameters[1])
|
|
15
21
|
world_data.me.username = parameters[2]
|
|
16
22
|
world_data.me.guild = parameters[57] if 57 in parameters else ""
|
|
@@ -30,7 +36,7 @@ def handle_operation_join(world_data: WorldData, parameters):
|
|
|
30
36
|
# set map my character is currently in
|
|
31
37
|
if parameters[8][0] == "@":
|
|
32
38
|
area = parameters[8].split("@")
|
|
33
|
-
if area[1] == "RANDOMDUNGEON":
|
|
39
|
+
if area[1] == "RANDOMDUNGEON" or area[1] == "MISTS":
|
|
34
40
|
check_map = Location.get_location_from_code(area[1])
|
|
35
41
|
WorldDataUtils.start_current_dungeon(
|
|
36
42
|
world_data, type=check_map.type, name=check_map.name
|
|
@@ -52,10 +52,20 @@ class WorldDataUtils:
|
|
|
52
52
|
def set_dungeon_status(
|
|
53
53
|
world_data: WorldData, check_map: Location, map_type_splitted: set
|
|
54
54
|
):
|
|
55
|
-
if "EXPEDITION" in map_type_splitted
|
|
55
|
+
if "EXPEDITION" in map_type_splitted:
|
|
56
56
|
WorldDataUtils.start_current_dungeon(
|
|
57
57
|
world_data, type=check_map.type, name=check_map.name
|
|
58
58
|
)
|
|
59
|
+
elif "DUNGEON" in map_type_splitted:
|
|
60
|
+
WorldDataUtils.start_current_dungeon(
|
|
61
|
+
world_data,
|
|
62
|
+
type=check_map.type,
|
|
63
|
+
name=(
|
|
64
|
+
f"{check_map.name} at {world_data.current_map.name}"
|
|
65
|
+
if world_data.current_map
|
|
66
|
+
else check_map.name
|
|
67
|
+
),
|
|
68
|
+
)
|
|
59
69
|
elif (
|
|
60
70
|
"EXPEDITION" not in map_type_splitted or "DUNGEON" not in map_type_splitted
|
|
61
71
|
):
|
albibong/classes/location.py
CHANGED
|
@@ -13,34 +13,6 @@ class Location:
|
|
|
13
13
|
self.name = name
|
|
14
14
|
self.type = type
|
|
15
15
|
|
|
16
|
-
def is_black_zone(self):
|
|
17
|
-
if self.type == "OPENPVP_BLACK":
|
|
18
|
-
return True
|
|
19
|
-
elif self.type == "DUNGEON_BLACK":
|
|
20
|
-
return True
|
|
21
|
-
elif self.type == "PASSAGE_BLACK":
|
|
22
|
-
return True
|
|
23
|
-
elif self.type == "TUNNEL":
|
|
24
|
-
return True
|
|
25
|
-
else:
|
|
26
|
-
return False
|
|
27
|
-
|
|
28
|
-
def is_red_zone(self):
|
|
29
|
-
if self.type == "OPENPVP_RED":
|
|
30
|
-
return True
|
|
31
|
-
elif self.type == "DUNGEON_RED":
|
|
32
|
-
return True
|
|
33
|
-
elif self.type == "PASSAGE_RED":
|
|
34
|
-
return True
|
|
35
|
-
else:
|
|
36
|
-
return False
|
|
37
|
-
|
|
38
|
-
def is_safe_zone(self):
|
|
39
|
-
if self.is_black_zone() == False and self.is_red_zone() == False:
|
|
40
|
-
return True
|
|
41
|
-
else:
|
|
42
|
-
return False
|
|
43
|
-
|
|
44
16
|
@classmethod
|
|
45
17
|
def get_location_from_code(cls, code: str):
|
|
46
18
|
location = map_data[code]
|