mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-25 14:07:06 +00:00
Fixed Classnames in PlaceObject
This commit is contained in:
@@ -391,12 +391,14 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
@Internal
|
||||
private Map<Integer, String> importedTagToExportNameMapping = new HashMap<>();
|
||||
|
||||
|
||||
@Internal
|
||||
private Map<String, Integer> classToCharacter = new HashMap<>();
|
||||
|
||||
private static final DecompilerPool decompilerPool = new DecompilerPool();
|
||||
|
||||
@Internal
|
||||
private AbcIndexing abcIndex;
|
||||
|
||||
|
||||
private static AbcIndexing playerGlobalAbcIndex;
|
||||
|
||||
private static AbcIndexing airGlobalAbcIndex;
|
||||
@@ -738,6 +740,14 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
public CharacterTag getCharacter(int characterId) {
|
||||
return getCharacters().get(characterId);
|
||||
}
|
||||
|
||||
public CharacterTag getCharacterByClass(String className) {
|
||||
if (!classToCharacter.containsKey(className)) {
|
||||
return null;
|
||||
}
|
||||
int charId = classToCharacter.get(className);
|
||||
return getCharacter(charId);
|
||||
}
|
||||
|
||||
public String getExportName(int characterId) {
|
||||
CharacterTag characterTag = getCharacters().get(characterId);
|
||||
@@ -1867,6 +1877,11 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
classToCharacter.clear();
|
||||
for (int ch:classes.keySet()) {
|
||||
classToCharacter.put(classes.get(ch), ch);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user