Rename methods to show they deal with Equipment instead of Inventory

pull/112/merge
David Cernat 8 years ago
parent c2abcd3869
commit fcd24ebb7e

@ -286,7 +286,7 @@ DedicatedPlayer *Players::newPlayer(RakNet::RakNetGUID guid)
return players[guid.g];
}
void DedicatedPlayer::updateInventory()
void DedicatedPlayer::updateEquipment()
{
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)

@ -47,7 +47,7 @@ namespace mwmp
MWWorld::ManualRef* getRef();
void move(float dt);
void updateDrawState();
void updateInventory();
void updateEquipment();
void updateCell();

@ -61,7 +61,7 @@ void LocalPlayer::update()
updateDrawStateAndFlags();
updateAttackState();
updateDeadState();
updateEquipped();
updateEquipment();
updateDynamicStats();
updateAttributes();
updateSkills();
@ -370,7 +370,7 @@ void LocalPlayer::updateChar()
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->rebuildAvatar();
}
void LocalPlayer::updateEquipped(bool forceUpdate)
void LocalPlayer::updateEquipment(bool forceUpdate)
{
MWWorld::Ptr player = getPlayerPtr();
@ -765,7 +765,7 @@ void LocalPlayer::setClass()
}
}
void LocalPlayer::setInventory()
void LocalPlayer::setEquipment()
{
MWWorld::Ptr ptrPlayer = getPlayerPtr();

@ -30,7 +30,7 @@ namespace mwmp
void updatePosition(bool forceUpdate = false);
void updateCell(bool forceUpdate = false);
void updateChar();
void updateEquipped(bool forceUpdate = false);
void updateEquipment(bool forceUpdate = false);
void updateInventory(bool forceUpdate = false);
void updateAttackState(bool forceUpdate = false);
void updateDeadState(bool forceUpdate = false);
@ -43,7 +43,7 @@ namespace mwmp
void setPosition();
void setCell();
void setClass();
void setInventory();
void setEquipment();
void sendClass();
void sendInventory();

@ -270,18 +270,18 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
{
if (packet->length == myPacket->headerSize())
{
getLocalPlayer()->updateEquipped(true);
getLocalPlayer()->updateEquipment(true);
}
else
{
myPacket->Packet(&bsIn, getLocalPlayer(), false);
getLocalPlayer()->setInventory();
getLocalPlayer()->setEquipment();
}
}
else if (pl != 0)
{
myPacket->Packet(&bsIn, pl, false);
pl->updateInventory();
pl->updateEquipment();
}
break;
}
@ -329,7 +329,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
itemPtr.getCellRef().setCharge(item.health);
printf("%s %d %d\n", item.refid.c_str(), item.count, item.health);
}
getLocalPlayer()->setInventory(); // restore equipped items
getLocalPlayer()->setEquipment(); // restore equipped items
}
}
}

Loading…
Cancel
Save