mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 13:17:42 +02:00
fix(mapper): score update mapper
This commit is contained in:
@ -10,15 +10,15 @@ class ScoreUpdateMapper : AbstractClassMapper("ScoreUpdate") {
|
||||
init {
|
||||
mapper {
|
||||
for (classDef in classes) {
|
||||
classDef.methods.firstOrNull {
|
||||
it.name == "<init>" &&
|
||||
it.parameterTypes.size > 4 &&
|
||||
it.parameterTypes[1] == "Ljava/lang/Long;" &&
|
||||
it.parameterTypes[3] == "Ljava/util/Collection;"
|
||||
val toStringMethod = classDef.methods.firstOrNull {
|
||||
it.name == "toString"
|
||||
} ?: continue
|
||||
if (classDef.methods.firstOrNull {
|
||||
it.name == "toString"
|
||||
}?.implementation?.findConstString("Friend.sq:selectFriendUserScoresNeedToUpdate") != true) continue
|
||||
if (classDef.methods.none {
|
||||
it.name == "<init>" &&
|
||||
it.parameterTypes.size > 4
|
||||
}) continue
|
||||
|
||||
if (toStringMethod.implementation?.findConstString("selectFriendUserScoresNeedToUpdate", contains = true) != true) continue
|
||||
|
||||
classReference.set(classDef.getClassName())
|
||||
return@mapper
|
||||
|
Reference in New Issue
Block a user