mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
[Client] Prevent errors from NPC-only packets for DedicatedPlayers
This commit is contained in:
parent
68ee64902d
commit
716809f2db
@ -276,6 +276,9 @@ void DedicatedPlayer::setAnimFlags()
|
||||
|
||||
void DedicatedPlayer::setEquipment()
|
||||
{
|
||||
// Go no further if the player is disguised as a creature
|
||||
if (!ptr.getClass().hasInventoryStore(ptr)) return;
|
||||
|
||||
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
|
||||
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)
|
||||
{
|
||||
|
@ -30,6 +30,10 @@ namespace mwmp
|
||||
else if (player != 0)
|
||||
{
|
||||
MWWorld::Ptr ptrPlayer = static_cast<DedicatedPlayer *>(player)->getPtr();
|
||||
|
||||
// Go no further if the player is disguised as a creature
|
||||
if (ptrPlayer.getTypeName() != typeid(ESM::NPC).name()) return;
|
||||
|
||||
MWMechanics::NpcStats *ptrNpcStats = &ptrPlayer.getClass().getNpcStats(ptrPlayer);
|
||||
MWMechanics::SkillValue skillValue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user