883 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
17 lines
1015 B
C++
17 lines
1015 B
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#include "gateway/social.hpp"
|
|
#include "SystemPackets.h"
|
|
#include <cassert>
|
|
using namespace gateway;
|
|
int main(){
|
|
SocialProjection p;p.kind=SocialProjection::Kind::LegacyConfiguration;p.virtual_address=0x1000046;
|
|
auto actual=serialize_social_projection(social_projection_input(p));
|
|
WorldPackets::System::MirrorVarSingle value{"legacyFriendSystemEnabledClient","1"};
|
|
assert(value.UpdateType==0);WorldPackets::System::MirrorVars reference;reference.Variables=std::span(&value,1);
|
|
auto expected=reference.Write();assert(actual==Bytes(expected->data(),expected->data()+expected->size()));
|
|
assert(actual.size()>8);assert(actual[0]==1&&actual[1]==0&&actual[2]==0&&actual[3]==0);
|
|
// It is a single character-friend capability, not account/BNet or other
|
|
// social services. Malformed config DTOs cannot smuggle contact state.
|
|
bool rejected=false;p.flags=1;try{social_projection_input(p);}catch(const Error&){rejected=true;}assert(rejected);
|
|
}
|