mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[Client] Fix item magic casting synchronization for spell scrolls
Previously, spell scrolls were used up before their IDs could be included in attacks packets supposed to be sent for them.
This commit is contained in:
parent
d83160523f
commit
81e2e48561
1 changed files with 5 additions and 2 deletions
|
@ -3258,10 +3258,11 @@ namespace MWWorld
|
||||||
|
|
||||||
If this actor is a LocalPlayer or LocalActor, get their Attack and prepare
|
If this actor is a LocalPlayer or LocalActor, get their Attack and prepare
|
||||||
it for sending
|
it for sending
|
||||||
|
|
||||||
|
Set the attack details before going through with the casting, in case it's
|
||||||
|
a one use item that would get removed through the casting (like a scroll)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
cast.cast(*inv.getSelectedEnchantItem());
|
|
||||||
|
|
||||||
mwmp::Attack *localAttack = MechanicsHelper::getLocalAttack(actor);
|
mwmp::Attack *localAttack = MechanicsHelper::getLocalAttack(actor);
|
||||||
|
|
||||||
if (localAttack)
|
if (localAttack)
|
||||||
|
@ -3271,6 +3272,8 @@ namespace MWWorld
|
||||||
localAttack->itemId = inv.getSelectedEnchantItem()->getCellRef().getRefId();
|
localAttack->itemId = inv.getSelectedEnchantItem()->getCellRef().getRefId();
|
||||||
localAttack->shouldSend = true;
|
localAttack->shouldSend = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cast.cast(*inv.getSelectedEnchantItem());
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
End of tes3mp addition
|
End of tes3mp addition
|
||||||
|
|
Loading…
Reference in a new issue