v2.1.4: remove def-id range sweep — polluting userItems with unknown ids broke pet display; restore exact v2.1.0 injection semantics, keep pass-through traces + catalog dump
This commit is contained in:
parent
fee1556da3
commit
817a2eff78
2 changed files with 16 additions and 6 deletions
|
|
@ -553,7 +553,14 @@ int Il2CppResolver::fabricateOwnership(){
|
||||||
char* s=strrchr(exe,'\\'); if(!s) s=strrchr(exe,'/');
|
char* s=strrchr(exe,'\\'); if(!s) s=strrchr(exe,'/');
|
||||||
if(s){
|
if(s){
|
||||||
std::ofstream f(std::string(exe,s-exe)+"\\DevourUnlocker.log",std::ios::app);
|
std::ofstream f(std::string(exe,s-exe)+"\\DevourUnlocker.log",std::ios::app);
|
||||||
f<<"[own] fabricate: catalog="<<cSize<<" had="<<(uSize>0?uSize:(int)have.size()-injected)<<" injected="<<injected<<"\n";
|
static bool loggedCatalog=false;
|
||||||
|
if(!loggedCatalog && cSize>0){
|
||||||
|
loggedCatalog=true;
|
||||||
|
f<<"[own] catalog ids:";
|
||||||
|
for(int i=0;i<cSize;++i){ void* ip=*(void**)(cData+(size_t)i*8); if(!ip) continue; f<<" "<<*(uint32_t*)((unsigned char*)ip+0x10); }
|
||||||
|
f<<"\n";
|
||||||
|
}
|
||||||
|
f<<"[own] fabricate: catalog="<<cSize<<" had="<<(uSize>0?uSize:(int)(have.size()-injected))<<" injected="<<injected<<"\n";
|
||||||
}
|
}
|
||||||
}catch(...){}
|
}catch(...){}
|
||||||
} catch(...){ injected=-1; }
|
} catch(...){ injected=-1; }
|
||||||
|
|
|
||||||
|
|
@ -90,15 +90,18 @@ static void __fastcall hUpdateLockedRobes(void* thiz, void* method) { if (oUpdRo
|
||||||
// Ownership override: every Steam catalog item (pets/flashlights/emotes/outfits/promos) counts as owned.
|
// Ownership override: every Steam catalog item (pets/flashlights/emotes/outfits/promos) counts as owned.
|
||||||
// LOGS every query — if the pet UI never appears in the log, it reads the userItems list field directly.
|
// LOGS every query — if the pet UI never appears in the log, it reads the userItems list field directly.
|
||||||
static bool __fastcall hUserHasItem(void* thiz, unsigned long long itemDef, void* method) {
|
static bool __fastcall hUserHasItem(void* thiz, unsigned long long itemDef, void* method) {
|
||||||
|
// pass-through + trace (v2.1.0 proved forcing true blocks purchases)
|
||||||
|
char b[96]; snprintf(b,sizeof(b),"[trace] UserHasItem(def=%llu)", (unsigned long long)itemDef); logPatch(b);
|
||||||
if (oUserHasItem) return oUserHasItem(thiz, itemDef, method);
|
if (oUserHasItem) return oUserHasItem(thiz, itemDef, method);
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
// Multiplayer validator: every player counts as owning every item (lobby validation path)
|
// Multiplayer validator: every player counts as owning every item (lobby validation path)
|
||||||
static bool __fastcall hPlayerHasItem(void* thiz, int connectionId, unsigned long long itemDef, void* method) {
|
static bool __fastcall hPlayerHasItem(void* thiz, int connectionId, unsigned long long itemDef, void* method) {
|
||||||
// Validator gate used by StoreEmotesOwnedOnSteam + WaitForPurchased*Validation coroutines.
|
// MUST stay pass-through: forcing true desyncs lobby validation vs injected
|
||||||
// Does NOT block purchases (that was UserHasItem) — safe to force true.
|
// userItems and UNLOCKS REGRESS (pets locked again). See v2.1.1 regression.
|
||||||
char b[160]; snprintf(b,sizeof(b),"[trace] PlayerHasItem(conn=%d def=%llu) -> true", connectionId, itemDef); logPatch(b);
|
char b[128]; snprintf(b,sizeof(b),"[trace] PlayerHasItem(conn=%d def=%llu)", connectionId, (unsigned long long)itemDef); logPatch(b);
|
||||||
return true;
|
if (oPlayerHasItem) return oPlayerHasItem(thiz, connectionId, itemDef, method);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
// Inventory-retrieved flag: pass through — forcing true with an empty userItems made some
|
// Inventory-retrieved flag: pass through — forcing true with an empty userItems made some
|
||||||
// flows treat items as definitively NOT owned; original behavior is safer now
|
// flows treat items as definitively NOT owned; original behavior is safer now
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue