mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 16:11:37 -04:00
[Client] Fix declarations hiding class members
This commit is contained in:
parent
56c3ef71ae
commit
c702eab93c
@ -333,22 +333,22 @@ void DedicatedActor::playSound()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DedicatedActor::hasItem(std::string refId, int charge)
|
bool DedicatedActor::hasItem(std::string itemId, int charge)
|
||||||
{
|
{
|
||||||
for (const auto &itemPtr : ptr.getClass().getInventoryStore(ptr))
|
for (const auto &itemPtr : ptr.getClass().getInventoryStore(ptr))
|
||||||
{
|
{
|
||||||
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), refId) && itemPtr.getCellRef().getCharge() == charge)
|
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), itemId) && itemPtr.getCellRef().getCharge() == charge)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DedicatedActor::equipItem(std::string refId, int charge)
|
void DedicatedActor::equipItem(std::string itemId, int charge)
|
||||||
{
|
{
|
||||||
for (const auto &itemPtr : ptr.getClass().getInventoryStore(ptr))
|
for (const auto &itemPtr : ptr.getClass().getInventoryStore(ptr))
|
||||||
{
|
{
|
||||||
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), refId) && itemPtr.getCellRef().getCharge() == charge)
|
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), itemId) && itemPtr.getCellRef().getCharge() == charge)
|
||||||
{
|
{
|
||||||
std::shared_ptr<MWWorld::Action> action = itemPtr.getClass().use(itemPtr);
|
std::shared_ptr<MWWorld::Action> action = itemPtr.getClass().use(itemPtr);
|
||||||
action->execute(ptr);
|
action->execute(ptr);
|
||||||
|
@ -26,8 +26,8 @@ namespace mwmp
|
|||||||
void playAnimation();
|
void playAnimation();
|
||||||
void playSound();
|
void playSound();
|
||||||
|
|
||||||
bool hasItem(std::string refId, int charge);
|
bool hasItem(std::string itemId, int charge);
|
||||||
void equipItem(std::string refId, int charge);
|
void equipItem(std::string itemId, int charge);
|
||||||
|
|
||||||
MWWorld::Ptr getPtr();
|
MWWorld::Ptr getPtr();
|
||||||
void setPtr(const MWWorld::Ptr& newPtr);
|
void setPtr(const MWWorld::Ptr& newPtr);
|
||||||
|
@ -255,10 +255,10 @@ void DedicatedPlayer::setAnimFlags()
|
|||||||
ptr.getClass().getCreatureStats(ptr).getActiveSpells().purgeEffect(ESM::MagicEffect::Levitate);
|
ptr.getClass().getCreatureStats(ptr).getActiveSpells().purgeEffect(ESM::MagicEffect::Levitate);
|
||||||
else if (isFlying && !world->isFlying(ptr))
|
else if (isFlying && !world->isFlying(ptr))
|
||||||
{
|
{
|
||||||
MWMechanics::CastSpell cast(ptr, ptr);
|
MWMechanics::CastSpell levitationCast(ptr, ptr);
|
||||||
cast.mHitPosition = ptr.getRefData().getPosition().asVec3();
|
levitationCast.mHitPosition = ptr.getRefData().getPosition().asVec3();
|
||||||
cast.mAlwaysSucceed = true;
|
levitationCast.mAlwaysSucceed = true;
|
||||||
cast.cast("Levitate");
|
levitationCast.cast("Levitate");
|
||||||
}
|
}
|
||||||
|
|
||||||
MWMechanics::CreatureStats *ptrCreatureStats = &ptr.getClass().getCreatureStats(ptr);
|
MWMechanics::CreatureStats *ptrCreatureStats = &ptr.getClass().getCreatureStats(ptr);
|
||||||
|
@ -250,8 +250,8 @@ namespace mwmp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUIChat::setDelay(float delay)
|
void GUIChat::setDelay(float newDelay)
|
||||||
{
|
{
|
||||||
this->delay = delay;
|
this->delay = newDelay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ namespace mwmp
|
|||||||
|
|
||||||
void pressedChatMode(); //switch chat mode
|
void pressedChatMode(); //switch chat mode
|
||||||
void pressedSay(); // switch chat focus (if chat mode != CHAT_DISABLED)
|
void pressedSay(); // switch chat focus (if chat mode != CHAT_DISABLED)
|
||||||
void setDelay(float delay);
|
void setDelay(float newDelay);
|
||||||
|
|
||||||
void update(float dt);
|
void update(float dt);
|
||||||
|
|
||||||
|
@ -329,9 +329,9 @@ ESM::CustomMarker mwmp::GUIController::createMarker(const RakNet::RakNetGUID &gu
|
|||||||
|
|
||||||
void mwmp::GUIController::updatePlayersMarkers(MWGui::LocalMapBase *localMapBase)
|
void mwmp::GUIController::updatePlayersMarkers(MWGui::LocalMapBase *localMapBase)
|
||||||
{
|
{
|
||||||
std::vector<MyGUI::Widget*>::iterator it = localMapBase->mPlayerMarkerWidgets.begin();
|
std::vector<MyGUI::Widget*>::iterator markerWidgetIterator = localMapBase->mPlayerMarkerWidgets.begin();
|
||||||
for (; it != localMapBase->mPlayerMarkerWidgets.end(); ++it)
|
for (; markerWidgetIterator != localMapBase->mPlayerMarkerWidgets.end(); ++markerWidgetIterator)
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*markerWidgetIterator);
|
||||||
localMapBase->mPlayerMarkerWidgets.clear();
|
localMapBase->mPlayerMarkerWidgets.clear();
|
||||||
|
|
||||||
for (int dX = -localMapBase->mCellDistance; dX <= localMapBase->mCellDistance; ++dX)
|
for (int dX = -localMapBase->mCellDistance; dX <= localMapBase->mCellDistance; ++dX)
|
||||||
@ -345,9 +345,10 @@ void mwmp::GUIController::updatePlayersMarkers(MWGui::LocalMapBase *localMapBase
|
|||||||
cellId.mIndex.mY = localMapBase->mCurY+dY;
|
cellId.mIndex.mY = localMapBase->mCurY+dY;
|
||||||
|
|
||||||
PlayerMarkerCollection::RangeType markers = mPlayerMarkers.getMarkers(cellId);
|
PlayerMarkerCollection::RangeType markers = mPlayerMarkers.getMarkers(cellId);
|
||||||
for (PlayerMarkerCollection::ContainerType::const_iterator it = markers.first; it != markers.second; ++it)
|
for (PlayerMarkerCollection::ContainerType::const_iterator markerIterator = markers.first;
|
||||||
|
markerIterator != markers.second; ++markerIterator)
|
||||||
{
|
{
|
||||||
const ESM::CustomMarker &marker = it->second;
|
const ESM::CustomMarker &marker = markerIterator->second;
|
||||||
|
|
||||||
MWGui::LocalMapBase::MarkerUserData markerPos (localMapBase->mLocalMapRender);
|
MWGui::LocalMapBase::MarkerUserData markerPos (localMapBase->mLocalMapRender);
|
||||||
MyGUI::IntPoint widgetPos = localMapBase->getMarkerPosition(marker.mWorldX, marker.mWorldY, markerPos);
|
MyGUI::IntPoint widgetPos = localMapBase->getMarkerPosition(marker.mWorldX, marker.mWorldY, markerPos);
|
||||||
|
@ -1345,12 +1345,12 @@ void LocalPlayer::setSelectedSpell()
|
|||||||
int(MWMechanics::getSpellSuccessChance(selectedSpellId, ptrPlayer)));
|
int(MWMechanics::getSpellSuccessChance(selectedSpellId, ptrPlayer)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalPlayer::sendDeath(char deathState)
|
void LocalPlayer::sendDeath(char newDeathState)
|
||||||
{
|
{
|
||||||
if (MechanicsHelper::isEmptyTarget(killer))
|
if (MechanicsHelper::isEmptyTarget(killer))
|
||||||
killer = MechanicsHelper::getTarget(getPlayerPtr());
|
killer = MechanicsHelper::getTarget(getPlayerPtr());
|
||||||
|
|
||||||
this->deathState = deathState;
|
deathState = newDeathState;
|
||||||
|
|
||||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_DEATH about myself to server\n- deathState: %d", deathState);
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_DEATH about myself to server\n- deathState: %d", deathState);
|
||||||
getNetworking()->getPlayerPacket(ID_PLAYER_DEATH)->setPlayer(this);
|
getNetworking()->getPlayerPacket(ID_PLAYER_DEATH)->setPlayer(this);
|
||||||
@ -1683,7 +1683,7 @@ void LocalPlayer::clearCurrentContainer()
|
|||||||
currentContainer.mpNum = 0;
|
currentContainer.mpNum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalPlayer::storeCellState(const ESM::Cell& cell, int stateType)
|
void LocalPlayer::storeCellState(const ESM::Cell& storedCell, int stateType)
|
||||||
{
|
{
|
||||||
std::vector<CellState>::iterator iter;
|
std::vector<CellState>::iterator iter;
|
||||||
|
|
||||||
@ -1691,14 +1691,14 @@ void LocalPlayer::storeCellState(const ESM::Cell& cell, int stateType)
|
|||||||
{
|
{
|
||||||
// If there's already a cell state recorded for this particular cell,
|
// If there's already a cell state recorded for this particular cell,
|
||||||
// remove it
|
// remove it
|
||||||
if (cell.getDescription() == (*iter).cell.getDescription())
|
if (storedCell.getDescription() == (*iter).cell.getDescription())
|
||||||
iter = cellStateChanges.erase(iter);
|
iter = cellStateChanges.erase(iter);
|
||||||
else
|
else
|
||||||
++iter;
|
++iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
CellState cellState;
|
CellState cellState;
|
||||||
cellState.cell = cell;
|
cellState.cell = storedCell;
|
||||||
cellState.type = stateType;
|
cellState.type = stateType;
|
||||||
|
|
||||||
cellStateChanges.push_back(cellState);
|
cellStateChanges.push_back(cellState);
|
||||||
|
@ -75,7 +75,7 @@ namespace mwmp
|
|||||||
void setMarkLocation();
|
void setMarkLocation();
|
||||||
void setSelectedSpell();
|
void setSelectedSpell();
|
||||||
|
|
||||||
void sendDeath(char deathState);
|
void sendDeath(char newDeathState);
|
||||||
void sendClass();
|
void sendClass();
|
||||||
void sendInventory();
|
void sendInventory();
|
||||||
void sendItemChange(const mwmp::Item& item, unsigned int action);
|
void sendItemChange(const mwmp::Item& item, unsigned int action);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user