示例#1
0
 def gps(world_session, args):
     player_x = world_session.player_mgr.location.x
     player_y = world_session.player_mgr.location.y
     player_z = world_session.player_mgr.location.z
     player_o = world_session.player_mgr.location.o
     maps_z = MapManager.calculate_z_for_object(world_session.player_mgr)[0]
     adt_tile = MapManager.get_tile(player_x, player_y)
     return 0, f'Map: {world_session.player_mgr.map_},  ' \
               f'Zone: {world_session.player_mgr.zone}, ' \
               f'ADT: [{adt_tile[0]},{adt_tile[1]}], ' \
               f'X: {player_x:.3f}, ' \
               f'Y: {player_y:.3f}, ' \
               f'Z: {player_z:.3f}, ' \
               f'MapZ: {maps_z:.3f}, ' \
               f'O: {player_o:.3f}'
示例#2
0
 def is_on_water(self):
     liquid_information = MapManager.get_liquid_information(
         self.map_, self.location.x, self.location.y, self.location.z)
     map_z = MapManager.calculate_z_for_object(self)[0]
     return liquid_information and map_z < liquid_information.height