Clean up OP_ManaChange

This commit is contained in:
Michael Cook (mackal) 2016-08-15 01:17:53 -04:00
parent e894e96404
commit ae5689ffb4
14 changed files with 52 additions and 39 deletions

View File

@ -432,10 +432,11 @@ struct DeleteSpell_Struct
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
};
struct SwapSpell_Struct

View File

@ -1623,7 +1623,8 @@ namespace RoF
OUT(new_mana);
OUT(stamina);
OUT(spell_id);
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
OUT(keepcasting);
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
FINISH_ENCODE();
}

View File

@ -1701,7 +1701,8 @@ namespace RoF2
OUT(new_mana);
OUT(stamina);
OUT(spell_id);
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
OUT(keepcasting);
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
FINISH_ENCODE();
}

View File

@ -668,11 +668,12 @@ struct DeleteSpell_Struct
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
uint32 unknown16;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
};
struct SwapSpell_Struct

View File

@ -657,11 +657,12 @@ struct DeleteSpell_Struct
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
uint32 unknown16;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
};
struct SwapSpell_Struct

View File

@ -1139,7 +1139,8 @@ namespace SoD
OUT(new_mana);
OUT(stamina);
OUT(spell_id);
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
OUT(keepcasting);
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
FINISH_ENCODE();
}

View File

@ -512,11 +512,12 @@ struct DeleteSpell_Struct
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
uint32 unknown16;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
};
struct SwapSpell_Struct

View File

@ -936,7 +936,8 @@ namespace SoF
OUT(new_mana);
OUT(stamina);
OUT(spell_id);
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
OUT(keepcasting);
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
FINISH_ENCODE();
}

View File

@ -491,11 +491,12 @@ struct DeleteSpell_Struct
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
uint32 unknown16;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
};
struct SwapSpell_Struct

View File

@ -420,13 +420,13 @@ struct DeleteSpell_Struct
/*005*/uint8 unknowndss006[3];
/*008*/
};
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
};
struct SwapSpell_Struct

View File

@ -1386,7 +1386,8 @@ namespace UF
OUT(new_mana);
OUT(stamina);
OUT(spell_id);
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
OUT(keepcasting);
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
FINISH_ENCODE();
}

View File

@ -512,11 +512,12 @@ struct DeleteSpell_Struct
struct ManaChange_Struct
{
uint32 new_mana; // New Mana AMount
uint32 stamina;
uint32 spell_id;
uint32 unknown12;
uint32 unknown16;
/*00*/ uint32 new_mana; // New Mana AMount
/*04*/ uint32 stamina;
/*08*/ uint32 spell_id;
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
};
struct SwapSpell_Struct

View File

@ -1809,6 +1809,7 @@ void Client::SendManaUpdatePacket() {
manachange->new_mana = cur_mana;
manachange->stamina = cur_end;
manachange->spell_id = casting_spell_id; //always going to be 0... since we check IsCasting()
manachange->keepcasting = 1;
outapp->priority = 6;
QueuePacket(outapp);
safe_delete(outapp);

View File

@ -4754,6 +4754,7 @@ void Mob::SendSpellBarEnable(uint16 spell_id)
manachange->new_mana = GetMana();
manachange->spell_id = spell_id;
manachange->stamina = CastToClient()->GetEndurance();
manachange->keepcasting = 0;
outapp->priority = 6;
CastToClient()->QueuePacket(outapp);
safe_delete(outapp);