I'm not sure how much you've dug into the code, so forgive me if already you know this stuff. But here's the basic flow:
Code:
interface.cpp:2360
m_packet->connect2("OP_Buff", SP_Zone, DIR_Server|DIR_Client,
"buffStruct", SZC_Match,
m_spellShell, SLOT(buff(const uint8_t*, size_t, uint8_t)));
This says that when OP_Buff comes in, it gets passed to the SpellShell's buff function.
Code:
spellshell.cpp:325
if (b->changetype == 0x01) // removing buff
deleteSpell(item);
else if (b->changetype == 0x02)
{
// right now we only know how to find the updated duration
item->setDuration(b->duration * 6);
emit changeSpell(item);
}
And this, for a duration update, converts the OP_Buff's duration in ticks to the duration in seconds, sets the new duration on the spell item, and signals that the spell has changed.
Code:
spelllist.cpp:287
void SpellList::changeSpell(const SpellItem *item)
{
if (item) {
SpellListItem *i = Find(item);
if (!i)
return;
int sid = i->text(SPELLCOL_SPELLID).toInt();
int cid = i->text(SPELLCOL_CASTERID).toInt();
int tid = i->text(SPELLCOL_TARGETID).toInt();
if ((sid == item->spellId()) &&
(cid == item->casterId()) &&
(tid == item->targetId()))
i->update();
else {
DeleteItem(item);
addSpell(item);
}
}
}
The spell list receives the signal, and updates the window with the new info.
So just looking at it briefly, it looks like it *should* be working, assuming the both the struct and the opcode for OP_Buff are correct.