mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-22 09:42:26 +00:00
-Damage mostly works
-Death kinda sorta works; need to fix an ordering issue in source (we send death before damage on killing blow) -Fix animation -Fix auto attack -Camp
This commit is contained in:
parent
591fa0eb1d
commit
392998325b
@ -2601,6 +2601,62 @@ namespace Laurion
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_Damage) {
|
||||||
|
SETUP_DIRECT_ENCODE(CombatDamage_Struct, structs::CombatDamage_Struct);
|
||||||
|
|
||||||
|
OUT(target);
|
||||||
|
OUT(source);
|
||||||
|
OUT(type);
|
||||||
|
OUT(spellid);
|
||||||
|
OUT(damage);
|
||||||
|
OUT(force);
|
||||||
|
OUT(hit_heading);
|
||||||
|
OUT(hit_pitch);
|
||||||
|
OUT(special);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_Animation)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(Animation_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(Animation_Struct, structs::Animation_Struct);
|
||||||
|
|
||||||
|
OUT(spawnid);
|
||||||
|
OUT(action);
|
||||||
|
OUT(speed);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_Death)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(Death_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(Death_Struct, structs::Death_Struct);
|
||||||
|
|
||||||
|
OUT(spawn_id);
|
||||||
|
OUT(killer_id);
|
||||||
|
OUT(spell_id);
|
||||||
|
OUT(attack_skill);
|
||||||
|
OUT(damage);
|
||||||
|
|
||||||
|
//This is a hack, we need to actually fix the ordering in source as this wont respect filters etc
|
||||||
|
if (emu->attack_skill != 231) {
|
||||||
|
auto combat_packet = new EQApplicationPacket(OP_Damage, sizeof(structs::CombatDamage_Struct));
|
||||||
|
structs::CombatDamage_Struct* cds = (structs::CombatDamage_Struct*)combat_packet->pBuffer;
|
||||||
|
|
||||||
|
cds->target = emu->spawn_id;
|
||||||
|
cds->source = emu->killer_id;
|
||||||
|
cds->type = emu->attack_skill;
|
||||||
|
cds->damage = emu->damage;
|
||||||
|
cds->spellid = -1;
|
||||||
|
|
||||||
|
dest->FastQueuePacket(&combat_packet, ack_req);
|
||||||
|
}
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
// DECODE methods
|
// DECODE methods
|
||||||
|
|
||||||
DECODE(OP_EnterWorld)
|
DECODE(OP_EnterWorld)
|
||||||
|
|||||||
@ -27,6 +27,9 @@ E(OP_DeleteSpawn)
|
|||||||
E(OP_FormattedMessage)
|
E(OP_FormattedMessage)
|
||||||
E(OP_Consider)
|
E(OP_Consider)
|
||||||
E(OP_HPUpdate)
|
E(OP_HPUpdate)
|
||||||
|
E(OP_Damage)
|
||||||
|
E(OP_Animation)
|
||||||
|
E(OP_Death)
|
||||||
//list of packets we need to decode on the way in:
|
//list of packets we need to decode on the way in:
|
||||||
D(OP_EnterWorld)
|
D(OP_EnterWorld)
|
||||||
D(OP_ZoneEntry)
|
D(OP_ZoneEntry)
|
||||||
|
|||||||
@ -525,6 +525,68 @@ namespace Laurion {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Flags for special:
|
||||||
|
WildRampage: 0x1
|
||||||
|
Rampage: 0x2
|
||||||
|
NoCastOnText: 0x4
|
||||||
|
DoubleBowShot: 0x8
|
||||||
|
UnknownSpellFlag: 0x10
|
||||||
|
Flurry: 0x20
|
||||||
|
Riposte: 0x40
|
||||||
|
Critical: 0x80
|
||||||
|
Lucky: 0x100
|
||||||
|
FinishingBlow: 0x200
|
||||||
|
CripplingBlow: 0x400
|
||||||
|
Assassinate: 0x800
|
||||||
|
DeadlyStrike: 0x1000
|
||||||
|
SlayUndead: 0x2000
|
||||||
|
Headshot: 0x4000
|
||||||
|
Strikethrough: 0x8000
|
||||||
|
LuckyRiposte: 0x10000
|
||||||
|
Twincast: 0x20000
|
||||||
|
Might be more flags beyond this but I'm not sure
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct CombatDamage_Struct
|
||||||
|
{
|
||||||
|
/*000*/ uint16 target;
|
||||||
|
/*002*/ uint16 source;
|
||||||
|
/*004*/ uint32 unknown1; //not read by the client
|
||||||
|
/*008*/ int64 damage;
|
||||||
|
/*016*/ uint32 special; //flags; will document above
|
||||||
|
/*020*/ int32 spellid;
|
||||||
|
/*024*/ uint32 spell_level; //spell caster level (unconfirmed; it is used for the spell link)
|
||||||
|
/*028*/ float force; //I haven't actually been able to confirm these three yet
|
||||||
|
/*032*/ float hit_heading;
|
||||||
|
/*036*/ int32 hit_pitch;
|
||||||
|
/*040*/ uint8 type;
|
||||||
|
/*041*/ uint8 padding[3];
|
||||||
|
/*044*/ uint32 unknown2; //not read by the client
|
||||||
|
/*048*/
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Animation_Struct {
|
||||||
|
/*00*/ uint16 spawnid;
|
||||||
|
/*02*/ uint8 action;
|
||||||
|
/*03*/ uint8 speed;
|
||||||
|
/*04*/
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Death_Struct
|
||||||
|
{
|
||||||
|
/*000*/ uint32 spawn_id;
|
||||||
|
/*004*/ uint32 killer_id;
|
||||||
|
/*008*/ uint32 corpseid; //not read by client
|
||||||
|
/*012*/ uint32 unknown1; //not read by client
|
||||||
|
/*016*/ uint32 spell_id;
|
||||||
|
/*020*/ uint32 attack_skill;
|
||||||
|
/*024*/ uint64 damage;
|
||||||
|
/*032*/ uint32 unknown2; //not read by client
|
||||||
|
/*036*/ uint32 unknown3; //not read by client
|
||||||
|
/*040*/
|
||||||
|
};
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
|
|||||||
@ -195,7 +195,7 @@ OP_Death=0x429a
|
|||||||
OP_GMTraining=0x0000
|
OP_GMTraining=0x0000
|
||||||
OP_GMEndTraining=0x0000
|
OP_GMEndTraining=0x0000
|
||||||
OP_GMTrainSkill=0x0000
|
OP_GMTrainSkill=0x0000
|
||||||
OP_Animation=0x0000
|
OP_Animation=0x79c7
|
||||||
OP_Begging=0x0000
|
OP_Begging=0x0000
|
||||||
OP_Consent=0x0000
|
OP_Consent=0x0000
|
||||||
OP_ConsentDeny=0x0000
|
OP_ConsentDeny=0x0000
|
||||||
@ -217,7 +217,7 @@ OP_CorpseDrop=0x0000
|
|||||||
OP_Bug=0x0000
|
OP_Bug=0x0000
|
||||||
OP_Feedback=0x0000
|
OP_Feedback=0x0000
|
||||||
OP_Report=0x0000
|
OP_Report=0x0000
|
||||||
OP_Damage=0x0000
|
OP_Damage=0x7d07
|
||||||
OP_ChannelMessage=0x6adc
|
OP_ChannelMessage=0x6adc
|
||||||
OP_Assist=0x0000
|
OP_Assist=0x0000
|
||||||
OP_AssistGroup=0x0000
|
OP_AssistGroup=0x0000
|
||||||
@ -233,7 +233,7 @@ OP_Rewind=0x0000
|
|||||||
OP_TargetCommand=0x3b18
|
OP_TargetCommand=0x3b18
|
||||||
OP_Hide=0x0000
|
OP_Hide=0x0000
|
||||||
OP_Jump=0x0000
|
OP_Jump=0x0000
|
||||||
OP_Camp=0x0000
|
OP_Camp=0x326f
|
||||||
OP_Emote=0x0000
|
OP_Emote=0x0000
|
||||||
OP_SetRunMode=0x0000
|
OP_SetRunMode=0x0000
|
||||||
OP_BankerChange=0x0000
|
OP_BankerChange=0x0000
|
||||||
@ -250,8 +250,8 @@ OP_XTargetOpenResponse=0x0000
|
|||||||
OP_BuffCreate=0x0000 #0x27a1
|
OP_BuffCreate=0x0000 #0x27a1
|
||||||
OP_BuffRemoveRequest=0x0000
|
OP_BuffRemoveRequest=0x0000
|
||||||
OP_DeleteSpawn=0x7712
|
OP_DeleteSpawn=0x7712
|
||||||
OP_AutoAttack=0x0000
|
OP_AutoAttack=0x3f03
|
||||||
OP_AutoAttack2=0x0000
|
OP_AutoAttack2=0x1c31
|
||||||
OP_Consume=0x0000
|
OP_Consume=0x0000
|
||||||
OP_MoveItem=0x0000
|
OP_MoveItem=0x0000
|
||||||
OP_MoveMultipleItems=0x0000
|
OP_MoveMultipleItems=0x0000
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user