1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

[Client] Send ObjectLock packets when using lock spells

This commit is contained in:
David Cernat 2017-06-29 22:29:49 +03:00
parent 9519c467eb
commit 0b68e59060

View file

@ -620,6 +620,19 @@ namespace MWMechanics
if (caster == getPlayer()) if (caster == getPlayer())
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicLockSuccess}"); MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicLockSuccess}");
target.getClass().lock(target, static_cast<int>(magnitude)); target.getClass().lock(target, static_cast<int>(magnitude));
/*
Start of tes3mp addition
Send an ID_OBJECT_LOCK packet every time an object is locked here
*/
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectLock(target, static_cast<int>(magnitude));
worldEvent->sendObjectLock();
/*
End of tes3mp addition
*/
} }
return true; return true;
} }