mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
weak_ptr removed
This commit is contained in:
@@ -166,6 +166,21 @@ CArtifactsOfHeroBase::ArtPlacePtr CArtifactsOfHeroBase::getArtPlace(const Artifa
|
||||
}
|
||||
}
|
||||
|
||||
CArtifactsOfHeroBase::ArtPlacePtr CArtifactsOfHeroBase::getArtPlace(const Point & cursorPosition)
|
||||
{
|
||||
for(const auto & [slot, artPlace] : artWorn)
|
||||
{
|
||||
if(artPlace->pos.isInside(cursorPosition))
|
||||
return artPlace;
|
||||
}
|
||||
for(const auto & artPlace : backpack)
|
||||
{
|
||||
if(artPlace->pos.isInside(cursorPosition))
|
||||
return artPlace;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CArtifactsOfHeroBase::updateWornSlots()
|
||||
{
|
||||
for(auto place : artWorn)
|
||||
|
||||
Reference in New Issue
Block a user