forked from mirror/openmw-tes3mp
Implement UnequipItem() script function
This commit is contained in:
parent
c1bd4f1ce3
commit
7f25abb9c8
2 changed files with 8 additions and 2 deletions
|
@ -36,8 +36,10 @@ void ItemFunctions::EquipItem(unsigned short pid, unsigned short slot, const cha
|
||||||
|
|
||||||
void ItemFunctions::UnequipItem(unsigned short pid, unsigned short slot) noexcept
|
void ItemFunctions::UnequipItem(unsigned short pid, unsigned short slot) noexcept
|
||||||
{
|
{
|
||||||
LOG_MESSAGE(Log::LOG_WARN, "stub");
|
Player *player;
|
||||||
//ItemFunctions::EquipItem(pid, slot, "", 0);
|
GET_PLAYER(pid, player, );
|
||||||
|
|
||||||
|
ItemFunctions::EquipItem(pid, slot, "", 0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemFunctions::AddItem(unsigned short pid, const char* itemName, unsigned int count, int health) noexcept
|
void ItemFunctions::AddItem(unsigned short pid, const char* itemName, unsigned int count, int health) noexcept
|
||||||
|
|
|
@ -794,6 +794,10 @@ void LocalPlayer::setEquipment()
|
||||||
else
|
else
|
||||||
ptrInventory.equip(slot, it, ptrPlayer);
|
ptrInventory.equip(slot, it, ptrPlayer);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ptrInventory.unequipSlot(slot, ptrPlayer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue