woww: Fix SpellCastFlags object layout

This commit is contained in:
Gtker 2022-11-10 16:20:19 +01:00 committed by Alexis La Goutte
parent 96226c9e49
commit 4c96bb33ce
1 changed files with 50 additions and 160 deletions

View File

@ -260,7 +260,6 @@ static int hf_woww_cooldown_in_msecs = -1;
static int hf_woww_cooldown_time_in_msecs = -1;
static int hf_woww_corpse_query_result = -1;
static int hf_woww_corpse_target_ally = -1;
static int hf_woww_corpse_target_enemy = -1;
static int hf_woww_cos_angle = -1;
static int hf_woww_cost_in_copper = -1;
static int hf_woww_count = -1;
@ -301,9 +300,6 @@ static int hf_woww_delay_time = -1;
static int hf_woww_description = -1;
static int hf_woww_destination_bag = -1;
static int hf_woww_destination_node = -1;
static int hf_woww_destination_position_x = -1;
static int hf_woww_destination_position_y = -1;
static int hf_woww_destination_position_z = -1;
static int hf_woww_destination_slot = -1;
static int hf_woww_destionation_slot = -1;
static int hf_woww_details = -1;
@ -463,7 +459,6 @@ static int hf_woww_item_target = -1;
static int hf_woww_item_target_entry = -1;
static int hf_woww_item_template = -1;
static int hf_woww_item_text_id = -1;
static int hf_woww_item_trade_target = -1;
static int hf_woww_items_required = -1;
static int hf_woww_join_as_group = -1;
static int hf_woww_key_version = -1;
@ -559,7 +554,6 @@ static int hf_woww_npc_guid = -1;
static int hf_woww_number_of_battlegrounds = -1;
static int hf_woww_number_of_choices = -1;
static int hf_woww_object_target = -1;
static int hf_woww_object_target_locked = -1;
static int hf_woww_object_type = -1;
static int hf_woww_objective_text = -1;
static int hf_woww_objective_texts = -1;
@ -728,9 +722,6 @@ static int hf_woww_sound_id = -1;
static int hf_woww_source_bag = -1;
static int hf_woww_source_item_id = -1;
static int hf_woww_source_node = -1;
static int hf_woww_source_position_x = -1;
static int hf_woww_source_position_y = -1;
static int hf_woww_source_position_z = -1;
static int hf_woww_source_slot = -1;
static int hf_woww_speech_bubble_credit = -1;
static int hf_woww_speed = -1;
@ -844,7 +835,6 @@ static int hf_woww_tutorial_data = -1;
static int hf_woww_tutorial_flag = -1;
static int hf_woww_type_flags = -1;
static int hf_woww_unimplemented = -1;
static int hf_woww_unit_enemy_target = -1;
static int hf_woww_unit_stand_state = -1;
static int hf_woww_unit_target = -1;
static int hf_woww_unknown_bytes = -1;
@ -9490,30 +9480,25 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT_ENEMY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_GAMEOBJECT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_LOCKED) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_TRADE_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_SOURCE_LOCATION) {
ptvcursor_add(ptv, hf_woww_source_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_DEST_LOCATION) {
ptvcursor_add(ptv, hf_woww_destination_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_STRING) {
add_cstring(ptv, &hf_woww_target_string);
@ -9521,9 +9506,6 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ALLY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ENEMY) {
add_packed_guid(ptv, pinfo);
}
ptvcursor_pop_subtree(ptv);
break;
case CMSG_CHANNEL_ANNOUNCEMENTS:
@ -10522,30 +10504,25 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT_ENEMY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_GAMEOBJECT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_LOCKED) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_TRADE_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_SOURCE_LOCATION) {
ptvcursor_add(ptv, hf_woww_source_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_DEST_LOCATION) {
ptvcursor_add(ptv, hf_woww_destination_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_STRING) {
add_cstring(ptv, &hf_woww_target_string);
@ -10553,9 +10530,6 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ALLY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ENEMY) {
add_packed_guid(ptv, pinfo);
}
ptvcursor_pop_subtree(ptv);
break;
case CMSG_PET_NAME_QUERY:
@ -10807,30 +10781,25 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT_ENEMY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_GAMEOBJECT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_LOCKED) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_TRADE_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_SOURCE_LOCATION) {
ptvcursor_add(ptv, hf_woww_source_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_DEST_LOCATION) {
ptvcursor_add(ptv, hf_woww_destination_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_STRING) {
add_cstring(ptv, &hf_woww_target_string);
@ -10838,9 +10807,6 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ALLY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ENEMY) {
add_packed_guid(ptv, pinfo);
}
ptvcursor_pop_subtree(ptv);
break;
case CMSG_WARDEN_DATA:
@ -14710,30 +14676,25 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT_ENEMY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_GAMEOBJECT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_LOCKED) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_TRADE_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_SOURCE_LOCATION) {
ptvcursor_add(ptv, hf_woww_source_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_DEST_LOCATION) {
ptvcursor_add(ptv, hf_woww_destination_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_STRING) {
add_cstring(ptv, &hf_woww_target_string);
@ -14741,9 +14702,6 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ALLY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ENEMY) {
add_packed_guid(ptv, pinfo);
}
ptvcursor_pop_subtree(ptv);
if (flags & CAST_FLAGS_AMMO) {
ptvcursor_add(ptv, hf_woww_ammo_display_id, 4, ENC_LITTLE_ENDIAN);
@ -14761,30 +14719,25 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_UNIT_ENEMY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_GAMEOBJECT) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_LOCKED) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_TRADE_ITEM) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_SOURCE_LOCATION) {
ptvcursor_add(ptv, hf_woww_source_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_source_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_DEST_LOCATION) {
ptvcursor_add(ptv, hf_woww_destination_position_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_destination_position_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add_text_with_subtree(ptv, SUBTREE_UNDEFINED_LENGTH, ett_message, "Vector3d");
ptvcursor_add(ptv, hf_woww_x, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_y, 4, ENC_LITTLE_ENDIAN);
ptvcursor_add(ptv, hf_woww_z, 4, ENC_LITTLE_ENDIAN);
ptvcursor_pop_subtree(ptv);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_STRING) {
add_cstring(ptv, &hf_woww_target_string);
@ -14792,9 +14745,6 @@ add_body_fields(guint32 opcode,
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ALLY) {
add_packed_guid(ptv, pinfo);
}
if (target_flags & SPELL_CAST_TARGET_FLAGS_CORPSE_ENEMY) {
add_packed_guid(ptv, pinfo);
}
ptvcursor_pop_subtree(ptv);
if (flags & CAST_FLAGS_AMMO) {
ptvcursor_add(ptv, hf_woww_ammo_display_id, 4, ENC_LITTLE_ENDIAN);
@ -16547,12 +16497,6 @@ proto_register_woww(void)
NULL, HFILL
}
},
{ &hf_woww_corpse_target_enemy,
{ "Corpse Target Enemy", "woww.corpse.target.enemy",
FT_UINT64, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_cos_angle,
{ "Cos Angle", "woww.cos.angle",
FT_FLOAT, BASE_NONE, NULL, 0,
@ -16793,24 +16737,6 @@ proto_register_woww(void)
NULL, HFILL
}
},
{ &hf_woww_destination_position_x,
{ "Destination Position X", "woww.destination.position.x",
FT_FLOAT, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_destination_position_y,
{ "Destination Position Y", "woww.destination.position.y",
FT_FLOAT, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_destination_position_z,
{ "Destination Position Z", "woww.destination.position.z",
FT_FLOAT, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_destination_slot,
{ "Destination Slot", "woww.destination.slot",
FT_UINT8, BASE_HEX_DEC, NULL, 0,
@ -17765,12 +17691,6 @@ proto_register_woww(void)
NULL, HFILL
}
},
{ &hf_woww_item_trade_target,
{ "Item Trade Target", "woww.item.trade.target",
FT_UINT64, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_items_required,
{ "Items Required", "woww.items.required",
FT_UINT32, BASE_HEX_DEC, NULL, 0,
@ -18341,12 +18261,6 @@ proto_register_woww(void)
NULL, HFILL
}
},
{ &hf_woww_object_target_locked,
{ "Object Target Locked", "woww.object.target.locked",
FT_UINT64, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_object_type,
{ "Object Type", "woww.object.type",
FT_UINT8, BASE_HEX_DEC, VALS(e_object_type_strings), 0,
@ -19355,24 +19269,6 @@ proto_register_woww(void)
NULL, HFILL
}
},
{ &hf_woww_source_position_x,
{ "Source Position X", "woww.source.position.x",
FT_FLOAT, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_source_position_y,
{ "Source Position Y", "woww.source.position.y",
FT_FLOAT, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_source_position_z,
{ "Source Position Z", "woww.source.position.z",
FT_FLOAT, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_source_slot,
{ "Source Slot", "woww.source.slot",
FT_UINT8, BASE_HEX_DEC, NULL, 0,
@ -20051,12 +19947,6 @@ proto_register_woww(void)
NULL, HFILL
}
},
{ &hf_woww_unit_enemy_target,
{ "Unit Enemy Target", "woww.unit.enemy.target",
FT_UINT64, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_woww_unit_stand_state,
{ "Unit Stand State", "woww.unit.stand.state",
FT_UINT32, BASE_HEX_DEC, VALS(e_unit_stand_state_strings), 0,