883 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
19 lines
1.1 KiB
C++
19 lines
1.1 KiB
C++
#include "world_translation.hpp"
|
|
#include "gateway/chat.hpp"
|
|
using namespace gateway;
|
|
int main(){
|
|
NativeWorldTranslation w{};w.guild_id=21;w.self_created=true;
|
|
uint64_t npc=(uint64_t(0xf130)<<48)|(uint64_t(62081)<<24)|1;
|
|
NativeEntityTranslation::Actor a;a.entry=62081;a.kind=3;a.sent=true;a.generation=1;w.entities.actors[npc]=a;
|
|
CreatureTemplateReply t;t.names[0]="Jerry Gallywix";w.entities.templates[62081]=t;
|
|
GossipMenu greeting;greeting.guid=npc;greeting.text_id=2700010;greeting.options.push_back({});
|
|
if(w.bank_gossip(greeting)||w.bank_window||!w.requests.empty())return 1;
|
|
GossipMenu trigger;trigger.guid=npc;trigger.text_id=80918;
|
|
if(!w.bank_gossip(trigger)||!w.bank_window||w.requests.size()!=3)return 2;
|
|
if(w.requests[0].opcode!=0x13d||w.requests[1].opcode!=0x89||w.requests[2].opcode!=0x95)return 3;
|
|
Reader r(w.requests[2].body);if(r.le(4)!=3||r.le(4)!=0xffffffffu||r.cstring(256)!="TW_GUILDBANK\tGetBankInfo:")return 4;r.end();
|
|
w.clear_bank();w.requests.clear();w.entities.templates[62081].names[0]="Other";
|
|
if(w.bank_gossip(trigger)||!w.requests.empty())return 5;
|
|
return 0;
|
|
}
|