Hello all.
I've found an opcode that allows AAs to be purchased for Titanium. The opcode is OP_RespondAA=0x3af4. I have included the coding changes for 0.7.0-840:
for common/patches/Titanium.cpp:
Code:
577c577
< Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->title_sid,val1),ConvertArray(aa2->cost,val2),points2);
---
> Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->id,val1),ConvertArray(aa2->cost,val2),points2);
579c579
< Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->title_sid,val1),ConvertArray(aa2->cost,val2),point2);
---
> Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->id,val1),ConvertArray(aa2->cost,val2),point2);
583c583
< Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),ConvertArray(aa2->cost,val3),points2);
---
> Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->id,val1),ConvertArray(cur_level,val2),ConvertArray(aa2->cost,val3),points2);
585c585
< Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),ConvertArray(aa2->cost,val3),point2);
---
> Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->id,val1),ConvertArray(cur_level,val2),ConvertArray(aa2->cost,val3),point2);
For zone/AA.cpp:
Code:
147,148c147,148
< eq->title_sid = emu->id;
< eq->desc_sid = emu->id;
---
> eq->title_sid = emu->id - emu->current_level + 1;
> eq->desc_sid = emu->id - emu->current_level + 1;
and for zone/client_packet.cpp:
Code:
6234c6234
< //SendAATable();
---
> SendAATable();
There are still some issues at the moment that need addressing:
1. This only works for Titanium, due to the changes in string ids that need to be sent to the client. I am working on a method that involves a custom Message_StringID function that uses a "fake" opcode that both Titanium and Client62 can interpret and send the correct string id.
2. The AA information does not show correctly in the AA window after zoning or logging. The rank for the AA appears to be one less than the actual rank. However, a rank that is maxed out (such as Innate Strength 5/5) will show correctly.
Hope this helps out.