mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 12:52:25 +00:00
Basic spellcasting works a bit.
This commit is contained in:
parent
13f57f3c5d
commit
ce98118cc8
@ -3048,6 +3048,29 @@ namespace Laurion
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_Action) {
|
||||
ENCODE_LENGTH_EXACT(Action_Struct);
|
||||
SETUP_DIRECT_ENCODE(Action_Struct, structs::MissileHitInfo);
|
||||
|
||||
//This is mostly figured out; there's two unknowns, only unknown1 is read by the client
|
||||
OUT(target);
|
||||
OUT(source);
|
||||
eq->spell_id = emu->spell;
|
||||
eq->effect_type = emu->effect_flag;
|
||||
eq->effective_casting_level = 0; //if you set this to != 0 it will use this level instead of calculating it
|
||||
eq->unknown1 = 0;
|
||||
eq->unknown2 = 0;
|
||||
eq->damage = 0; //client doesn't read this but live sends it here, can just set 0
|
||||
eq->modifier = 1.0f + (emu->instrument_mod - 10) / 10.0f;
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
eq->skill = emu->type;
|
||||
OUT(level);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
// DECODE methods
|
||||
|
||||
DECODE(OP_EnterWorld)
|
||||
|
||||
@ -39,6 +39,7 @@ E(OP_BeginCast)
|
||||
E(OP_BuffCreate)
|
||||
E(OP_Buff)
|
||||
E(OP_ManaChange)
|
||||
E(OP_Action)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_EnterWorld)
|
||||
D(OP_ZoneEntry)
|
||||
|
||||
@ -704,6 +704,35 @@ namespace Laurion {
|
||||
int32 slot;
|
||||
};
|
||||
|
||||
//This is what we call OP_Action
|
||||
//To the client though this is basically a missile hit though
|
||||
//OP_Action is basically "instant missile hit" to the client
|
||||
//@0x1401f0970 MissileHitInfo::Deserialize(CUnSerializeBuffer *buffer);
|
||||
struct MissileHitInfo
|
||||
{
|
||||
uint16 target;
|
||||
uint16 source;
|
||||
uint32 spell_id;
|
||||
//4 leaves a buff
|
||||
uint32 effect_type;
|
||||
uint32 effective_casting_level;
|
||||
//Client does read this but only does something if it's negative
|
||||
int64 unknown1;
|
||||
//I don't see the client read this one outside basic serialization
|
||||
int64 unknown2;
|
||||
//I don't see the client read this one either but based on captures from live it seems to match spell damage
|
||||
int64 damage;
|
||||
float modifier;
|
||||
float force;
|
||||
float hit_heading;
|
||||
float hit_pitch;
|
||||
//same convention as damage
|
||||
//231 for spell, otherwise it's skill in use
|
||||
uint8 skill;
|
||||
uint8 level; //the client doesn't actually deserialize anything past level
|
||||
//live however has a lot more info here depending on packet type
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
}; //end namespace structs
|
||||
|
||||
@ -103,7 +103,7 @@ OP_SendAAStats=0x0000
|
||||
OP_AAExpUpdate=0x0000 #0x642f
|
||||
OP_ExpUpdate=0x611d
|
||||
OP_HPUpdate=0x775c
|
||||
OP_ManaChange=0x0606
|
||||
OP_ManaChange=0x700f
|
||||
OP_TGB=0x0000 #removed; tgb is baked in and always on
|
||||
OP_SpecialMesg=0x7d93
|
||||
OP_GuildMemberList=0x0000
|
||||
@ -173,17 +173,17 @@ OP_QueryUCSServerStatus=0x0000
|
||||
OP_InspectRequest=0x0000
|
||||
OP_InspectAnswer=0x0000
|
||||
OP_InspectMessageUpdate=0x0000
|
||||
OP_BeginCast=0x0000
|
||||
OP_BeginCast=0x31f9
|
||||
OP_ColoredText=0x0000
|
||||
OP_ConsentResponse=0x0000
|
||||
OP_MemorizeSpell=0x0000
|
||||
OP_LinkedReuse=0x0000
|
||||
OP_SwapSpell=0x0000
|
||||
OP_CastSpell=0x0000
|
||||
OP_CastSpell=0x325b
|
||||
OP_Consider=0x53e3
|
||||
OP_FormattedMessage=0x7f7f
|
||||
OP_SimpleMessage=0x1943
|
||||
OP_Buff=0x0000 #0x6ce5
|
||||
OP_Buff=0x6ce5
|
||||
OP_Illusion=0x0000
|
||||
OP_MoneyOnCorpse=0x0000
|
||||
OP_RandomReply=0x0000
|
||||
@ -209,7 +209,7 @@ OP_ClearSurname=0x0000
|
||||
OP_FaceChange=0x0000
|
||||
OP_SetFace=0x0000
|
||||
OP_SenseHeading=0x0000
|
||||
OP_Action=0x0000
|
||||
OP_Action=0x4c13
|
||||
OP_ConsiderCorpse=0x6092
|
||||
OP_HideCorpse=0x0000
|
||||
OP_CorpseDrag=0x0000
|
||||
@ -247,7 +247,7 @@ OP_XTargetRequest=0x0000
|
||||
OP_XTargetAutoAddHaters=0x0000
|
||||
OP_XTargetOpen=0x0000
|
||||
OP_XTargetOpenResponse=0x0000
|
||||
OP_BuffCreate=0x0000 #0x27a1
|
||||
OP_BuffCreate=0x27a1
|
||||
OP_BuffRemoveRequest=0x0000
|
||||
OP_DeleteSpawn=0x7712
|
||||
OP_AutoAttack=0x3f03
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user