SMSG_CAST_FAILED

Client Version 2.4.3

Wowm Representation

Autogenerated from wowm file at wow_message_parser/wowm/world/spell/smsg_cast_failed.wowm:1.

smsg SMSG_CAST_FAILED = 0x0130 {
    Spell id;
    SpellCastResult result;
    Bool multiple_casts;
    if (result == REQUIRES_SPELL_FOCUS) {
        u32 spell_focus;
    }
    else if (result == REQUIRES_AREA) {
        Area area;
    }
    else if (result == TOTEMS) {
        u32[2] totems;
    }
    else if (result == TOTEM_CATEGORY) {
        u32[2] totem_categories;
    }
    else if (result == EQUIPPED_ITEM_CLASS) {
        u32 item_class;
        u32 item_sub_class;
        u32 item_inventory_type;
    }
}

SMSG have a header of 4 bytes.

SMSG Header

OffsetSize / EndiannessTypeNameDescription
0x002 / Biguint16sizeSize of the rest of the message including the opcode field but not including the size field.
0x022 / Littleuint16opcodeOpcode that determines which fields the message contains.

Body

OffsetSize / EndiannessTypeNameComment
0x044 / LittleSpellid
0x081 / -SpellCastResultresult
0x091 / -Boolmultiple_casts

If result is equal to REQUIRES_SPELL_FOCUS:

OffsetSize / EndiannessTypeNameComment
0x0A4 / Littleu32spell_focus

Else If result is equal to REQUIRES_AREA:

OffsetSize / EndiannessTypeNameComment
0x0E4 / -Areaarea

Else If result is equal to TOTEMS:

OffsetSize / EndiannessTypeNameComment
0x128 / -u32[2]totems

Else If result is equal to TOTEM_CATEGORY:

OffsetSize / EndiannessTypeNameComment
0x1A8 / -u32[2]totem_categories

Else If result is equal to EQUIPPED_ITEM_CLASS:

OffsetSize / EndiannessTypeNameComment
0x224 / Littleu32item_class
0x264 / Littleu32item_sub_class
0x2A4 / Littleu32item_inventory_type

Client Version 3.3.5

Wowm Representation

Autogenerated from wowm file at wow_message_parser/wowm/world/spell/smsg_cast_failed.wowm:26.

smsg SMSG_CAST_FAILED = 0x0130 {
    u8 cast_count;
    Spell id;
    SpellCastResult result;
    Bool multiple_casts;
    if (result == REQUIRES_SPELL_FOCUS) {
        u32 spell_focus;
    }
    else if (result == REQUIRES_AREA) {
        Area area;
    }
    else if (result == TOTEMS) {
        u32[2] totems;
    }
    else if (result == TOTEM_CATEGORY) {
        u32[2] totem_categories;
    }
    else if (result == EQUIPPED_ITEM_CLASS
        || result == EQUIPPED_ITEM_CLASS_OFFHAND
        || result == EQUIPPED_ITEM_CLASS_MAINHAND) {
        u32 item_class;
        u32 item_sub_class;
    }
    else if (result == TOO_MANY_OF_ITEM) {
        u32 item_limit_category;
    }
    else if (result == CUSTOM_ERROR) {
        u32 custom_error;
    }
    else if (result == REAGENTS) {
        u32 missing_item;
    }
    else if (result == PREVENTED_BY_MECHANIC) {
        u32 mechanic;
    }
    else if (result == NEED_EXOTIC_AMMO) {
        u32 equipped_item_sub_class;
    }
    else if (result == NEED_MORE_ITEMS) {
        Item item;
        u32 count;
    }
    else if (result == MIN_SKILL) {
        (u32)Skill skill;
        u32 skill_required;
    }
    else if (result == FISHING_TOO_LOW) {
        u32 fishing_skill_required;
    }
}

Header

SMSG have a header of 4 bytes.

SMSG Header

OffsetSize / EndiannessTypeNameDescription
0x002 OR 3 / Biguint16 OR uint16+uint8sizeSize of the rest of the message including the opcode field but not including the size field. Wrath server messages can be 3 bytes. If the first (most significant) size byte has 0x80 set, the header will be 3 bytes, otherwise it is 2.
-2 / Littleuint16opcodeOpcode that determines which fields the message contains.

Body

OffsetSize / EndiannessTypeNameComment
-1 / -u8cast_count
-4 / LittleSpellid
-1 / -SpellCastResultresult
-1 / -Boolmultiple_casts

If result is equal to REQUIRES_SPELL_FOCUS:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32spell_focus

Else If result is equal to REQUIRES_AREA:

OffsetSize / EndiannessTypeNameComment
-4 / -Areaarea

Else If result is equal to TOTEMS:

OffsetSize / EndiannessTypeNameComment
-8 / -u32[2]totems

Else If result is equal to TOTEM_CATEGORY:

OffsetSize / EndiannessTypeNameComment
-8 / -u32[2]totem_categories

Else If result is equal to EQUIPPED_ITEM_CLASS or is equal to EQUIPPED_ITEM_CLASS_OFFHAND or is equal to EQUIPPED_ITEM_CLASS_MAINHAND:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32item_class
-4 / Littleu32item_sub_class

Else If result is equal to TOO_MANY_OF_ITEM:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32item_limit_category

Else If result is equal to CUSTOM_ERROR:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32custom_error

Else If result is equal to REAGENTS:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32missing_item

Else If result is equal to PREVENTED_BY_MECHANIC:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32mechanic

Else If result is equal to NEED_EXOTIC_AMMO:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32equipped_item_sub_class

Else If result is equal to NEED_MORE_ITEMS:

OffsetSize / EndiannessTypeNameComment
-4 / LittleItemitem
-4 / Littleu32count

Else If result is equal to MIN_SKILL:

OffsetSize / EndiannessTypeNameComment
-4 / -Skillskill
-4 / Littleu32skill_required

Else If result is equal to FISHING_TOO_LOW:

OffsetSize / EndiannessTypeNameComment
-4 / Littleu32fishing_skill_required