The OP_InterruptCast error from npc's comes from
Code:
void Mob::InterruptSpell(int16 message, int16 color, int16 spellid) in spells.cpp
the line
Code:
outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct) + strlen(GetCleanName()) + 1);
sends the npc's name + 1
but the encode uses the define for exact size of the InterruptCast_Struct
Code:
ENCODE(OP_InterruptCast) {
ENCODE_LENGTH_EXACT(InterruptCast_Struct);
SETUP_DIRECT_ENCODE(InterruptCast_Struct, structs::InterruptCast_Struct);
OUT(spawnid);
OUT(messageid);
FINISH_ENCODE();
}
when adding the name to the size might make it fail. Maybe it should use
Code:
ENCODE(OP_InterruptCast) {
ENCODE_LENGTH_ATLEAST(InterruptCast_Struct);
SETUP_DIRECT_ENCODE(InterruptCast_Struct, structs::InterruptCast_Struct);
OUT(spawnid);
OUT(messageid);
FINISH_ENCODE();
}