Identify the rest of Action/CombatDamage structs

This commit is contained in:
Michael Cook (mackal) 2018-02-28 19:21:03 -05:00
parent 29f89cdfbc
commit 06d22fa009
17 changed files with 261 additions and 290 deletions

View File

@ -1253,21 +1253,22 @@ struct Action_Struct
{ {
/* 00 */ uint16 target; // id of target /* 00 */ uint16 target; // id of target
/* 02 */ uint16 source; // id of caster /* 02 */ uint16 source; // id of caster
/* 04 */ uint16 level; // level of caster /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/* 06 */ uint16 instrument_mod; /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
/* 08 */ uint32 bard_focus_id; /* 10 */ float force;
/* 12 */ uint16 unknown16; /* 14 */ float hit_heading;
// some kind of sequence that's the same in both actions /* 18 */ float hit_pitch;
// as well as the combat damage, to tie em together? /* 22 */ uint8 type; // 231 (0xE7) for spells, skill
/* 14 */ uint32 sequence; /* 23 */ uint16 unknown23; // OSX says min_damage
/* 18 */ uint32 unknown18; /* 25 */ uint16 unknown25; // OSX says tohit
/* 22 */ uint8 type; // 231 (0xE7) for spells
/* 23 */ uint32 unknown23;
/* 27 */ uint16 spell; // spell id being cast /* 27 */ uint16 spell; // spell id being cast
/* 29 */ uint8 unknown29; /* 29 */ uint8 spell_level;
// this field seems to be some sort of success flag, if it's 4 // this field seems to be some sort of success flag, if it's 4
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
/* 31 */ // newer clients have some data for setting LaunchSpellData when effect_flag & 4
// /* 31 */ uint8 spell_gem;
// /* 32 */ uint32 inventory_slot;
// /* 36 */ uint32 item_cast_type;
}; };
// this is what prints the You have been struck. and the regular // this is what prints the You have been struck. and the regular
@ -1277,12 +1278,12 @@ struct CombatDamage_Struct
{ {
/* 00 */ uint16 target; /* 00 */ uint16 target;
/* 02 */ uint16 source; /* 02 */ uint16 source;
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells /* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells, skill
/* 05 */ uint16 spellid; /* 05 */ uint16 spellid;
/* 07 */ uint32 damage; /* 07 */ uint32 damage;
/* 11 */ float force; /* 11 */ float force;
/* 15 */ float meleepush_xy; // see above notes in Action_Struct /* 15 */ float hit_heading; // see above notes in Action_Struct
/* 19 */ float meleepush_z; /* 19 */ float hit_pitch;
/* 23 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 23 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
}; };

View File

@ -163,22 +163,23 @@ namespace RoF
OUT(level); OUT(level);
eq->unknown06 = 0; eq->unknown06 = 0;
eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f; eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f;
eq->bard_focus_id = emu->bard_focus_id; OUT(force);
eq->knockback_angle = emu->sequence; OUT(hit_heading);
eq->unknown22 = 0; OUT(hit_pitch);
OUT(type); OUT(type);
eq->damage = 0; eq->damage = 0;
eq->unknown31 = 0; eq->unknown31 = 0;
OUT(spell); OUT(spell);
eq->level2 = eq->level; OUT(spell_level);
eq->effect_flag = emu->buff_unknown; OUT(effect_flag);
eq->unknown39 = 14; eq->spell_gem = 0;
eq->unknown43 = 0; eq->slot.Type = INVALID_INDEX;
eq->unknown44 = 17; eq->slot.Unknown02 = 0;
eq->unknown45 = 0; eq->slot.Slot = INVALID_INDEX;
eq->unknown46 = -1; eq->slot.SubIndex = INVALID_INDEX;
eq->unknown50 = 0; eq->slot.AugIndex = INVALID_INDEX;
eq->unknown54 = 0; eq->slot.Unknown01 = 0;
eq->item_cast_type = 0;
FINISH_ENCODE(); FINISH_ENCODE();
} }
@ -659,8 +660,8 @@ namespace RoF
OUT(spellid); OUT(spellid);
OUT(damage); OUT(damage);
OUT(force); OUT(force);
OUT(meleepush_xy); OUT(hit_heading);
OUT(meleepush_z); OUT(hit_pitch);
OUT(special); OUT(special);
FINISH_ENCODE(); FINISH_ENCODE();
@ -4466,7 +4467,7 @@ namespace RoF
IN(type); IN(type);
IN(spellid); IN(spellid);
IN(damage); IN(damage);
IN(meleepush_xy); IN(hit_heading);
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }

View File

@ -232,22 +232,23 @@ namespace RoF2
OUT(level); OUT(level);
eq->unknown06 = 0; eq->unknown06 = 0;
eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f; eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f;
eq->bard_focus_id = emu->bard_focus_id; OUT(force);
eq->knockback_angle = emu->sequence; OUT(hit_heading);
eq->unknown22 = 0; OUT(hit_pitch);
OUT(type); OUT(type);
eq->damage = 0; eq->damage = 0;
eq->unknown31 = 0; eq->unknown31 = 0;
OUT(spell); OUT(spell);
eq->level2 = eq->level; OUT(spell_level);
eq->effect_flag = emu->buff_unknown; OUT(effect_flag);
eq->unknown39 = 14; eq->spell_gem = 0;
eq->unknown43 = 0; eq->slot.Type = INVALID_INDEX;
eq->unknown44 = 17; eq->slot.Unknown02 = 0;
eq->unknown45 = 0; eq->slot.Slot = INVALID_INDEX;
eq->unknown46 = -1; eq->slot.SubIndex = INVALID_INDEX;
eq->unknown50 = 0; eq->slot.AugIndex = INVALID_INDEX;
eq->unknown54 = 0; eq->slot.Unknown01 = 0;
eq->item_cast_type = 0;
FINISH_ENCODE(); FINISH_ENCODE();
} }
@ -727,8 +728,8 @@ namespace RoF2
OUT(spellid); OUT(spellid);
OUT(damage); OUT(damage);
OUT(force); OUT(force);
OUT(meleepush_xy); OUT(hit_heading);
OUT(meleepush_z); OUT(hit_pitch);
OUT(special); OUT(special);
FINISH_ENCODE(); FINISH_ENCODE();
@ -4706,7 +4707,7 @@ namespace RoF2
IN(type); IN(type);
IN(spellid); IN(spellid);
IN(damage); IN(damage);
IN(meleepush_xy); IN(hit_heading);
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }

View File

@ -1462,17 +1462,17 @@ struct Action_Struct
{ {
/*00*/ uint16 target; // id of target /*00*/ uint16 target; // id of target
/*02*/ uint16 source; // id of caster /*02*/ uint16 source; // id of caster
/*04*/ uint16 level; // level of caster - Seen 0 /*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*06*/ uint32 unknown06; /*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
/*10*/ float instrument_mod; /*10*/ float instrument_mod;
/*14*/ uint32 bard_focus_id; // seen 0 /*14*/ float force;
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again /*18*/ float hit_heading;
/*22*/ uint32 unknown22; /*22*/ float hit_pitch;
/*26*/ uint8 type; /*26*/ uint8 type; // 231 (0xE7) for spells, skill
/*27*/ uint32 damage; /*27*/ uint32 damage; // OSX says min_damage
/*31*/ uint16 unknown31; /*31*/ uint16 unknown31; // OSX says tohit
/*33*/ uint32 spell; // spell id being cast /*33*/ uint32 spell; // spell id being cast
/*37*/ uint8 level2; // level of caster again? Or maybe the castee /*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
/*39*/ /*39*/
}; };
@ -1484,25 +1484,21 @@ struct ActionAlt_Struct
{ {
/*00*/ uint16 target; // id of target /*00*/ uint16 target; // id of target
/*02*/ uint16 source; // id of caster /*02*/ uint16 source; // id of caster
/*04*/ uint16 level; // level of caster - Seen 0 /*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*06*/ uint32 unknown06; /*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
/*10*/ float instrument_mod; /*10*/ float instrument_mod;
/*14*/ uint32 bard_focus_id; // seen 0 /*14*/ float force;
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again /*18*/ float hit_heading;
/*22*/ uint32 unknown22; /*22*/ float hit_pitch;
/*26*/ uint8 type; /*26*/ uint8 type; // 231 (0xE7) for spells, skill
/*27*/ uint32 damage; /*27*/ uint32 damage; // OSX says min_damage
/*31*/ uint16 unknown31; /*31*/ uint16 unknown31; // OSX says tohit
/*33*/ uint32 spell; // spell id being cast /*33*/ uint32 spell; // spell id being cast
/*37*/ uint8 level2; // level of caster again? Or maybe the castee /*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
/*39*/ uint32 unknown39; // New field to Underfoot - Seen 14 /*39*/ uint8 spell_gem;
/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0 /*40*/ InventorySlot_Struct slot;
/*44*/ uint8 unknown44; // New field to Underfoot - Seen 17 /*52*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
/*45*/ uint8 unknown45; // New field to Underfoot - Seen 0
/*46*/ int32 unknown46; // New field to Underfoot - Seen -1
/*50*/ uint32 unknown50; // New field to Underfoot - Seen 0
/*54*/ uint16 unknown54; // New field to Underfoot - Seen 0
/*56*/ /*56*/
}; };
@ -1517,9 +1513,9 @@ struct CombatDamage_Struct
/* 05 */ uint32 spellid; /* 05 */ uint32 spellid;
/* 09 */ int32 damage; /* 09 */ int32 damage;
/* 13 */ float force; // cd cc cc 3d /* 13 */ float force; // cd cc cc 3d
/* 17 */ float meleepush_xy; // see above notes in Action_Struct /* 17 */ float hit_heading; // see above notes in Action_Struct
/* 21 */ float meleepush_z; /* 21 */ float hit_pitch;
/* 25 */ uint8 unknown25; // was [9] /* 25 */ uint8 secondary; // 0 for primary hand, 1 for secondary
/* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
/* 30 */ /* 30 */
}; };

View File

@ -1450,17 +1450,17 @@ struct Action_Struct
{ {
/*00*/ uint16 target; // id of target /*00*/ uint16 target; // id of target
/*02*/ uint16 source; // id of caster /*02*/ uint16 source; // id of caster
/*04*/ uint16 level; // level of caster - Seen 0 /*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*06*/ uint32 unknown06; /*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
/*10*/ float instrument_mod; /*10*/ float instrument_mod;
/*14*/ uint32 bard_focus_id; // seen 0 /*14*/ float force;
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again /*18*/ float hit_heading;
/*22*/ uint32 unknown22; /*22*/ float hit_pitch;
/*26*/ uint8 type; /*26*/ uint8 type; // 231 (0xE7) for spells, skill
/*27*/ uint32 damage; /*27*/ uint32 damage; // OSX says min_damage
/*31*/ uint16 unknown31; /*31*/ uint16 unknown31; // OSX says tohit
/*33*/ uint32 spell; // spell id being cast /*33*/ uint32 spell; // spell id being cast
/*37*/ uint8 level2; // level of caster again? Or maybe the castee /*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
/*39*/ /*39*/
}; };
@ -1472,25 +1472,21 @@ struct ActionAlt_Struct
{ {
/*00*/ uint16 target; // id of target /*00*/ uint16 target; // id of target
/*02*/ uint16 source; // id of caster /*02*/ uint16 source; // id of caster
/*04*/ uint16 level; // level of caster - Seen 0 /*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*06*/ uint32 unknown06; /*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
/*10*/ float instrument_mod; /*10*/ float instrument_mod;
/*14*/ uint32 bard_focus_id; // seen 0 /*14*/ float force;
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again /*18*/ float hit_heading;
/*22*/ uint32 unknown22; /*22*/ float hit_pitch;
/*26*/ uint8 type; /*26*/ uint8 type; // 231 (0xE7) for spells, skill
/*27*/ uint32 damage; /*27*/ uint32 damage; // OSX says min_damage
/*31*/ uint16 unknown31; /*31*/ uint16 unknown31; // OSX says tohit
/*33*/ uint32 spell; // spell id being cast /*33*/ uint32 spell; // spell id being cast
/*37*/ uint8 level2; // level of caster again? Or maybe the castee /*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
/*39*/ uint32 unknown39; // New field to Underfoot - Seen 14 /*39*/ uint8 spell_gem;
/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0 /*40*/ InventorySlot_Struct slot;
/*44*/ uint8 unknown44; // New field to Underfoot - Seen 17 /*52*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
/*45*/ uint8 unknown45; // New field to Underfoot - Seen 0
/*46*/ int32 unknown46; // New field to Underfoot - Seen -1
/*50*/ uint32 unknown50; // New field to Underfoot - Seen 0
/*54*/ uint16 unknown54; // New field to Underfoot - Seen 0
/*56*/ /*56*/
}; };
@ -1505,9 +1501,9 @@ struct CombatDamage_Struct
/* 05 */ uint32 spellid; /* 05 */ uint32 spellid;
/* 09 */ int32 damage; /* 09 */ int32 damage;
/* 13 */ float force; // cd cc cc 3d /* 13 */ float force; // cd cc cc 3d
/* 17 */ float meleepush_xy; // see above notes in Action_Struct /* 17 */ float hit_heading; // see above notes in Action_Struct
/* 21 */ float meleepush_z; /* 21 */ float hit_pitch;
/* 25 */ uint8 unknown25; // was [9] /* 25 */ uint8 secondary; // 0 for primary hand, 1 for secondary
/* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
/* 30 */ /* 30 */
}; };

View File

@ -161,15 +161,14 @@ namespace SoD
OUT(source); OUT(source);
OUT(level); OUT(level);
OUT(instrument_mod); OUT(instrument_mod);
eq->sequence = emu->sequence; OUT(force);
OUT(hit_heading);
OUT(hit_pitch);
OUT(type); OUT(type);
//OUT(damage); //OUT(damage);
OUT(spell); OUT(spell);
eq->level2 = emu->level; OUT(spell_level);
OUT(buff_unknown); // if this is 4, a buff icon is made OUT(effect_flag); // if this is 4, a buff icon is made
//eq->unknown0036 = -1;
//eq->unknown0040 = -1;
//eq->unknown0044 = -1;
FINISH_ENCODE(); FINISH_ENCODE();
} }
@ -458,8 +457,8 @@ namespace SoD
OUT(spellid); OUT(spellid);
OUT(damage); OUT(damage);
OUT(force); OUT(force);
OUT(meleepush_xy); OUT(hit_heading);
OUT(meleepush_z); OUT(hit_pitch);
OUT(special); OUT(special);
FINISH_ENCODE(); FINISH_ENCODE();

View File

@ -1215,20 +1215,18 @@ struct Action_Struct
{ {
/* 00 */ uint16 target; // id of target /* 00 */ uint16 target; // id of target
/* 02 */ uint16 source; // id of caster /* 02 */ uint16 source; // id of caster
/* 04 */ uint16 level; // level of caster /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/* 06 */ uint16 instrument_mod; // seems to be fixed to 0x0A /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
/* 08 */ uint32 unknown08; /* 10 */ float force;
/* 12 */ uint16 unknown16; /* 14 */ float hit_heading;
// some kind of sequence that's the same in both actions /* 18 */ float hit_pitch;
// as well as the combat damage, to tie em together? /* 22 */ uint8 type; // 231 (0xE7) for spells, skill
/* 14 */ float sequence; // was uint32 /* 23 */ uint16 unknown23; // OSX says min_damage
/* 18 */ uint32 unknown18; /* 25 */ uint16 unknown25; // OSX says tohit
/* 22 */ uint8 type; // 231 (0xE7) for spells
/* 23 */ uint32 unknown23;
/* 27 */ uint16 spell; // spell id being cast /* 27 */ uint16 spell; // spell id being cast
/* 29 */ uint8 level2; // level of caster again? Or maybe the castee /* 29 */ uint8 spell_level; // level of caster again? Or maybe the castee
// this field seems to be some sort of success flag, if it's 4 // this field seems to be some sort of success flag, if it's 4
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
/* 31 */ /* 31 */
}; };
@ -1237,26 +1235,23 @@ struct Action_Struct
// has to do with buff blocking?? // has to do with buff blocking??
struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes
{ {
/*0000*/ uint16 target; // Target ID /*0000*/ uint16 target; // id of target
/*0002*/ uint16 source; // SourceID /*0002*/ uint16 source; // id of caster
/*0004*/ uint16 level; // level of caster /*0004*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*0006*/ uint16 instrument_mod; // seems to be fixed to 0x0A /*0006*/ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
/*0008*/ uint32 unknown08; /*0010*/ float force;
/*0012*/ uint16 unknown16; /*0014*/ float hit_heading;
/*0014*/ uint32 sequence; /*0018*/ float hit_pitch;
/*0018*/ uint32 unknown18; /*0022*/ uint8 type; // 231 (0xE7) for spells, skill
/*0022*/ uint8 type; // Casts, Falls, Bashes, etc... /*0023*/ uint16 unknown23; // OSX says min_damage
/*0023*/ uint32 damage; // Amount of Damage /*0025*/ uint16 unknown25; // OSX says tohit
/*0027*/ uint16 spell; // SpellID /*0027*/ uint16 spell; // spell id being cast
/*0029*/ uint8 unknown29; /*0029*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*0030*/ uint8 buff_unknown; // if this is 4, a buff icon is made // this field seems to be some sort of success flag, if it's 4
/*0031*/ uint32 unknown0031; // seen 00 00 00 00 /*0030*/ uint8 effect_flag; // if this is 4, a buff icon is made
/*0035*/ uint8 unknown0035; // seen 00 /*0031*/ uint8 spell_slot;
/*0036*/ uint32 unknown0036; // seen ff ff ff ff /*0032*/ uint32 slot[5];
/*0040*/ uint32 unknown0040; // seen ff ff ff ff /*0052*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
/*0044*/ uint32 unknown0044; // seen ff ff ff ff
/*0048*/ uint32 unknown0048; // seen 00 00 00 00
/*0052*/ uint32 unknown0052; // seen 00 00 00 00
/*0056*/ /*0056*/
}; };
@ -1271,9 +1266,9 @@ struct CombatDamage_Struct
/* 05 */ uint16 spellid; /* 05 */ uint16 spellid;
/* 07 */ int32 damage; /* 07 */ int32 damage;
/* 11 */ float force; // cd cc cc 3d /* 11 */ float force; // cd cc cc 3d
/* 15 */ float meleepush_xy; // see above notes in Action_Struct /* 15 */ float hit_heading; // see above notes in Action_Struct
/* 19 */ float meleepush_z; /* 19 */ float hit_pitch;
/* 23 */ uint8 unknown23; // was [9] /* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary
/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
/* 28 */ /* 28 */
}; };

View File

@ -161,15 +161,14 @@ namespace SoF
OUT(source); OUT(source);
OUT(level); OUT(level);
OUT(instrument_mod); OUT(instrument_mod);
eq->sequence = emu->sequence; OUT(force);
OUT(hit_heading);
OUT(hit_pitch);
OUT(type); OUT(type);
//OUT(damage); //OUT(damage);
OUT(spell); OUT(spell);
eq->level2 = emu->level; OUT(spell_level);
OUT(buff_unknown); // if this is 4, a buff icon is made OUT(effect_flag); // if this is 4, a buff icon is made
//eq->unknown0036 = -1;
//eq->unknown0040 = -1;
//eq->unknown0044 = -1;
FINISH_ENCODE(); FINISH_ENCODE();
} }
@ -440,8 +439,8 @@ namespace SoF
OUT(spellid); OUT(spellid);
OUT(damage); OUT(damage);
OUT(force); OUT(force);
OUT(meleepush_xy); OUT(hit_heading);
OUT(meleepush_z); OUT(hit_pitch);
FINISH_ENCODE(); FINISH_ENCODE();
} }

View File

@ -1215,20 +1215,18 @@ struct Action_Struct
{ {
/* 00 */ uint16 target; // id of target /* 00 */ uint16 target; // id of target
/* 02 */ uint16 source; // id of caster /* 02 */ uint16 source; // id of caster
/* 04 */ uint16 level; // level of caster /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/* 06 */ uint16 instrument_mod; // seems to be fixed to 0x0A /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
/* 08 */ uint32 unknown08; /* 10 */ float force;
/* 12 */ uint16 unknown16; /* 14 */ float hit_heading;
// some kind of sequence that's the same in both actions /* 18 */ float hit_pitch;
// as well as the combat damage, to tie em together? /* 22 */ uint8 type; // 231 (0xE7) for spells, skill
/* 14 */ float sequence; // was uint32 /* 23 */ uint16 unknown23; // OSX says min_damage
/* 18 */ uint32 unknown18; /* 25 */ uint16 unknown25; // OSX says tohit
/* 22 */ uint8 type; // 231 (0xE7) for spells
/* 23 */ uint32 unknown23;
/* 27 */ uint16 spell; // spell id being cast /* 27 */ uint16 spell; // spell id being cast
/* 29 */ uint8 level2; // level of caster again? Or maybe the castee /* 29 */ uint8 spell_level; // level of caster again? Or maybe the castee
// this field seems to be some sort of success flag, if it's 4 // this field seems to be some sort of success flag, if it's 4
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
/* 31 */ /* 31 */
}; };
@ -1237,26 +1235,23 @@ struct Action_Struct
// has to do with buff blocking?? // has to do with buff blocking??
struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes
{ {
/*0000*/ uint16 target; // Target ID /*0000*/ uint16 target; // id of target
/*0002*/ uint16 source; // SourceID /*0002*/ uint16 source; // id of caster
/*0004*/ uint16 level; // level of caster /*0004*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*0006*/ uint16 instrument_mod; // seems to be fixed to 0x0A /*0006*/ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
/*0008*/ uint32 unknown08; /*0010*/ float force;
/*0012*/ uint16 unknown16; /*0014*/ float hit_heading;
/*0014*/ uint32 sequence; /*0018*/ float hit_pitch;
/*0018*/ uint32 unknown18; /*0022*/ uint8 type; // 231 (0xE7) for spells, skill
/*0022*/ uint8 type; // Casts, Falls, Bashes, etc... /*0023*/ uint16 unknown23; // OSX says min_damage
/*0023*/ uint32 damage; // Amount of Damage /*0025*/ uint16 unknown25; // OSX says tohit
/*0027*/ uint16 spell; // SpellID /*0027*/ uint16 spell; // spell id being cast
/*0029*/ uint8 unknown29; /*0029*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*0030*/ uint8 buff_unknown; // if this is 4, a buff icon is made // this field seems to be some sort of success flag, if it's 4
/*0031*/ uint32 unknown0031; // seen 00 00 00 00 /*0030*/ uint8 effect_flag; // if this is 4, a buff icon is made
/*0035*/ uint8 unknown0035; // seen 00 /*0031*/ uint8 spell_slot;
/*0036*/ uint32 unknown0036; // seen ff ff ff ff /*0032*/ uint32 slot[5];
/*0040*/ uint32 unknown0040; // seen ff ff ff ff /*0052*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
/*0044*/ uint32 unknown0044; // seen ff ff ff ff
/*0048*/ uint32 unknown0048; // seen 00 00 00 00
/*0052*/ uint32 unknown0052; // seen 00 00 00 00
/*0056*/ /*0056*/
}; };
@ -1271,9 +1266,10 @@ struct CombatDamage_Struct
/* 05 */ uint16 spellid; /* 05 */ uint16 spellid;
/* 07 */ int32 damage; /* 07 */ int32 damage;
/* 11 */ float force; // cd cc cc 3d /* 11 */ float force; // cd cc cc 3d
/* 15 */ float meleepush_xy; // see above notes in Action_Struct /* 15 */ float hit_heading; // see above notes in Action_Struct
/* 19 */ float meleepush_z; /* 19 */ float hit_pitch;
/* 23 */ uint8 unknown23[5]; // was [9] this appears unrelated to the stuff the other clients do here? /* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary
/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage, Report function doesn't seem to check this :P
/* 28 */ /* 28 */
}; };

View File

@ -164,11 +164,14 @@ namespace Titanium
OUT(source); OUT(source);
OUT(level); OUT(level);
OUT(instrument_mod); OUT(instrument_mod);
OUT(sequence); OUT(force);
OUT(hit_heading);
OUT(hit_pitch);
OUT(type); OUT(type);
//OUT(damage); //OUT(damage);
OUT(spell); OUT(spell);
OUT(buff_unknown); // if this is 4, a buff icon is made OUT(spell_level);
OUT(effect_flag); // if this is 4, a buff icon is made
FINISH_ENCODE(); FINISH_ENCODE();
} }
@ -358,8 +361,8 @@ namespace Titanium
OUT(spellid); OUT(spellid);
OUT(damage); OUT(damage);
OUT(force); OUT(force);
OUT(meleepush_xy); OUT(hit_heading);
OUT(meleepush_z); OUT(hit_pitch);
FINISH_ENCODE(); FINISH_ENCODE();
} }

View File

@ -1119,20 +1119,18 @@ struct Action_Struct
{ {
/* 00 */ uint16 target; // id of target /* 00 */ uint16 target; // id of target
/* 02 */ uint16 source; // id of caster /* 02 */ uint16 source; // id of caster
/* 04 */ uint16 level; // level of caster /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/* 06 */ uint16 instrument_mod; /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
/* 08 */ uint32 unknown08; /* 10 */ float force;
/* 12 */ uint16 unknown16; /* 14 */ float hit_heading;
// some kind of sequence that's the same in both actions /* 18 */ float hit_pitch;
// as well as the combat damage, to tie em together? /* 22 */ uint8 type; // 231 (0xE7) for spells, skill
/* 14 */ uint32 sequence; /* 23 */ uint16 unknown23; // OSX says min_damage
/* 18 */ uint32 unknown18; /* 25 */ uint16 unknown25; // OSX says tohit
/* 22 */ uint8 type; // 231 (0xE7) for spells
/* 23 */ uint32 unknown23;
/* 27 */ uint16 spell; // spell id being cast /* 27 */ uint16 spell; // spell id being cast
/* 29 */ uint8 unknown29; /* 29 */ uint8 spell_level;
// this field seems to be some sort of success flag, if it's 4 // this field seems to be some sort of success flag, if it's 4
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
/* 31 */ /* 31 */
}; };
@ -1143,12 +1141,12 @@ struct CombatDamage_Struct
{ {
/* 00 */ uint16 target; /* 00 */ uint16 target;
/* 02 */ uint16 source; /* 02 */ uint16 source;
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells /* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells, skill
/* 05 */ uint16 spellid; /* 05 */ uint16 spellid;
/* 07 */ uint32 damage; /* 07 */ uint32 damage;
/* 11 */ float force; /* 11 */ float force;
/* 15 */ float meleepush_xy; // see above notes in Action_Struct /* 15 */ float hit_heading; // see above notes in Action_Struct
/* 19 */ float meleepush_z; /* 19 */ float hit_pitch;
/* 23 */ /* 23 */
}; };

View File

@ -161,29 +161,20 @@ namespace UF
OUT(source); OUT(source);
OUT(level); OUT(level);
eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f; eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f;
eq->knockback_angle = emu->sequence; OUT(force);
OUT(hit_heading);
OUT(hit_pitch);
OUT(type); OUT(type);
OUT(spell); OUT(spell);
eq->level2 = eq->level; OUT(spell_level);
eq->effect_flag = emu->buff_unknown; OUT(effect_flag);
eq->unknown37 = 0x01; eq->spell_gem = 0;
eq->unknown44 = 0xFFFFFFFF; eq->slot[0] = -1; // type
eq->unknown48 = 0xFFFFFFFF; eq->slot[1] = -1; // slot
eq->unknown52 = 0xFFFFFFFF; eq->slot[2] = -1; // sub index
eq->slot[3] = -1; // aug index
/*OUT(target); eq->slot[4] = -1; // unknown
OUT(source); eq->item_cast_type = 0;
OUT(level);
OUT(instrument_mod);
eq->sequence = emu->sequence;
OUT(type);
//OUT(damage);
OUT(spell);
eq->level2 = emu->level;
OUT(buff_unknown); // if this is 4, a buff icon is made
//eq->unknown0036 = -1;
//eq->unknown0040 = -1;
//eq->unknown0044 = -1;*/
FINISH_ENCODE(); FINISH_ENCODE();
} }
@ -586,8 +577,8 @@ namespace UF
OUT(spellid); OUT(spellid);
OUT(damage); OUT(damage);
OUT(force); OUT(force);
OUT(meleepush_xy); OUT(hit_heading);
OUT(meleepush_z); OUT(hit_pitch);
OUT(special); OUT(special);
FINISH_ENCODE(); FINISH_ENCODE();
@ -3398,7 +3389,7 @@ namespace UF
IN(type); IN(type);
IN(spellid); IN(spellid);
IN(damage); IN(damage);
IN(meleepush_xy); IN(hit_heading);
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }

View File

@ -1252,19 +1252,19 @@ struct Action_Struct
{ {
/*00*/ uint16 target; // id of target /*00*/ uint16 target; // id of target
/*02*/ uint16 source; // id of caster /*02*/ uint16 source; // id of caster
/*04*/ uint16 level; // level of caster - Seen 0 /*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*06*/ uint32 unknown06; /*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
/*10*/ uint16 instrument_focus; /*10*/ float instrument_mod;
/*12*/ uint16 unknown12; // seems to always be set to something and it doesn't change between casts except in special cases like changing instrument mods /*14*/ float force;
/*14*/ uint32 unknown14; // seen 0 /*18*/ float hit_heading;
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again /*22*/ float hit_pitch;
/*22*/ uint32 unknown22; /*26*/ uint8 type; // 231 (0xE7) for spells, skill
/*26*/ uint8 type; /*27*/ uint32 damage; // OSX says min_damage
/*27*/ uint32 damage; /*31*/ uint16 unknown31; // OSX says tohit
/*31*/ uint16 unknown31;
/*33*/ uint16 spell; // spell id being cast /*33*/ uint16 spell; // spell id being cast
/*35*/ uint8 level2; // level of caster again? Or maybe the castee /*35*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
/*37*/
}; };
@ -1276,27 +1276,22 @@ struct ActionAlt_Struct
{ {
/*00*/ uint16 target; // id of target /*00*/ uint16 target; // id of target
/*02*/ uint16 source; // id of caster /*02*/ uint16 source; // id of caster
/*04*/ uint16 level; // level of caster - Seen 0 /*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
/*06*/ uint32 unknown06; /*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
/*10*/ float instrument_mod; /*10*/ float instrument_mod;
/*14*/ uint32 unknown14; // seen 0 /*14*/ float force;
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again /*18*/ float hit_heading;
/*22*/ uint32 unknown22; /*22*/ float hit_pitch;
/*26*/ uint8 type; /*26*/ uint8 type; // 231 (0xE7) for spells, skill
/*27*/ uint32 damage; /*27*/ uint32 damage; // OSX says min_damage
/*31*/ uint16 unknown31; /*31*/ uint16 unknown31; // OSX says tohit
/*33*/ uint16 spell; // spell id being cast /*33*/ uint16 spell; // spell id being cast
/*35*/ uint8 level2; // level of caster again? Or maybe the castee /*35*/ uint8 spell_level; // level of caster again? Or maybe the castee
/*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
/*37*/ uint32 unknown37; // New field to Underfoot - Seen 14 /*37*/ uint8 spell_gem;
/*41*/ uint8 unknown41; // New field to Underfoot - Seen 0 /*38*/ uint8 padding38[2];
/*42*/ uint8 unknown42; // New field to Underfoot - Seen 0 /*40*/ uint32 slot[5];
/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0 /*60*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
/*44*/ uint32 unknown44; // New field to Underfoot - Seen 23
/*48*/ uint32 unknown48; // New field to Underfoot - Seen -1
/*52*/ uint32 unknown52; // New field to Underfoot - Seen -1
/*56*/ uint32 unknown56; // New field to Underfoot - Seen 0
/*60*/ uint32 unknown60; // New field to Underfoot - Seen 0
/*64*/ /*64*/
}; };
@ -1311,9 +1306,9 @@ struct CombatDamage_Struct
/* 05 */ uint16 spellid; /* 05 */ uint16 spellid;
/* 07 */ int32 damage; /* 07 */ int32 damage;
/* 11 */ float force; // cd cc cc 3d /* 11 */ float force; // cd cc cc 3d
/* 15 */ float meleepush_xy; // see above notes in Action_Struct /* 15 */ float hit_heading; // see above notes in Action_Struct
/* 19 */ float meleepush_z; /* 19 */ float hit_pitch;
/* 23 */ uint8 unknown23; // was [9] /* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary
/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
/* 28 */ /* 28 */
}; };

View File

@ -3611,15 +3611,15 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
a->special = 2; a->special = 2;
else else
a->special = 0; a->special = 0;
a->meleepush_xy = attacker ? attacker->GetHeading() : 0.0f; a->hit_heading = attacker ? attacker->GetHeading() : 0.0f;
if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() && if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() &&
(IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) { (IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) {
a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used); a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used);
if (IsNPC()) if (IsNPC())
a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC
// update NPC stuff // update NPC stuff
auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->meleepush_xy) + m_Delta.x), auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x),
m_Position.y + (a->force * std::sin(a->meleepush_xy) + m_Delta.y), m_Position.z); m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z);
if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
if (IsNPC()) { if (IsNPC()) {
// Is this adequate? // Is this adequate?

View File

@ -913,16 +913,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
action->source = caster ? caster->GetID() : GetID(); action->source = caster ? caster->GetID() : GetID();
action->level = 65; action->level = 65;
action->instrument_mod = 10; action->instrument_mod = 10;
action->sequence = static_cast<uint32>((GetHeading() * 12345 / 2)); action->hit_heading = GetHeading();
action->type = 231; action->type = 231;
action->spell = spell_id; action->spell = spell_id;
action->buff_unknown = 4; action->effect_flag = 4;
cd->target = action->target; cd->target = action->target;
cd->source = action->source; cd->source = action->source;
cd->type = action->type; cd->type = action->type;
cd->spellid = action->spell; cd->spellid = action->spell;
cd->meleepush_xy = action->sequence; cd->hit_heading = action->hit_heading;
CastToClient()->QueuePacket(action_packet); CastToClient()->QueuePacket(action_packet);
if(caster && caster->IsClient() && caster != this) if(caster && caster->IsClient() && caster != this)
@ -964,16 +964,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
action->source = caster ? caster->GetID() : GetID(); action->source = caster ? caster->GetID() : GetID();
action->level = 65; action->level = 65;
action->instrument_mod = 10; action->instrument_mod = 10;
action->sequence = static_cast<uint32>((GetHeading() * 12345 / 2)); action->hit_heading = GetHeading();
action->type = 231; action->type = 231;
action->spell = spell_id; action->spell = spell_id;
action->buff_unknown = 4; action->effect_flag = 4;
cd->target = action->target; cd->target = action->target;
cd->source = action->source; cd->source = action->source;
cd->type = action->type; cd->type = action->type;
cd->spellid = action->spell; cd->spellid = action->spell;
cd->meleepush_xy = action->sequence; cd->hit_heading = action->hit_heading;
CastToClient()->QueuePacket(action_packet); CastToClient()->QueuePacket(action_packet);
if(caster->IsClient() && caster != this) if(caster->IsClient() && caster != this)
@ -1002,16 +1002,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
action->source = caster ? caster->GetID() : GetID(); action->source = caster ? caster->GetID() : GetID();
action->level = 65; action->level = 65;
action->instrument_mod = 10; action->instrument_mod = 10;
action->sequence = static_cast<uint32>((GetHeading() * 12345 / 2)); action->hit_heading = GetHeading();
action->type = 231; action->type = 231;
action->spell = spell_id; action->spell = spell_id;
action->buff_unknown = 4; action->effect_flag = 4;
cd->target = action->target; cd->target = action->target;
cd->source = action->source; cd->source = action->source;
cd->type = action->type; cd->type = action->type;
cd->spellid = action->spell; cd->spellid = action->spell;
cd->meleepush_xy = action->sequence; cd->hit_heading = action->hit_heading;
CastToClient()->QueuePacket(action_packet); CastToClient()->QueuePacket(action_packet);
if(caster->IsClient() && caster != this) if(caster->IsClient() && caster != this)

View File

@ -2652,18 +2652,18 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
action->source = caster->GetID(); action->source = caster->GetID();
action->target = GetID(); action->target = GetID();
action->spell = spell_id; action->spell = spell_id;
action->sequence = (uint32) (GetHeading()); // just some random number action->hit_heading = GetHeading();
action->instrument_mod = caster->GetInstrumentMod(spell_id); action->instrument_mod = caster->GetInstrumentMod(spell_id);
action->buff_unknown = 0; action->effect_flag = 0;
action->level = buffs[buffs_i].casterlevel; action->spell_level = action->level = buffs[buffs_i].casterlevel;
action->type = DamageTypeSpell; action->type = DamageTypeSpell;
entity_list.QueueCloseClients(this, packet, false, RuleI(Range, SongMessages), 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells); entity_list.QueueCloseClients(this, packet, false, RuleI(Range, SongMessages), 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
action->buff_unknown = 4; action->effect_flag = 4;
if(IsEffectInSpell(spell_id, SE_TossUp)) if(IsEffectInSpell(spell_id, SE_TossUp))
{ {
action->buff_unknown = 0; action->effect_flag = 0;
} }
else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0)
{ {
@ -2673,7 +2673,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
{ {
CastToClient()->SetKnockBackExemption(true); CastToClient()->SetKnockBackExemption(true);
action->buff_unknown = 0; action->effect_flag = 0;
auto outapp_push = new EQApplicationPacket( auto outapp_push = new EQApplicationPacket(
OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer;
@ -2725,7 +2725,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
cd->source = action->source; cd->source = action->source;
cd->type = DamageTypeSpell; cd->type = DamageTypeSpell;
cd->spellid = action->spell; cd->spellid = action->spell;
cd->meleepush_xy = action->sequence; cd->hit_heading = action->hit_heading;
cd->damage = 0; cd->damage = 0;
if(!IsEffectInSpell(spell_id, SE_BindAffinity)) if(!IsEffectInSpell(spell_id, SE_BindAffinity))
{ {
@ -3536,9 +3536,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
action->level = caster_level; // caster level, for animation only action->level = caster_level; // caster level, for animation only
action->type = 231; // 231 means a spell action->type = 231; // 231 means a spell
action->spell = spell_id; action->spell = spell_id;
action->sequence = (uint32) (GetHeading()); // just some random number action->hit_heading = GetHeading();
action->instrument_mod = GetInstrumentMod(spell_id); action->instrument_mod = GetInstrumentMod(spell_id);
action->buff_unknown = 0; action->effect_flag = 0;
if(spelltar != this && spelltar->IsClient()) // send to target if(spelltar != this && spelltar->IsClient()) // send to target
spelltar->CastToClient()->QueuePacket(action_packet); spelltar->CastToClient()->QueuePacket(action_packet);
@ -3965,11 +3965,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
// NOTE: this is what causes the buff icon to appear on the client, if // NOTE: this is what causes the buff icon to appear on the client, if
// this is a buff - but it sortof relies on the first packet. // this is a buff - but it sortof relies on the first packet.
// the complete sequence is 2 actions and 1 damage message // the complete sequence is 2 actions and 1 damage message
action->buff_unknown = 0x04; // this is a success flag action->effect_flag = 0x04; // this is a success flag
if(IsEffectInSpell(spell_id, SE_TossUp)) if(IsEffectInSpell(spell_id, SE_TossUp))
{ {
action->buff_unknown = 0; action->effect_flag = 0;
} }
else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0)
{ {
@ -3979,7 +3979,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
{ {
spelltar->CastToClient()->SetKnockBackExemption(true); spelltar->CastToClient()->SetKnockBackExemption(true);
action->buff_unknown = 0; action->effect_flag = 0;
auto outapp_push = auto outapp_push =
new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer;
@ -4039,7 +4039,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
cd->source = action->source; cd->source = action->source;
cd->type = action->type; cd->type = action->type;
cd->spellid = action->spell; cd->spellid = action->spell;
cd->meleepush_xy = action->sequence; cd->hit_heading = action->hit_heading;
cd->damage = 0; cd->damage = 0;
if(!IsEffectInSpell(spell_id, SE_BindAffinity)){ if(!IsEffectInSpell(spell_id, SE_BindAffinity)){
entity_list.QueueCloseClients( entity_list.QueueCloseClients(
@ -5722,7 +5722,7 @@ void Client::SendSpellAnim(uint16 targetid, uint16 spell_id)
a->source = this->GetID(); a->source = this->GetID();
a->type = 231; a->type = 231;
a->spell = spell_id; a->spell = spell_id;
a->sequence = 231; a->hit_heading = GetHeading();
app.priority = 1; app.priority = 1;
entity_list.QueueCloseClients(this, &app, false, RuleI(Range, SpellParticles)); entity_list.QueueCloseClients(this, &app, false, RuleI(Range, SpellParticles));

View File

@ -216,7 +216,7 @@ void Trap::Trigger(Mob* trigger)
int dmg = zone->random.Int(effectvalue, effectvalue2); int dmg = zone->random.Int(effectvalue, effectvalue2);
trigger->SetHP(trigger->GetHP() - dmg); trigger->SetHP(trigger->GetHP() - dmg);
a->damage = dmg; a->damage = dmg;
a->meleepush_xy = zone->random.Int(0, 1234567); a->hit_heading = 0.0f;
a->source = GetHiddenTrigger()!=nullptr ? GetHiddenTrigger()->GetID() : trigger->GetID(); a->source = GetHiddenTrigger()!=nullptr ? GetHiddenTrigger()->GetID() : trigger->GetID();
a->spellid = 0; a->spellid = 0;
a->target = trigger->GetID(); a->target = trigger->GetID();