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]; return players[guid.g];
} }
void DedicatedPlayer::updateInventory() void DedicatedPlayer::updateEquipment()
{ {
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr); MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot) for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)

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

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

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

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