[Client] Send ObjectTrap packets when disarming traps with keys & probes

0.6.1
David Cernat 8 years ago
parent 32879adc5b
commit 20a72ec807

@ -185,6 +185,19 @@ namespace MWClass
"Disarm Trap", 1.0f, 1.0f, MWBase::SoundManager::Play_TypeSfx,
MWBase::SoundManager::Play_Normal);
isTrapped = false;
/*
Start of tes3mp addition
Send an ID_OBJECT_TRAP packet every time a trap is disarmed
*/
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectTrap(ptr, ptr.getRefData().getPosition(), true);
worldEvent->sendObjectTrap();
/*
End of tes3mp addition
*/
}
/*

@ -170,6 +170,19 @@ namespace MWClass
"Disarm Trap", 1.0f, 1.0f, MWBase::SoundManager::Play_TypeSfx,
MWBase::SoundManager::Play_Normal);
isTrapped = false;
/*
Start of tes3mp addition
Send an ID_OBJECT_TRAP packet every time a trap is disarmed
*/
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectTrap(ptr, ptr.getRefData().getPosition(), true);
worldEvent->sendObjectTrap();
/*
End of tes3mp addition
*/
}
/*

@ -126,6 +126,19 @@ namespace MWMechanics
resultSound = "Disarm Trap";
resultMessage = "#{sTrapSuccess}";
mActor.getClass().skillUsageSucceeded(mActor, ESM::Skill::Security, 0);
/*
Start of tes3mp addition
Send an ID_OBJECT_TRAP packet every time a trap is disarmed
*/
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectTrap(trap, trap.getRefData().getPosition(), true);
worldEvent->sendObjectTrap();
/*
End of tes3mp addition
*/
}
else
resultMessage = "#{sTrapFail}";

Loading…
Cancel
Save